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