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

Side by Side Diff: third_party/protobuf/php/src/Google/Protobuf/Internal/FileOptions.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.FileOptions</code>
16 */
17 class FileOptions extends \Google\Protobuf\Internal\Message
18 {
19 /**
20 * <pre>
21 * Sets the Java package where classes generated from this .proto will be
22 * placed. By default, the proto package is used, but this is often
23 * inappropriate because proto packages do not normally start with backwards
24 * domain names.
25 * </pre>
26 *
27 * <code>optional string java_package = 1;</code>
28 */
29 private $java_package = '';
30 private $has_java_package = false;
31 /**
32 * <pre>
33 * If set, all the classes from the .proto file are wrapped in a single
34 * outer class with the given name. This applies to both Proto1
35 * (equivalent to the old "--one_java_file" option) and Proto2 (where
36 * a .proto always translates to a single class, but you may want to
37 * explicitly choose the class name).
38 * </pre>
39 *
40 * <code>optional string java_outer_classname = 8;</code>
41 */
42 private $java_outer_classname = '';
43 private $has_java_outer_classname = false;
44 /**
45 * <pre>
46 * If set true, then the Java code generator will generate a separate .java
47 * file for each top-level message, enum, and service defined in the .proto
48 * file. Thus, these types will *not* be nested inside the outer class
49 * named by java_outer_classname. However, the outer class will still be
50 * generated to contain the file's getDescriptor() method as well as any
51 * top-level extensions defined in the file.
52 * </pre>
53 *
54 * <code>optional bool java_multiple_files = 10 [default = false];</code>
55 */
56 private $java_multiple_files = false;
57 private $has_java_multiple_files = false;
58 /**
59 * <pre>
60 * This option does nothing.
61 * </pre>
62 *
63 * <code>optional bool java_generate_equals_and_hash = 20 [deprecated = true ];</code>
64 */
65 private $java_generate_equals_and_hash = false;
66 private $has_java_generate_equals_and_hash = false;
67 /**
68 * <pre>
69 * If set true, then the Java2 code generator will generate code that
70 * throws an exception whenever an attempt is made to assign a non-UTF-8
71 * byte sequence to a string field.
72 * Message reflection will do the same.
73 * However, an extension field still accepts non-UTF-8 byte sequences.
74 * This option has no effect on when used with the lite runtime.
75 * </pre>
76 *
77 * <code>optional bool java_string_check_utf8 = 27 [default = false];</code>
78 */
79 private $java_string_check_utf8 = false;
80 private $has_java_string_check_utf8 = false;
81 /**
82 * <code>optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];</code>
83 */
84 private $optimize_for = 0;
85 private $has_optimize_for = false;
86 /**
87 * <pre>
88 * Sets the Go package where structs generated from this .proto will be
89 * placed. If omitted, the Go package will be derived from the following:
90 * - The basename of the package import path, if provided.
91 * - Otherwise, the package statement in the .proto file, if present.
92 * - Otherwise, the basename of the .proto file, without extension.
93 * </pre>
94 *
95 * <code>optional string go_package = 11;</code>
96 */
97 private $go_package = '';
98 private $has_go_package = false;
99 /**
100 * <pre>
101 * Should generic services be generated in each language? "Generic" service s
102 * are not specific to any particular RPC system. They are generated by the
103 * main code generators in each language (without additional plugins).
104 * Generic services were the only kind of service generation supported by
105 * early versions of google.protobuf.
106 * Generic services are now considered deprecated in favor of using plugins
107 * that generate code specific to your particular RPC system. Therefore,
108 * these default to false. Old code which depends on generic services shoul d
109 * explicitly set them to true.
110 * </pre>
111 *
112 * <code>optional bool cc_generic_services = 16 [default = false];</code>
113 */
114 private $cc_generic_services = false;
115 private $has_cc_generic_services = false;
116 /**
117 * <code>optional bool java_generic_services = 17 [default = false];</code>
118 */
119 private $java_generic_services = false;
120 private $has_java_generic_services = false;
121 /**
122 * <code>optional bool py_generic_services = 18 [default = false];</code>
123 */
124 private $py_generic_services = false;
125 private $has_py_generic_services = false;
126 /**
127 * <pre>
128 * Is this file deprecated?
129 * Depending on the target platform, this can emit Deprecated annotations
130 * for everything in the file, or it will be completely ignored; in the very
131 * least, this is a formalization for deprecating files.
132 * </pre>
133 *
134 * <code>optional bool deprecated = 23 [default = false];</code>
135 */
136 private $deprecated = false;
137 private $has_deprecated = false;
138 /**
139 * <pre>
140 * Enables the use of arenas for the proto messages in this file. This appli es
141 * only to generated classes for C++.
142 * </pre>
143 *
144 * <code>optional bool cc_enable_arenas = 31 [default = false];</code>
145 */
146 private $cc_enable_arenas = false;
147 private $has_cc_enable_arenas = false;
148 /**
149 * <pre>
150 * Sets the objective c class prefix which is prepended to all objective c
151 * generated classes from this .proto. There is no default.
152 * </pre>
153 *
154 * <code>optional string objc_class_prefix = 36;</code>
155 */
156 private $objc_class_prefix = '';
157 private $has_objc_class_prefix = false;
158 /**
159 * <pre>
160 * Namespace for generated classes; defaults to the package.
161 * </pre>
162 *
163 * <code>optional string csharp_namespace = 37;</code>
164 */
165 private $csharp_namespace = '';
166 private $has_csharp_namespace = false;
167 /**
168 * <pre>
169 * By default Swift generators will take the proto package and CamelCase it
170 * replacing '.' with underscore and use that to prefix the types/symbols
171 * defined. When this options is provided, they will use this value instead
172 * to prefix the types/symbols defined.
173 * </pre>
174 *
175 * <code>optional string swift_prefix = 39;</code>
176 */
177 private $swift_prefix = '';
178 private $has_swift_prefix = false;
179 /**
180 * <pre>
181 * The parser stores options it doesn't recognize here. See above.
182 * </pre>
183 *
184 * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
185 */
186 private $uninterpreted_option;
187 private $has_uninterpreted_option = false;
188
189 public function __construct() {
190 \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
191 parent::__construct();
192 }
193
194 /**
195 * <pre>
196 * Sets the Java package where classes generated from this .proto will be
197 * placed. By default, the proto package is used, but this is often
198 * inappropriate because proto packages do not normally start with backwards
199 * domain names.
200 * </pre>
201 *
202 * <code>optional string java_package = 1;</code>
203 */
204 public function getJavaPackage()
205 {
206 return $this->java_package;
207 }
208
209 /**
210 * <pre>
211 * Sets the Java package where classes generated from this .proto will be
212 * placed. By default, the proto package is used, but this is often
213 * inappropriate because proto packages do not normally start with backwards
214 * domain names.
215 * </pre>
216 *
217 * <code>optional string java_package = 1;</code>
218 */
219 public function setJavaPackage($var)
220 {
221 GPBUtil::checkString($var, True);
222 $this->java_package = $var;
223 $this->has_java_package = true;
224 }
225
226 public function hasJavaPackage()
227 {
228 return $this->has_java_package;
229 }
230
231 /**
232 * <pre>
233 * If set, all the classes from the .proto file are wrapped in a single
234 * outer class with the given name. This applies to both Proto1
235 * (equivalent to the old "--one_java_file" option) and Proto2 (where
236 * a .proto always translates to a single class, but you may want to
237 * explicitly choose the class name).
238 * </pre>
239 *
240 * <code>optional string java_outer_classname = 8;</code>
241 */
242 public function getJavaOuterClassname()
243 {
244 return $this->java_outer_classname;
245 }
246
247 /**
248 * <pre>
249 * If set, all the classes from the .proto file are wrapped in a single
250 * outer class with the given name. This applies to both Proto1
251 * (equivalent to the old "--one_java_file" option) and Proto2 (where
252 * a .proto always translates to a single class, but you may want to
253 * explicitly choose the class name).
254 * </pre>
255 *
256 * <code>optional string java_outer_classname = 8;</code>
257 */
258 public function setJavaOuterClassname($var)
259 {
260 GPBUtil::checkString($var, True);
261 $this->java_outer_classname = $var;
262 $this->has_java_outer_classname = true;
263 }
264
265 public function hasJavaOuterClassname()
266 {
267 return $this->has_java_outer_classname;
268 }
269
270 /**
271 * <pre>
272 * If set true, then the Java code generator will generate a separate .java
273 * file for each top-level message, enum, and service defined in the .proto
274 * file. Thus, these types will *not* be nested inside the outer class
275 * named by java_outer_classname. However, the outer class will still be
276 * generated to contain the file's getDescriptor() method as well as any
277 * top-level extensions defined in the file.
278 * </pre>
279 *
280 * <code>optional bool java_multiple_files = 10 [default = false];</code>
281 */
282 public function getJavaMultipleFiles()
283 {
284 return $this->java_multiple_files;
285 }
286
287 /**
288 * <pre>
289 * If set true, then the Java code generator will generate a separate .java
290 * file for each top-level message, enum, and service defined in the .proto
291 * file. Thus, these types will *not* be nested inside the outer class
292 * named by java_outer_classname. However, the outer class will still be
293 * generated to contain the file's getDescriptor() method as well as any
294 * top-level extensions defined in the file.
295 * </pre>
296 *
297 * <code>optional bool java_multiple_files = 10 [default = false];</code>
298 */
299 public function setJavaMultipleFiles($var)
300 {
301 GPBUtil::checkBool($var);
302 $this->java_multiple_files = $var;
303 $this->has_java_multiple_files = true;
304 }
305
306 public function hasJavaMultipleFiles()
307 {
308 return $this->has_java_multiple_files;
309 }
310
311 /**
312 * <pre>
313 * This option does nothing.
314 * </pre>
315 *
316 * <code>optional bool java_generate_equals_and_hash = 20 [deprecated = true ];</code>
317 */
318 public function getJavaGenerateEqualsAndHash()
319 {
320 return $this->java_generate_equals_and_hash;
321 }
322
323 /**
324 * <pre>
325 * This option does nothing.
326 * </pre>
327 *
328 * <code>optional bool java_generate_equals_and_hash = 20 [deprecated = true ];</code>
329 */
330 public function setJavaGenerateEqualsAndHash($var)
331 {
332 GPBUtil::checkBool($var);
333 $this->java_generate_equals_and_hash = $var;
334 $this->has_java_generate_equals_and_hash = true;
335 }
336
337 public function hasJavaGenerateEqualsAndHash()
338 {
339 return $this->has_java_generate_equals_and_hash;
340 }
341
342 /**
343 * <pre>
344 * If set true, then the Java2 code generator will generate code that
345 * throws an exception whenever an attempt is made to assign a non-UTF-8
346 * byte sequence to a string field.
347 * Message reflection will do the same.
348 * However, an extension field still accepts non-UTF-8 byte sequences.
349 * This option has no effect on when used with the lite runtime.
350 * </pre>
351 *
352 * <code>optional bool java_string_check_utf8 = 27 [default = false];</code>
353 */
354 public function getJavaStringCheckUtf8()
355 {
356 return $this->java_string_check_utf8;
357 }
358
359 /**
360 * <pre>
361 * If set true, then the Java2 code generator will generate code that
362 * throws an exception whenever an attempt is made to assign a non-UTF-8
363 * byte sequence to a string field.
364 * Message reflection will do the same.
365 * However, an extension field still accepts non-UTF-8 byte sequences.
366 * This option has no effect on when used with the lite runtime.
367 * </pre>
368 *
369 * <code>optional bool java_string_check_utf8 = 27 [default = false];</code>
370 */
371 public function setJavaStringCheckUtf8($var)
372 {
373 GPBUtil::checkBool($var);
374 $this->java_string_check_utf8 = $var;
375 $this->has_java_string_check_utf8 = true;
376 }
377
378 public function hasJavaStringCheckUtf8()
379 {
380 return $this->has_java_string_check_utf8;
381 }
382
383 /**
384 * <code>optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];</code>
385 */
386 public function getOptimizeFor()
387 {
388 return $this->optimize_for;
389 }
390
391 /**
392 * <code>optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];</code>
393 */
394 public function setOptimizeFor($var)
395 {
396 GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FileOptions_OptimizeM ode::class);
397 $this->optimize_for = $var;
398 $this->has_optimize_for = true;
399 }
400
401 public function hasOptimizeFor()
402 {
403 return $this->has_optimize_for;
404 }
405
406 /**
407 * <pre>
408 * Sets the Go package where structs generated from this .proto will be
409 * placed. If omitted, the Go package will be derived from the following:
410 * - The basename of the package import path, if provided.
411 * - Otherwise, the package statement in the .proto file, if present.
412 * - Otherwise, the basename of the .proto file, without extension.
413 * </pre>
414 *
415 * <code>optional string go_package = 11;</code>
416 */
417 public function getGoPackage()
418 {
419 return $this->go_package;
420 }
421
422 /**
423 * <pre>
424 * Sets the Go package where structs generated from this .proto will be
425 * placed. If omitted, the Go package will be derived from the following:
426 * - The basename of the package import path, if provided.
427 * - Otherwise, the package statement in the .proto file, if present.
428 * - Otherwise, the basename of the .proto file, without extension.
429 * </pre>
430 *
431 * <code>optional string go_package = 11;</code>
432 */
433 public function setGoPackage($var)
434 {
435 GPBUtil::checkString($var, True);
436 $this->go_package = $var;
437 $this->has_go_package = true;
438 }
439
440 public function hasGoPackage()
441 {
442 return $this->has_go_package;
443 }
444
445 /**
446 * <pre>
447 * Should generic services be generated in each language? "Generic" service s
448 * are not specific to any particular RPC system. They are generated by the
449 * main code generators in each language (without additional plugins).
450 * Generic services were the only kind of service generation supported by
451 * early versions of google.protobuf.
452 * Generic services are now considered deprecated in favor of using plugins
453 * that generate code specific to your particular RPC system. Therefore,
454 * these default to false. Old code which depends on generic services shoul d
455 * explicitly set them to true.
456 * </pre>
457 *
458 * <code>optional bool cc_generic_services = 16 [default = false];</code>
459 */
460 public function getCcGenericServices()
461 {
462 return $this->cc_generic_services;
463 }
464
465 /**
466 * <pre>
467 * Should generic services be generated in each language? "Generic" service s
468 * are not specific to any particular RPC system. They are generated by the
469 * main code generators in each language (without additional plugins).
470 * Generic services were the only kind of service generation supported by
471 * early versions of google.protobuf.
472 * Generic services are now considered deprecated in favor of using plugins
473 * that generate code specific to your particular RPC system. Therefore,
474 * these default to false. Old code which depends on generic services shoul d
475 * explicitly set them to true.
476 * </pre>
477 *
478 * <code>optional bool cc_generic_services = 16 [default = false];</code>
479 */
480 public function setCcGenericServices($var)
481 {
482 GPBUtil::checkBool($var);
483 $this->cc_generic_services = $var;
484 $this->has_cc_generic_services = true;
485 }
486
487 public function hasCcGenericServices()
488 {
489 return $this->has_cc_generic_services;
490 }
491
492 /**
493 * <code>optional bool java_generic_services = 17 [default = false];</code>
494 */
495 public function getJavaGenericServices()
496 {
497 return $this->java_generic_services;
498 }
499
500 /**
501 * <code>optional bool java_generic_services = 17 [default = false];</code>
502 */
503 public function setJavaGenericServices($var)
504 {
505 GPBUtil::checkBool($var);
506 $this->java_generic_services = $var;
507 $this->has_java_generic_services = true;
508 }
509
510 public function hasJavaGenericServices()
511 {
512 return $this->has_java_generic_services;
513 }
514
515 /**
516 * <code>optional bool py_generic_services = 18 [default = false];</code>
517 */
518 public function getPyGenericServices()
519 {
520 return $this->py_generic_services;
521 }
522
523 /**
524 * <code>optional bool py_generic_services = 18 [default = false];</code>
525 */
526 public function setPyGenericServices($var)
527 {
528 GPBUtil::checkBool($var);
529 $this->py_generic_services = $var;
530 $this->has_py_generic_services = true;
531 }
532
533 public function hasPyGenericServices()
534 {
535 return $this->has_py_generic_services;
536 }
537
538 /**
539 * <pre>
540 * Is this file deprecated?
541 * Depending on the target platform, this can emit Deprecated annotations
542 * for everything in the file, or it will be completely ignored; in the very
543 * least, this is a formalization for deprecating files.
544 * </pre>
545 *
546 * <code>optional bool deprecated = 23 [default = false];</code>
547 */
548 public function getDeprecated()
549 {
550 return $this->deprecated;
551 }
552
553 /**
554 * <pre>
555 * Is this file deprecated?
556 * Depending on the target platform, this can emit Deprecated annotations
557 * for everything in the file, or it will be completely ignored; in the very
558 * least, this is a formalization for deprecating files.
559 * </pre>
560 *
561 * <code>optional bool deprecated = 23 [default = false];</code>
562 */
563 public function setDeprecated($var)
564 {
565 GPBUtil::checkBool($var);
566 $this->deprecated = $var;
567 $this->has_deprecated = true;
568 }
569
570 public function hasDeprecated()
571 {
572 return $this->has_deprecated;
573 }
574
575 /**
576 * <pre>
577 * Enables the use of arenas for the proto messages in this file. This appli es
578 * only to generated classes for C++.
579 * </pre>
580 *
581 * <code>optional bool cc_enable_arenas = 31 [default = false];</code>
582 */
583 public function getCcEnableArenas()
584 {
585 return $this->cc_enable_arenas;
586 }
587
588 /**
589 * <pre>
590 * Enables the use of arenas for the proto messages in this file. This appli es
591 * only to generated classes for C++.
592 * </pre>
593 *
594 * <code>optional bool cc_enable_arenas = 31 [default = false];</code>
595 */
596 public function setCcEnableArenas($var)
597 {
598 GPBUtil::checkBool($var);
599 $this->cc_enable_arenas = $var;
600 $this->has_cc_enable_arenas = true;
601 }
602
603 public function hasCcEnableArenas()
604 {
605 return $this->has_cc_enable_arenas;
606 }
607
608 /**
609 * <pre>
610 * Sets the objective c class prefix which is prepended to all objective c
611 * generated classes from this .proto. There is no default.
612 * </pre>
613 *
614 * <code>optional string objc_class_prefix = 36;</code>
615 */
616 public function getObjcClassPrefix()
617 {
618 return $this->objc_class_prefix;
619 }
620
621 /**
622 * <pre>
623 * Sets the objective c class prefix which is prepended to all objective c
624 * generated classes from this .proto. There is no default.
625 * </pre>
626 *
627 * <code>optional string objc_class_prefix = 36;</code>
628 */
629 public function setObjcClassPrefix($var)
630 {
631 GPBUtil::checkString($var, True);
632 $this->objc_class_prefix = $var;
633 $this->has_objc_class_prefix = true;
634 }
635
636 public function hasObjcClassPrefix()
637 {
638 return $this->has_objc_class_prefix;
639 }
640
641 /**
642 * <pre>
643 * Namespace for generated classes; defaults to the package.
644 * </pre>
645 *
646 * <code>optional string csharp_namespace = 37;</code>
647 */
648 public function getCsharpNamespace()
649 {
650 return $this->csharp_namespace;
651 }
652
653 /**
654 * <pre>
655 * Namespace for generated classes; defaults to the package.
656 * </pre>
657 *
658 * <code>optional string csharp_namespace = 37;</code>
659 */
660 public function setCsharpNamespace($var)
661 {
662 GPBUtil::checkString($var, True);
663 $this->csharp_namespace = $var;
664 $this->has_csharp_namespace = true;
665 }
666
667 public function hasCsharpNamespace()
668 {
669 return $this->has_csharp_namespace;
670 }
671
672 /**
673 * <pre>
674 * By default Swift generators will take the proto package and CamelCase it
675 * replacing '.' with underscore and use that to prefix the types/symbols
676 * defined. When this options is provided, they will use this value instead
677 * to prefix the types/symbols defined.
678 * </pre>
679 *
680 * <code>optional string swift_prefix = 39;</code>
681 */
682 public function getSwiftPrefix()
683 {
684 return $this->swift_prefix;
685 }
686
687 /**
688 * <pre>
689 * By default Swift generators will take the proto package and CamelCase it
690 * replacing '.' with underscore and use that to prefix the types/symbols
691 * defined. When this options is provided, they will use this value instead
692 * to prefix the types/symbols defined.
693 * </pre>
694 *
695 * <code>optional string swift_prefix = 39;</code>
696 */
697 public function setSwiftPrefix($var)
698 {
699 GPBUtil::checkString($var, True);
700 $this->swift_prefix = $var;
701 $this->has_swift_prefix = true;
702 }
703
704 public function hasSwiftPrefix()
705 {
706 return $this->has_swift_prefix;
707 }
708
709 /**
710 * <pre>
711 * The parser stores options it doesn't recognize here. See above.
712 * </pre>
713 *
714 * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
715 */
716 public function getUninterpretedOption()
717 {
718 return $this->uninterpreted_option;
719 }
720
721 /**
722 * <pre>
723 * The parser stores options it doesn't recognize here. See above.
724 * </pre>
725 *
726 * <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
727 */
728 public function setUninterpretedOption(&$var)
729 {
730 GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MES SAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
731 $this->uninterpreted_option = $var;
732 $this->has_uninterpreted_option = true;
733 }
734
735 public function hasUninterpretedOption()
736 {
737 return $this->has_uninterpreted_option;
738 }
739
740 }
741
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698