Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(398)

Side by Side Diff: third_party/protobuf/php/src/Google/Protobuf/Internal/FieldOptions.php

Issue 2495533002: third_party/protobuf: Update to HEAD (83d681ee2c) (Closed)
Patch Set: Make chrome settings proto generated file a component Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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.FieldOptions</code>
16 */
17 class FieldOptions extends \Google\Protobuf\Internal\Message
18 {
19 /**
20 * <pre>
21 * The ctype option instructs the C++ code generator to use a different
22 * representation of the field than it normally would. See the specific
23 * options below. This option is not yet implemented in the open source
24 * release -- sorry, we'll try to include it in a future version!
25 * </pre>
26 *
27 * <code>optional .google.protobuf.FieldOptions.CType ctype = 1 [default = S TRING];</code>
28 */
29 private $ctype = 0;
30 private $has_ctype = false;
31 /**
32 * <pre>
33 * The packed option can be enabled for repeated primitive fields to enable
34 * a more efficient representation on the wire. Rather than repeatedly
35 * writing the tag and type for each element, the entire array is encoded as
36 * a single length-delimited blob. In proto3, only explicit setting it to
37 * false will avoid using packed encoding.
38 * </pre>
39 *
40 * <code>optional bool packed = 2;</code>
41 */
42 private $packed = false;
43 private $has_packed = false;
44 /**
45 * <pre>
46 * The jstype option determines the JavaScript type used for values of the
47 * field. The option is permitted only for 64 bit integral and fixed types
48 * (int64, uint64, sint64, fixed64, sfixed64). By default these types are
49 * represented as JavaScript strings. This avoids loss of precision that ca n
50 * happen when a large value is converted to a floating point JavaScript
51 * numbers. Specifying JS_NUMBER for the jstype causes the generated
52 * JavaScript code to use the JavaScript "number" type instead of strings.
53 * This option is an enum to permit additional types to be added,
54 * e.g. goog.math.Integer.
55 * </pre>
56 *
57 * <code>optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];</code>
58 */
59 private $jstype = 0;
60 private $has_jstype = false;
61 /**
62 * <pre>
63 * Should this field be parsed lazily? Lazy applies only to message-type
64 * fields. It means that when the outer message is initially parsed, the
65 * inner message's contents will not be parsed but instead stored in encoded
66 * form. The inner message will actually be parsed when it is first accesse d.
67 * This is only a hint. Implementations are free to choose whether to use
68 * eager or lazy parsing regardless of the value of this option. However,
69 * setting this option true suggests that the protocol author believes that
70 * using lazy parsing on this field is worth the additional bookkeeping
71 * overhead typically needed to implement it.
72 * This option does not affect the public interface of any generated code;
73 * all method signatures remain the same. Furthermore, thread-safety of the
74 * interface is not affected by this option; const methods remain safe to
75 * call from multiple threads concurrently, while non-const methods continue
76 * to require exclusive access.
77 * Note that implementations may choose not to check required fields within
78 * a lazy sub-message. That is, calling IsInitialized() on the outer messag e
79 * may return true even if the inner message has missing required fields.
80 * This is necessary because otherwise the inner message would have to be
81 * parsed in order to perform the check, defeating the purpose of lazy
82 * parsing. An implementation which chooses not to check required fields
83 * must be consistent about it. That is, for any particular sub-message, th e
84 * implementation must either *always* check its required fields, or *never*
85 * check its required fields, regardless of whether or not the message has
86 * been parsed.
87 * </pre>
88 *
89 * <code>optional bool lazy = 5 [default = false];</code>
90 */
91 private $lazy = false;
92 private $has_lazy = false;
93 /**
94 * <pre>
95 * Is this field deprecated?
96 * Depending on the target platform, this can emit Deprecated annotations
97 * for accessors, or it will be completely ignored; in the very least, this
98 * is a formalization for deprecating fields.
99 * </pre>
100 *
101 * <code>optional bool deprecated = 3 [default = false];</code>
102 */
103 private $deprecated = false;
104 private $has_deprecated = false;
105 /**
106 * <pre>
107 * For Google-internal migration only. Do not use.
108 * </pre>
109 *
110 * <code>optional bool weak = 10 [default = false];</code>
111 */
112 private $weak = false;
113 private $has_weak = false;
114 /**
115 * <pre>
116 * The parser stores options it doesn't recognize here. See above.
117 * </pre>
118 *
119 * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
120 */
121 private $uninterpreted_option;
122 private $has_uninterpreted_option = false;
123
124 public function __construct() {
125 \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
126 parent::__construct();
127 }
128
129 /**
130 * <pre>
131 * The ctype option instructs the C++ code generator to use a different
132 * representation of the field than it normally would. See the specific
133 * options below. This option is not yet implemented in the open source
134 * release -- sorry, we'll try to include it in a future version!
135 * </pre>
136 *
137 * <code>optional .google.protobuf.FieldOptions.CType ctype = 1 [default = S TRING];</code>
138 */
139 public function getCtype()
140 {
141 return $this->ctype;
142 }
143
144 /**
145 * <pre>
146 * The ctype option instructs the C++ code generator to use a different
147 * representation of the field than it normally would. See the specific
148 * options below. This option is not yet implemented in the open source
149 * release -- sorry, we'll try to include it in a future version!
150 * </pre>
151 *
152 * <code>optional .google.protobuf.FieldOptions.CType ctype = 1 [default = S TRING];</code>
153 */
154 public function setCtype($var)
155 {
156 GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FieldOptions_CType::c lass);
157 $this->ctype = $var;
158 $this->has_ctype = true;
159 }
160
161 public function hasCtype()
162 {
163 return $this->has_ctype;
164 }
165
166 /**
167 * <pre>
168 * The packed option can be enabled for repeated primitive fields to enable
169 * a more efficient representation on the wire. Rather than repeatedly
170 * writing the tag and type for each element, the entire array is encoded as
171 * a single length-delimited blob. In proto3, only explicit setting it to
172 * false will avoid using packed encoding.
173 * </pre>
174 *
175 * <code>optional bool packed = 2;</code>
176 */
177 public function getPacked()
178 {
179 return $this->packed;
180 }
181
182 /**
183 * <pre>
184 * The packed option can be enabled for repeated primitive fields to enable
185 * a more efficient representation on the wire. Rather than repeatedly
186 * writing the tag and type for each element, the entire array is encoded as
187 * a single length-delimited blob. In proto3, only explicit setting it to
188 * false will avoid using packed encoding.
189 * </pre>
190 *
191 * <code>optional bool packed = 2;</code>
192 */
193 public function setPacked($var)
194 {
195 GPBUtil::checkBool($var);
196 $this->packed = $var;
197 $this->has_packed = true;
198 }
199
200 public function hasPacked()
201 {
202 return $this->has_packed;
203 }
204
205 /**
206 * <pre>
207 * The jstype option determines the JavaScript type used for values of the
208 * field. The option is permitted only for 64 bit integral and fixed types
209 * (int64, uint64, sint64, fixed64, sfixed64). By default these types are
210 * represented as JavaScript strings. This avoids loss of precision that ca n
211 * happen when a large value is converted to a floating point JavaScript
212 * numbers. Specifying JS_NUMBER for the jstype causes the generated
213 * JavaScript code to use the JavaScript "number" type instead of strings.
214 * This option is an enum to permit additional types to be added,
215 * e.g. goog.math.Integer.
216 * </pre>
217 *
218 * <code>optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];</code>
219 */
220 public function getJstype()
221 {
222 return $this->jstype;
223 }
224
225 /**
226 * <pre>
227 * The jstype option determines the JavaScript type used for values of the
228 * field. The option is permitted only for 64 bit integral and fixed types
229 * (int64, uint64, sint64, fixed64, sfixed64). By default these types are
230 * represented as JavaScript strings. This avoids loss of precision that ca n
231 * happen when a large value is converted to a floating point JavaScript
232 * numbers. Specifying JS_NUMBER for the jstype causes the generated
233 * JavaScript code to use the JavaScript "number" type instead of strings.
234 * This option is an enum to permit additional types to be added,
235 * e.g. goog.math.Integer.
236 * </pre>
237 *
238 * <code>optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];</code>
239 */
240 public function setJstype($var)
241 {
242 GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FieldOptions_JSType:: class);
243 $this->jstype = $var;
244 $this->has_jstype = true;
245 }
246
247 public function hasJstype()
248 {
249 return $this->has_jstype;
250 }
251
252 /**
253 * <pre>
254 * Should this field be parsed lazily? Lazy applies only to message-type
255 * fields. It means that when the outer message is initially parsed, the
256 * inner message's contents will not be parsed but instead stored in encoded
257 * form. The inner message will actually be parsed when it is first accesse d.
258 * This is only a hint. Implementations are free to choose whether to use
259 * eager or lazy parsing regardless of the value of this option. However,
260 * setting this option true suggests that the protocol author believes that
261 * using lazy parsing on this field is worth the additional bookkeeping
262 * overhead typically needed to implement it.
263 * This option does not affect the public interface of any generated code;
264 * all method signatures remain the same. Furthermore, thread-safety of the
265 * interface is not affected by this option; const methods remain safe to
266 * call from multiple threads concurrently, while non-const methods continue
267 * to require exclusive access.
268 * Note that implementations may choose not to check required fields within
269 * a lazy sub-message. That is, calling IsInitialized() on the outer messag e
270 * may return true even if the inner message has missing required fields.
271 * This is necessary because otherwise the inner message would have to be
272 * parsed in order to perform the check, defeating the purpose of lazy
273 * parsing. An implementation which chooses not to check required fields
274 * must be consistent about it. That is, for any particular sub-message, th e
275 * implementation must either *always* check its required fields, or *never*
276 * check its required fields, regardless of whether or not the message has
277 * been parsed.
278 * </pre>
279 *
280 * <code>optional bool lazy = 5 [default = false];</code>
281 */
282 public function getLazy()
283 {
284 return $this->lazy;
285 }
286
287 /**
288 * <pre>
289 * Should this field be parsed lazily? Lazy applies only to message-type
290 * fields. It means that when the outer message is initially parsed, the
291 * inner message's contents will not be parsed but instead stored in encoded
292 * form. The inner message will actually be parsed when it is first accesse d.
293 * This is only a hint. Implementations are free to choose whether to use
294 * eager or lazy parsing regardless of the value of this option. However,
295 * setting this option true suggests that the protocol author believes that
296 * using lazy parsing on this field is worth the additional bookkeeping
297 * overhead typically needed to implement it.
298 * This option does not affect the public interface of any generated code;
299 * all method signatures remain the same. Furthermore, thread-safety of the
300 * interface is not affected by this option; const methods remain safe to
301 * call from multiple threads concurrently, while non-const methods continue
302 * to require exclusive access.
303 * Note that implementations may choose not to check required fields within
304 * a lazy sub-message. That is, calling IsInitialized() on the outer messag e
305 * may return true even if the inner message has missing required fields.
306 * This is necessary because otherwise the inner message would have to be
307 * parsed in order to perform the check, defeating the purpose of lazy
308 * parsing. An implementation which chooses not to check required fields
309 * must be consistent about it. That is, for any particular sub-message, th e
310 * implementation must either *always* check its required fields, or *never*
311 * check its required fields, regardless of whether or not the message has
312 * been parsed.
313 * </pre>
314 *
315 * <code>optional bool lazy = 5 [default = false];</code>
316 */
317 public function setLazy($var)
318 {
319 GPBUtil::checkBool($var);
320 $this->lazy = $var;
321 $this->has_lazy = true;
322 }
323
324 public function hasLazy()
325 {
326 return $this->has_lazy;
327 }
328
329 /**
330 * <pre>
331 * Is this field deprecated?
332 * Depending on the target platform, this can emit Deprecated annotations
333 * for accessors, or it will be completely ignored; in the very least, this
334 * is a formalization for deprecating fields.
335 * </pre>
336 *
337 * <code>optional bool deprecated = 3 [default = false];</code>
338 */
339 public function getDeprecated()
340 {
341 return $this->deprecated;
342 }
343
344 /**
345 * <pre>
346 * Is this field deprecated?
347 * Depending on the target platform, this can emit Deprecated annotations
348 * for accessors, or it will be completely ignored; in the very least, this
349 * is a formalization for deprecating fields.
350 * </pre>
351 *
352 * <code>optional bool deprecated = 3 [default = false];</code>
353 */
354 public function setDeprecated($var)
355 {
356 GPBUtil::checkBool($var);
357 $this->deprecated = $var;
358 $this->has_deprecated = true;
359 }
360
361 public function hasDeprecated()
362 {
363 return $this->has_deprecated;
364 }
365
366 /**
367 * <pre>
368 * For Google-internal migration only. Do not use.
369 * </pre>
370 *
371 * <code>optional bool weak = 10 [default = false];</code>
372 */
373 public function getWeak()
374 {
375 return $this->weak;
376 }
377
378 /**
379 * <pre>
380 * For Google-internal migration only. Do not use.
381 * </pre>
382 *
383 * <code>optional bool weak = 10 [default = false];</code>
384 */
385 public function setWeak($var)
386 {
387 GPBUtil::checkBool($var);
388 $this->weak = $var;
389 $this->has_weak = true;
390 }
391
392 public function hasWeak()
393 {
394 return $this->has_weak;
395 }
396
397 /**
398 * <pre>
399 * The parser stores options it doesn't recognize here. See above.
400 * </pre>
401 *
402 * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
403 */
404 public function getUninterpretedOption()
405 {
406 return $this->uninterpreted_option;
407 }
408
409 /**
410 * <pre>
411 * The parser stores options it doesn't recognize here. See above.
412 * </pre>
413 *
414 * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
415 */
416 public function setUninterpretedOption(&$var)
417 {
418 GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MES SAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
419 $this->uninterpreted_option = $var;
420 $this->has_uninterpreted_option = true;
421 }
422
423 public function hasUninterpretedOption()
424 {
425 return $this->has_uninterpreted_option;
426 }
427
428 }
429
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698