blob: a5835358fd7e4ee23a3036b801c22e0ab0d3ce55 [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/**
15 * Protobuf type <code>google.protobuf.MessageOptions</code>
16 */
17class 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 can
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&lt;KeyType, ValueType&gt; 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, but
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;
Paul Yang6f325802017-06-05 00:10:18 -0700158
159 return $this;
Paul Yang46ae90d2016-12-08 11:16:49 -0800160 }
161
162 public function hasMessageSetWireFormat()
163 {
164 return $this->has_message_set_wire_format;
165 }
166
167 /**
168 * <pre>
169 * Disables the generation of the standard "descriptor()" accessor, which can
170 * conflict with a field of the same name. This is meant to make migration
171 * from proto1 easier; new code should avoid fields named "descriptor".
172 * </pre>
173 *
174 * <code>optional bool no_standard_descriptor_accessor = 2 [default = false];</code>
175 */
176 public function getNoStandardDescriptorAccessor()
177 {
178 return $this->no_standard_descriptor_accessor;
179 }
180
181 /**
182 * <pre>
183 * Disables the generation of the standard "descriptor()" accessor, which can
184 * conflict with a field of the same name. This is meant to make migration
185 * from proto1 easier; new code should avoid fields named "descriptor".
186 * </pre>
187 *
188 * <code>optional bool no_standard_descriptor_accessor = 2 [default = false];</code>
189 */
190 public function setNoStandardDescriptorAccessor($var)
191 {
192 GPBUtil::checkBool($var);
193 $this->no_standard_descriptor_accessor = $var;
194 $this->has_no_standard_descriptor_accessor = true;
Paul Yang6f325802017-06-05 00:10:18 -0700195
196 return $this;
Paul Yang46ae90d2016-12-08 11:16:49 -0800197 }
198
199 public function hasNoStandardDescriptorAccessor()
200 {
201 return $this->has_no_standard_descriptor_accessor;
202 }
203
204 /**
205 * <pre>
206 * Is this message deprecated?
207 * Depending on the target platform, this can emit Deprecated annotations
208 * for the message, or it will be completely ignored; in the very least,
209 * this is a formalization for deprecating messages.
210 * </pre>
211 *
212 * <code>optional bool deprecated = 3 [default = false];</code>
213 */
214 public function getDeprecated()
215 {
216 return $this->deprecated;
217 }
218
219 /**
220 * <pre>
221 * Is this message deprecated?
222 * Depending on the target platform, this can emit Deprecated annotations
223 * for the message, or it will be completely ignored; in the very least,
224 * this is a formalization for deprecating messages.
225 * </pre>
226 *
227 * <code>optional bool deprecated = 3 [default = false];</code>
228 */
229 public function setDeprecated($var)
230 {
231 GPBUtil::checkBool($var);
232 $this->deprecated = $var;
233 $this->has_deprecated = true;
Paul Yang6f325802017-06-05 00:10:18 -0700234
235 return $this;
Paul Yang46ae90d2016-12-08 11:16:49 -0800236 }
237
238 public function hasDeprecated()
239 {
240 return $this->has_deprecated;
241 }
242
243 /**
244 * <pre>
245 * Whether the message is an automatically generated map entry type for the
246 * maps field.
247 * For maps fields:
248 * map&lt;KeyType, ValueType&gt; map_field = 1;
249 * The parsed descriptor looks like:
250 * message MapFieldEntry {
251 * option map_entry = true;
252 * optional KeyType key = 1;
253 * optional ValueType value = 2;
254 * }
255 * repeated MapFieldEntry map_field = 1;
256 * Implementations may choose not to generate the map_entry=true message, but
257 * use a native map in the target language to hold the keys and values.
258 * The reflection APIs in such implementions still need to work as
259 * if the field is a repeated message field.
260 * NOTE: Do not set the option in .proto files. Always use the maps syntax
261 * instead. The option should only be implicitly set by the proto compiler
262 * parser.
263 * </pre>
264 *
265 * <code>optional bool map_entry = 7;</code>
266 */
267 public function getMapEntry()
268 {
269 return $this->map_entry;
270 }
271
272 /**
273 * <pre>
274 * Whether the message is an automatically generated map entry type for the
275 * maps field.
276 * For maps fields:
277 * map&lt;KeyType, ValueType&gt; map_field = 1;
278 * The parsed descriptor looks like:
279 * message MapFieldEntry {
280 * option map_entry = true;
281 * optional KeyType key = 1;
282 * optional ValueType value = 2;
283 * }
284 * repeated MapFieldEntry map_field = 1;
285 * Implementations may choose not to generate the map_entry=true message, but
286 * use a native map in the target language to hold the keys and values.
287 * The reflection APIs in such implementions still need to work as
288 * if the field is a repeated message field.
289 * NOTE: Do not set the option in .proto files. Always use the maps syntax
290 * instead. The option should only be implicitly set by the proto compiler
291 * parser.
292 * </pre>
293 *
294 * <code>optional bool map_entry = 7;</code>
295 */
296 public function setMapEntry($var)
297 {
298 GPBUtil::checkBool($var);
299 $this->map_entry = $var;
300 $this->has_map_entry = true;
Paul Yang6f325802017-06-05 00:10:18 -0700301
302 return $this;
Paul Yang46ae90d2016-12-08 11:16:49 -0800303 }
304
305 public function hasMapEntry()
306 {
307 return $this->has_map_entry;
308 }
309
310 /**
311 * <pre>
312 * The parser stores options it doesn't recognize here. See above.
313 * </pre>
314 *
315 * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
316 */
317 public function getUninterpretedOption()
318 {
319 return $this->uninterpreted_option;
320 }
321
322 /**
323 * <pre>
324 * The parser stores options it doesn't recognize here. See above.
325 * </pre>
326 *
327 * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
328 */
329 public function setUninterpretedOption(&$var)
330 {
Paul Yang6b27c1f2017-03-17 11:08:06 -0700331 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
332 $this->uninterpreted_option = $arr;
Paul Yang46ae90d2016-12-08 11:16:49 -0800333 $this->has_uninterpreted_option = true;
Paul Yang6f325802017-06-05 00:10:18 -0700334
335 return $this;
Paul Yang46ae90d2016-12-08 11:16:49 -0800336 }
337
338 public function hasUninterpretedOption()
339 {
340 return $this->has_uninterpreted_option;
341 }
342
343}
344