Debian Codegraph @

php/src/Google/Protobuf/Internal/UninterpretedOption.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 * A message representing a option the parser does not recognize. This only
15 * appears in options protos created by the compiler::Parser class.
16 * DescriptorPool resolves these when building Descriptor objects. Therefore,
17 * options protos in descriptor objects (e.g. returned by Descriptor::options(),
18 * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
19 * in them.
20 *
21 * Generated from protobuf message <code>google.protobuf.UninterpretedOption</code>
22 */
23 class UninterpretedOption extends \Google\Protobuf\Internal\Message
24 {
25 /**
26 * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>
27 */
28 private $name;
29 /**
30 * The value of the uninterpreted option, in whatever type the tokenizer
31 * identified it as during parsing. Exactly one of these should be set.
32 *
33 * Generated from protobuf field <code>optional string identifier_value = 3;</code>
34 */
35 protected $identifier_value = null;
36 /**
37 * Generated from protobuf field <code>optional uint64 positive_int_value = 4;</code>
38 */
39 protected $positive_int_value = null;
40 /**
41 * Generated from protobuf field <code>optional int64 negative_int_value = 5;</code>
42 */
43 protected $negative_int_value = null;
44 /**
45 * Generated from protobuf field <code>optional double double_value = 6;</code>
46 */
47 protected $double_value = null;
48 /**
49 * Generated from protobuf field <code>optional bytes string_value = 7;</code>
50 */
51 protected $string_value = null;
52 /**
53 * Generated from protobuf field <code>optional string aggregate_value = 8;</code>
54 */
55 protected $aggregate_value = null;
56
57 /**
58 * Constructor.
59 *
60 * @param array $data {
61 * Optional. Data for populating the Message object.
62 *
63 * @type array<\Google\Protobuf\Internal\UninterpretedOption\NamePart>|\Google\Protobuf\Internal\RepeatedField $name
64 * @type string $identifier_value
65 * The value of the uninterpreted option, in whatever type the tokenizer
66 * identified it as during parsing. Exactly one of these should be set.
67 * @type int|string $positive_int_value
68 * @type int|string $negative_int_value
69 * @type float $double_value
70 * @type string $string_value
71 * @type string $aggregate_value
72 * }
73 */
74 public function __construct($data = NULL) {
75 \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
76 parent::__construct($data);
77 }
78
79 /**
80 * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>
81 * @return \Google\Protobuf\Internal\RepeatedField
82 */
83 public function getName()
84 {
85 return $this->name;
86 }
87
88 /**
89 * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>
90 * @param array<\Google\Protobuf\Internal\UninterpretedOption\NamePart>|\Google\Protobuf\Internal\RepeatedField $var
91 * @return $this
92 */
93 public function setName($var)
94 {
95 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption\NamePart::class);
96 $this->name = $arr;
97
98 return $this;
99 }
100
101 /**
102 * The value of the uninterpreted option, in whatever type the tokenizer
103 * identified it as during parsing. Exactly one of these should be set.
104 *
105 * Generated from protobuf field <code>optional string identifier_value = 3;</code>
106 * @return string
107 */
108 public function getIdentifierValue()
109 {
110 return isset($this->identifier_value) ? $this->identifier_value : '';
111 }
112
113 public function hasIdentifierValue()
114 {
115 return isset($this->identifier_value);
116 }
117
118 public function clearIdentifierValue()
119 {
120 unset($this->identifier_value);
121 }
122
123 /**
124 * The value of the uninterpreted option, in whatever type the tokenizer
125 * identified it as during parsing. Exactly one of these should be set.
126 *
127 * Generated from protobuf field <code>optional string identifier_value = 3;</code>
128 * @param string $var
129 * @return $this
130 */
131 public function setIdentifierValue($var)
132 {
133 GPBUtil::checkString($var, True);
134 $this->identifier_value = $var;
135
136 return $this;
137 }
138
139 /**
140 * Generated from protobuf field <code>optional uint64 positive_int_value = 4;</code>
141 * @return int|string
142 */
143 public function getPositiveIntValue()
144 {
145 return isset($this->positive_int_value) ? $this->positive_int_value : 0;
146 }
147
148 public function hasPositiveIntValue()
149 {
150 return isset($this->positive_int_value);
151 }
152
153 public function clearPositiveIntValue()
154 {
155 unset($this->positive_int_value);
156 }
157
158 /**
159 * Generated from protobuf field <code>optional uint64 positive_int_value = 4;</code>
160 * @param int|string $var
161 * @return $this
162 */
163 public function setPositiveIntValue($var)
164 {
165 GPBUtil::checkUint64($var);
166 $this->positive_int_value = $var;
167
168 return $this;
169 }
170
171 /**
172 * Generated from protobuf field <code>optional int64 negative_int_value = 5;</code>
173 * @return int|string
174 */
175 public function getNegativeIntValue()
176 {
177 return isset($this->negative_int_value) ? $this->negative_int_value : 0;
178 }
179
180 public function hasNegativeIntValue()
181 {
182 return isset($this->negative_int_value);
183 }
184
185 public function clearNegativeIntValue()
186 {
187 unset($this->negative_int_value);
188 }
189
190 /**
191 * Generated from protobuf field <code>optional int64 negative_int_value = 5;</code>
192 * @param int|string $var
193 * @return $this
194 */
195 public function setNegativeIntValue($var)
196 {
197 GPBUtil::checkInt64($var);
198 $this->negative_int_value = $var;
199
200 return $this;
201 }
202
203 /**
204 * Generated from protobuf field <code>optional double double_value = 6;</code>
205 * @return float
206 */
207 public function getDoubleValue()
208 {
209 return isset($this->double_value) ? $this->double_value : 0.0;
210 }
211
212 public function hasDoubleValue()
213 {
214 return isset($this->double_value);
215 }
216
217 public function clearDoubleValue()
218 {
219 unset($this->double_value);
220 }
221
222 /**
223 * Generated from protobuf field <code>optional double double_value = 6;</code>
224 * @param float $var
225 * @return $this
226 */
227 public function setDoubleValue($var)
228 {
229 GPBUtil::checkDouble($var);
230 $this->double_value = $var;
231
232 return $this;
233 }
234
235 /**
236 * Generated from protobuf field <code>optional bytes string_value = 7;</code>
237 * @return string
238 */
239 public function getStringValue()
240 {
241 return isset($this->string_value) ? $this->string_value : '';
242 }
243
244 public function hasStringValue()
245 {
246 return isset($this->string_value);
247 }
248
249 public function clearStringValue()
250 {
251 unset($this->string_value);
252 }
253
254 /**
255 * Generated from protobuf field <code>optional bytes string_value = 7;</code>
256 * @param string $var
257 * @return $this
258 */
259 public function setStringValue($var)
260 {
261 GPBUtil::checkString($var, False);
262 $this->string_value = $var;
263
264 return $this;
265 }
266
267 /**
268 * Generated from protobuf field <code>optional string aggregate_value = 8;</code>
269 * @return string
270 */
271 public function getAggregateValue()
272 {
273 return isset($this->aggregate_value) ? $this->aggregate_value : '';
274 }
275
276 public function hasAggregateValue()
277 {
278 return isset($this->aggregate_value);
279 }
280
281 public function clearAggregateValue()
282 {
283 unset($this->aggregate_value);
284 }
285
286 /**
287 * Generated from protobuf field <code>optional string aggregate_value = 8;</code>
288 * @param string $var
289 * @return $this
290 */
291 public function setAggregateValue($var)
292 {
293 GPBUtil::checkString($var, True);
294 $this->aggregate_value = $var;
295
296 return $this;
297 }
298
299 }
300