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