blob: 3677ca38eee5814ef6d45f247862ac33fe74c5a9 [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;
11
12use Google\Protobuf\Internal\GPBUtil;
13
14/**
Brent Shaffer12acbc22017-06-27 16:28:28 -070015 * Generated from protobuf message <code>google.protobuf.MessageOptions</code>
Paul Yang46ae90d2016-12-08 11:16:49 -080016 */
17class MessageOptions extends \Google\Protobuf\Internal\Message
18{
19 /**
Paul Yang46ae90d2016-12-08 11:16:49 -080020 * 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 Yang46ae90d2016-12-08 11:16:49 -080035 *
Brent Shaffer12acbc22017-06-27 16:28:28 -070036 * Generated from protobuf field <code>optional bool message_set_wire_format = 1 [default = false];</code>
Paul Yang46ae90d2016-12-08 11:16:49 -080037 */
38 private $message_set_wire_format = false;
39 private $has_message_set_wire_format = false;
40 /**
Paul Yang46ae90d2016-12-08 11:16:49 -080041 * 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 Yang46ae90d2016-12-08 11:16:49 -080044 *
Brent Shaffer12acbc22017-06-27 16:28:28 -070045 * Generated from protobuf field <code>optional bool no_standard_descriptor_accessor = 2 [default = false];</code>
Paul Yang46ae90d2016-12-08 11:16:49 -080046 */
47 private $no_standard_descriptor_accessor = false;
48 private $has_no_standard_descriptor_accessor = false;
49 /**
Paul Yang46ae90d2016-12-08 11:16:49 -080050 * 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 Yang46ae90d2016-12-08 11:16:49 -080054 *
Brent Shaffer12acbc22017-06-27 16:28:28 -070055 * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
Paul Yang46ae90d2016-12-08 11:16:49 -080056 */
57 private $deprecated = false;
58 private $has_deprecated = false;
59 /**
Paul Yang46ae90d2016-12-08 11:16:49 -080060 * Whether the message is an automatically generated map entry type for the
61 * maps field.
62 * For maps fields:
Brent Shaffer12acbc22017-06-27 16:28:28 -070063 * map<KeyType, ValueType> map_field = 1;
Paul Yang46ae90d2016-12-08 11:16:49 -080064 * 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 Yang46ae90d2016-12-08 11:16:49 -080078 *
Brent Shaffer12acbc22017-06-27 16:28:28 -070079 * Generated from protobuf field <code>optional bool map_entry = 7;</code>
Paul Yang46ae90d2016-12-08 11:16:49 -080080 */
81 private $map_entry = false;
82 private $has_map_entry = false;
83 /**
Paul Yang46ae90d2016-12-08 11:16:49 -080084 * The parser stores options it doesn't recognize here. See above.
Paul Yang46ae90d2016-12-08 11:16:49 -080085 *
Brent Shaffer12acbc22017-06-27 16:28:28 -070086 * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
Paul Yang46ae90d2016-12-08 11:16:49 -080087 */
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 Yang46ae90d2016-12-08 11:16:49 -080097 * 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 Yang46ae90d2016-12-08 11:16:49 -0800112 *
Brent Shaffer12acbc22017-06-27 16:28:28 -0700113 * Generated from protobuf field <code>optional bool message_set_wire_format = 1 [default = false];</code>
114 * @return bool
Paul Yang46ae90d2016-12-08 11:16:49 -0800115 */
116 public function getMessageSetWireFormat()
117 {
118 return $this->message_set_wire_format;
119 }
120
121 /**
Paul Yang46ae90d2016-12-08 11:16:49 -0800122 * 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 Yang46ae90d2016-12-08 11:16:49 -0800137 *
Brent Shaffer12acbc22017-06-27 16:28:28 -0700138 * Generated from protobuf field <code>optional bool message_set_wire_format = 1 [default = false];</code>
139 * @param bool $var
140 * @return $this
Paul Yang46ae90d2016-12-08 11:16:49 -0800141 */
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 Yang6f325802017-06-05 00:10:18 -0700147
148 return $this;
Paul Yang46ae90d2016-12-08 11:16:49 -0800149 }
150
151 public function hasMessageSetWireFormat()
152 {
153 return $this->has_message_set_wire_format;
154 }
155
156 /**
Paul Yang46ae90d2016-12-08 11:16:49 -0800157 * 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 Yang46ae90d2016-12-08 11:16:49 -0800160 *
Brent Shaffer12acbc22017-06-27 16:28:28 -0700161 * Generated from protobuf field <code>optional bool no_standard_descriptor_accessor = 2 [default = false];</code>
162 * @return bool
Paul Yang46ae90d2016-12-08 11:16:49 -0800163 */
164 public function getNoStandardDescriptorAccessor()
165 {
166 return $this->no_standard_descriptor_accessor;
167 }
168
169 /**
Paul Yang46ae90d2016-12-08 11:16:49 -0800170 * 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 Yang46ae90d2016-12-08 11:16:49 -0800173 *
Brent Shaffer12acbc22017-06-27 16:28:28 -0700174 * Generated from protobuf field <code>optional bool no_standard_descriptor_accessor = 2 [default = false];</code>
175 * @param bool $var
176 * @return $this
Paul Yang46ae90d2016-12-08 11:16:49 -0800177 */
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 Yang6f325802017-06-05 00:10:18 -0700183
184 return $this;
Paul Yang46ae90d2016-12-08 11:16:49 -0800185 }
186
187 public function hasNoStandardDescriptorAccessor()
188 {
189 return $this->has_no_standard_descriptor_accessor;
190 }
191
192 /**
Paul Yang46ae90d2016-12-08 11:16:49 -0800193 * 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 Yang46ae90d2016-12-08 11:16:49 -0800197 *
Brent Shaffer12acbc22017-06-27 16:28:28 -0700198 * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
199 * @return bool
Paul Yang46ae90d2016-12-08 11:16:49 -0800200 */
201 public function getDeprecated()
202 {
203 return $this->deprecated;
204 }
205
206 /**
Paul Yang46ae90d2016-12-08 11:16:49 -0800207 * 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 Yang46ae90d2016-12-08 11:16:49 -0800211 *
Brent Shaffer12acbc22017-06-27 16:28:28 -0700212 * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
213 * @param bool $var
214 * @return $this
Paul Yang46ae90d2016-12-08 11:16:49 -0800215 */
216 public function setDeprecated($var)
217 {
218 GPBUtil::checkBool($var);
219 $this->deprecated = $var;
220 $this->has_deprecated = true;
Paul Yang6f325802017-06-05 00:10:18 -0700221
222 return $this;
Paul Yang46ae90d2016-12-08 11:16:49 -0800223 }
224
225 public function hasDeprecated()
226 {
227 return $this->has_deprecated;
228 }
229
230 /**
Paul Yang46ae90d2016-12-08 11:16:49 -0800231 * Whether the message is an automatically generated map entry type for the
232 * maps field.
233 * For maps fields:
Brent Shaffer12acbc22017-06-27 16:28:28 -0700234 * map<KeyType, ValueType> map_field = 1;
Paul Yang46ae90d2016-12-08 11:16:49 -0800235 * 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 Yang46ae90d2016-12-08 11:16:49 -0800249 *
Brent Shaffer12acbc22017-06-27 16:28:28 -0700250 * Generated from protobuf field <code>optional bool map_entry = 7;</code>
251 * @return bool
Paul Yang46ae90d2016-12-08 11:16:49 -0800252 */
253 public function getMapEntry()
254 {
255 return $this->map_entry;
256 }
257
258 /**
Paul Yang46ae90d2016-12-08 11:16:49 -0800259 * Whether the message is an automatically generated map entry type for the
260 * maps field.
261 * For maps fields:
Brent Shaffer12acbc22017-06-27 16:28:28 -0700262 * map<KeyType, ValueType> map_field = 1;
Paul Yang46ae90d2016-12-08 11:16:49 -0800263 * 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 Yang46ae90d2016-12-08 11:16:49 -0800277 *
Brent Shaffer12acbc22017-06-27 16:28:28 -0700278 * Generated from protobuf field <code>optional bool map_entry = 7;</code>
279 * @param bool $var
280 * @return $this
Paul Yang46ae90d2016-12-08 11:16:49 -0800281 */
282 public function setMapEntry($var)
283 {
284 GPBUtil::checkBool($var);
285 $this->map_entry = $var;
286 $this->has_map_entry = true;
Paul Yang6f325802017-06-05 00:10:18 -0700287
288 return $this;
Paul Yang46ae90d2016-12-08 11:16:49 -0800289 }
290
291 public function hasMapEntry()
292 {
293 return $this->has_map_entry;
294 }
295
296 /**
Paul Yang46ae90d2016-12-08 11:16:49 -0800297 * The parser stores options it doesn't recognize here. See above.
Paul Yang46ae90d2016-12-08 11:16:49 -0800298 *
Brent Shaffer12acbc22017-06-27 16:28:28 -0700299 * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
300 * @return \Google\Protobuf\Internal\RepeatedField
Paul Yang46ae90d2016-12-08 11:16:49 -0800301 */
302 public function getUninterpretedOption()
303 {
304 return $this->uninterpreted_option;
305 }
306
307 /**
Paul Yang46ae90d2016-12-08 11:16:49 -0800308 * The parser stores options it doesn't recognize here. See above.
Paul Yang46ae90d2016-12-08 11:16:49 -0800309 *
Brent Shaffer12acbc22017-06-27 16:28:28 -0700310 * 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 Yang46ae90d2016-12-08 11:16:49 -0800313 */
314 public function setUninterpretedOption(&$var)
315 {
Paul Yang6b27c1f2017-03-17 11:08:06 -0700316 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
317 $this->uninterpreted_option = $arr;
Paul Yang46ae90d2016-12-08 11:16:49 -0800318 $this->has_uninterpreted_option = true;
Paul Yang6f325802017-06-05 00:10:18 -0700319
320 return $this;
Paul Yang46ae90d2016-12-08 11:16:49 -0800321 }
322
323 public function hasUninterpretedOption()
324 {
325 return $this->has_uninterpreted_option;
326 }
327
328}
329