OLD | NEW |
(Empty) | |
| 1 <?php |
| 2 # Generated by the protocol buffer compiler. DO NOT EDIT! |
| 3 # source: google/protobuf/descriptor.proto |
| 4 |
| 5 namespace Google\Protobuf\Internal; |
| 6 |
| 7 use Google\Protobuf\Internal\GPBType; |
| 8 use Google\Protobuf\Internal\GPBWire; |
| 9 use Google\Protobuf\Internal\RepeatedField; |
| 10 use Google\Protobuf\Internal\InputStream; |
| 11 |
| 12 use Google\Protobuf\Internal\GPBUtil; |
| 13 |
| 14 /** |
| 15 * <pre> |
| 16 * Describes an enum type. |
| 17 * </pre> |
| 18 * |
| 19 * Protobuf type <code>google.protobuf.EnumDescriptorProto</code> |
| 20 */ |
| 21 class EnumDescriptorProto extends \Google\Protobuf\Internal\Message |
| 22 { |
| 23 /** |
| 24 * <code>optional string name = 1;</code> |
| 25 */ |
| 26 private $name = ''; |
| 27 private $has_name = false; |
| 28 /** |
| 29 * <code>repeated .google.protobuf.EnumValueDescriptorProto value = 2;</code
> |
| 30 */ |
| 31 private $value; |
| 32 private $has_value = false; |
| 33 /** |
| 34 * <code>optional .google.protobuf.EnumOptions options = 3;</code> |
| 35 */ |
| 36 private $options = null; |
| 37 private $has_options = false; |
| 38 |
| 39 public function __construct() { |
| 40 \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce(); |
| 41 parent::__construct(); |
| 42 } |
| 43 |
| 44 /** |
| 45 * <code>optional string name = 1;</code> |
| 46 */ |
| 47 public function getName() |
| 48 { |
| 49 return $this->name; |
| 50 } |
| 51 |
| 52 /** |
| 53 * <code>optional string name = 1;</code> |
| 54 */ |
| 55 public function setName($var) |
| 56 { |
| 57 GPBUtil::checkString($var, True); |
| 58 $this->name = $var; |
| 59 $this->has_name = true; |
| 60 } |
| 61 |
| 62 public function hasName() |
| 63 { |
| 64 return $this->has_name; |
| 65 } |
| 66 |
| 67 /** |
| 68 * <code>repeated .google.protobuf.EnumValueDescriptorProto value = 2;</code
> |
| 69 */ |
| 70 public function getValue() |
| 71 { |
| 72 return $this->value; |
| 73 } |
| 74 |
| 75 /** |
| 76 * <code>repeated .google.protobuf.EnumValueDescriptorProto value = 2;</code
> |
| 77 */ |
| 78 public function setValue(&$var) |
| 79 { |
| 80 GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MES
SAGE, \Google\Protobuf\Internal\EnumValueDescriptorProto::class); |
| 81 $this->value = $var; |
| 82 $this->has_value = true; |
| 83 } |
| 84 |
| 85 public function hasValue() |
| 86 { |
| 87 return $this->has_value; |
| 88 } |
| 89 |
| 90 /** |
| 91 * <code>optional .google.protobuf.EnumOptions options = 3;</code> |
| 92 */ |
| 93 public function getOptions() |
| 94 { |
| 95 return $this->options; |
| 96 } |
| 97 |
| 98 /** |
| 99 * <code>optional .google.protobuf.EnumOptions options = 3;</code> |
| 100 */ |
| 101 public function setOptions(&$var) |
| 102 { |
| 103 GPBUtil::checkMessage($var, \Google\Protobuf\Internal\EnumOptions::class
); |
| 104 $this->options = $var; |
| 105 $this->has_options = true; |
| 106 } |
| 107 |
| 108 public function hasOptions() |
| 109 { |
| 110 return $this->has_options; |
| 111 } |
| 112 |
| 113 } |
| 114 |
OLD | NEW |