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 * A message representing a option the parser does not recognize. This only
15 * appears in options protos created by the compiler::Parser class.
16 * DescriptorPool resolves these when building Descriptor objects. Therefore,
17 * options protos in descriptor objects (e.g. returned by Descriptor::options(),
18 * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
19 * in them.
20 *
21 * Generated from protobuf message <code>google.protobuf.UninterpretedOption</code>
22 */
23class UninterpretedOption extends \Google\Protobuf\Internal\Message
24{
25    /**
26     * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>
27     */
28    private $name;
29    private $has_name = false;
30    /**
31     * The value of the uninterpreted option, in whatever type the tokenizer
32     * identified it as during parsing. Exactly one of these should be set.
33     *
34     * Generated from protobuf field <code>optional string identifier_value = 3;</code>
35     */
36    private $identifier_value = '';
37    private $has_identifier_value = false;
38    /**
39     * Generated from protobuf field <code>optional uint64 positive_int_value = 4;</code>
40     */
41    private $positive_int_value = 0;
42    private $has_positive_int_value = false;
43    /**
44     * Generated from protobuf field <code>optional int64 negative_int_value = 5;</code>
45     */
46    private $negative_int_value = 0;
47    private $has_negative_int_value = false;
48    /**
49     * Generated from protobuf field <code>optional double double_value = 6;</code>
50     */
51    private $double_value = 0.0;
52    private $has_double_value = false;
53    /**
54     * Generated from protobuf field <code>optional bytes string_value = 7;</code>
55     */
56    private $string_value = '';
57    private $has_string_value = false;
58    /**
59     * Generated from protobuf field <code>optional string aggregate_value = 8;</code>
60     */
61    private $aggregate_value = '';
62    private $has_aggregate_value = false;
63
64    /**
65     * Constructor.
66     *
67     * @param array $data {
68     *     Optional. Data for populating the Message object.
69     *
70     *     @type \Google\Protobuf\Internal\UninterpretedOption\NamePart[]|\Google\Protobuf\Internal\RepeatedField $name
71     *     @type string $identifier_value
72     *           The value of the uninterpreted option, in whatever type the tokenizer
73     *           identified it as during parsing. Exactly one of these should be set.
74     *     @type int|string $positive_int_value
75     *     @type int|string $negative_int_value
76     *     @type float $double_value
77     *     @type string $string_value
78     *     @type string $aggregate_value
79     * }
80     */
81    public function __construct($data = NULL) {
82        \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
83        parent::__construct($data);
84    }
85
86    /**
87     * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>
88     * @return \Google\Protobuf\Internal\RepeatedField
89     */
90    public function getName()
91    {
92        return $this->name;
93    }
94
95    /**
96     * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>
97     * @param \Google\Protobuf\Internal\UninterpretedOption\NamePart[]|\Google\Protobuf\Internal\RepeatedField $var
98     * @return $this
99     */
100    public function setName($var)
101    {
102        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption\NamePart::class);
103        $this->name = $arr;
104        $this->has_name = true;
105
106        return $this;
107    }
108
109    public function hasName()
110    {
111        return $this->has_name;
112    }
113
114    /**
115     * The value of the uninterpreted option, in whatever type the tokenizer
116     * identified it as during parsing. Exactly one of these should be set.
117     *
118     * Generated from protobuf field <code>optional string identifier_value = 3;</code>
119     * @return string
120     */
121    public function getIdentifierValue()
122    {
123        return $this->identifier_value;
124    }
125
126    /**
127     * The value of the uninterpreted option, in whatever type the tokenizer
128     * identified it as during parsing. Exactly one of these should be set.
129     *
130     * Generated from protobuf field <code>optional string identifier_value = 3;</code>
131     * @param string $var
132     * @return $this
133     */
134    public function setIdentifierValue($var)
135    {
136        GPBUtil::checkString($var, True);
137        $this->identifier_value = $var;
138        $this->has_identifier_value = true;
139
140        return $this;
141    }
142
143    public function hasIdentifierValue()
144    {
145        return $this->has_identifier_value;
146    }
147
148    /**
149     * Generated from protobuf field <code>optional uint64 positive_int_value = 4;</code>
150     * @return int|string
151     */
152    public function getPositiveIntValue()
153    {
154        return $this->positive_int_value;
155    }
156
157    /**
158     * Generated from protobuf field <code>optional uint64 positive_int_value = 4;</code>
159     * @param int|string $var
160     * @return $this
161     */
162    public function setPositiveIntValue($var)
163    {
164        GPBUtil::checkUint64($var);
165        $this->positive_int_value = $var;
166        $this->has_positive_int_value = true;
167
168        return $this;
169    }
170
171    public function hasPositiveIntValue()
172    {
173        return $this->has_positive_int_value;
174    }
175
176    /**
177     * Generated from protobuf field <code>optional int64 negative_int_value = 5;</code>
178     * @return int|string
179     */
180    public function getNegativeIntValue()
181    {
182        return $this->negative_int_value;
183    }
184
185    /**
186     * Generated from protobuf field <code>optional int64 negative_int_value = 5;</code>
187     * @param int|string $var
188     * @return $this
189     */
190    public function setNegativeIntValue($var)
191    {
192        GPBUtil::checkInt64($var);
193        $this->negative_int_value = $var;
194        $this->has_negative_int_value = true;
195
196        return $this;
197    }
198
199    public function hasNegativeIntValue()
200    {
201        return $this->has_negative_int_value;
202    }
203
204    /**
205     * Generated from protobuf field <code>optional double double_value = 6;</code>
206     * @return float
207     */
208    public function getDoubleValue()
209    {
210        return $this->double_value;
211    }
212
213    /**
214     * Generated from protobuf field <code>optional double double_value = 6;</code>
215     * @param float $var
216     * @return $this
217     */
218    public function setDoubleValue($var)
219    {
220        GPBUtil::checkDouble($var);
221        $this->double_value = $var;
222        $this->has_double_value = true;
223
224        return $this;
225    }
226
227    public function hasDoubleValue()
228    {
229        return $this->has_double_value;
230    }
231
232    /**
233     * Generated from protobuf field <code>optional bytes string_value = 7;</code>
234     * @return string
235     */
236    public function getStringValue()
237    {
238        return $this->string_value;
239    }
240
241    /**
242     * Generated from protobuf field <code>optional bytes string_value = 7;</code>
243     * @param string $var
244     * @return $this
245     */
246    public function setStringValue($var)
247    {
248        GPBUtil::checkString($var, False);
249        $this->string_value = $var;
250        $this->has_string_value = true;
251
252        return $this;
253    }
254
255    public function hasStringValue()
256    {
257        return $this->has_string_value;
258    }
259
260    /**
261     * Generated from protobuf field <code>optional string aggregate_value = 8;</code>
262     * @return string
263     */
264    public function getAggregateValue()
265    {
266        return $this->aggregate_value;
267    }
268
269    /**
270     * Generated from protobuf field <code>optional string aggregate_value = 8;</code>
271     * @param string $var
272     * @return $this
273     */
274    public function setAggregateValue($var)
275    {
276        GPBUtil::checkString($var, True);
277        $this->aggregate_value = $var;
278        $this->has_aggregate_value = true;
279
280        return $this;
281    }
282
283    public function hasAggregateValue()
284    {
285        return $this->has_aggregate_value;
286    }
287
288}
289
290