// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/protobuf/plugin.proto
unit plugin_pb;

interface

uses
  descriptor_pb,
  protobuf;
type

  PCodeGeneratorRequest = ^TCodeGeneratorRequest;
  TRepeatedCodeGeneratorRequest = {specialize} TRepeated<PCodeGeneratorRequest>;
  PCodeGeneratorResponse = ^TCodeGeneratorResponse;
  TRepeatedCodeGeneratorResponse = {specialize} TRepeated<PCodeGeneratorResponse>;

  TCodeGeneratorRequest = object(TProtoMessageObject)
  public type
  
  
  
  private
      Ffile_to_generate: TRepeatedAnsiString;
      FparameterHas: Boolean;
      Fparameter: AnsiString;
      Fproto_file: TRepeatedFileDescriptorProto;
  
  public
    procedure Serialize(Func: TSerializeFunc); virtual;
    procedure Parse(Func: TParseFunc); virtual;
      procedure Setparameter(const _parameter: AnsiString);
      function  Getparameter: AnsiString;
      property parameter: AnsiString read Getparameter write Setparameter;
  end;
  
  TCodeGeneratorResponse = object(TProtoMessageObject)
  public type
  
    P_File = ^T_File;
    TRepeated_File = {specialize} TRepeated<P_File>;
  
    T_File = object(TProtoMessageObject)
    public type
    
    
    
    private
        FnameHas: Boolean;
        Fname: AnsiString;
        Finsertion_pointHas: Boolean;
        Finsertion_point: AnsiString;
        FcontentHas: Boolean;
        Fcontent: AnsiString;
    
    public
      procedure Serialize(Func: TSerializeFunc); virtual;
      procedure Parse(Func: TParseFunc); virtual;
        procedure Setname(const _name: AnsiString);
        function  Getname: AnsiString;
        procedure Setinsertion_point(const _insertion_point: AnsiString);
        function  Getinsertion_point: AnsiString;
        procedure Setcontent(const _content: AnsiString);
        function  Getcontent: AnsiString;
        property name: AnsiString read Getname write Setname;
        property insertion_point: AnsiString read Getinsertion_point write Setinsertion_point;
        property content: AnsiString read Getcontent write Setcontent;
    end;
    
  
  private
      FerrorHas: Boolean;
      Ferror: AnsiString;
      Ffile: TRepeated_File;
  
  public
    procedure Serialize(Func: TSerializeFunc); virtual;
    procedure Parse(Func: TParseFunc); virtual;
      procedure Seterror(const _error: AnsiString);
      function  Geterror: AnsiString;
      property error: AnsiString read Geterror write Seterror;
  end;
  


implementation
    procedure TCodeGeneratorRequest.Setparameter(const _parameter: AnsiString);
    begin
      Fparameter := _parameter;
      FparameterHas := True;
    end;
    
    function  TCodeGeneratorRequest.Getparameter: AnsiString;
    begin
      // TODO: maybe checking for Has here?
      Result := Fparameter;
    end;
  
  procedure TCodeGeneratorRequest.Serialize(Func: TSerializeFunc);
  begin
      if FparameterHas then TProtobuf.Serializestring(Func, 18, (Fparameter));
  end;
  
  procedure TCodeGeneratorRequest.Parse(Func: TParseFunc);
  begin
      {2:} TProtobuf.Parsestring(Func, (Fparameter));
  end;
    procedure TCodeGeneratorResponse.Seterror(const _error: AnsiString);
    begin
      Ferror := _error;
      FerrorHas := True;
    end;
    
    function  TCodeGeneratorResponse.Geterror: AnsiString;
    begin
      // TODO: maybe checking for Has here?
      Result := Ferror;
    end;
      procedure TCodeGeneratorResponse.T_File.Setname(const _name: AnsiString);
      begin
        Fname := _name;
        FnameHas := True;
      end;
      
      function  TCodeGeneratorResponse.T_File.Getname: AnsiString;
      begin
        // TODO: maybe checking for Has here?
        Result := Fname;
      end;
      procedure TCodeGeneratorResponse.T_File.Setinsertion_point(const _insertion_point: AnsiString);
      begin
        Finsertion_point := _insertion_point;
        Finsertion_pointHas := True;
      end;
      
      function  TCodeGeneratorResponse.T_File.Getinsertion_point: AnsiString;
      begin
        // TODO: maybe checking for Has here?
        Result := Finsertion_point;
      end;
      procedure TCodeGeneratorResponse.T_File.Setcontent(const _content: AnsiString);
      begin
        Fcontent := _content;
        FcontentHas := True;
      end;
      
      function  TCodeGeneratorResponse.T_File.Getcontent: AnsiString;
      begin
        // TODO: maybe checking for Has here?
        Result := Fcontent;
      end;
    
    procedure TCodeGeneratorResponse.T_File.Serialize(Func: TSerializeFunc);
    begin
        if FnameHas then TProtobuf.Serializestring(Func, 10, (Fname));
        if Finsertion_pointHas then TProtobuf.Serializestring(Func, 18, (Finsertion_point));
        if FcontentHas then TProtobuf.Serializestring(Func, 122, (Fcontent));
    end;
    
    procedure TCodeGeneratorResponse.T_File.Parse(Func: TParseFunc);
    begin
        {1:} TProtobuf.Parsestring(Func, (Fname));
        {2:} TProtobuf.Parsestring(Func, (Finsertion_point));
        {15:} TProtobuf.Parsestring(Func, (Fcontent));
    end;
  
  procedure TCodeGeneratorResponse.Serialize(Func: TSerializeFunc);
  begin
      if FerrorHas then TProtobuf.Serializestring(Func, 10, (Ferror));
  end;
  
  procedure TCodeGeneratorResponse.Parse(Func: TParseFunc);
  begin
      {1:} TProtobuf.Parsestring(Func, (Ferror));
  end;

end.
