blob: bf490de686ac204c9de0b948c3f6553cbdfd752c [file] [log] [blame]
Paul Yang46ae90d2016-12-08 11:16:49 -08001<?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;
Paul Yang46ae90d2016-12-08 11:16:49 -080011use Google\Protobuf\Internal\GPBUtil;
12
13/**
Brent Shaffer12acbc22017-06-27 16:28:28 -070014 * Generated from protobuf message <code>google.protobuf.MessageOptions</code>
Paul Yang46ae90d2016-12-08 11:16:49 -080015 */
16class MessageOptions extends \Google\Protobuf\Internal\Message
17{
18 /**
Paul Yang46ae90d2016-12-08 11:16:49 -080019 * 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.
Paul Yang46ae90d2016-12-08 11:16:49 -080034 *
Brent Shaffer12acbc22017-06-27 16:28:28 -070035 * Generated from protobuf field <code>optional bool message_set_wire_format = 1 [default = false];</code>
Paul Yang46ae90d2016-12-08 11:16:49 -080036 */
37 private $message_set_wire_format = false;
38 private $has_message_set_wire_format = false;
39 /**
Paul Yang46ae90d2016-12-08 11:16:49 -080040 * Disables the generation of the standard "descriptor()" accessor, which can
41 * conflict with a field of the same name. This is meant to make migration
42 * from proto1 easier; new code should avoid fields named "descriptor".
Paul Yang46ae90d2016-12-08 11:16:49 -080043 *
Brent Shaffer12acbc22017-06-27 16:28:28 -070044 * Generated from protobuf field <code>optional bool no_standard_descriptor_accessor = 2 [default = false];</code>
Paul Yang46ae90d2016-12-08 11:16:49 -080045 */
46 private $no_standard_descriptor_accessor = false;
47 private $has_no_standard_descriptor_accessor = false;
48 /**
Paul Yang46ae90d2016-12-08 11:16:49 -080049 * Is this message deprecated?
50 * Depending on the target platform, this can emit Deprecated annotations
51 * for the message, or it will be completely ignored; in the very least,
52 * this is a formalization for deprecating messages.
Paul Yang46ae90d2016-12-08 11:16:49 -080053 *
Brent Shaffer12acbc22017-06-27 16:28:28 -070054 * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
Paul Yang46ae90d2016-12-08 11:16:49 -080055 */
56 private $deprecated = false;
57 private $has_deprecated = false;
58 /**
Paul Yang46ae90d2016-12-08 11:16:49 -080059 * Whether the message is an automatically generated map entry type for the
60 * maps field.
61 * For maps fields:
Brent Shaffer12acbc22017-06-27 16:28:28 -070062 * map<KeyType, ValueType> map_field = 1;
Paul Yang46ae90d2016-12-08 11:16:49 -080063 * 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 implementions still need to work as
73 * if the field is a repeated message field.
74 * NOTE: Do not set the option in .proto files. Always use the maps syntax
75 * instead. The option should only be implicitly set by the proto compiler
76 * parser.
Paul Yang46ae90d2016-12-08 11:16:49 -080077 *
Brent Shaffer12acbc22017-06-27 16:28:28 -070078 * Generated from protobuf field <code>optional bool map_entry = 7;</code>
Paul Yang46ae90d2016-12-08 11:16:49 -080079 */
80 private $map_entry = false;
81 private $has_map_entry = false;
82 /**
Paul Yang46ae90d2016-12-08 11:16:49 -080083 * The parser stores options it doesn't recognize here. See above.
Paul Yang46ae90d2016-12-08 11:16:49 -080084 *
Brent Shaffer12acbc22017-06-27 16:28:28 -070085 * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
Paul Yang46ae90d2016-12-08 11:16:49 -080086 */
87 private $uninterpreted_option;
88 private $has_uninterpreted_option = false;
89
Brent Shafferf1911f32018-05-02 14:40:15 -070090 /**
91 * Constructor.
92 *
93 * @param array $data {
94 * Optional. Data for populating the Message object.
95 *
96 * @type bool $message_set_wire_format
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.
112 * @type bool $no_standard_descriptor_accessor
113 * Disables the generation of the standard "descriptor()" accessor, which can
114 * conflict with a field of the same name. This is meant to make migration
115 * from proto1 easier; new code should avoid fields named "descriptor".
116 * @type bool $deprecated
117 * Is this message deprecated?
118 * Depending on the target platform, this can emit Deprecated annotations
119 * for the message, or it will be completely ignored; in the very least,
120 * this is a formalization for deprecating messages.
121 * @type bool $map_entry
122 * Whether the message is an automatically generated map entry type for the
123 * maps field.
124 * For maps fields:
125 * map<KeyType, ValueType> map_field = 1;
126 * The parsed descriptor looks like:
127 * message MapFieldEntry {
128 * option map_entry = true;
129 * optional KeyType key = 1;
130 * optional ValueType value = 2;
131 * }
132 * repeated MapFieldEntry map_field = 1;
133 * Implementations may choose not to generate the map_entry=true message, but
134 * use a native map in the target language to hold the keys and values.
135 * The reflection APIs in such implementions still need to work as
136 * if the field is a repeated message field.
137 * NOTE: Do not set the option in .proto files. Always use the maps syntax
138 * instead. The option should only be implicitly set by the proto compiler
139 * parser.
140 * @type \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
141 * The parser stores options it doesn't recognize here. See above.
142 * }
143 */
144 public function __construct($data = NULL) {
Paul Yang46ae90d2016-12-08 11:16:49 -0800145 \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
Brent Shafferf1911f32018-05-02 14:40:15 -0700146 parent::__construct($data);
Paul Yang46ae90d2016-12-08 11:16:49 -0800147 }
148
149 /**
Paul Yang46ae90d2016-12-08 11:16:49 -0800150 * Set true to use the old proto1 MessageSet wire format for extensions.
151 * This is provided for backwards-compatibility with the MessageSet wire
152 * format. You should not use this for any other reason: It's less
153 * efficient, has fewer features, and is more complicated.
154 * The message must be defined exactly as follows:
155 * message Foo {
156 * option message_set_wire_format = true;
157 * extensions 4 to max;
158 * }
159 * Note that the message cannot have any defined fields; MessageSets only
160 * have extensions.
161 * All extensions of your type must be singular messages; e.g. they cannot
162 * be int32s, enums, or repeated messages.
163 * Because this is an option, the above two restrictions are not enforced by
164 * the protocol compiler.
Paul Yang46ae90d2016-12-08 11:16:49 -0800165 *
Brent Shaffer12acbc22017-06-27 16:28:28 -0700166 * Generated from protobuf field <code>optional bool message_set_wire_format = 1 [default = false];</code>
167 * @return bool
Paul Yang46ae90d2016-12-08 11:16:49 -0800168 */
169 public function getMessageSetWireFormat()
170 {
171 return $this->message_set_wire_format;
172 }
173
174 /**
Paul Yang46ae90d2016-12-08 11:16:49 -0800175 * Set true to use the old proto1 MessageSet wire format for extensions.
176 * This is provided for backwards-compatibility with the MessageSet wire
177 * format. You should not use this for any other reason: It's less
178 * efficient, has fewer features, and is more complicated.
179 * The message must be defined exactly as follows:
180 * message Foo {
181 * option message_set_wire_format = true;
182 * extensions 4 to max;
183 * }
184 * Note that the message cannot have any defined fields; MessageSets only
185 * have extensions.
186 * All extensions of your type must be singular messages; e.g. they cannot
187 * be int32s, enums, or repeated messages.
188 * Because this is an option, the above two restrictions are not enforced by
189 * the protocol compiler.
Paul Yang46ae90d2016-12-08 11:16:49 -0800190 *
Brent Shaffer12acbc22017-06-27 16:28:28 -0700191 * Generated from protobuf field <code>optional bool message_set_wire_format = 1 [default = false];</code>
192 * @param bool $var
193 * @return $this
Paul Yang46ae90d2016-12-08 11:16:49 -0800194 */
195 public function setMessageSetWireFormat($var)
196 {
197 GPBUtil::checkBool($var);
198 $this->message_set_wire_format = $var;
199 $this->has_message_set_wire_format = true;
Paul Yang6f325802017-06-05 00:10:18 -0700200
201 return $this;
Paul Yang46ae90d2016-12-08 11:16:49 -0800202 }
203
204 public function hasMessageSetWireFormat()
205 {
206 return $this->has_message_set_wire_format;
207 }
208
209 /**
Paul Yang46ae90d2016-12-08 11:16:49 -0800210 * Disables the generation of the standard "descriptor()" accessor, which can
211 * conflict with a field of the same name. This is meant to make migration
212 * from proto1 easier; new code should avoid fields named "descriptor".
Paul Yang46ae90d2016-12-08 11:16:49 -0800213 *
Brent Shaffer12acbc22017-06-27 16:28:28 -0700214 * Generated from protobuf field <code>optional bool no_standard_descriptor_accessor = 2 [default = false];</code>
215 * @return bool
Paul Yang46ae90d2016-12-08 11:16:49 -0800216 */
217 public function getNoStandardDescriptorAccessor()
218 {
219 return $this->no_standard_descriptor_accessor;
220 }
221
222 /**
Paul Yang46ae90d2016-12-08 11:16:49 -0800223 * Disables the generation of the standard "descriptor()" accessor, which can
224 * conflict with a field of the same name. This is meant to make migration
225 * from proto1 easier; new code should avoid fields named "descriptor".
Paul Yang46ae90d2016-12-08 11:16:49 -0800226 *
Brent Shaffer12acbc22017-06-27 16:28:28 -0700227 * Generated from protobuf field <code>optional bool no_standard_descriptor_accessor = 2 [default = false];</code>
228 * @param bool $var
229 * @return $this
Paul Yang46ae90d2016-12-08 11:16:49 -0800230 */
231 public function setNoStandardDescriptorAccessor($var)
232 {
233 GPBUtil::checkBool($var);
234 $this->no_standard_descriptor_accessor = $var;
235 $this->has_no_standard_descriptor_accessor = true;
Paul Yang6f325802017-06-05 00:10:18 -0700236
237 return $this;
Paul Yang46ae90d2016-12-08 11:16:49 -0800238 }
239
240 public function hasNoStandardDescriptorAccessor()
241 {
242 return $this->has_no_standard_descriptor_accessor;
243 }
244
245 /**
Paul Yang46ae90d2016-12-08 11:16:49 -0800246 * Is this message deprecated?
247 * Depending on the target platform, this can emit Deprecated annotations
248 * for the message, or it will be completely ignored; in the very least,
249 * this is a formalization for deprecating messages.
Paul Yang46ae90d2016-12-08 11:16:49 -0800250 *
Brent Shaffer12acbc22017-06-27 16:28:28 -0700251 * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
252 * @return bool
Paul Yang46ae90d2016-12-08 11:16:49 -0800253 */
254 public function getDeprecated()
255 {
256 return $this->deprecated;
257 }
258
259 /**
Paul Yang46ae90d2016-12-08 11:16:49 -0800260 * Is this message deprecated?
261 * Depending on the target platform, this can emit Deprecated annotations
262 * for the message, or it will be completely ignored; in the very least,
263 * this is a formalization for deprecating messages.
Paul Yang46ae90d2016-12-08 11:16:49 -0800264 *
Brent Shaffer12acbc22017-06-27 16:28:28 -0700265 * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
266 * @param bool $var
267 * @return $this
Paul Yang46ae90d2016-12-08 11:16:49 -0800268 */
269 public function setDeprecated($var)
270 {
271 GPBUtil::checkBool($var);
272 $this->deprecated = $var;
273 $this->has_deprecated = true;
Paul Yang6f325802017-06-05 00:10:18 -0700274
275 return $this;
Paul Yang46ae90d2016-12-08 11:16:49 -0800276 }
277
278 public function hasDeprecated()
279 {
280 return $this->has_deprecated;
281 }
282
283 /**
Paul Yang46ae90d2016-12-08 11:16:49 -0800284 * Whether the message is an automatically generated map entry type for the
285 * maps field.
286 * For maps fields:
Brent Shaffer12acbc22017-06-27 16:28:28 -0700287 * map<KeyType, ValueType> map_field = 1;
Paul Yang46ae90d2016-12-08 11:16:49 -0800288 * The parsed descriptor looks like:
289 * message MapFieldEntry {
290 * option map_entry = true;
291 * optional KeyType key = 1;
292 * optional ValueType value = 2;
293 * }
294 * repeated MapFieldEntry map_field = 1;
295 * Implementations may choose not to generate the map_entry=true message, but
296 * use a native map in the target language to hold the keys and values.
297 * The reflection APIs in such implementions still need to work as
298 * if the field is a repeated message field.
299 * NOTE: Do not set the option in .proto files. Always use the maps syntax
300 * instead. The option should only be implicitly set by the proto compiler
301 * parser.
Paul Yang46ae90d2016-12-08 11:16:49 -0800302 *
Brent Shaffer12acbc22017-06-27 16:28:28 -0700303 * Generated from protobuf field <code>optional bool map_entry = 7;</code>
304 * @return bool
Paul Yang46ae90d2016-12-08 11:16:49 -0800305 */
306 public function getMapEntry()
307 {
308 return $this->map_entry;
309 }
310
311 /**
Paul Yang46ae90d2016-12-08 11:16:49 -0800312 * Whether the message is an automatically generated map entry type for the
313 * maps field.
314 * For maps fields:
Brent Shaffer12acbc22017-06-27 16:28:28 -0700315 * map<KeyType, ValueType> map_field = 1;
Paul Yang46ae90d2016-12-08 11:16:49 -0800316 * The parsed descriptor looks like:
317 * message MapFieldEntry {
318 * option map_entry = true;
319 * optional KeyType key = 1;
320 * optional ValueType value = 2;
321 * }
322 * repeated MapFieldEntry map_field = 1;
323 * Implementations may choose not to generate the map_entry=true message, but
324 * use a native map in the target language to hold the keys and values.
325 * The reflection APIs in such implementions still need to work as
326 * if the field is a repeated message field.
327 * NOTE: Do not set the option in .proto files. Always use the maps syntax
328 * instead. The option should only be implicitly set by the proto compiler
329 * parser.
Paul Yang46ae90d2016-12-08 11:16:49 -0800330 *
Brent Shaffer12acbc22017-06-27 16:28:28 -0700331 * Generated from protobuf field <code>optional bool map_entry = 7;</code>
332 * @param bool $var
333 * @return $this
Paul Yang46ae90d2016-12-08 11:16:49 -0800334 */
335 public function setMapEntry($var)
336 {
337 GPBUtil::checkBool($var);
338 $this->map_entry = $var;
339 $this->has_map_entry = true;
Paul Yang6f325802017-06-05 00:10:18 -0700340
341 return $this;
Paul Yang46ae90d2016-12-08 11:16:49 -0800342 }
343
344 public function hasMapEntry()
345 {
346 return $this->has_map_entry;
347 }
348
349 /**
Paul Yang46ae90d2016-12-08 11:16:49 -0800350 * The parser stores options it doesn't recognize here. See above.
Paul Yang46ae90d2016-12-08 11:16:49 -0800351 *
Brent Shaffer12acbc22017-06-27 16:28:28 -0700352 * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
353 * @return \Google\Protobuf\Internal\RepeatedField
Paul Yang46ae90d2016-12-08 11:16:49 -0800354 */
355 public function getUninterpretedOption()
356 {
357 return $this->uninterpreted_option;
358 }
359
360 /**
Paul Yang46ae90d2016-12-08 11:16:49 -0800361 * The parser stores options it doesn't recognize here. See above.
Paul Yang46ae90d2016-12-08 11:16:49 -0800362 *
Brent Shaffer12acbc22017-06-27 16:28:28 -0700363 * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
364 * @param \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $var
365 * @return $this
Paul Yang46ae90d2016-12-08 11:16:49 -0800366 */
Brent Shaffer324b20a2017-07-17 09:14:46 -0700367 public function setUninterpretedOption($var)
Paul Yang46ae90d2016-12-08 11:16:49 -0800368 {
Paul Yang6b27c1f2017-03-17 11:08:06 -0700369 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
370 $this->uninterpreted_option = $arr;
Paul Yang46ae90d2016-12-08 11:16:49 -0800371 $this->has_uninterpreted_option = true;
Paul Yang6f325802017-06-05 00:10:18 -0700372
373 return $this;
Paul Yang46ae90d2016-12-08 11:16:49 -0800374 }
375
376 public function hasUninterpretedOption()
377 {
378 return $this->has_uninterpreted_option;
379 }
380
381}
382