<?php
namespace google\protobuf\compiler;

// @@protoc_insertion_point(namespace:.google.protobuf.compiler.CodeGeneratorRequest)

/**
 * Generated by the protocol buffer compiler.  DO NOT EDIT!
 * source: google/protobuf/compiler/plugin.proto
 *
 * An encoded CodeGeneratorRequest is written to the plugin's stdin.
 *
 * -*- magic methods -*-
 *
 * @method array getFileToGenerate()
 * @method void appendFileToGenerate(string $value)
 * @method string getParameter()
 * @method void setParameter(string $value)
 * @method array getProtoFile()
 * @method void appendProtoFile(\google\protobuf\FileDescriptorProto $value)
 */
class CodeGeneratorRequest extends \ProtocolBuffers\Message
{
  // @@protoc_insertion_point(traits:.google.protobuf.compiler.CodeGeneratorRequest)
  
  /**
   * The .proto files that were explicitly listed on the command-line.  The
   * code generator should generate code only for these files.  Each file's
   * descriptor will be included in proto_file, below.
   *
   * @var array $file_to_generate
   * @tag 1
   * @label optional
   * @type \ProtocolBuffers::TYPE_STRING
   **/
  protected $file_to_generate;
  
  /**
   * The generator parameter passed on the command-line.
   *
   * @var string $parameter
   * @tag 2
   * @label optional
   * @type \ProtocolBuffers::TYPE_STRING
   **/
  protected $parameter;
  
  /**
   * FileDescriptorProtos for all files in files_to_generate and everything
   * they import.  The files will appear in topological order, so each file
   * appears before any file that imports it.
   * 
   * protoc guarantees that all proto_files will be written after
   * the fields above, even though this is not technically guaranteed by the
   * protobuf wire format.  This theoretically could allow a plugin to stream
   * in the FileDescriptorProtos and handle them one by one rather than read
   * the entire set into memory at once.  However, as of this writing, this
   * is not similarly optimized on protoc's end -- it will store all fields in
   * memory at once before sending them to the plugin.
   *
   * @var array $proto_file
   * @tag 15
   * @label optional
   * @type \ProtocolBuffers::TYPE_MESSAGE
   * @see \google\protobuf\FileDescriptorProto
   **/
  protected $proto_file;
  
  
  // @@protoc_insertion_point(properties_scope:.google.protobuf.compiler.CodeGeneratorRequest)

  // @@protoc_insertion_point(class_scope:.google.protobuf.compiler.CodeGeneratorRequest)

  /**
   * get descriptor for protocol buffers
   * 
   * @return \ProtocolBuffersDescriptor
   */
  public static function getDescriptor()
  {
    static $descriptor;
    
    if (!isset($descriptor)) {
      $desc = new \ProtocolBuffers\DescriptorBuilder();
      $desc->addField(1, new \ProtocolBuffers\FieldDescriptor(array(
        "type"     => \ProtocolBuffers::TYPE_STRING,
        "name"     => "file_to_generate",
        "required" => false,
        "optional" => false,
        "repeated" => true,
        "packable" => false,
        "default"  => "",
      )));
      $desc->addField(2, new \ProtocolBuffers\FieldDescriptor(array(
        "type"     => \ProtocolBuffers::TYPE_STRING,
        "name"     => "parameter",
        "required" => false,
        "optional" => true,
        "repeated" => false,
        "packable" => false,
        "default"  => "",
      )));
      $desc->addField(15, new \ProtocolBuffers\FieldDescriptor(array(
        "type"     => \ProtocolBuffers::TYPE_MESSAGE,
        "name"     => "proto_file",
        "required" => false,
        "optional" => false,
        "repeated" => true,
        "packable" => false,
        "default"  => null,
        "message" => '\google\protobuf\FileDescriptorProto',
      )));
      // @@protoc_insertion_point(builder_scope:.google.protobuf.compiler.CodeGeneratorRequest)

      $descriptor = $desc->build();
    }
    return $descriptor;
  }

}
