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 * Generated from protobuf message <code>google.protobuf.FieldOptions</code> 15 */ 16class FieldOptions extends \Google\Protobuf\Internal\Message 17{ 18 /** 19 * The ctype option instructs the C++ code generator to use a different 20 * representation of the field than it normally would. See the specific 21 * options below. This option is not yet implemented in the open source 22 * release -- sorry, we'll try to include it in a future version! 23 * 24 * Generated from protobuf field <code>optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];</code> 25 */ 26 protected $ctype = null; 27 /** 28 * The packed option can be enabled for repeated primitive fields to enable 29 * a more efficient representation on the wire. Rather than repeatedly 30 * writing the tag and type for each element, the entire array is encoded as 31 * a single length-delimited blob. In proto3, only explicit setting it to 32 * false will avoid using packed encoding. 33 * 34 * Generated from protobuf field <code>optional bool packed = 2;</code> 35 */ 36 protected $packed = null; 37 /** 38 * The jstype option determines the JavaScript type used for values of the 39 * field. The option is permitted only for 64 bit integral and fixed types 40 * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING 41 * is represented as JavaScript string, which avoids loss of precision that 42 * can happen when a large value is converted to a floating point JavaScript. 43 * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to 44 * use the JavaScript "number" type. The behavior of the default option 45 * JS_NORMAL is implementation dependent. 46 * This option is an enum to permit additional types to be added, e.g. 47 * goog.math.Integer. 48 * 49 * Generated from protobuf field <code>optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];</code> 50 */ 51 protected $jstype = null; 52 /** 53 * Should this field be parsed lazily? Lazy applies only to message-type 54 * fields. It means that when the outer message is initially parsed, the 55 * inner message's contents will not be parsed but instead stored in encoded 56 * form. The inner message will actually be parsed when it is first accessed. 57 * This is only a hint. Implementations are free to choose whether to use 58 * eager or lazy parsing regardless of the value of this option. However, 59 * setting this option true suggests that the protocol author believes that 60 * using lazy parsing on this field is worth the additional bookkeeping 61 * overhead typically needed to implement it. 62 * This option does not affect the public interface of any generated code; 63 * all method signatures remain the same. Furthermore, thread-safety of the 64 * interface is not affected by this option; const methods remain safe to 65 * call from multiple threads concurrently, while non-const methods continue 66 * to require exclusive access. 67 * Note that implementations may choose not to check required fields within 68 * a lazy sub-message. That is, calling IsInitialized() on the outer message 69 * may return true even if the inner message has missing required fields. 70 * This is necessary because otherwise the inner message would have to be 71 * parsed in order to perform the check, defeating the purpose of lazy 72 * parsing. An implementation which chooses not to check required fields 73 * must be consistent about it. That is, for any particular sub-message, the 74 * implementation must either *always* check its required fields, or *never* 75 * check its required fields, regardless of whether or not the message has 76 * been parsed. 77 * 78 * Generated from protobuf field <code>optional bool lazy = 5 [default = false];</code> 79 */ 80 protected $lazy = null; 81 /** 82 * Is this field deprecated? 83 * Depending on the target platform, this can emit Deprecated annotations 84 * for accessors, or it will be completely ignored; in the very least, this 85 * is a formalization for deprecating fields. 86 * 87 * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code> 88 */ 89 protected $deprecated = null; 90 /** 91 * For Google-internal migration only. Do not use. 92 * 93 * Generated from protobuf field <code>optional bool weak = 10 [default = false];</code> 94 */ 95 protected $weak = null; 96 /** 97 * The parser stores options it doesn't recognize here. See above. 98 * 99 * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code> 100 */ 101 private $uninterpreted_option; 102 103 /** 104 * Constructor. 105 * 106 * @param array $data { 107 * Optional. Data for populating the Message object. 108 * 109 * @type int $ctype 110 * The ctype option instructs the C++ code generator to use a different 111 * representation of the field than it normally would. See the specific 112 * options below. This option is not yet implemented in the open source 113 * release -- sorry, we'll try to include it in a future version! 114 * @type bool $packed 115 * The packed option can be enabled for repeated primitive fields to enable 116 * a more efficient representation on the wire. Rather than repeatedly 117 * writing the tag and type for each element, the entire array is encoded as 118 * a single length-delimited blob. In proto3, only explicit setting it to 119 * false will avoid using packed encoding. 120 * @type int $jstype 121 * The jstype option determines the JavaScript type used for values of the 122 * field. The option is permitted only for 64 bit integral and fixed types 123 * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING 124 * is represented as JavaScript string, which avoids loss of precision that 125 * can happen when a large value is converted to a floating point JavaScript. 126 * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to 127 * use the JavaScript "number" type. The behavior of the default option 128 * JS_NORMAL is implementation dependent. 129 * This option is an enum to permit additional types to be added, e.g. 130 * goog.math.Integer. 131 * @type bool $lazy 132 * Should this field be parsed lazily? Lazy applies only to message-type 133 * fields. It means that when the outer message is initially parsed, the 134 * inner message's contents will not be parsed but instead stored in encoded 135 * form. The inner message will actually be parsed when it is first accessed. 136 * This is only a hint. Implementations are free to choose whether to use 137 * eager or lazy parsing regardless of the value of this option. However, 138 * setting this option true suggests that the protocol author believes that 139 * using lazy parsing on this field is worth the additional bookkeeping 140 * overhead typically needed to implement it. 141 * This option does not affect the public interface of any generated code; 142 * all method signatures remain the same. Furthermore, thread-safety of the 143 * interface is not affected by this option; const methods remain safe to 144 * call from multiple threads concurrently, while non-const methods continue 145 * to require exclusive access. 146 * Note that implementations may choose not to check required fields within 147 * a lazy sub-message. That is, calling IsInitialized() on the outer message 148 * may return true even if the inner message has missing required fields. 149 * This is necessary because otherwise the inner message would have to be 150 * parsed in order to perform the check, defeating the purpose of lazy 151 * parsing. An implementation which chooses not to check required fields 152 * must be consistent about it. That is, for any particular sub-message, the 153 * implementation must either *always* check its required fields, or *never* 154 * check its required fields, regardless of whether or not the message has 155 * been parsed. 156 * @type bool $deprecated 157 * Is this field deprecated? 158 * Depending on the target platform, this can emit Deprecated annotations 159 * for accessors, or it will be completely ignored; in the very least, this 160 * is a formalization for deprecating fields. 161 * @type bool $weak 162 * For Google-internal migration only. Do not use. 163 * @type \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option 164 * The parser stores options it doesn't recognize here. See above. 165 * } 166 */ 167 public function __construct($data = NULL) { 168 \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce(); 169 parent::__construct($data); 170 } 171 172 /** 173 * The ctype option instructs the C++ code generator to use a different 174 * representation of the field than it normally would. See the specific 175 * options below. This option is not yet implemented in the open source 176 * release -- sorry, we'll try to include it in a future version! 177 * 178 * Generated from protobuf field <code>optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];</code> 179 * @return int 180 */ 181 public function getCtype() 182 { 183 return isset($this->ctype) ? $this->ctype : 0; 184 } 185 186 public function hasCtype() 187 { 188 return isset($this->ctype); 189 } 190 191 public function clearCtype() 192 { 193 unset($this->ctype); 194 } 195 196 /** 197 * The ctype option instructs the C++ code generator to use a different 198 * representation of the field than it normally would. See the specific 199 * options below. This option is not yet implemented in the open source 200 * release -- sorry, we'll try to include it in a future version! 201 * 202 * Generated from protobuf field <code>optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];</code> 203 * @param int $var 204 * @return $this 205 */ 206 public function setCtype($var) 207 { 208 GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FieldOptions\CType::class); 209 $this->ctype = $var; 210 211 return $this; 212 } 213 214 /** 215 * The packed option can be enabled for repeated primitive fields to enable 216 * a more efficient representation on the wire. Rather than repeatedly 217 * writing the tag and type for each element, the entire array is encoded as 218 * a single length-delimited blob. In proto3, only explicit setting it to 219 * false will avoid using packed encoding. 220 * 221 * Generated from protobuf field <code>optional bool packed = 2;</code> 222 * @return bool 223 */ 224 public function getPacked() 225 { 226 return isset($this->packed) ? $this->packed : false; 227 } 228 229 public function hasPacked() 230 { 231 return isset($this->packed); 232 } 233 234 public function clearPacked() 235 { 236 unset($this->packed); 237 } 238 239 /** 240 * The packed option can be enabled for repeated primitive fields to enable 241 * a more efficient representation on the wire. Rather than repeatedly 242 * writing the tag and type for each element, the entire array is encoded as 243 * a single length-delimited blob. In proto3, only explicit setting it to 244 * false will avoid using packed encoding. 245 * 246 * Generated from protobuf field <code>optional bool packed = 2;</code> 247 * @param bool $var 248 * @return $this 249 */ 250 public function setPacked($var) 251 { 252 GPBUtil::checkBool($var); 253 $this->packed = $var; 254 255 return $this; 256 } 257 258 /** 259 * The jstype option determines the JavaScript type used for values of the 260 * field. The option is permitted only for 64 bit integral and fixed types 261 * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING 262 * is represented as JavaScript string, which avoids loss of precision that 263 * can happen when a large value is converted to a floating point JavaScript. 264 * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to 265 * use the JavaScript "number" type. The behavior of the default option 266 * JS_NORMAL is implementation dependent. 267 * This option is an enum to permit additional types to be added, e.g. 268 * goog.math.Integer. 269 * 270 * Generated from protobuf field <code>optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];</code> 271 * @return int 272 */ 273 public function getJstype() 274 { 275 return isset($this->jstype) ? $this->jstype : 0; 276 } 277 278 public function hasJstype() 279 { 280 return isset($this->jstype); 281 } 282 283 public function clearJstype() 284 { 285 unset($this->jstype); 286 } 287 288 /** 289 * The jstype option determines the JavaScript type used for values of the 290 * field. The option is permitted only for 64 bit integral and fixed types 291 * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING 292 * is represented as JavaScript string, which avoids loss of precision that 293 * can happen when a large value is converted to a floating point JavaScript. 294 * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to 295 * use the JavaScript "number" type. The behavior of the default option 296 * JS_NORMAL is implementation dependent. 297 * This option is an enum to permit additional types to be added, e.g. 298 * goog.math.Integer. 299 * 300 * Generated from protobuf field <code>optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];</code> 301 * @param int $var 302 * @return $this 303 */ 304 public function setJstype($var) 305 { 306 GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FieldOptions\JSType::class); 307 $this->jstype = $var; 308 309 return $this; 310 } 311 312 /** 313 * Should this field be parsed lazily? Lazy applies only to message-type 314 * fields. It means that when the outer message is initially parsed, the 315 * inner message's contents will not be parsed but instead stored in encoded 316 * form. The inner message will actually be parsed when it is first accessed. 317 * This is only a hint. Implementations are free to choose whether to use 318 * eager or lazy parsing regardless of the value of this option. However, 319 * setting this option true suggests that the protocol author believes that 320 * using lazy parsing on this field is worth the additional bookkeeping 321 * overhead typically needed to implement it. 322 * This option does not affect the public interface of any generated code; 323 * all method signatures remain the same. Furthermore, thread-safety of the 324 * interface is not affected by this option; const methods remain safe to 325 * call from multiple threads concurrently, while non-const methods continue 326 * to require exclusive access. 327 * Note that implementations may choose not to check required fields within 328 * a lazy sub-message. That is, calling IsInitialized() on the outer message 329 * may return true even if the inner message has missing required fields. 330 * This is necessary because otherwise the inner message would have to be 331 * parsed in order to perform the check, defeating the purpose of lazy 332 * parsing. An implementation which chooses not to check required fields 333 * must be consistent about it. That is, for any particular sub-message, the 334 * implementation must either *always* check its required fields, or *never* 335 * check its required fields, regardless of whether or not the message has 336 * been parsed. 337 * 338 * Generated from protobuf field <code>optional bool lazy = 5 [default = false];</code> 339 * @return bool 340 */ 341 public function getLazy() 342 { 343 return isset($this->lazy) ? $this->lazy : false; 344 } 345 346 public function hasLazy() 347 { 348 return isset($this->lazy); 349 } 350 351 public function clearLazy() 352 { 353 unset($this->lazy); 354 } 355 356 /** 357 * Should this field be parsed lazily? Lazy applies only to message-type 358 * fields. It means that when the outer message is initially parsed, the 359 * inner message's contents will not be parsed but instead stored in encoded 360 * form. The inner message will actually be parsed when it is first accessed. 361 * This is only a hint. Implementations are free to choose whether to use 362 * eager or lazy parsing regardless of the value of this option. However, 363 * setting this option true suggests that the protocol author believes that 364 * using lazy parsing on this field is worth the additional bookkeeping 365 * overhead typically needed to implement it. 366 * This option does not affect the public interface of any generated code; 367 * all method signatures remain the same. Furthermore, thread-safety of the 368 * interface is not affected by this option; const methods remain safe to 369 * call from multiple threads concurrently, while non-const methods continue 370 * to require exclusive access. 371 * Note that implementations may choose not to check required fields within 372 * a lazy sub-message. That is, calling IsInitialized() on the outer message 373 * may return true even if the inner message has missing required fields. 374 * This is necessary because otherwise the inner message would have to be 375 * parsed in order to perform the check, defeating the purpose of lazy 376 * parsing. An implementation which chooses not to check required fields 377 * must be consistent about it. That is, for any particular sub-message, the 378 * implementation must either *always* check its required fields, or *never* 379 * check its required fields, regardless of whether or not the message has 380 * been parsed. 381 * 382 * Generated from protobuf field <code>optional bool lazy = 5 [default = false];</code> 383 * @param bool $var 384 * @return $this 385 */ 386 public function setLazy($var) 387 { 388 GPBUtil::checkBool($var); 389 $this->lazy = $var; 390 391 return $this; 392 } 393 394 /** 395 * Is this field deprecated? 396 * Depending on the target platform, this can emit Deprecated annotations 397 * for accessors, or it will be completely ignored; in the very least, this 398 * is a formalization for deprecating fields. 399 * 400 * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code> 401 * @return bool 402 */ 403 public function getDeprecated() 404 { 405 return isset($this->deprecated) ? $this->deprecated : false; 406 } 407 408 public function hasDeprecated() 409 { 410 return isset($this->deprecated); 411 } 412 413 public function clearDeprecated() 414 { 415 unset($this->deprecated); 416 } 417 418 /** 419 * Is this field deprecated? 420 * Depending on the target platform, this can emit Deprecated annotations 421 * for accessors, or it will be completely ignored; in the very least, this 422 * is a formalization for deprecating fields. 423 * 424 * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code> 425 * @param bool $var 426 * @return $this 427 */ 428 public function setDeprecated($var) 429 { 430 GPBUtil::checkBool($var); 431 $this->deprecated = $var; 432 433 return $this; 434 } 435 436 /** 437 * For Google-internal migration only. Do not use. 438 * 439 * Generated from protobuf field <code>optional bool weak = 10 [default = false];</code> 440 * @return bool 441 */ 442 public function getWeak() 443 { 444 return isset($this->weak) ? $this->weak : false; 445 } 446 447 public function hasWeak() 448 { 449 return isset($this->weak); 450 } 451 452 public function clearWeak() 453 { 454 unset($this->weak); 455 } 456 457 /** 458 * For Google-internal migration only. Do not use. 459 * 460 * Generated from protobuf field <code>optional bool weak = 10 [default = false];</code> 461 * @param bool $var 462 * @return $this 463 */ 464 public function setWeak($var) 465 { 466 GPBUtil::checkBool($var); 467 $this->weak = $var; 468 469 return $this; 470 } 471 472 /** 473 * The parser stores options it doesn't recognize here. See above. 474 * 475 * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code> 476 * @return \Google\Protobuf\Internal\RepeatedField 477 */ 478 public function getUninterpretedOption() 479 { 480 return $this->uninterpreted_option; 481 } 482 483 /** 484 * The parser stores options it doesn't recognize here. See above. 485 * 486 * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code> 487 * @param \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $var 488 * @return $this 489 */ 490 public function setUninterpretedOption($var) 491 { 492 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class); 493 $this->uninterpreted_option = $arr; 494 495 return $this; 496 } 497 498} 499 500