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.MessageOptions</code> 15 */ 16class MessageOptions extends \Google\Protobuf\Internal\Message 17{ 18 /** 19 * Set true to use the old proto1 MessageSet wire format for extensions. 20 * This is provided for backwards-compatibility with the MessageSet wire 21 * format. You should not use this for any other reason: It's less 22 * efficient, has fewer features, and is more complicated. 23 * The message must be defined exactly as follows: 24 * message Foo { 25 * option message_set_wire_format = true; 26 * extensions 4 to max; 27 * } 28 * Note that the message cannot have any defined fields; MessageSets only 29 * have extensions. 30 * All extensions of your type must be singular messages; e.g. they cannot 31 * be int32s, enums, or repeated messages. 32 * Because this is an option, the above two restrictions are not enforced by 33 * the protocol compiler. 34 * 35 * Generated from protobuf field <code>optional bool message_set_wire_format = 1 [default = false];</code> 36 */ 37 protected $message_set_wire_format = null; 38 /** 39 * Disables the generation of the standard "descriptor()" accessor, which can 40 * conflict with a field of the same name. This is meant to make migration 41 * from proto1 easier; new code should avoid fields named "descriptor". 42 * 43 * Generated from protobuf field <code>optional bool no_standard_descriptor_accessor = 2 [default = false];</code> 44 */ 45 protected $no_standard_descriptor_accessor = null; 46 /** 47 * Is this message deprecated? 48 * Depending on the target platform, this can emit Deprecated annotations 49 * for the message, or it will be completely ignored; in the very least, 50 * this is a formalization for deprecating messages. 51 * 52 * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code> 53 */ 54 protected $deprecated = null; 55 /** 56 * NOTE: Do not set the option in .proto files. Always use the maps syntax 57 * instead. The option should only be implicitly set by the proto compiler 58 * parser. 59 * Whether the message is an automatically generated map entry type for the 60 * maps field. 61 * For maps fields: 62 * map<KeyType, ValueType> map_field = 1; 63 * The parsed descriptor looks like: 64 * message MapFieldEntry { 65 * option map_entry = true; 66 * optional KeyType key = 1; 67 * optional ValueType value = 2; 68 * } 69 * repeated MapFieldEntry map_field = 1; 70 * Implementations may choose not to generate the map_entry=true message, but 71 * use a native map in the target language to hold the keys and values. 72 * The reflection APIs in such implementations still need to work as 73 * if the field is a repeated message field. 74 * 75 * Generated from protobuf field <code>optional bool map_entry = 7;</code> 76 */ 77 protected $map_entry = null; 78 /** 79 * Enable the legacy handling of JSON field name conflicts. This lowercases 80 * and strips underscored from the fields before comparison in proto3 only. 81 * The new behavior takes `json_name` into account and applies to proto2 as 82 * well. 83 * This should only be used as a temporary measure against broken builds due 84 * to the change in behavior for JSON field name conflicts. 85 * TODO This is legacy behavior we plan to remove once downstream 86 * teams have had time to migrate. 87 * 88 * Generated from protobuf field <code>optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true];</code> 89 * @deprecated 90 */ 91 protected $deprecated_legacy_json_field_conflicts = null; 92 /** 93 * The parser stores options it doesn't recognize here. See above. 94 * 95 * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code> 96 */ 97 private $uninterpreted_option; 98 99 /** 100 * Constructor. 101 * 102 * @param array $data { 103 * Optional. Data for populating the Message object. 104 * 105 * @type bool $message_set_wire_format 106 * Set true to use the old proto1 MessageSet wire format for extensions. 107 * This is provided for backwards-compatibility with the MessageSet wire 108 * format. You should not use this for any other reason: It's less 109 * efficient, has fewer features, and is more complicated. 110 * The message must be defined exactly as follows: 111 * message Foo { 112 * option message_set_wire_format = true; 113 * extensions 4 to max; 114 * } 115 * Note that the message cannot have any defined fields; MessageSets only 116 * have extensions. 117 * All extensions of your type must be singular messages; e.g. they cannot 118 * be int32s, enums, or repeated messages. 119 * Because this is an option, the above two restrictions are not enforced by 120 * the protocol compiler. 121 * @type bool $no_standard_descriptor_accessor 122 * Disables the generation of the standard "descriptor()" accessor, which can 123 * conflict with a field of the same name. This is meant to make migration 124 * from proto1 easier; new code should avoid fields named "descriptor". 125 * @type bool $deprecated 126 * Is this message deprecated? 127 * Depending on the target platform, this can emit Deprecated annotations 128 * for the message, or it will be completely ignored; in the very least, 129 * this is a formalization for deprecating messages. 130 * @type bool $map_entry 131 * NOTE: Do not set the option in .proto files. Always use the maps syntax 132 * instead. The option should only be implicitly set by the proto compiler 133 * parser. 134 * Whether the message is an automatically generated map entry type for the 135 * maps field. 136 * For maps fields: 137 * map<KeyType, ValueType> map_field = 1; 138 * The parsed descriptor looks like: 139 * message MapFieldEntry { 140 * option map_entry = true; 141 * optional KeyType key = 1; 142 * optional ValueType value = 2; 143 * } 144 * repeated MapFieldEntry map_field = 1; 145 * Implementations may choose not to generate the map_entry=true message, but 146 * use a native map in the target language to hold the keys and values. 147 * The reflection APIs in such implementations still need to work as 148 * if the field is a repeated message field. 149 * @type bool $deprecated_legacy_json_field_conflicts 150 * Enable the legacy handling of JSON field name conflicts. This lowercases 151 * and strips underscored from the fields before comparison in proto3 only. 152 * The new behavior takes `json_name` into account and applies to proto2 as 153 * well. 154 * This should only be used as a temporary measure against broken builds due 155 * to the change in behavior for JSON field name conflicts. 156 * TODO This is legacy behavior we plan to remove once downstream 157 * teams have had time to migrate. 158 * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option 159 * The parser stores options it doesn't recognize here. See above. 160 * } 161 */ 162 public function __construct($data = NULL) { 163 \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce(); 164 parent::__construct($data); 165 } 166 167 /** 168 * Set true to use the old proto1 MessageSet wire format for extensions. 169 * This is provided for backwards-compatibility with the MessageSet wire 170 * format. You should not use this for any other reason: It's less 171 * efficient, has fewer features, and is more complicated. 172 * The message must be defined exactly as follows: 173 * message Foo { 174 * option message_set_wire_format = true; 175 * extensions 4 to max; 176 * } 177 * Note that the message cannot have any defined fields; MessageSets only 178 * have extensions. 179 * All extensions of your type must be singular messages; e.g. they cannot 180 * be int32s, enums, or repeated messages. 181 * Because this is an option, the above two restrictions are not enforced by 182 * the protocol compiler. 183 * 184 * Generated from protobuf field <code>optional bool message_set_wire_format = 1 [default = false];</code> 185 * @return bool 186 */ 187 public function getMessageSetWireFormat() 188 { 189 return isset($this->message_set_wire_format) ? $this->message_set_wire_format : false; 190 } 191 192 public function hasMessageSetWireFormat() 193 { 194 return isset($this->message_set_wire_format); 195 } 196 197 public function clearMessageSetWireFormat() 198 { 199 unset($this->message_set_wire_format); 200 } 201 202 /** 203 * Set true to use the old proto1 MessageSet wire format for extensions. 204 * This is provided for backwards-compatibility with the MessageSet wire 205 * format. You should not use this for any other reason: It's less 206 * efficient, has fewer features, and is more complicated. 207 * The message must be defined exactly as follows: 208 * message Foo { 209 * option message_set_wire_format = true; 210 * extensions 4 to max; 211 * } 212 * Note that the message cannot have any defined fields; MessageSets only 213 * have extensions. 214 * All extensions of your type must be singular messages; e.g. they cannot 215 * be int32s, enums, or repeated messages. 216 * Because this is an option, the above two restrictions are not enforced by 217 * the protocol compiler. 218 * 219 * Generated from protobuf field <code>optional bool message_set_wire_format = 1 [default = false];</code> 220 * @param bool $var 221 * @return $this 222 */ 223 public function setMessageSetWireFormat($var) 224 { 225 GPBUtil::checkBool($var); 226 $this->message_set_wire_format = $var; 227 228 return $this; 229 } 230 231 /** 232 * Disables the generation of the standard "descriptor()" accessor, which can 233 * conflict with a field of the same name. This is meant to make migration 234 * from proto1 easier; new code should avoid fields named "descriptor". 235 * 236 * Generated from protobuf field <code>optional bool no_standard_descriptor_accessor = 2 [default = false];</code> 237 * @return bool 238 */ 239 public function getNoStandardDescriptorAccessor() 240 { 241 return isset($this->no_standard_descriptor_accessor) ? $this->no_standard_descriptor_accessor : false; 242 } 243 244 public function hasNoStandardDescriptorAccessor() 245 { 246 return isset($this->no_standard_descriptor_accessor); 247 } 248 249 public function clearNoStandardDescriptorAccessor() 250 { 251 unset($this->no_standard_descriptor_accessor); 252 } 253 254 /** 255 * Disables the generation of the standard "descriptor()" accessor, which can 256 * conflict with a field of the same name. This is meant to make migration 257 * from proto1 easier; new code should avoid fields named "descriptor". 258 * 259 * Generated from protobuf field <code>optional bool no_standard_descriptor_accessor = 2 [default = false];</code> 260 * @param bool $var 261 * @return $this 262 */ 263 public function setNoStandardDescriptorAccessor($var) 264 { 265 GPBUtil::checkBool($var); 266 $this->no_standard_descriptor_accessor = $var; 267 268 return $this; 269 } 270 271 /** 272 * Is this message deprecated? 273 * Depending on the target platform, this can emit Deprecated annotations 274 * for the message, or it will be completely ignored; in the very least, 275 * this is a formalization for deprecating messages. 276 * 277 * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code> 278 * @return bool 279 */ 280 public function getDeprecated() 281 { 282 return isset($this->deprecated) ? $this->deprecated : false; 283 } 284 285 public function hasDeprecated() 286 { 287 return isset($this->deprecated); 288 } 289 290 public function clearDeprecated() 291 { 292 unset($this->deprecated); 293 } 294 295 /** 296 * Is this message deprecated? 297 * Depending on the target platform, this can emit Deprecated annotations 298 * for the message, or it will be completely ignored; in the very least, 299 * this is a formalization for deprecating messages. 300 * 301 * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code> 302 * @param bool $var 303 * @return $this 304 */ 305 public function setDeprecated($var) 306 { 307 GPBUtil::checkBool($var); 308 $this->deprecated = $var; 309 310 return $this; 311 } 312 313 /** 314 * NOTE: Do not set the option in .proto files. Always use the maps syntax 315 * instead. The option should only be implicitly set by the proto compiler 316 * parser. 317 * Whether the message is an automatically generated map entry type for the 318 * maps field. 319 * For maps fields: 320 * map<KeyType, ValueType> map_field = 1; 321 * The parsed descriptor looks like: 322 * message MapFieldEntry { 323 * option map_entry = true; 324 * optional KeyType key = 1; 325 * optional ValueType value = 2; 326 * } 327 * repeated MapFieldEntry map_field = 1; 328 * Implementations may choose not to generate the map_entry=true message, but 329 * use a native map in the target language to hold the keys and values. 330 * The reflection APIs in such implementations still need to work as 331 * if the field is a repeated message field. 332 * 333 * Generated from protobuf field <code>optional bool map_entry = 7;</code> 334 * @return bool 335 */ 336 public function getMapEntry() 337 { 338 return isset($this->map_entry) ? $this->map_entry : false; 339 } 340 341 public function hasMapEntry() 342 { 343 return isset($this->map_entry); 344 } 345 346 public function clearMapEntry() 347 { 348 unset($this->map_entry); 349 } 350 351 /** 352 * NOTE: Do not set the option in .proto files. Always use the maps syntax 353 * instead. The option should only be implicitly set by the proto compiler 354 * parser. 355 * Whether the message is an automatically generated map entry type for the 356 * maps field. 357 * For maps fields: 358 * map<KeyType, ValueType> map_field = 1; 359 * The parsed descriptor looks like: 360 * message MapFieldEntry { 361 * option map_entry = true; 362 * optional KeyType key = 1; 363 * optional ValueType value = 2; 364 * } 365 * repeated MapFieldEntry map_field = 1; 366 * Implementations may choose not to generate the map_entry=true message, but 367 * use a native map in the target language to hold the keys and values. 368 * The reflection APIs in such implementations still need to work as 369 * if the field is a repeated message field. 370 * 371 * Generated from protobuf field <code>optional bool map_entry = 7;</code> 372 * @param bool $var 373 * @return $this 374 */ 375 public function setMapEntry($var) 376 { 377 GPBUtil::checkBool($var); 378 $this->map_entry = $var; 379 380 return $this; 381 } 382 383 /** 384 * Enable the legacy handling of JSON field name conflicts. This lowercases 385 * and strips underscored from the fields before comparison in proto3 only. 386 * The new behavior takes `json_name` into account and applies to proto2 as 387 * well. 388 * This should only be used as a temporary measure against broken builds due 389 * to the change in behavior for JSON field name conflicts. 390 * TODO This is legacy behavior we plan to remove once downstream 391 * teams have had time to migrate. 392 * 393 * Generated from protobuf field <code>optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true];</code> 394 * @return bool 395 * @deprecated 396 */ 397 public function getDeprecatedLegacyJsonFieldConflicts() 398 { 399 @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED); 400 return isset($this->deprecated_legacy_json_field_conflicts) ? $this->deprecated_legacy_json_field_conflicts : false; 401 } 402 403 public function hasDeprecatedLegacyJsonFieldConflicts() 404 { 405 @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED); 406 return isset($this->deprecated_legacy_json_field_conflicts); 407 } 408 409 public function clearDeprecatedLegacyJsonFieldConflicts() 410 { 411 @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED); 412 unset($this->deprecated_legacy_json_field_conflicts); 413 } 414 415 /** 416 * Enable the legacy handling of JSON field name conflicts. This lowercases 417 * and strips underscored from the fields before comparison in proto3 only. 418 * The new behavior takes `json_name` into account and applies to proto2 as 419 * well. 420 * This should only be used as a temporary measure against broken builds due 421 * to the change in behavior for JSON field name conflicts. 422 * TODO This is legacy behavior we plan to remove once downstream 423 * teams have had time to migrate. 424 * 425 * Generated from protobuf field <code>optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true];</code> 426 * @param bool $var 427 * @return $this 428 * @deprecated 429 */ 430 public function setDeprecatedLegacyJsonFieldConflicts($var) 431 { 432 @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED); 433 GPBUtil::checkBool($var); 434 $this->deprecated_legacy_json_field_conflicts = $var; 435 436 return $this; 437 } 438 439 /** 440 * The parser stores options it doesn't recognize here. See above. 441 * 442 * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code> 443 * @return \Google\Protobuf\Internal\RepeatedField 444 */ 445 public function getUninterpretedOption() 446 { 447 return $this->uninterpreted_option; 448 } 449 450 /** 451 * The parser stores options it doesn't recognize here. See above. 452 * 453 * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code> 454 * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var 455 * @return $this 456 */ 457 public function setUninterpretedOption($var) 458 { 459 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class); 460 $this->uninterpreted_option = $arr; 461 462 return $this; 463 } 464 465} 466 467