Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 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 | /** |
Brent Shaffer | 12acbc2 | 2017-06-27 16:28:28 -0700 | [diff] [blame^] | 15 | * Generated from protobuf message <code>google.protobuf.MessageOptions</code> |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 16 | */ |
| 17 | class MessageOptions extends \Google\Protobuf\Internal\Message |
| 18 | { |
| 19 | /** |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 20 | * Set true to use the old proto1 MessageSet wire format for extensions. |
| 21 | * This is provided for backwards-compatibility with the MessageSet wire |
| 22 | * format. You should not use this for any other reason: It's less |
| 23 | * efficient, has fewer features, and is more complicated. |
| 24 | * The message must be defined exactly as follows: |
| 25 | * message Foo { |
| 26 | * option message_set_wire_format = true; |
| 27 | * extensions 4 to max; |
| 28 | * } |
| 29 | * Note that the message cannot have any defined fields; MessageSets only |
| 30 | * have extensions. |
| 31 | * All extensions of your type must be singular messages; e.g. they cannot |
| 32 | * be int32s, enums, or repeated messages. |
| 33 | * Because this is an option, the above two restrictions are not enforced by |
| 34 | * the protocol compiler. |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 35 | * |
Brent Shaffer | 12acbc2 | 2017-06-27 16:28:28 -0700 | [diff] [blame^] | 36 | * Generated from protobuf field <code>optional bool message_set_wire_format = 1 [default = false];</code> |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 37 | */ |
| 38 | private $message_set_wire_format = false; |
| 39 | private $has_message_set_wire_format = false; |
| 40 | /** |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 41 | * Disables the generation of the standard "descriptor()" accessor, which can |
| 42 | * conflict with a field of the same name. This is meant to make migration |
| 43 | * from proto1 easier; new code should avoid fields named "descriptor". |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 44 | * |
Brent Shaffer | 12acbc2 | 2017-06-27 16:28:28 -0700 | [diff] [blame^] | 45 | * Generated from protobuf field <code>optional bool no_standard_descriptor_accessor = 2 [default = false];</code> |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 46 | */ |
| 47 | private $no_standard_descriptor_accessor = false; |
| 48 | private $has_no_standard_descriptor_accessor = false; |
| 49 | /** |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 50 | * Is this message deprecated? |
| 51 | * Depending on the target platform, this can emit Deprecated annotations |
| 52 | * for the message, or it will be completely ignored; in the very least, |
| 53 | * this is a formalization for deprecating messages. |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 54 | * |
Brent Shaffer | 12acbc2 | 2017-06-27 16:28:28 -0700 | [diff] [blame^] | 55 | * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code> |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 56 | */ |
| 57 | private $deprecated = false; |
| 58 | private $has_deprecated = false; |
| 59 | /** |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 60 | * Whether the message is an automatically generated map entry type for the |
| 61 | * maps field. |
| 62 | * For maps fields: |
Brent Shaffer | 12acbc2 | 2017-06-27 16:28:28 -0700 | [diff] [blame^] | 63 | * map<KeyType, ValueType> map_field = 1; |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 64 | * The parsed descriptor looks like: |
| 65 | * message MapFieldEntry { |
| 66 | * option map_entry = true; |
| 67 | * optional KeyType key = 1; |
| 68 | * optional ValueType value = 2; |
| 69 | * } |
| 70 | * repeated MapFieldEntry map_field = 1; |
| 71 | * Implementations may choose not to generate the map_entry=true message, but |
| 72 | * use a native map in the target language to hold the keys and values. |
| 73 | * The reflection APIs in such implementions still need to work as |
| 74 | * if the field is a repeated message field. |
| 75 | * NOTE: Do not set the option in .proto files. Always use the maps syntax |
| 76 | * instead. The option should only be implicitly set by the proto compiler |
| 77 | * parser. |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 78 | * |
Brent Shaffer | 12acbc2 | 2017-06-27 16:28:28 -0700 | [diff] [blame^] | 79 | * Generated from protobuf field <code>optional bool map_entry = 7;</code> |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 80 | */ |
| 81 | private $map_entry = false; |
| 82 | private $has_map_entry = false; |
| 83 | /** |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 84 | * The parser stores options it doesn't recognize here. See above. |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 85 | * |
Brent Shaffer | 12acbc2 | 2017-06-27 16:28:28 -0700 | [diff] [blame^] | 86 | * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code> |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 87 | */ |
| 88 | private $uninterpreted_option; |
| 89 | private $has_uninterpreted_option = false; |
| 90 | |
| 91 | public function __construct() { |
| 92 | \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce(); |
| 93 | parent::__construct(); |
| 94 | } |
| 95 | |
| 96 | /** |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 97 | * Set true to use the old proto1 MessageSet wire format for extensions. |
| 98 | * This is provided for backwards-compatibility with the MessageSet wire |
| 99 | * format. You should not use this for any other reason: It's less |
| 100 | * efficient, has fewer features, and is more complicated. |
| 101 | * The message must be defined exactly as follows: |
| 102 | * message Foo { |
| 103 | * option message_set_wire_format = true; |
| 104 | * extensions 4 to max; |
| 105 | * } |
| 106 | * Note that the message cannot have any defined fields; MessageSets only |
| 107 | * have extensions. |
| 108 | * All extensions of your type must be singular messages; e.g. they cannot |
| 109 | * be int32s, enums, or repeated messages. |
| 110 | * Because this is an option, the above two restrictions are not enforced by |
| 111 | * the protocol compiler. |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 112 | * |
Brent Shaffer | 12acbc2 | 2017-06-27 16:28:28 -0700 | [diff] [blame^] | 113 | * Generated from protobuf field <code>optional bool message_set_wire_format = 1 [default = false];</code> |
| 114 | * @return bool |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 115 | */ |
| 116 | public function getMessageSetWireFormat() |
| 117 | { |
| 118 | return $this->message_set_wire_format; |
| 119 | } |
| 120 | |
| 121 | /** |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 122 | * Set true to use the old proto1 MessageSet wire format for extensions. |
| 123 | * This is provided for backwards-compatibility with the MessageSet wire |
| 124 | * format. You should not use this for any other reason: It's less |
| 125 | * efficient, has fewer features, and is more complicated. |
| 126 | * The message must be defined exactly as follows: |
| 127 | * message Foo { |
| 128 | * option message_set_wire_format = true; |
| 129 | * extensions 4 to max; |
| 130 | * } |
| 131 | * Note that the message cannot have any defined fields; MessageSets only |
| 132 | * have extensions. |
| 133 | * All extensions of your type must be singular messages; e.g. they cannot |
| 134 | * be int32s, enums, or repeated messages. |
| 135 | * Because this is an option, the above two restrictions are not enforced by |
| 136 | * the protocol compiler. |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 137 | * |
Brent Shaffer | 12acbc2 | 2017-06-27 16:28:28 -0700 | [diff] [blame^] | 138 | * Generated from protobuf field <code>optional bool message_set_wire_format = 1 [default = false];</code> |
| 139 | * @param bool $var |
| 140 | * @return $this |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 141 | */ |
| 142 | public function setMessageSetWireFormat($var) |
| 143 | { |
| 144 | GPBUtil::checkBool($var); |
| 145 | $this->message_set_wire_format = $var; |
| 146 | $this->has_message_set_wire_format = true; |
Paul Yang | 6f32580 | 2017-06-05 00:10:18 -0700 | [diff] [blame] | 147 | |
| 148 | return $this; |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 149 | } |
| 150 | |
| 151 | public function hasMessageSetWireFormat() |
| 152 | { |
| 153 | return $this->has_message_set_wire_format; |
| 154 | } |
| 155 | |
| 156 | /** |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 157 | * Disables the generation of the standard "descriptor()" accessor, which can |
| 158 | * conflict with a field of the same name. This is meant to make migration |
| 159 | * from proto1 easier; new code should avoid fields named "descriptor". |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 160 | * |
Brent Shaffer | 12acbc2 | 2017-06-27 16:28:28 -0700 | [diff] [blame^] | 161 | * Generated from protobuf field <code>optional bool no_standard_descriptor_accessor = 2 [default = false];</code> |
| 162 | * @return bool |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 163 | */ |
| 164 | public function getNoStandardDescriptorAccessor() |
| 165 | { |
| 166 | return $this->no_standard_descriptor_accessor; |
| 167 | } |
| 168 | |
| 169 | /** |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 170 | * Disables the generation of the standard "descriptor()" accessor, which can |
| 171 | * conflict with a field of the same name. This is meant to make migration |
| 172 | * from proto1 easier; new code should avoid fields named "descriptor". |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 173 | * |
Brent Shaffer | 12acbc2 | 2017-06-27 16:28:28 -0700 | [diff] [blame^] | 174 | * Generated from protobuf field <code>optional bool no_standard_descriptor_accessor = 2 [default = false];</code> |
| 175 | * @param bool $var |
| 176 | * @return $this |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 177 | */ |
| 178 | public function setNoStandardDescriptorAccessor($var) |
| 179 | { |
| 180 | GPBUtil::checkBool($var); |
| 181 | $this->no_standard_descriptor_accessor = $var; |
| 182 | $this->has_no_standard_descriptor_accessor = true; |
Paul Yang | 6f32580 | 2017-06-05 00:10:18 -0700 | [diff] [blame] | 183 | |
| 184 | return $this; |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 185 | } |
| 186 | |
| 187 | public function hasNoStandardDescriptorAccessor() |
| 188 | { |
| 189 | return $this->has_no_standard_descriptor_accessor; |
| 190 | } |
| 191 | |
| 192 | /** |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 193 | * Is this message deprecated? |
| 194 | * Depending on the target platform, this can emit Deprecated annotations |
| 195 | * for the message, or it will be completely ignored; in the very least, |
| 196 | * this is a formalization for deprecating messages. |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 197 | * |
Brent Shaffer | 12acbc2 | 2017-06-27 16:28:28 -0700 | [diff] [blame^] | 198 | * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code> |
| 199 | * @return bool |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 200 | */ |
| 201 | public function getDeprecated() |
| 202 | { |
| 203 | return $this->deprecated; |
| 204 | } |
| 205 | |
| 206 | /** |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 207 | * Is this message deprecated? |
| 208 | * Depending on the target platform, this can emit Deprecated annotations |
| 209 | * for the message, or it will be completely ignored; in the very least, |
| 210 | * this is a formalization for deprecating messages. |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 211 | * |
Brent Shaffer | 12acbc2 | 2017-06-27 16:28:28 -0700 | [diff] [blame^] | 212 | * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code> |
| 213 | * @param bool $var |
| 214 | * @return $this |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 215 | */ |
| 216 | public function setDeprecated($var) |
| 217 | { |
| 218 | GPBUtil::checkBool($var); |
| 219 | $this->deprecated = $var; |
| 220 | $this->has_deprecated = true; |
Paul Yang | 6f32580 | 2017-06-05 00:10:18 -0700 | [diff] [blame] | 221 | |
| 222 | return $this; |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 223 | } |
| 224 | |
| 225 | public function hasDeprecated() |
| 226 | { |
| 227 | return $this->has_deprecated; |
| 228 | } |
| 229 | |
| 230 | /** |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 231 | * Whether the message is an automatically generated map entry type for the |
| 232 | * maps field. |
| 233 | * For maps fields: |
Brent Shaffer | 12acbc2 | 2017-06-27 16:28:28 -0700 | [diff] [blame^] | 234 | * map<KeyType, ValueType> map_field = 1; |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 235 | * The parsed descriptor looks like: |
| 236 | * message MapFieldEntry { |
| 237 | * option map_entry = true; |
| 238 | * optional KeyType key = 1; |
| 239 | * optional ValueType value = 2; |
| 240 | * } |
| 241 | * repeated MapFieldEntry map_field = 1; |
| 242 | * Implementations may choose not to generate the map_entry=true message, but |
| 243 | * use a native map in the target language to hold the keys and values. |
| 244 | * The reflection APIs in such implementions still need to work as |
| 245 | * if the field is a repeated message field. |
| 246 | * NOTE: Do not set the option in .proto files. Always use the maps syntax |
| 247 | * instead. The option should only be implicitly set by the proto compiler |
| 248 | * parser. |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 249 | * |
Brent Shaffer | 12acbc2 | 2017-06-27 16:28:28 -0700 | [diff] [blame^] | 250 | * Generated from protobuf field <code>optional bool map_entry = 7;</code> |
| 251 | * @return bool |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 252 | */ |
| 253 | public function getMapEntry() |
| 254 | { |
| 255 | return $this->map_entry; |
| 256 | } |
| 257 | |
| 258 | /** |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 259 | * Whether the message is an automatically generated map entry type for the |
| 260 | * maps field. |
| 261 | * For maps fields: |
Brent Shaffer | 12acbc2 | 2017-06-27 16:28:28 -0700 | [diff] [blame^] | 262 | * map<KeyType, ValueType> map_field = 1; |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 263 | * The parsed descriptor looks like: |
| 264 | * message MapFieldEntry { |
| 265 | * option map_entry = true; |
| 266 | * optional KeyType key = 1; |
| 267 | * optional ValueType value = 2; |
| 268 | * } |
| 269 | * repeated MapFieldEntry map_field = 1; |
| 270 | * Implementations may choose not to generate the map_entry=true message, but |
| 271 | * use a native map in the target language to hold the keys and values. |
| 272 | * The reflection APIs in such implementions still need to work as |
| 273 | * if the field is a repeated message field. |
| 274 | * NOTE: Do not set the option in .proto files. Always use the maps syntax |
| 275 | * instead. The option should only be implicitly set by the proto compiler |
| 276 | * parser. |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 277 | * |
Brent Shaffer | 12acbc2 | 2017-06-27 16:28:28 -0700 | [diff] [blame^] | 278 | * Generated from protobuf field <code>optional bool map_entry = 7;</code> |
| 279 | * @param bool $var |
| 280 | * @return $this |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 281 | */ |
| 282 | public function setMapEntry($var) |
| 283 | { |
| 284 | GPBUtil::checkBool($var); |
| 285 | $this->map_entry = $var; |
| 286 | $this->has_map_entry = true; |
Paul Yang | 6f32580 | 2017-06-05 00:10:18 -0700 | [diff] [blame] | 287 | |
| 288 | return $this; |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 289 | } |
| 290 | |
| 291 | public function hasMapEntry() |
| 292 | { |
| 293 | return $this->has_map_entry; |
| 294 | } |
| 295 | |
| 296 | /** |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 297 | * The parser stores options it doesn't recognize here. See above. |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 298 | * |
Brent Shaffer | 12acbc2 | 2017-06-27 16:28:28 -0700 | [diff] [blame^] | 299 | * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code> |
| 300 | * @return \Google\Protobuf\Internal\RepeatedField |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 301 | */ |
| 302 | public function getUninterpretedOption() |
| 303 | { |
| 304 | return $this->uninterpreted_option; |
| 305 | } |
| 306 | |
| 307 | /** |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 308 | * The parser stores options it doesn't recognize here. See above. |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 309 | * |
Brent Shaffer | 12acbc2 | 2017-06-27 16:28:28 -0700 | [diff] [blame^] | 310 | * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code> |
| 311 | * @param \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $var |
| 312 | * @return $this |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 313 | */ |
| 314 | public function setUninterpretedOption(&$var) |
| 315 | { |
Paul Yang | 6b27c1f | 2017-03-17 11:08:06 -0700 | [diff] [blame] | 316 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class); |
| 317 | $this->uninterpreted_option = $arr; |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 318 | $this->has_uninterpreted_option = true; |
Paul Yang | 6f32580 | 2017-06-05 00:10:18 -0700 | [diff] [blame] | 319 | |
| 320 | return $this; |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 321 | } |
| 322 | |
| 323 | public function hasUninterpretedOption() |
| 324 | { |
| 325 | return $this->has_uninterpreted_option; |
| 326 | } |
| 327 | |
| 328 | } |
| 329 | |