blob: 1b47811050a4c4ee47052d2915f11ddb5dd8be3c [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/type.proto
4
5namespace Google\Protobuf;
6
7use Google\Protobuf\Internal\GPBType;
8use Google\Protobuf\Internal\RepeatedField;
9use Google\Protobuf\Internal\GPBUtil;
10
11/**
12 * A protocol buffer message type.
13 *
14 * Generated from protobuf message <code>google.protobuf.Type</code>
15 */
16class Type extends \Google\Protobuf\Internal\Message
17{
18 /**
19 * The fully qualified message name.
20 *
21 * Generated from protobuf field <code>string name = 1;</code>
22 */
23 private $name = '';
24 /**
25 * The list of fields.
26 *
27 * Generated from protobuf field <code>repeated .google.protobuf.Field fields = 2;</code>
28 */
29 private $fields;
30 /**
31 * The list of types appearing in `oneof` definitions in this type.
32 *
33 * Generated from protobuf field <code>repeated string oneofs = 3;</code>
34 */
35 private $oneofs;
36 /**
37 * The protocol buffer options.
38 *
39 * Generated from protobuf field <code>repeated .google.protobuf.Option options = 4;</code>
40 */
41 private $options;
42 /**
43 * The source context.
44 *
45 * Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 5;</code>
46 */
47 private $source_context = null;
48 /**
49 * The source syntax.
50 *
51 * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 6;</code>
52 */
53 private $syntax = 0;
54
55 /**
56 * Constructor.
57 *
58 * @param array $data {
59 * Optional. Data for populating the Message object.
60 *
61 * @type string $name
62 * The fully qualified message name.
63 * @type \Google\Protobuf\Field[]|\Google\Protobuf\Internal\RepeatedField $fields
64 * The list of fields.
65 * @type string[]|\Google\Protobuf\Internal\RepeatedField $oneofs
66 * The list of types appearing in `oneof` definitions in this type.
67 * @type \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $options
68 * The protocol buffer options.
69 * @type \Google\Protobuf\SourceContext $source_context
70 * The source context.
71 * @type int $syntax
72 * The source syntax.
73 * }
74 */
75 public function __construct($data = NULL) {
76 \GPBMetadata\Google\Protobuf\Type::initOnce();
77 parent::__construct($data);
78 }
79
80 /**
81 * The fully qualified message name.
82 *
83 * Generated from protobuf field <code>string name = 1;</code>
84 * @return string
85 */
86 public function getName()
87 {
88 return $this->name;
89 }
90
91 /**
92 * The fully qualified message name.
93 *
94 * Generated from protobuf field <code>string name = 1;</code>
95 * @param string $var
96 * @return $this
97 */
98 public function setName($var)
99 {
100 GPBUtil::checkString($var, True);
101 $this->name = $var;
102
103 return $this;
104 }
105
106 /**
107 * The list of fields.
108 *
109 * Generated from protobuf field <code>repeated .google.protobuf.Field fields = 2;</code>
110 * @return \Google\Protobuf\Internal\RepeatedField
111 */
112 public function getFields()
113 {
114 return $this->fields;
115 }
116
117 /**
118 * The list of fields.
119 *
120 * Generated from protobuf field <code>repeated .google.protobuf.Field fields = 2;</code>
121 * @param \Google\Protobuf\Field[]|\Google\Protobuf\Internal\RepeatedField $var
122 * @return $this
123 */
124 public function setFields($var)
125 {
126 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Field::class);
127 $this->fields = $arr;
128
129 return $this;
130 }
131
132 /**
133 * The list of types appearing in `oneof` definitions in this type.
134 *
135 * Generated from protobuf field <code>repeated string oneofs = 3;</code>
136 * @return \Google\Protobuf\Internal\RepeatedField
137 */
138 public function getOneofs()
139 {
140 return $this->oneofs;
141 }
142
143 /**
144 * The list of types appearing in `oneof` definitions in this type.
145 *
146 * Generated from protobuf field <code>repeated string oneofs = 3;</code>
147 * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
148 * @return $this
149 */
150 public function setOneofs($var)
151 {
152 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
153 $this->oneofs = $arr;
154
155 return $this;
156 }
157
158 /**
159 * The protocol buffer options.
160 *
161 * Generated from protobuf field <code>repeated .google.protobuf.Option options = 4;</code>
162 * @return \Google\Protobuf\Internal\RepeatedField
163 */
164 public function getOptions()
165 {
166 return $this->options;
167 }
168
169 /**
170 * The protocol buffer options.
171 *
172 * Generated from protobuf field <code>repeated .google.protobuf.Option options = 4;</code>
173 * @param \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $var
174 * @return $this
175 */
176 public function setOptions($var)
177 {
178 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class);
179 $this->options = $arr;
180
181 return $this;
182 }
183
184 /**
185 * The source context.
186 *
187 * Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 5;</code>
188 * @return \Google\Protobuf\SourceContext
189 */
190 public function getSourceContext()
191 {
192 return $this->source_context;
193 }
194
195 /**
196 * The source context.
197 *
198 * Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 5;</code>
199 * @param \Google\Protobuf\SourceContext $var
200 * @return $this
201 */
202 public function setSourceContext($var)
203 {
204 GPBUtil::checkMessage($var, \Google\Protobuf\SourceContext::class);
205 $this->source_context = $var;
206
207 return $this;
208 }
209
210 /**
211 * The source syntax.
212 *
213 * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 6;</code>
214 * @return int
215 */
216 public function getSyntax()
217 {
218 return $this->syntax;
219 }
220
221 /**
222 * The source syntax.
223 *
224 * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 6;</code>
225 * @param int $var
226 * @return $this
227 */
228 public function setSyntax($var)
229 {
230 GPBUtil::checkEnum($var, \Google\Protobuf\Syntax::class);
231 $this->syntax = $var;
232
233 return $this;
234 }
235
236}
237