1ffe3c632Sopenharmony_ci<?php
2ffe3c632Sopenharmony_ci# Generated by the protocol buffer compiler.  DO NOT EDIT!
3ffe3c632Sopenharmony_ci# source: google/protobuf/type.proto
4ffe3c632Sopenharmony_ci
5ffe3c632Sopenharmony_cinamespace Google\Protobuf;
6ffe3c632Sopenharmony_ci
7ffe3c632Sopenharmony_ciuse Google\Protobuf\Internal\GPBType;
8ffe3c632Sopenharmony_ciuse Google\Protobuf\Internal\RepeatedField;
9ffe3c632Sopenharmony_ciuse Google\Protobuf\Internal\GPBUtil;
10ffe3c632Sopenharmony_ci
11ffe3c632Sopenharmony_ci/**
12ffe3c632Sopenharmony_ci * A single field of a message type.
13ffe3c632Sopenharmony_ci *
14ffe3c632Sopenharmony_ci * Generated from protobuf message <code>google.protobuf.Field</code>
15ffe3c632Sopenharmony_ci */
16ffe3c632Sopenharmony_ciclass Field extends \Google\Protobuf\Internal\Message
17ffe3c632Sopenharmony_ci{
18ffe3c632Sopenharmony_ci    /**
19ffe3c632Sopenharmony_ci     * The field type.
20ffe3c632Sopenharmony_ci     *
21ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>.google.protobuf.Field.Kind kind = 1;</code>
22ffe3c632Sopenharmony_ci     */
23ffe3c632Sopenharmony_ci    private $kind = 0;
24ffe3c632Sopenharmony_ci    /**
25ffe3c632Sopenharmony_ci     * The field cardinality.
26ffe3c632Sopenharmony_ci     *
27ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>.google.protobuf.Field.Cardinality cardinality = 2;</code>
28ffe3c632Sopenharmony_ci     */
29ffe3c632Sopenharmony_ci    private $cardinality = 0;
30ffe3c632Sopenharmony_ci    /**
31ffe3c632Sopenharmony_ci     * The field number.
32ffe3c632Sopenharmony_ci     *
33ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>int32 number = 3;</code>
34ffe3c632Sopenharmony_ci     */
35ffe3c632Sopenharmony_ci    private $number = 0;
36ffe3c632Sopenharmony_ci    /**
37ffe3c632Sopenharmony_ci     * The field name.
38ffe3c632Sopenharmony_ci     *
39ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>string name = 4;</code>
40ffe3c632Sopenharmony_ci     */
41ffe3c632Sopenharmony_ci    private $name = '';
42ffe3c632Sopenharmony_ci    /**
43ffe3c632Sopenharmony_ci     * The field type URL, without the scheme, for message or enumeration
44ffe3c632Sopenharmony_ci     * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
45ffe3c632Sopenharmony_ci     *
46ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>string type_url = 6;</code>
47ffe3c632Sopenharmony_ci     */
48ffe3c632Sopenharmony_ci    private $type_url = '';
49ffe3c632Sopenharmony_ci    /**
50ffe3c632Sopenharmony_ci     * The index of the field type in `Type.oneofs`, for message or enumeration
51ffe3c632Sopenharmony_ci     * types. The first type has index 1; zero means the type is not in the list.
52ffe3c632Sopenharmony_ci     *
53ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>int32 oneof_index = 7;</code>
54ffe3c632Sopenharmony_ci     */
55ffe3c632Sopenharmony_ci    private $oneof_index = 0;
56ffe3c632Sopenharmony_ci    /**
57ffe3c632Sopenharmony_ci     * Whether to use alternative packed wire representation.
58ffe3c632Sopenharmony_ci     *
59ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>bool packed = 8;</code>
60ffe3c632Sopenharmony_ci     */
61ffe3c632Sopenharmony_ci    private $packed = false;
62ffe3c632Sopenharmony_ci    /**
63ffe3c632Sopenharmony_ci     * The protocol buffer options.
64ffe3c632Sopenharmony_ci     *
65ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>repeated .google.protobuf.Option options = 9;</code>
66ffe3c632Sopenharmony_ci     */
67ffe3c632Sopenharmony_ci    private $options;
68ffe3c632Sopenharmony_ci    /**
69ffe3c632Sopenharmony_ci     * The field JSON name.
70ffe3c632Sopenharmony_ci     *
71ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>string json_name = 10;</code>
72ffe3c632Sopenharmony_ci     */
73ffe3c632Sopenharmony_ci    private $json_name = '';
74ffe3c632Sopenharmony_ci    /**
75ffe3c632Sopenharmony_ci     * The string value of the default value of this field. Proto2 syntax only.
76ffe3c632Sopenharmony_ci     *
77ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>string default_value = 11;</code>
78ffe3c632Sopenharmony_ci     */
79ffe3c632Sopenharmony_ci    private $default_value = '';
80ffe3c632Sopenharmony_ci
81ffe3c632Sopenharmony_ci    /**
82ffe3c632Sopenharmony_ci     * Constructor.
83ffe3c632Sopenharmony_ci     *
84ffe3c632Sopenharmony_ci     * @param array $data {
85ffe3c632Sopenharmony_ci     *     Optional. Data for populating the Message object.
86ffe3c632Sopenharmony_ci     *
87ffe3c632Sopenharmony_ci     *     @type int $kind
88ffe3c632Sopenharmony_ci     *           The field type.
89ffe3c632Sopenharmony_ci     *     @type int $cardinality
90ffe3c632Sopenharmony_ci     *           The field cardinality.
91ffe3c632Sopenharmony_ci     *     @type int $number
92ffe3c632Sopenharmony_ci     *           The field number.
93ffe3c632Sopenharmony_ci     *     @type string $name
94ffe3c632Sopenharmony_ci     *           The field name.
95ffe3c632Sopenharmony_ci     *     @type string $type_url
96ffe3c632Sopenharmony_ci     *           The field type URL, without the scheme, for message or enumeration
97ffe3c632Sopenharmony_ci     *           types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
98ffe3c632Sopenharmony_ci     *     @type int $oneof_index
99ffe3c632Sopenharmony_ci     *           The index of the field type in `Type.oneofs`, for message or enumeration
100ffe3c632Sopenharmony_ci     *           types. The first type has index 1; zero means the type is not in the list.
101ffe3c632Sopenharmony_ci     *     @type bool $packed
102ffe3c632Sopenharmony_ci     *           Whether to use alternative packed wire representation.
103ffe3c632Sopenharmony_ci     *     @type \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $options
104ffe3c632Sopenharmony_ci     *           The protocol buffer options.
105ffe3c632Sopenharmony_ci     *     @type string $json_name
106ffe3c632Sopenharmony_ci     *           The field JSON name.
107ffe3c632Sopenharmony_ci     *     @type string $default_value
108ffe3c632Sopenharmony_ci     *           The string value of the default value of this field. Proto2 syntax only.
109ffe3c632Sopenharmony_ci     * }
110ffe3c632Sopenharmony_ci     */
111ffe3c632Sopenharmony_ci    public function __construct($data = NULL) {
112ffe3c632Sopenharmony_ci        \GPBMetadata\Google\Protobuf\Type::initOnce();
113ffe3c632Sopenharmony_ci        parent::__construct($data);
114ffe3c632Sopenharmony_ci    }
115ffe3c632Sopenharmony_ci
116ffe3c632Sopenharmony_ci    /**
117ffe3c632Sopenharmony_ci     * The field type.
118ffe3c632Sopenharmony_ci     *
119ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>.google.protobuf.Field.Kind kind = 1;</code>
120ffe3c632Sopenharmony_ci     * @return int
121ffe3c632Sopenharmony_ci     */
122ffe3c632Sopenharmony_ci    public function getKind()
123ffe3c632Sopenharmony_ci    {
124ffe3c632Sopenharmony_ci        return $this->kind;
125ffe3c632Sopenharmony_ci    }
126ffe3c632Sopenharmony_ci
127ffe3c632Sopenharmony_ci    /**
128ffe3c632Sopenharmony_ci     * The field type.
129ffe3c632Sopenharmony_ci     *
130ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>.google.protobuf.Field.Kind kind = 1;</code>
131ffe3c632Sopenharmony_ci     * @param int $var
132ffe3c632Sopenharmony_ci     * @return $this
133ffe3c632Sopenharmony_ci     */
134ffe3c632Sopenharmony_ci    public function setKind($var)
135ffe3c632Sopenharmony_ci    {
136ffe3c632Sopenharmony_ci        GPBUtil::checkEnum($var, \Google\Protobuf\Field_Kind::class);
137ffe3c632Sopenharmony_ci        $this->kind = $var;
138ffe3c632Sopenharmony_ci
139ffe3c632Sopenharmony_ci        return $this;
140ffe3c632Sopenharmony_ci    }
141ffe3c632Sopenharmony_ci
142ffe3c632Sopenharmony_ci    /**
143ffe3c632Sopenharmony_ci     * The field cardinality.
144ffe3c632Sopenharmony_ci     *
145ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>.google.protobuf.Field.Cardinality cardinality = 2;</code>
146ffe3c632Sopenharmony_ci     * @return int
147ffe3c632Sopenharmony_ci     */
148ffe3c632Sopenharmony_ci    public function getCardinality()
149ffe3c632Sopenharmony_ci    {
150ffe3c632Sopenharmony_ci        return $this->cardinality;
151ffe3c632Sopenharmony_ci    }
152ffe3c632Sopenharmony_ci
153ffe3c632Sopenharmony_ci    /**
154ffe3c632Sopenharmony_ci     * The field cardinality.
155ffe3c632Sopenharmony_ci     *
156ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>.google.protobuf.Field.Cardinality cardinality = 2;</code>
157ffe3c632Sopenharmony_ci     * @param int $var
158ffe3c632Sopenharmony_ci     * @return $this
159ffe3c632Sopenharmony_ci     */
160ffe3c632Sopenharmony_ci    public function setCardinality($var)
161ffe3c632Sopenharmony_ci    {
162ffe3c632Sopenharmony_ci        GPBUtil::checkEnum($var, \Google\Protobuf\Field_Cardinality::class);
163ffe3c632Sopenharmony_ci        $this->cardinality = $var;
164ffe3c632Sopenharmony_ci
165ffe3c632Sopenharmony_ci        return $this;
166ffe3c632Sopenharmony_ci    }
167ffe3c632Sopenharmony_ci
168ffe3c632Sopenharmony_ci    /**
169ffe3c632Sopenharmony_ci     * The field number.
170ffe3c632Sopenharmony_ci     *
171ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>int32 number = 3;</code>
172ffe3c632Sopenharmony_ci     * @return int
173ffe3c632Sopenharmony_ci     */
174ffe3c632Sopenharmony_ci    public function getNumber()
175ffe3c632Sopenharmony_ci    {
176ffe3c632Sopenharmony_ci        return $this->number;
177ffe3c632Sopenharmony_ci    }
178ffe3c632Sopenharmony_ci
179ffe3c632Sopenharmony_ci    /**
180ffe3c632Sopenharmony_ci     * The field number.
181ffe3c632Sopenharmony_ci     *
182ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>int32 number = 3;</code>
183ffe3c632Sopenharmony_ci     * @param int $var
184ffe3c632Sopenharmony_ci     * @return $this
185ffe3c632Sopenharmony_ci     */
186ffe3c632Sopenharmony_ci    public function setNumber($var)
187ffe3c632Sopenharmony_ci    {
188ffe3c632Sopenharmony_ci        GPBUtil::checkInt32($var);
189ffe3c632Sopenharmony_ci        $this->number = $var;
190ffe3c632Sopenharmony_ci
191ffe3c632Sopenharmony_ci        return $this;
192ffe3c632Sopenharmony_ci    }
193ffe3c632Sopenharmony_ci
194ffe3c632Sopenharmony_ci    /**
195ffe3c632Sopenharmony_ci     * The field name.
196ffe3c632Sopenharmony_ci     *
197ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>string name = 4;</code>
198ffe3c632Sopenharmony_ci     * @return string
199ffe3c632Sopenharmony_ci     */
200ffe3c632Sopenharmony_ci    public function getName()
201ffe3c632Sopenharmony_ci    {
202ffe3c632Sopenharmony_ci        return $this->name;
203ffe3c632Sopenharmony_ci    }
204ffe3c632Sopenharmony_ci
205ffe3c632Sopenharmony_ci    /**
206ffe3c632Sopenharmony_ci     * The field name.
207ffe3c632Sopenharmony_ci     *
208ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>string name = 4;</code>
209ffe3c632Sopenharmony_ci     * @param string $var
210ffe3c632Sopenharmony_ci     * @return $this
211ffe3c632Sopenharmony_ci     */
212ffe3c632Sopenharmony_ci    public function setName($var)
213ffe3c632Sopenharmony_ci    {
214ffe3c632Sopenharmony_ci        GPBUtil::checkString($var, True);
215ffe3c632Sopenharmony_ci        $this->name = $var;
216ffe3c632Sopenharmony_ci
217ffe3c632Sopenharmony_ci        return $this;
218ffe3c632Sopenharmony_ci    }
219ffe3c632Sopenharmony_ci
220ffe3c632Sopenharmony_ci    /**
221ffe3c632Sopenharmony_ci     * The field type URL, without the scheme, for message or enumeration
222ffe3c632Sopenharmony_ci     * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
223ffe3c632Sopenharmony_ci     *
224ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>string type_url = 6;</code>
225ffe3c632Sopenharmony_ci     * @return string
226ffe3c632Sopenharmony_ci     */
227ffe3c632Sopenharmony_ci    public function getTypeUrl()
228ffe3c632Sopenharmony_ci    {
229ffe3c632Sopenharmony_ci        return $this->type_url;
230ffe3c632Sopenharmony_ci    }
231ffe3c632Sopenharmony_ci
232ffe3c632Sopenharmony_ci    /**
233ffe3c632Sopenharmony_ci     * The field type URL, without the scheme, for message or enumeration
234ffe3c632Sopenharmony_ci     * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
235ffe3c632Sopenharmony_ci     *
236ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>string type_url = 6;</code>
237ffe3c632Sopenharmony_ci     * @param string $var
238ffe3c632Sopenharmony_ci     * @return $this
239ffe3c632Sopenharmony_ci     */
240ffe3c632Sopenharmony_ci    public function setTypeUrl($var)
241ffe3c632Sopenharmony_ci    {
242ffe3c632Sopenharmony_ci        GPBUtil::checkString($var, True);
243ffe3c632Sopenharmony_ci        $this->type_url = $var;
244ffe3c632Sopenharmony_ci
245ffe3c632Sopenharmony_ci        return $this;
246ffe3c632Sopenharmony_ci    }
247ffe3c632Sopenharmony_ci
248ffe3c632Sopenharmony_ci    /**
249ffe3c632Sopenharmony_ci     * The index of the field type in `Type.oneofs`, for message or enumeration
250ffe3c632Sopenharmony_ci     * types. The first type has index 1; zero means the type is not in the list.
251ffe3c632Sopenharmony_ci     *
252ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>int32 oneof_index = 7;</code>
253ffe3c632Sopenharmony_ci     * @return int
254ffe3c632Sopenharmony_ci     */
255ffe3c632Sopenharmony_ci    public function getOneofIndex()
256ffe3c632Sopenharmony_ci    {
257ffe3c632Sopenharmony_ci        return $this->oneof_index;
258ffe3c632Sopenharmony_ci    }
259ffe3c632Sopenharmony_ci
260ffe3c632Sopenharmony_ci    /**
261ffe3c632Sopenharmony_ci     * The index of the field type in `Type.oneofs`, for message or enumeration
262ffe3c632Sopenharmony_ci     * types. The first type has index 1; zero means the type is not in the list.
263ffe3c632Sopenharmony_ci     *
264ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>int32 oneof_index = 7;</code>
265ffe3c632Sopenharmony_ci     * @param int $var
266ffe3c632Sopenharmony_ci     * @return $this
267ffe3c632Sopenharmony_ci     */
268ffe3c632Sopenharmony_ci    public function setOneofIndex($var)
269ffe3c632Sopenharmony_ci    {
270ffe3c632Sopenharmony_ci        GPBUtil::checkInt32($var);
271ffe3c632Sopenharmony_ci        $this->oneof_index = $var;
272ffe3c632Sopenharmony_ci
273ffe3c632Sopenharmony_ci        return $this;
274ffe3c632Sopenharmony_ci    }
275ffe3c632Sopenharmony_ci
276ffe3c632Sopenharmony_ci    /**
277ffe3c632Sopenharmony_ci     * Whether to use alternative packed wire representation.
278ffe3c632Sopenharmony_ci     *
279ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>bool packed = 8;</code>
280ffe3c632Sopenharmony_ci     * @return bool
281ffe3c632Sopenharmony_ci     */
282ffe3c632Sopenharmony_ci    public function getPacked()
283ffe3c632Sopenharmony_ci    {
284ffe3c632Sopenharmony_ci        return $this->packed;
285ffe3c632Sopenharmony_ci    }
286ffe3c632Sopenharmony_ci
287ffe3c632Sopenharmony_ci    /**
288ffe3c632Sopenharmony_ci     * Whether to use alternative packed wire representation.
289ffe3c632Sopenharmony_ci     *
290ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>bool packed = 8;</code>
291ffe3c632Sopenharmony_ci     * @param bool $var
292ffe3c632Sopenharmony_ci     * @return $this
293ffe3c632Sopenharmony_ci     */
294ffe3c632Sopenharmony_ci    public function setPacked($var)
295ffe3c632Sopenharmony_ci    {
296ffe3c632Sopenharmony_ci        GPBUtil::checkBool($var);
297ffe3c632Sopenharmony_ci        $this->packed = $var;
298ffe3c632Sopenharmony_ci
299ffe3c632Sopenharmony_ci        return $this;
300ffe3c632Sopenharmony_ci    }
301ffe3c632Sopenharmony_ci
302ffe3c632Sopenharmony_ci    /**
303ffe3c632Sopenharmony_ci     * The protocol buffer options.
304ffe3c632Sopenharmony_ci     *
305ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>repeated .google.protobuf.Option options = 9;</code>
306ffe3c632Sopenharmony_ci     * @return \Google\Protobuf\Internal\RepeatedField
307ffe3c632Sopenharmony_ci     */
308ffe3c632Sopenharmony_ci    public function getOptions()
309ffe3c632Sopenharmony_ci    {
310ffe3c632Sopenharmony_ci        return $this->options;
311ffe3c632Sopenharmony_ci    }
312ffe3c632Sopenharmony_ci
313ffe3c632Sopenharmony_ci    /**
314ffe3c632Sopenharmony_ci     * The protocol buffer options.
315ffe3c632Sopenharmony_ci     *
316ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>repeated .google.protobuf.Option options = 9;</code>
317ffe3c632Sopenharmony_ci     * @param \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $var
318ffe3c632Sopenharmony_ci     * @return $this
319ffe3c632Sopenharmony_ci     */
320ffe3c632Sopenharmony_ci    public function setOptions($var)
321ffe3c632Sopenharmony_ci    {
322ffe3c632Sopenharmony_ci        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class);
323ffe3c632Sopenharmony_ci        $this->options = $arr;
324ffe3c632Sopenharmony_ci
325ffe3c632Sopenharmony_ci        return $this;
326ffe3c632Sopenharmony_ci    }
327ffe3c632Sopenharmony_ci
328ffe3c632Sopenharmony_ci    /**
329ffe3c632Sopenharmony_ci     * The field JSON name.
330ffe3c632Sopenharmony_ci     *
331ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>string json_name = 10;</code>
332ffe3c632Sopenharmony_ci     * @return string
333ffe3c632Sopenharmony_ci     */
334ffe3c632Sopenharmony_ci    public function getJsonName()
335ffe3c632Sopenharmony_ci    {
336ffe3c632Sopenharmony_ci        return $this->json_name;
337ffe3c632Sopenharmony_ci    }
338ffe3c632Sopenharmony_ci
339ffe3c632Sopenharmony_ci    /**
340ffe3c632Sopenharmony_ci     * The field JSON name.
341ffe3c632Sopenharmony_ci     *
342ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>string json_name = 10;</code>
343ffe3c632Sopenharmony_ci     * @param string $var
344ffe3c632Sopenharmony_ci     * @return $this
345ffe3c632Sopenharmony_ci     */
346ffe3c632Sopenharmony_ci    public function setJsonName($var)
347ffe3c632Sopenharmony_ci    {
348ffe3c632Sopenharmony_ci        GPBUtil::checkString($var, True);
349ffe3c632Sopenharmony_ci        $this->json_name = $var;
350ffe3c632Sopenharmony_ci
351ffe3c632Sopenharmony_ci        return $this;
352ffe3c632Sopenharmony_ci    }
353ffe3c632Sopenharmony_ci
354ffe3c632Sopenharmony_ci    /**
355ffe3c632Sopenharmony_ci     * The string value of the default value of this field. Proto2 syntax only.
356ffe3c632Sopenharmony_ci     *
357ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>string default_value = 11;</code>
358ffe3c632Sopenharmony_ci     * @return string
359ffe3c632Sopenharmony_ci     */
360ffe3c632Sopenharmony_ci    public function getDefaultValue()
361ffe3c632Sopenharmony_ci    {
362ffe3c632Sopenharmony_ci        return $this->default_value;
363ffe3c632Sopenharmony_ci    }
364ffe3c632Sopenharmony_ci
365ffe3c632Sopenharmony_ci    /**
366ffe3c632Sopenharmony_ci     * The string value of the default value of this field. Proto2 syntax only.
367ffe3c632Sopenharmony_ci     *
368ffe3c632Sopenharmony_ci     * Generated from protobuf field <code>string default_value = 11;</code>
369ffe3c632Sopenharmony_ci     * @param string $var
370ffe3c632Sopenharmony_ci     * @return $this
371ffe3c632Sopenharmony_ci     */
372ffe3c632Sopenharmony_ci    public function setDefaultValue($var)
373ffe3c632Sopenharmony_ci    {
374ffe3c632Sopenharmony_ci        GPBUtil::checkString($var, True);
375ffe3c632Sopenharmony_ci        $this->default_value = $var;
376ffe3c632Sopenharmony_ci
377ffe3c632Sopenharmony_ci        return $this;
378ffe3c632Sopenharmony_ci    }
379ffe3c632Sopenharmony_ci
380ffe3c632Sopenharmony_ci}
381ffe3c632Sopenharmony_ci
382