Debian Codegraph @

php/src/Google/Protobuf/Internal/FileDescriptorProto.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 * Describes a complete .proto file.
15 *
16 * Generated from protobuf message <code>google.protobuf.FileDescriptorProto</code>
17 */
18 class FileDescriptorProto extends \Google\Protobuf\Internal\Message
19 {
20 /**
21 * file name, relative to root of source tree
22 *
23 * Generated from protobuf field <code>optional string name = 1;</code>
24 */
25 protected $name = null;
26 /**
27 * e.g. "foo", "foo.bar", etc.
28 *
29 * Generated from protobuf field <code>optional string package = 2;</code>
30 */
31 protected $package = null;
32 /**
33 * Names of files imported by this file.
34 *
35 * Generated from protobuf field <code>repeated string dependency = 3;</code>
36 */
37 private $dependency;
38 /**
39 * Indexes of the public imported files in the dependency list above.
40 *
41 * Generated from protobuf field <code>repeated int32 public_dependency = 10;</code>
42 */
43 private $public_dependency;
44 /**
45 * Indexes of the weak imported files in the dependency list.
46 * For Google-internal migration only. Do not use.
47 *
48 * Generated from protobuf field <code>repeated int32 weak_dependency = 11;</code>
49 */
50 private $weak_dependency;
51 /**
52 * All top-level definitions in this file.
53 *
54 * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto message_type = 4;</code>
55 */
56 private $message_type;
57 /**
58 * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 5;</code>
59 */
60 private $enum_type;
61 /**
62 * Generated from protobuf field <code>repeated .google.protobuf.ServiceDescriptorProto service = 6;</code>
63 */
64 private $service;
65 /**
66 * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 7;</code>
67 */
68 private $extension;
69 /**
70 * Generated from protobuf field <code>optional .google.protobuf.FileOptions options = 8;</code>
71 */
72 protected $options = null;
73 /**
74 * This field contains optional information about the original source code.
75 * You may safely remove this entire field without harming runtime
76 * functionality of the descriptors -- the information is needed only by
77 * development tools.
78 *
79 * Generated from protobuf field <code>optional .google.protobuf.SourceCodeInfo source_code_info = 9;</code>
80 */
81 protected $source_code_info = null;
82 /**
83 * The syntax of the proto file.
84 * The supported values are "proto2" and "proto3".
85 *
86 * Generated from protobuf field <code>optional string syntax = 12;</code>
87 */
88 protected $syntax = null;
89
90 /**
91 * Constructor.
92 *
93 * @param array $data {
94 * Optional. Data for populating the Message object.
95 *
96 * @type string $name
97 * file name, relative to root of source tree
98 * @type string $package
99 * e.g. "foo", "foo.bar", etc.
100 * @type array<string>|\Google\Protobuf\Internal\RepeatedField $dependency
101 * Names of files imported by this file.
102 * @type array<int>|\Google\Protobuf\Internal\RepeatedField $public_dependency
103 * Indexes of the public imported files in the dependency list above.
104 * @type array<int>|\Google\Protobuf\Internal\RepeatedField $weak_dependency
105 * Indexes of the weak imported files in the dependency list.
106 * For Google-internal migration only. Do not use.
107 * @type array<\Google\Protobuf\Internal\DescriptorProto>|\Google\Protobuf\Internal\RepeatedField $message_type
108 * All top-level definitions in this file.
109 * @type array<\Google\Protobuf\Internal\EnumDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $enum_type
110 * @type array<\Google\Protobuf\Internal\ServiceDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $service
111 * @type array<\Google\Protobuf\Internal\FieldDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $extension
112 * @type \Google\Protobuf\Internal\FileOptions $options
113 * @type \Google\Protobuf\Internal\SourceCodeInfo $source_code_info
114 * This field contains optional information about the original source code.
115 * You may safely remove this entire field without harming runtime
116 * functionality of the descriptors -- the information is needed only by
117 * development tools.
118 * @type string $syntax
119 * The syntax of the proto file.
120 * The supported values are "proto2" and "proto3".
121 * }
122 */
123 public function __construct($data = NULL) {
124 \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
125 parent::__construct($data);
126 }
127
128 /**
129 * file name, relative to root of source tree
130 *
131 * Generated from protobuf field <code>optional string name = 1;</code>
132 * @return string
133 */
134 public function getName()
135 {
136 return isset($this->name) ? $this->name : '';
137 }
138
139 public function hasName()
140 {
141 return isset($this->name);
142 }
143
144 public function clearName()
145 {
146 unset($this->name);
147 }
148
149 /**
150 * file name, relative to root of source tree
151 *
152 * Generated from protobuf field <code>optional string name = 1;</code>
153 * @param string $var
154 * @return $this
155 */
156 public function setName($var)
157 {
158 GPBUtil::checkString($var, True);
159 $this->name = $var;
160
161 return $this;
162 }
163
164 /**
165 * e.g. "foo", "foo.bar", etc.
166 *
167 * Generated from protobuf field <code>optional string package = 2;</code>
168 * @return string
169 */
170 public function getPackage()
171 {
172 return isset($this->package) ? $this->package : '';
173 }
174
175 public function hasPackage()
176 {
177 return isset($this->package);
178 }
179
180 public function clearPackage()
181 {
182 unset($this->package);
183 }
184
185 /**
186 * e.g. "foo", "foo.bar", etc.
187 *
188 * Generated from protobuf field <code>optional string package = 2;</code>
189 * @param string $var
190 * @return $this
191 */
192 public function setPackage($var)
193 {
194 GPBUtil::checkString($var, True);
195 $this->package = $var;
196
197 return $this;
198 }
199
200 /**
201 * Names of files imported by this file.
202 *
203 * Generated from protobuf field <code>repeated string dependency = 3;</code>
204 * @return \Google\Protobuf\Internal\RepeatedField
205 */
206 public function getDependency()
207 {
208 return $this->dependency;
209 }
210
211 /**
212 * Names of files imported by this file.
213 *
214 * Generated from protobuf field <code>repeated string dependency = 3;</code>
215 * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
216 * @return $this
217 */
218 public function setDependency($var)
219 {
220 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
221 $this->dependency = $arr;
222
223 return $this;
224 }
225
226 /**
227 * Indexes of the public imported files in the dependency list above.
228 *
229 * Generated from protobuf field <code>repeated int32 public_dependency = 10;</code>
230 * @return \Google\Protobuf\Internal\RepeatedField
231 */
232 public function getPublicDependency()
233 {
234 return $this->public_dependency;
235 }
236
237 /**
238 * Indexes of the public imported files in the dependency list above.
239 *
240 * Generated from protobuf field <code>repeated int32 public_dependency = 10;</code>
241 * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
242 * @return $this
243 */
244 public function setPublicDependency($var)
245 {
246 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
247 $this->public_dependency = $arr;
248
249 return $this;
250 }
251
252 /**
253 * Indexes of the weak imported files in the dependency list.
254 * For Google-internal migration only. Do not use.
255 *
256 * Generated from protobuf field <code>repeated int32 weak_dependency = 11;</code>
257 * @return \Google\Protobuf\Internal\RepeatedField
258 */
259 public function getWeakDependency()
260 {
261 return $this->weak_dependency;
262 }
263
264 /**
265 * Indexes of the weak imported files in the dependency list.
266 * For Google-internal migration only. Do not use.
267 *
268 * Generated from protobuf field <code>repeated int32 weak_dependency = 11;</code>
269 * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
270 * @return $this
271 */
272 public function setWeakDependency($var)
273 {
274 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
275 $this->weak_dependency = $arr;
276
277 return $this;
278 }
279
280 /**
281 * All top-level definitions in this file.
282 *
283 * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto message_type = 4;</code>
284 * @return \Google\Protobuf\Internal\RepeatedField
285 */
286 public function getMessageType()
287 {
288 return $this->message_type;
289 }
290
291 /**
292 * All top-level definitions in this file.
293 *
294 * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto message_type = 4;</code>
295 * @param array<\Google\Protobuf\Internal\DescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
296 * @return $this
297 */
298 public function setMessageType($var)
299 {
300 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto::class);
301 $this->message_type = $arr;
302
303 return $this;
304 }
305
306 /**
307 * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 5;</code>
308 * @return \Google\Protobuf\Internal\RepeatedField
309 */
310 public function getEnumType()
311 {
312 return $this->enum_type;
313 }
314
315 /**
316 * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 5;</code>
317 * @param array<\Google\Protobuf\Internal\EnumDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
318 * @return $this
319 */
320 public function setEnumType($var)
321 {
322 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumDescriptorProto::class);
323 $this->enum_type = $arr;
324
325 return $this;
326 }
327
328 /**
329 * Generated from protobuf field <code>repeated .google.protobuf.ServiceDescriptorProto service = 6;</code>
330 * @return \Google\Protobuf\Internal\RepeatedField
331 */
332 public function getService()
333 {
334 return $this->service;
335 }
336
337 /**
338 * Generated from protobuf field <code>repeated .google.protobuf.ServiceDescriptorProto service = 6;</code>
339 * @param array<\Google\Protobuf\Internal\ServiceDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
340 * @return $this
341 */
342 public function setService($var)
343 {
344 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\ServiceDescriptorProto::class);
345 $this->service = $arr;
346
347 return $this;
348 }
349
350 /**
351 * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 7;</code>
352 * @return \Google\Protobuf\Internal\RepeatedField
353 */
354 public function getExtension()
355 {
356 return $this->extension;
357 }
358
359 /**
360 * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 7;</code>
361 * @param array<\Google\Protobuf\Internal\FieldDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
362 * @return $this
363 */
364 public function setExtension($var)
365 {
366 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class);
367 $this->extension = $arr;
368
369 return $this;
370 }
371
372 /**
373 * Generated from protobuf field <code>optional .google.protobuf.FileOptions options = 8;</code>
374 * @return \Google\Protobuf\Internal\FileOptions|null
375 */
376 public function getOptions()
377 {
378 return $this->options;
379 }
380
381 public function hasOptions()
382 {
383 return isset($this->options);
384 }
385
386 public function clearOptions()
387 {
388 unset($this->options);
389 }
390
391 /**
392 * Generated from protobuf field <code>optional .google.protobuf.FileOptions options = 8;</code>
393 * @param \Google\Protobuf\Internal\FileOptions $var
394 * @return $this
395 */
396 public function setOptions($var)
397 {
398 GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FileOptions::class);
399 $this->options = $var;
400
401 return $this;
402 }
403
404 /**
405 * This field contains optional information about the original source code.
406 * You may safely remove this entire field without harming runtime
407 * functionality of the descriptors -- the information is needed only by
408 * development tools.
409 *
410 * Generated from protobuf field <code>optional .google.protobuf.SourceCodeInfo source_code_info = 9;</code>
411 * @return \Google\Protobuf\Internal\SourceCodeInfo|null
412 */
413 public function getSourceCodeInfo()
414 {
415 return $this->source_code_info;
416 }
417
418 public function hasSourceCodeInfo()
419 {
420 return isset($this->source_code_info);
421 }
422
423 public function clearSourceCodeInfo()
424 {
425 unset($this->source_code_info);
426 }
427
428 /**
429 * This field contains optional information about the original source code.
430 * You may safely remove this entire field without harming runtime
431 * functionality of the descriptors -- the information is needed only by
432 * development tools.
433 *
434 * Generated from protobuf field <code>optional .google.protobuf.SourceCodeInfo source_code_info = 9;</code>
435 * @param \Google\Protobuf\Internal\SourceCodeInfo $var
436 * @return $this
437 */
438 public function setSourceCodeInfo($var)
439 {
440 GPBUtil::checkMessage($var, \Google\Protobuf\Internal\SourceCodeInfo::class);
441 $this->source_code_info = $var;
442
443 return $this;
444 }
445
446 /**
447 * The syntax of the proto file.
448 * The supported values are "proto2" and "proto3".
449 *
450 * Generated from protobuf field <code>optional string syntax = 12;</code>
451 * @return string
452 */
453 public function getSyntax()
454 {
455 return isset($this->syntax) ? $this->syntax : '';
456 }
457
458 public function hasSyntax()
459 {
460 return isset($this->syntax);
461 }
462
463 public function clearSyntax()
464 {
465 unset($this->syntax);
466 }
467
468 /**
469 * The syntax of the proto file.
470 * The supported values are "proto2" and "proto3".
471 *
472 * Generated from protobuf field <code>optional string syntax = 12;</code>
473 * @param string $var
474 * @return $this
475 */
476 public function setSyntax($var)
477 {
478 GPBUtil::checkString($var, True);
479 $this->syntax = $var;
480
481 return $this;
482 }
483
484 }
485