1<?php 2# Generated by the protocol buffer compiler. DO NOT EDIT! 3# source: google/protobuf/descriptor.proto 4 5namespace Google\Protobuf\Internal; 6 7use Google\Protobuf\Internal\GPBType; 8use Google\Protobuf\Internal\GPBWire; 9use Google\Protobuf\Internal\RepeatedField; 10use Google\Protobuf\Internal\InputStream; 11use Google\Protobuf\Internal\GPBUtil; 12 13/** 14 * Describes an enum type. 15 * 16 * Generated from protobuf message <code>google.protobuf.EnumDescriptorProto</code> 17 */ 18class EnumDescriptorProto extends \Google\Protobuf\Internal\Message 19{ 20 /** 21 * Generated from protobuf field <code>optional string name = 1;</code> 22 */ 23 protected $name = null; 24 /** 25 * Generated from protobuf field <code>repeated .google.protobuf.EnumValueDescriptorProto value = 2;</code> 26 */ 27 private $value; 28 /** 29 * Generated from protobuf field <code>optional .google.protobuf.EnumOptions options = 3;</code> 30 */ 31 protected $options = null; 32 /** 33 * Range of reserved numeric values. Reserved numeric values may not be used 34 * by enum values in the same enum declaration. Reserved ranges may not 35 * overlap. 36 * 37 * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;</code> 38 */ 39 private $reserved_range; 40 /** 41 * Reserved enum value names, which may not be reused. A given name may only 42 * be reserved once. 43 * 44 * Generated from protobuf field <code>repeated string reserved_name = 5;</code> 45 */ 46 private $reserved_name; 47 48 /** 49 * Constructor. 50 * 51 * @param array $data { 52 * Optional. Data for populating the Message object. 53 * 54 * @type string $name 55 * @type \Google\Protobuf\Internal\EnumValueDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $value 56 * @type \Google\Protobuf\Internal\EnumOptions $options 57 * @type \Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange[]|\Google\Protobuf\Internal\RepeatedField $reserved_range 58 * Range of reserved numeric values. Reserved numeric values may not be used 59 * by enum values in the same enum declaration. Reserved ranges may not 60 * overlap. 61 * @type string[]|\Google\Protobuf\Internal\RepeatedField $reserved_name 62 * Reserved enum value names, which may not be reused. A given name may only 63 * be reserved once. 64 * } 65 */ 66 public function __construct($data = NULL) { 67 \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce(); 68 parent::__construct($data); 69 } 70 71 /** 72 * Generated from protobuf field <code>optional string name = 1;</code> 73 * @return string 74 */ 75 public function getName() 76 { 77 return isset($this->name) ? $this->name : ''; 78 } 79 80 public function hasName() 81 { 82 return isset($this->name); 83 } 84 85 public function clearName() 86 { 87 unset($this->name); 88 } 89 90 /** 91 * Generated from protobuf field <code>optional string name = 1;</code> 92 * @param string $var 93 * @return $this 94 */ 95 public function setName($var) 96 { 97 GPBUtil::checkString($var, True); 98 $this->name = $var; 99 100 return $this; 101 } 102 103 /** 104 * Generated from protobuf field <code>repeated .google.protobuf.EnumValueDescriptorProto value = 2;</code> 105 * @return \Google\Protobuf\Internal\RepeatedField 106 */ 107 public function getValue() 108 { 109 return $this->value; 110 } 111 112 /** 113 * Generated from protobuf field <code>repeated .google.protobuf.EnumValueDescriptorProto value = 2;</code> 114 * @param \Google\Protobuf\Internal\EnumValueDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var 115 * @return $this 116 */ 117 public function setValue($var) 118 { 119 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumValueDescriptorProto::class); 120 $this->value = $arr; 121 122 return $this; 123 } 124 125 /** 126 * Generated from protobuf field <code>optional .google.protobuf.EnumOptions options = 3;</code> 127 * @return \Google\Protobuf\Internal\EnumOptions 128 */ 129 public function getOptions() 130 { 131 return isset($this->options) ? $this->options : null; 132 } 133 134 public function hasOptions() 135 { 136 return isset($this->options); 137 } 138 139 public function clearOptions() 140 { 141 unset($this->options); 142 } 143 144 /** 145 * Generated from protobuf field <code>optional .google.protobuf.EnumOptions options = 3;</code> 146 * @param \Google\Protobuf\Internal\EnumOptions $var 147 * @return $this 148 */ 149 public function setOptions($var) 150 { 151 GPBUtil::checkMessage($var, \Google\Protobuf\Internal\EnumOptions::class); 152 $this->options = $var; 153 154 return $this; 155 } 156 157 /** 158 * Range of reserved numeric values. Reserved numeric values may not be used 159 * by enum values in the same enum declaration. Reserved ranges may not 160 * overlap. 161 * 162 * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;</code> 163 * @return \Google\Protobuf\Internal\RepeatedField 164 */ 165 public function getReservedRange() 166 { 167 return $this->reserved_range; 168 } 169 170 /** 171 * Range of reserved numeric values. Reserved numeric values may not be used 172 * by enum values in the same enum declaration. Reserved ranges may not 173 * overlap. 174 * 175 * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;</code> 176 * @param \Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange[]|\Google\Protobuf\Internal\RepeatedField $var 177 * @return $this 178 */ 179 public function setReservedRange($var) 180 { 181 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange::class); 182 $this->reserved_range = $arr; 183 184 return $this; 185 } 186 187 /** 188 * Reserved enum value names, which may not be reused. A given name may only 189 * be reserved once. 190 * 191 * Generated from protobuf field <code>repeated string reserved_name = 5;</code> 192 * @return \Google\Protobuf\Internal\RepeatedField 193 */ 194 public function getReservedName() 195 { 196 return $this->reserved_name; 197 } 198 199 /** 200 * Reserved enum value names, which may not be reused. A given name may only 201 * be reserved once. 202 * 203 * Generated from protobuf field <code>repeated string reserved_name = 5;</code> 204 * @param string[]|\Google\Protobuf\Internal\RepeatedField $var 205 * @return $this 206 */ 207 public function setReservedName($var) 208 { 209 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); 210 $this->reserved_name = $arr; 211 212 return $this; 213 } 214 215} 216 217