• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?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;
11use Google\Protobuf\Internal\GPBUtil;
12
13/**
14 * Generated from protobuf message <code>google.protobuf.MessageOptions</code>
15 */
16class MessageOptions extends \Google\Protobuf\Internal\Message
17{
18    /**
19     * 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.
34     *
35     * Generated from protobuf field <code>optional bool message_set_wire_format = 1 [default = false];</code>
36     */
37    private $message_set_wire_format = false;
38    private $has_message_set_wire_format = false;
39    /**
40     * 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".
43     *
44     * Generated from protobuf field <code>optional bool no_standard_descriptor_accessor = 2 [default = false];</code>
45     */
46    private $no_standard_descriptor_accessor = false;
47    private $has_no_standard_descriptor_accessor = false;
48    /**
49     * 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.
53     *
54     * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
55     */
56    private $deprecated = false;
57    private $has_deprecated = false;
58    /**
59     * Whether the message is an automatically generated map entry type for the
60     * maps field.
61     * For maps fields:
62     *     map<KeyType, ValueType> map_field = 1;
63     * 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 implementations 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.
77     *
78     * Generated from protobuf field <code>optional bool map_entry = 7;</code>
79     */
80    private $map_entry = false;
81    private $has_map_entry = false;
82    /**
83     * The parser stores options it doesn't recognize here. See above.
84     *
85     * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
86     */
87    private $uninterpreted_option;
88    private $has_uninterpreted_option = false;
89
90    /**
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 implementations 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) {
145        \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
146        parent::__construct($data);
147    }
148
149    /**
150     * 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.
165     *
166     * Generated from protobuf field <code>optional bool message_set_wire_format = 1 [default = false];</code>
167     * @return bool
168     */
169    public function getMessageSetWireFormat()
170    {
171        return $this->message_set_wire_format;
172    }
173
174    /**
175     * 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.
190     *
191     * Generated from protobuf field <code>optional bool message_set_wire_format = 1 [default = false];</code>
192     * @param bool $var
193     * @return $this
194     */
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;
200
201        return $this;
202    }
203
204    public function hasMessageSetWireFormat()
205    {
206        return $this->has_message_set_wire_format;
207    }
208
209    /**
210     * 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".
213     *
214     * Generated from protobuf field <code>optional bool no_standard_descriptor_accessor = 2 [default = false];</code>
215     * @return bool
216     */
217    public function getNoStandardDescriptorAccessor()
218    {
219        return $this->no_standard_descriptor_accessor;
220    }
221
222    /**
223     * 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".
226     *
227     * Generated from protobuf field <code>optional bool no_standard_descriptor_accessor = 2 [default = false];</code>
228     * @param bool $var
229     * @return $this
230     */
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;
236
237        return $this;
238    }
239
240    public function hasNoStandardDescriptorAccessor()
241    {
242        return $this->has_no_standard_descriptor_accessor;
243    }
244
245    /**
246     * 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.
250     *
251     * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
252     * @return bool
253     */
254    public function getDeprecated()
255    {
256        return $this->deprecated;
257    }
258
259    /**
260     * 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.
264     *
265     * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
266     * @param bool $var
267     * @return $this
268     */
269    public function setDeprecated($var)
270    {
271        GPBUtil::checkBool($var);
272        $this->deprecated = $var;
273        $this->has_deprecated = true;
274
275        return $this;
276    }
277
278    public function hasDeprecated()
279    {
280        return $this->has_deprecated;
281    }
282
283    /**
284     * Whether the message is an automatically generated map entry type for the
285     * maps field.
286     * For maps fields:
287     *     map<KeyType, ValueType> map_field = 1;
288     * 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 implementations 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.
302     *
303     * Generated from protobuf field <code>optional bool map_entry = 7;</code>
304     * @return bool
305     */
306    public function getMapEntry()
307    {
308        return $this->map_entry;
309    }
310
311    /**
312     * Whether the message is an automatically generated map entry type for the
313     * maps field.
314     * For maps fields:
315     *     map<KeyType, ValueType> map_field = 1;
316     * 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 implementations 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.
330     *
331     * Generated from protobuf field <code>optional bool map_entry = 7;</code>
332     * @param bool $var
333     * @return $this
334     */
335    public function setMapEntry($var)
336    {
337        GPBUtil::checkBool($var);
338        $this->map_entry = $var;
339        $this->has_map_entry = true;
340
341        return $this;
342    }
343
344    public function hasMapEntry()
345    {
346        return $this->has_map_entry;
347    }
348
349    /**
350     * The parser stores options it doesn't recognize here. See above.
351     *
352     * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
353     * @return \Google\Protobuf\Internal\RepeatedField
354     */
355    public function getUninterpretedOption()
356    {
357        return $this->uninterpreted_option;
358    }
359
360    /**
361     * The parser stores options it doesn't recognize here. See above.
362     *
363     * 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
366     */
367    public function setUninterpretedOption($var)
368    {
369        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
370        $this->uninterpreted_option = $arr;
371        $this->has_uninterpreted_option = true;
372
373        return $this;
374    }
375
376    public function hasUninterpretedOption()
377    {
378        return $this->has_uninterpreted_option;
379    }
380
381}
382
383