Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Side by Side Diff: third_party/protobuf/php/src/Google/Protobuf/Internal/FileDescriptorProto.php

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

Powered by Google App Engine
This is Rietveld 408576698