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