Debian Codegraph @

php/src/Google/Protobuf/Internal/EnumOptions.php

raw
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 use Google\Protobuf\Internal\GPBUtil;
12
13 /**
14 * Generated from protobuf message <code>google.protobuf.EnumOptions</code>
15 */
16 class EnumOptions extends \Google\Protobuf\Internal\Message
17 {
18 /**
19 * Set this option to true to allow mapping different tag names to the same
20 * value.
21 *
22 * Generated from protobuf field <code>optional bool allow_alias = 2;</code>
23 */
24 protected $allow_alias = null;
25 /**
26 * Is this enum deprecated?
27 * Depending on the target platform, this can emit Deprecated annotations
28 * for the enum, or it will be completely ignored; in the very least, this
29 * is a formalization for deprecating enums.
30 *
31 * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
32 */
33 protected $deprecated = null;
34 /**
35 * The parser stores options it doesn't recognize here. See above.
36 *
37 * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
38 */
39 private $uninterpreted_option;
40
41 /**
42 * Constructor.
43 *
44 * @param array $data {
45 * Optional. Data for populating the Message object.
46 *
47 * @type bool $allow_alias
48 * Set this option to true to allow mapping different tag names to the same
49 * value.
50 * @type bool $deprecated
51 * Is this enum deprecated?
52 * Depending on the target platform, this can emit Deprecated annotations
53 * for the enum, or it will be completely ignored; in the very least, this
54 * is a formalization for deprecating enums.
55 * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
56 * The parser stores options it doesn't recognize here. See above.
57 * }
58 */
59 public function __construct($data = NULL) {
60 \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
61 parent::__construct($data);
62 }
63
64 /**
65 * Set this option to true to allow mapping different tag names to the same
66 * value.
67 *
68 * Generated from protobuf field <code>optional bool allow_alias = 2;</code>
69 * @return bool
70 */
71 public function getAllowAlias()
72 {
73 return isset($this->allow_alias) ? $this->allow_alias : false;
74 }
75
76 public function hasAllowAlias()
77 {
78 return isset($this->allow_alias);
79 }
80
81 public function clearAllowAlias()
82 {
83 unset($this->allow_alias);
84 }
85
86 /**
87 * Set this option to true to allow mapping different tag names to the same
88 * value.
89 *
90 * Generated from protobuf field <code>optional bool allow_alias = 2;</code>
91 * @param bool $var
92 * @return $this
93 */
94 public function setAllowAlias($var)
95 {
96 GPBUtil::checkBool($var);
97 $this->allow_alias = $var;
98
99 return $this;
100 }
101
102 /**
103 * Is this enum deprecated?
104 * Depending on the target platform, this can emit Deprecated annotations
105 * for the enum, or it will be completely ignored; in the very least, this
106 * is a formalization for deprecating enums.
107 *
108 * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
109 * @return bool
110 */
111 public function getDeprecated()
112 {
113 return isset($this->deprecated) ? $this->deprecated : false;
114 }
115
116 public function hasDeprecated()
117 {
118 return isset($this->deprecated);
119 }
120
121 public function clearDeprecated()
122 {
123 unset($this->deprecated);
124 }
125
126 /**
127 * Is this enum deprecated?
128 * Depending on the target platform, this can emit Deprecated annotations
129 * for the enum, or it will be completely ignored; in the very least, this
130 * is a formalization for deprecating enums.
131 *
132 * Generated from protobuf field <code>optional bool deprecated = 3 [default = false];</code>
133 * @param bool $var
134 * @return $this
135 */
136 public function setDeprecated($var)
137 {
138 GPBUtil::checkBool($var);
139 $this->deprecated = $var;
140
141 return $this;
142 }
143
144 /**
145 * The parser stores options it doesn't recognize here. See above.
146 *
147 * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
148 * @return \Google\Protobuf\Internal\RepeatedField
149 */
150 public function getUninterpretedOption()
151 {
152 return $this->uninterpreted_option;
153 }
154
155 /**
156 * The parser stores options it doesn't recognize here. See above.
157 *
158 * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
159 * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var
160 * @return $this
161 */
162 public function setUninterpretedOption($var)
163 {
164 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
165 $this->uninterpreted_option = $arr;
166
167 return $this;
168 }
169
170 }
171