blob: 7cc689d0282e15541dd8b0e67350c081166057a8 [file] [log] [blame]
avm9996399bb77c2020-01-27 03:15:08 +01001<?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 * Describes a message type.
15 *
16 * Generated from protobuf message <code>google.protobuf.DescriptorProto</code>
17 */
18class DescriptorProto extends \Google\Protobuf\Internal\Message
19{
20 /**
21 * Generated from protobuf field <code>optional string name = 1;</code>
22 */
23 protected $name = '';
24 private $has_name = false;
25 /**
26 * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto field = 2;</code>
27 */
28 private $field;
29 private $has_field = false;
30 /**
31 * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 6;</code>
32 */
33 private $extension;
34 private $has_extension = false;
35 /**
36 * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto nested_type = 3;</code>
37 */
38 private $nested_type;
39 private $has_nested_type = false;
40 /**
41 * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 4;</code>
42 */
43 private $enum_type;
44 private $has_enum_type = false;
45 /**
46 * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;</code>
47 */
48 private $extension_range;
49 private $has_extension_range = false;
50 /**
51 * Generated from protobuf field <code>repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;</code>
52 */
53 private $oneof_decl;
54 private $has_oneof_decl = false;
55 /**
56 * Generated from protobuf field <code>optional .google.protobuf.MessageOptions options = 7;</code>
57 */
58 protected $options = null;
59 private $has_options = false;
60 /**
61 * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;</code>
62 */
63 private $reserved_range;
64 private $has_reserved_range = false;
65 /**
66 * Reserved field names, which may not be used by fields in the same message.
67 * A given name may only be reserved once.
68 *
69 * Generated from protobuf field <code>repeated string reserved_name = 10;</code>
70 */
71 private $reserved_name;
72 private $has_reserved_name = false;
73
74 /**
75 * Constructor.
76 *
77 * @param array $data {
78 * Optional. Data for populating the Message object.
79 *
80 * @type string $name
81 * @type \Google\Protobuf\Internal\FieldDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $field
82 * @type \Google\Protobuf\Internal\FieldDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $extension
83 * @type \Google\Protobuf\Internal\DescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $nested_type
84 * @type \Google\Protobuf\Internal\EnumDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $enum_type
85 * @type \Google\Protobuf\Internal\DescriptorProto\ExtensionRange[]|\Google\Protobuf\Internal\RepeatedField $extension_range
86 * @type \Google\Protobuf\Internal\OneofDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $oneof_decl
87 * @type \Google\Protobuf\Internal\MessageOptions $options
88 * @type \Google\Protobuf\Internal\DescriptorProto\ReservedRange[]|\Google\Protobuf\Internal\RepeatedField $reserved_range
89 * @type string[]|\Google\Protobuf\Internal\RepeatedField $reserved_name
90 * Reserved field names, which may not be used by fields in the same message.
91 * A given name may only be reserved once.
92 * }
93 */
94 public function __construct($data = NULL) {
95 \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
96 parent::__construct($data);
97 }
98
99 /**
100 * Generated from protobuf field <code>optional string name = 1;</code>
101 * @return string
102 */
103 public function getName()
104 {
105 return $this->name;
106 }
107
108 /**
109 * Generated from protobuf field <code>optional string name = 1;</code>
110 * @param string $var
111 * @return $this
112 */
113 public function setName($var)
114 {
115 GPBUtil::checkString($var, True);
116 $this->name = $var;
117 $this->has_name = true;
118
119 return $this;
120 }
121
122 public function hasName()
123 {
124 return $this->has_name;
125 }
126
127 /**
128 * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto field = 2;</code>
129 * @return \Google\Protobuf\Internal\RepeatedField
130 */
131 public function getField()
132 {
133 return $this->field;
134 }
135
136 /**
137 * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto field = 2;</code>
138 * @param \Google\Protobuf\Internal\FieldDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
139 * @return $this
140 */
141 public function setField($var)
142 {
143 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class);
144 $this->field = $arr;
145 $this->has_field = true;
146
147 return $this;
148 }
149
150 public function hasField()
151 {
152 return $this->has_field;
153 }
154
155 /**
156 * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 6;</code>
157 * @return \Google\Protobuf\Internal\RepeatedField
158 */
159 public function getExtension()
160 {
161 return $this->extension;
162 }
163
164 /**
165 * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 6;</code>
166 * @param \Google\Protobuf\Internal\FieldDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
167 * @return $this
168 */
169 public function setExtension($var)
170 {
171 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class);
172 $this->extension = $arr;
173 $this->has_extension = true;
174
175 return $this;
176 }
177
178 public function hasExtension()
179 {
180 return $this->has_extension;
181 }
182
183 /**
184 * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto nested_type = 3;</code>
185 * @return \Google\Protobuf\Internal\RepeatedField
186 */
187 public function getNestedType()
188 {
189 return $this->nested_type;
190 }
191
192 /**
193 * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto nested_type = 3;</code>
194 * @param \Google\Protobuf\Internal\DescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
195 * @return $this
196 */
197 public function setNestedType($var)
198 {
199 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto::class);
200 $this->nested_type = $arr;
201 $this->has_nested_type = true;
202
203 return $this;
204 }
205
206 public function hasNestedType()
207 {
208 return $this->has_nested_type;
209 }
210
211 /**
212 * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 4;</code>
213 * @return \Google\Protobuf\Internal\RepeatedField
214 */
215 public function getEnumType()
216 {
217 return $this->enum_type;
218 }
219
220 /**
221 * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 4;</code>
222 * @param \Google\Protobuf\Internal\EnumDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
223 * @return $this
224 */
225 public function setEnumType($var)
226 {
227 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumDescriptorProto::class);
228 $this->enum_type = $arr;
229 $this->has_enum_type = true;
230
231 return $this;
232 }
233
234 public function hasEnumType()
235 {
236 return $this->has_enum_type;
237 }
238
239 /**
240 * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;</code>
241 * @return \Google\Protobuf\Internal\RepeatedField
242 */
243 public function getExtensionRange()
244 {
245 return $this->extension_range;
246 }
247
248 /**
249 * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;</code>
250 * @param \Google\Protobuf\Internal\DescriptorProto\ExtensionRange[]|\Google\Protobuf\Internal\RepeatedField $var
251 * @return $this
252 */
253 public function setExtensionRange($var)
254 {
255 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto\ExtensionRange::class);
256 $this->extension_range = $arr;
257 $this->has_extension_range = true;
258
259 return $this;
260 }
261
262 public function hasExtensionRange()
263 {
264 return $this->has_extension_range;
265 }
266
267 /**
268 * Generated from protobuf field <code>repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;</code>
269 * @return \Google\Protobuf\Internal\RepeatedField
270 */
271 public function getOneofDecl()
272 {
273 return $this->oneof_decl;
274 }
275
276 /**
277 * Generated from protobuf field <code>repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;</code>
278 * @param \Google\Protobuf\Internal\OneofDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
279 * @return $this
280 */
281 public function setOneofDecl($var)
282 {
283 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\OneofDescriptorProto::class);
284 $this->oneof_decl = $arr;
285 $this->has_oneof_decl = true;
286
287 return $this;
288 }
289
290 public function hasOneofDecl()
291 {
292 return $this->has_oneof_decl;
293 }
294
295 /**
296 * Generated from protobuf field <code>optional .google.protobuf.MessageOptions options = 7;</code>
297 * @return \Google\Protobuf\Internal\MessageOptions
298 */
299 public function getOptions()
300 {
301 return $this->options;
302 }
303
304 /**
305 * Generated from protobuf field <code>optional .google.protobuf.MessageOptions options = 7;</code>
306 * @param \Google\Protobuf\Internal\MessageOptions $var
307 * @return $this
308 */
309 public function setOptions($var)
310 {
311 GPBUtil::checkMessage($var, \Google\Protobuf\Internal\MessageOptions::class);
312 $this->options = $var;
313 $this->has_options = true;
314
315 return $this;
316 }
317
318 public function hasOptions()
319 {
320 return $this->has_options;
321 }
322
323 /**
324 * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;</code>
325 * @return \Google\Protobuf\Internal\RepeatedField
326 */
327 public function getReservedRange()
328 {
329 return $this->reserved_range;
330 }
331
332 /**
333 * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;</code>
334 * @param \Google\Protobuf\Internal\DescriptorProto\ReservedRange[]|\Google\Protobuf\Internal\RepeatedField $var
335 * @return $this
336 */
337 public function setReservedRange($var)
338 {
339 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto\ReservedRange::class);
340 $this->reserved_range = $arr;
341 $this->has_reserved_range = true;
342
343 return $this;
344 }
345
346 public function hasReservedRange()
347 {
348 return $this->has_reserved_range;
349 }
350
351 /**
352 * Reserved field names, which may not be used by fields in the same message.
353 * A given name may only be reserved once.
354 *
355 * Generated from protobuf field <code>repeated string reserved_name = 10;</code>
356 * @return \Google\Protobuf\Internal\RepeatedField
357 */
358 public function getReservedName()
359 {
360 return $this->reserved_name;
361 }
362
363 /**
364 * Reserved field names, which may not be used by fields in the same message.
365 * A given name may only be reserved once.
366 *
367 * Generated from protobuf field <code>repeated string reserved_name = 10;</code>
368 * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
369 * @return $this
370 */
371 public function setReservedName($var)
372 {
373 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
374 $this->reserved_name = $arr;
375 $this->has_reserved_name = true;
376
377 return $this;
378 }
379
380 public function hasReservedName()
381 {
382 return $this->has_reserved_name;
383 }
384
385}
386