<?php
namespace google\protobuf\compiler;

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

/**
 * Generated by the protocol buffer compiler.  DO NOT EDIT!
 * source: google/protobuf/compiler/plugin.proto
 *
 * The plugin writes an encoded CodeGeneratorResponse to stdout.
 *
 * -*- magic methods -*-
 *
 * @method string getError()
 * @method void setError(string $value)
 * @method array getFile()
 * @method void appendFile(\google\protobuf\compiler\CodeGeneratorResponse\File $value)
 */
class CodeGeneratorResponse extends \ProtocolBuffers\Message
{
  // @@protoc_insertion_point(traits:.google.protobuf.compiler.CodeGeneratorResponse)
  
  /**
   * Error message.  If non-empty, code generation failed.  The plugin process
   * should exit with status code zero even if it reports an error in this way.
   * 
   * This should be used to indicate errors in .proto files which prevent the
   * code generator from generating correct code.  Errors which indicate a
   * problem in protoc itself -- such as the input CodeGeneratorRequest being
   * unparseable -- should be reported by writing a message to stderr and
   * exiting with a non-zero status code.
   *
   * @var string $error
   * @tag 1
   * @label optional
   * @type \ProtocolBuffers::TYPE_STRING
   **/
  protected $error;
  
  /**
   * @var array $file
   * @tag 15
   * @label optional
   * @type \ProtocolBuffers::TYPE_MESSAGE
   * @see \google\protobuf\compiler\CodeGeneratorResponse\File
   **/
  protected $file;
  
  
  // @@protoc_insertion_point(properties_scope:.google.protobuf.compiler.CodeGeneratorResponse)

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

  /**
   * 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"     => "error",
        "required" => false,
        "optional" => true,
        "repeated" => false,
        "packable" => false,
        "default"  => "",
      )));
      $desc->addField(15, new \ProtocolBuffers\FieldDescriptor(array(
        "type"     => \ProtocolBuffers::TYPE_MESSAGE,
        "name"     => "file",
        "required" => false,
        "optional" => false,
        "repeated" => true,
        "packable" => false,
        "default"  => null,
        "message" => '\google\protobuf\compiler\CodeGeneratorResponse\File',
      )));
      // @@protoc_insertion_point(builder_scope:.google.protobuf.compiler.CodeGeneratorResponse)

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

}
