<?php
namespace google\protobuf\FieldDescriptorProto;

// @@protoc_insertion_point(namespace:.google.protobuf.FieldDescriptorProto.Type)

/**
 * Generated by the protocol buffer compiler.  DO NOT EDIT!
 * source: google/protobuf/descriptor.proto
 *
 */
class Type extends \ProtocolBuffers\Enum
{
  // @@protoc_insertion_point(traits:.google.protobuf.FieldDescriptorProto.Type)
  
  /**
   * 0 is reserved for errors.
   * Order is weird for historical reasons.
   */
  const TYPE_DOUBLE = 1;
  const TYPE_FLOAT = 2;
  /**
   * Not ZigZag encoded.  Negative numbers take 10 bytes.  Use TYPE_SINT64 if
   * negative values are likely.
   */
  const TYPE_INT64 = 3;
  const TYPE_UINT64 = 4;
  /**
   * Not ZigZag encoded.  Negative numbers take 10 bytes.  Use TYPE_SINT32 if
   * negative values are likely.
   */
  const TYPE_INT32 = 5;
  const TYPE_FIXED64 = 6;
  const TYPE_FIXED32 = 7;
  const TYPE_BOOL = 8;
  const TYPE_STRING = 9;
  const TYPE_GROUP = 10;
  const TYPE_MESSAGE = 11;
  /**
   * New in version 2.
   */
  const TYPE_BYTES = 12;
  const TYPE_UINT32 = 13;
  const TYPE_ENUM = 14;
  const TYPE_SFIXED32 = 15;
  const TYPE_SFIXED64 = 16;
  const TYPE_SINT32 = 17;
  const TYPE_SINT64 = 18;
  
  // @@protoc_insertion_point(const_scope:.google.protobuf.FieldDescriptorProto.Type)
  
  public static function isMessage(\google\protobuf\FieldDescriptorProto $field)
  {
    return self::TYPE_MESSAGE == $field->getType();
  }
  
  public static function isEnum(\google\protobuf\FieldDescriptorProto $field)
  {
    return self::TYPE_ENUM == $field->getType();
  }
  
  // @@protoc_insertion_point(class_scope:.google.protobuf.FieldDescriptorProto.Type)
  
  /**
   * @return \ProtocolBuffers\EnumDescriptor
   */
  public static function getEnumDescriptor()
  {
    static $descriptor;
    if (!$descriptor) {
      $builder = new \ProtocolBuffers\EnumDescriptorBuilder();
      $builder->addValue(new \ProtocolBuffers\EnumValueDescriptor(array(
        "value" => self::TYPE_DOUBLE,
        "name"  => 'TYPE_DOUBLE',
      )));
      $builder->addValue(new \ProtocolBuffers\EnumValueDescriptor(array(
        "value" => self::TYPE_FLOAT,
        "name"  => 'TYPE_FLOAT',
      )));
      $builder->addValue(new \ProtocolBuffers\EnumValueDescriptor(array(
        "value" => self::TYPE_INT64,
        "name"  => 'TYPE_INT64',
      )));
      $builder->addValue(new \ProtocolBuffers\EnumValueDescriptor(array(
        "value" => self::TYPE_UINT64,
        "name"  => 'TYPE_UINT64',
      )));
      $builder->addValue(new \ProtocolBuffers\EnumValueDescriptor(array(
        "value" => self::TYPE_INT32,
        "name"  => 'TYPE_INT32',
      )));
      $builder->addValue(new \ProtocolBuffers\EnumValueDescriptor(array(
        "value" => self::TYPE_FIXED64,
        "name"  => 'TYPE_FIXED64',
      )));
      $builder->addValue(new \ProtocolBuffers\EnumValueDescriptor(array(
        "value" => self::TYPE_FIXED32,
        "name"  => 'TYPE_FIXED32',
      )));
      $builder->addValue(new \ProtocolBuffers\EnumValueDescriptor(array(
        "value" => self::TYPE_BOOL,
        "name"  => 'TYPE_BOOL',
      )));
      $builder->addValue(new \ProtocolBuffers\EnumValueDescriptor(array(
        "value" => self::TYPE_STRING,
        "name"  => 'TYPE_STRING',
      )));
      $builder->addValue(new \ProtocolBuffers\EnumValueDescriptor(array(
        "value" => self::TYPE_GROUP,
        "name"  => 'TYPE_GROUP',
      )));
      $builder->addValue(new \ProtocolBuffers\EnumValueDescriptor(array(
        "value" => self::TYPE_MESSAGE,
        "name"  => 'TYPE_MESSAGE',
      )));
      $builder->addValue(new \ProtocolBuffers\EnumValueDescriptor(array(
        "value" => self::TYPE_BYTES,
        "name"  => 'TYPE_BYTES',
      )));
      $builder->addValue(new \ProtocolBuffers\EnumValueDescriptor(array(
        "value" => self::TYPE_UINT32,
        "name"  => 'TYPE_UINT32',
      )));
      $builder->addValue(new \ProtocolBuffers\EnumValueDescriptor(array(
        "value" => self::TYPE_ENUM,
        "name"  => 'TYPE_ENUM',
      )));
      $builder->addValue(new \ProtocolBuffers\EnumValueDescriptor(array(
        "value" => self::TYPE_SFIXED32,
        "name"  => 'TYPE_SFIXED32',
      )));
      $builder->addValue(new \ProtocolBuffers\EnumValueDescriptor(array(
        "value" => self::TYPE_SFIXED64,
        "name"  => 'TYPE_SFIXED64',
      )));
      $builder->addValue(new \ProtocolBuffers\EnumValueDescriptor(array(
        "value" => self::TYPE_SINT32,
        "name"  => 'TYPE_SINT32',
      )));
      $builder->addValue(new \ProtocolBuffers\EnumValueDescriptor(array(
        "value" => self::TYPE_SINT64,
        "name"  => 'TYPE_SINT64',
      )));
      // @@protoc_insertion_point(builder_scope:.google.protobuf.FieldDescriptorProto.Type)
      $descriptor = $builder->build();
    }
    return $descriptor;
  }
}
