PluginProbe ʕ •ᴥ•ʔ
ShareThis Dashboard for Google Analytics / trunk
ShareThis Dashboard for Google Analytics vtrunk
3.3.2 trunk 1.0.7 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2.5 2.3.5 2.3.6 2.3.7 2.3.8 2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 3.0.0 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.3.0 3.3.1
googleanalytics / lib / analytics-admin / vendor / google / gax / src / Testing / MockRequestBody.php
googleanalytics / lib / analytics-admin / vendor / google / gax / src / Testing Last commit date
GeneratedTest.php 3 years ago MessageAwareArrayComparator.php 3 years ago MessageAwareExporter.php 3 years ago MockBidiStreamingCall.php 3 years ago MockClientStreamingCall.php 3 years ago MockGrpcTransport.php 3 years ago MockRequest.php 3 years ago MockRequestBody.php 3 years ago MockResponse.php 3 years ago MockServerStreamingCall.php 3 years ago MockStatus.php 3 years ago MockStubTrait.php 3 years ago MockTransport.php 3 years ago MockUnaryCall.php 3 years ago ProtobufGPBEmptyComparator.php 3 years ago ProtobufMessageComparator.php 3 years ago ReceivedRequest.php 3 years ago SerializationTrait.php 3 years ago mocks.proto 3 years ago
MockRequestBody.php
645 lines
1 <?php
2 # Generated by the protocol buffer compiler. DO NOT EDIT!
3 # source: Testing/mocks.proto
4
5 namespace Google\ApiCore\Testing;
6
7 use Google\Protobuf\Internal\GPBUtil;
8
9 /**
10 * Generated from protobuf message <code>google.apicore.testing.MockRequestBody</code>
11 *
12 * @internal
13 */
14 class MockRequestBody extends \Google\Protobuf\Internal\Message
15 {
16 /**
17 * Generated from protobuf field <code>string name = 1;</code>
18 */
19 protected $name = '';
20 /**
21 * Generated from protobuf field <code>uint64 number = 2;</code>
22 */
23 protected $number = 0;
24 /**
25 * Generated from protobuf field <code>repeated string repeated_field = 3;</code>
26 */
27 private $repeated_field;
28 /**
29 * Generated from protobuf field <code>.google.apicore.testing.MockRequestBody nested_message = 4;</code>
30 */
31 protected $nested_message = null;
32 /**
33 * Generated from protobuf field <code>.google.protobuf.BytesValue bytes_value = 5;</code>
34 */
35 protected $bytes_value = null;
36 /**
37 * Generated from protobuf field <code>.google.protobuf.Duration duration_value = 6;</code>
38 */
39 protected $duration_value = null;
40 /**
41 * Generated from protobuf field <code>.google.protobuf.FieldMask field_mask = 7;</code>
42 */
43 protected $field_mask = null;
44 /**
45 * Generated from protobuf field <code>.google.protobuf.Int64Value int64_value = 8;</code>
46 */
47 protected $int64_value = null;
48 /**
49 * Generated from protobuf field <code>.google.protobuf.ListValue list_value = 9;</code>
50 */
51 protected $list_value = null;
52 /**
53 * Generated from protobuf field <code>.google.protobuf.StringValue string_value = 10;</code>
54 */
55 protected $string_value = null;
56 /**
57 * Generated from protobuf field <code>.google.protobuf.Struct struct_value = 11;</code>
58 */
59 protected $struct_value = null;
60 /**
61 * Generated from protobuf field <code>.google.protobuf.Timestamp timestamp_value = 12;</code>
62 */
63 protected $timestamp_value = null;
64 /**
65 * Generated from protobuf field <code>.google.protobuf.Value value_value = 13;</code>
66 */
67 protected $value_value = null;
68 protected $oneof_field;
69
70 /**
71 * Constructor.
72 *
73 * @param array $data {
74 * Optional. Data for populating the Message object.
75 *
76 * @type string $name
77 * @type int|string $number
78 * @type string[]|\Google\Protobuf\Internal\RepeatedField $repeated_field
79 * @type \Google\ApiCore\Testing\MockRequestBody $nested_message
80 * @type \Google\Protobuf\BytesValue $bytes_value
81 * @type \Google\Protobuf\Duration $duration_value
82 * @type \Google\Protobuf\FieldMask $field_mask
83 * @type \Google\Protobuf\Int64Value $int64_value
84 * @type \Google\Protobuf\ListValue $list_value
85 * @type \Google\Protobuf\StringValue $string_value
86 * @type \Google\Protobuf\Struct $struct_value
87 * @type \Google\Protobuf\Timestamp $timestamp_value
88 * @type \Google\Protobuf\Value $value_value
89 * @type string $field_1
90 * @type string $field_2
91 * @type string $field_3
92 * }
93 */
94 public function __construct($data = NULL) {
95 \GPBMetadata\ApiCore\Testing\Mocks::initOnce();
96 parent::__construct($data);
97 }
98
99 /**
100 * Generated from protobuf field <code>string name = 1;</code>
101 * @return string
102 */
103 public function getName()
104 {
105 return $this->name;
106 }
107
108 /**
109 * Generated from protobuf field <code>string name = 1;</code>
110 * @param string $var
111 * @return $this
112 */
113 public function setName($var)
114 {
115 GPBUtil::checkString($var, True);
116 $this->name = $var;
117
118 return $this;
119 }
120
121 /**
122 * Generated from protobuf field <code>uint64 number = 2;</code>
123 * @return int|string
124 */
125 public function getNumber()
126 {
127 return $this->number;
128 }
129
130 /**
131 * Generated from protobuf field <code>uint64 number = 2;</code>
132 * @param int|string $var
133 * @return $this
134 */
135 public function setNumber($var)
136 {
137 GPBUtil::checkUint64($var);
138 $this->number = $var;
139
140 return $this;
141 }
142
143 /**
144 * Generated from protobuf field <code>repeated string repeated_field = 3;</code>
145 * @return \Google\Protobuf\Internal\RepeatedField
146 */
147 public function getRepeatedField()
148 {
149 return $this->repeated_field;
150 }
151
152 /**
153 * Generated from protobuf field <code>repeated string repeated_field = 3;</code>
154 * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
155 * @return $this
156 */
157 public function setRepeatedField($var)
158 {
159 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
160 $this->repeated_field = $arr;
161
162 return $this;
163 }
164
165 /**
166 * Generated from protobuf field <code>.google.apicore.testing.MockRequestBody nested_message = 4;</code>
167 * @return \Google\ApiCore\Testing\MockRequestBody
168 */
169 public function getNestedMessage()
170 {
171 return isset($this->nested_message) ? $this->nested_message : null;
172 }
173
174 public function hasNestedMessage()
175 {
176 return isset($this->nested_message);
177 }
178
179 public function clearNestedMessage()
180 {
181 unset($this->nested_message);
182 }
183
184 /**
185 * Generated from protobuf field <code>.google.apicore.testing.MockRequestBody nested_message = 4;</code>
186 * @param \Google\ApiCore\Testing\MockRequestBody $var
187 * @return $this
188 */
189 public function setNestedMessage($var)
190 {
191 GPBUtil::checkMessage($var, \Google\ApiCore\Testing\MockRequestBody::class);
192 $this->nested_message = $var;
193
194 return $this;
195 }
196
197 /**
198 * Generated from protobuf field <code>.google.protobuf.BytesValue bytes_value = 5;</code>
199 * @return \Google\Protobuf\BytesValue
200 */
201 public function getBytesValue()
202 {
203 return isset($this->bytes_value) ? $this->bytes_value : null;
204 }
205
206 public function hasBytesValue()
207 {
208 return isset($this->bytes_value);
209 }
210
211 public function clearBytesValue()
212 {
213 unset($this->bytes_value);
214 }
215
216 /**
217 * Returns the unboxed value from <code>getBytesValue()</code>
218
219 * Generated from protobuf field <code>.google.protobuf.BytesValue bytes_value = 5;</code>
220 * @return string|null
221 */
222 public function getBytesValueUnwrapped()
223 {
224 return $this->readWrapperValue("bytes_value");
225 }
226
227 /**
228 * Generated from protobuf field <code>.google.protobuf.BytesValue bytes_value = 5;</code>
229 * @param \Google\Protobuf\BytesValue $var
230 * @return $this
231 */
232 public function setBytesValue($var)
233 {
234 GPBUtil::checkMessage($var, \Google\Protobuf\BytesValue::class);
235 $this->bytes_value = $var;
236
237 return $this;
238 }
239
240 /**
241 * Sets the field by wrapping a primitive type in a Google\Protobuf\BytesValue object.
242
243 * Generated from protobuf field <code>.google.protobuf.BytesValue bytes_value = 5;</code>
244 * @param string|null $var
245 * @return $this
246 */
247 public function setBytesValueUnwrapped($var)
248 {
249 $this->writeWrapperValue("bytes_value", $var);
250 return $this;}
251
252 /**
253 * Generated from protobuf field <code>.google.protobuf.Duration duration_value = 6;</code>
254 * @return \Google\Protobuf\Duration
255 */
256 public function getDurationValue()
257 {
258 return isset($this->duration_value) ? $this->duration_value : null;
259 }
260
261 public function hasDurationValue()
262 {
263 return isset($this->duration_value);
264 }
265
266 public function clearDurationValue()
267 {
268 unset($this->duration_value);
269 }
270
271 /**
272 * Generated from protobuf field <code>.google.protobuf.Duration duration_value = 6;</code>
273 * @param \Google\Protobuf\Duration $var
274 * @return $this
275 */
276 public function setDurationValue($var)
277 {
278 GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
279 $this->duration_value = $var;
280
281 return $this;
282 }
283
284 /**
285 * Generated from protobuf field <code>.google.protobuf.FieldMask field_mask = 7;</code>
286 * @return \Google\Protobuf\FieldMask
287 */
288 public function getFieldMask()
289 {
290 return isset($this->field_mask) ? $this->field_mask : null;
291 }
292
293 public function hasFieldMask()
294 {
295 return isset($this->field_mask);
296 }
297
298 public function clearFieldMask()
299 {
300 unset($this->field_mask);
301 }
302
303 /**
304 * Generated from protobuf field <code>.google.protobuf.FieldMask field_mask = 7;</code>
305 * @param \Google\Protobuf\FieldMask $var
306 * @return $this
307 */
308 public function setFieldMask($var)
309 {
310 GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
311 $this->field_mask = $var;
312
313 return $this;
314 }
315
316 /**
317 * Generated from protobuf field <code>.google.protobuf.Int64Value int64_value = 8;</code>
318 * @return \Google\Protobuf\Int64Value
319 */
320 public function getInt64Value()
321 {
322 return isset($this->int64_value) ? $this->int64_value : null;
323 }
324
325 public function hasInt64Value()
326 {
327 return isset($this->int64_value);
328 }
329
330 public function clearInt64Value()
331 {
332 unset($this->int64_value);
333 }
334
335 /**
336 * Returns the unboxed value from <code>getInt64Value()</code>
337
338 * Generated from protobuf field <code>.google.protobuf.Int64Value int64_value = 8;</code>
339 * @return int|string|null
340 */
341 public function getInt64ValueUnwrapped()
342 {
343 return $this->readWrapperValue("int64_value");
344 }
345
346 /**
347 * Generated from protobuf field <code>.google.protobuf.Int64Value int64_value = 8;</code>
348 * @param \Google\Protobuf\Int64Value $var
349 * @return $this
350 */
351 public function setInt64Value($var)
352 {
353 GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class);
354 $this->int64_value = $var;
355
356 return $this;
357 }
358
359 /**
360 * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object.
361
362 * Generated from protobuf field <code>.google.protobuf.Int64Value int64_value = 8;</code>
363 * @param int|string|null $var
364 * @return $this
365 */
366 public function setInt64ValueUnwrapped($var)
367 {
368 $this->writeWrapperValue("int64_value", $var);
369 return $this;}
370
371 /**
372 * Generated from protobuf field <code>.google.protobuf.ListValue list_value = 9;</code>
373 * @return \Google\Protobuf\ListValue
374 */
375 public function getListValue()
376 {
377 return isset($this->list_value) ? $this->list_value : null;
378 }
379
380 public function hasListValue()
381 {
382 return isset($this->list_value);
383 }
384
385 public function clearListValue()
386 {
387 unset($this->list_value);
388 }
389
390 /**
391 * Generated from protobuf field <code>.google.protobuf.ListValue list_value = 9;</code>
392 * @param \Google\Protobuf\ListValue $var
393 * @return $this
394 */
395 public function setListValue($var)
396 {
397 GPBUtil::checkMessage($var, \Google\Protobuf\ListValue::class);
398 $this->list_value = $var;
399
400 return $this;
401 }
402
403 /**
404 * Generated from protobuf field <code>.google.protobuf.StringValue string_value = 10;</code>
405 * @return \Google\Protobuf\StringValue
406 */
407 public function getStringValue()
408 {
409 return isset($this->string_value) ? $this->string_value : null;
410 }
411
412 public function hasStringValue()
413 {
414 return isset($this->string_value);
415 }
416
417 public function clearStringValue()
418 {
419 unset($this->string_value);
420 }
421
422 /**
423 * Returns the unboxed value from <code>getStringValue()</code>
424
425 * Generated from protobuf field <code>.google.protobuf.StringValue string_value = 10;</code>
426 * @return string|null
427 */
428 public function getStringValueUnwrapped()
429 {
430 return $this->readWrapperValue("string_value");
431 }
432
433 /**
434 * Generated from protobuf field <code>.google.protobuf.StringValue string_value = 10;</code>
435 * @param \Google\Protobuf\StringValue $var
436 * @return $this
437 */
438 public function setStringValue($var)
439 {
440 GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
441 $this->string_value = $var;
442
443 return $this;
444 }
445
446 /**
447 * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object.
448
449 * Generated from protobuf field <code>.google.protobuf.StringValue string_value = 10;</code>
450 * @param string|null $var
451 * @return $this
452 */
453 public function setStringValueUnwrapped($var)
454 {
455 $this->writeWrapperValue("string_value", $var);
456 return $this;}
457
458 /**
459 * Generated from protobuf field <code>.google.protobuf.Struct struct_value = 11;</code>
460 * @return \Google\Protobuf\Struct
461 */
462 public function getStructValue()
463 {
464 return isset($this->struct_value) ? $this->struct_value : null;
465 }
466
467 public function hasStructValue()
468 {
469 return isset($this->struct_value);
470 }
471
472 public function clearStructValue()
473 {
474 unset($this->struct_value);
475 }
476
477 /**
478 * Generated from protobuf field <code>.google.protobuf.Struct struct_value = 11;</code>
479 * @param \Google\Protobuf\Struct $var
480 * @return $this
481 */
482 public function setStructValue($var)
483 {
484 GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class);
485 $this->struct_value = $var;
486
487 return $this;
488 }
489
490 /**
491 * Generated from protobuf field <code>.google.protobuf.Timestamp timestamp_value = 12;</code>
492 * @return \Google\Protobuf\Timestamp
493 */
494 public function getTimestampValue()
495 {
496 return isset($this->timestamp_value) ? $this->timestamp_value : null;
497 }
498
499 public function hasTimestampValue()
500 {
501 return isset($this->timestamp_value);
502 }
503
504 public function clearTimestampValue()
505 {
506 unset($this->timestamp_value);
507 }
508
509 /**
510 * Generated from protobuf field <code>.google.protobuf.Timestamp timestamp_value = 12;</code>
511 * @param \Google\Protobuf\Timestamp $var
512 * @return $this
513 */
514 public function setTimestampValue($var)
515 {
516 GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
517 $this->timestamp_value = $var;
518
519 return $this;
520 }
521
522 /**
523 * Generated from protobuf field <code>.google.protobuf.Value value_value = 13;</code>
524 * @return \Google\Protobuf\Value
525 */
526 public function getValueValue()
527 {
528 return isset($this->value_value) ? $this->value_value : null;
529 }
530
531 public function hasValueValue()
532 {
533 return isset($this->value_value);
534 }
535
536 public function clearValueValue()
537 {
538 unset($this->value_value);
539 }
540
541 /**
542 * Generated from protobuf field <code>.google.protobuf.Value value_value = 13;</code>
543 * @param \Google\Protobuf\Value $var
544 * @return $this
545 */
546 public function setValueValue($var)
547 {
548 GPBUtil::checkMessage($var, \Google\Protobuf\Value::class);
549 $this->value_value = $var;
550
551 return $this;
552 }
553
554 /**
555 * Generated from protobuf field <code>string field_1 = 14;</code>
556 * @return string
557 */
558 public function getField1()
559 {
560 return $this->readOneof(14);
561 }
562
563 public function hasField1()
564 {
565 return $this->hasOneof(14);
566 }
567
568 /**
569 * Generated from protobuf field <code>string field_1 = 14;</code>
570 * @param string $var
571 * @return $this
572 */
573 public function setField1($var)
574 {
575 GPBUtil::checkString($var, True);
576 $this->writeOneof(14, $var);
577
578 return $this;
579 }
580
581 /**
582 * Generated from protobuf field <code>string field_2 = 15;</code>
583 * @return string
584 */
585 public function getField2()
586 {
587 return $this->readOneof(15);
588 }
589
590 public function hasField2()
591 {
592 return $this->hasOneof(15);
593 }
594
595 /**
596 * Generated from protobuf field <code>string field_2 = 15;</code>
597 * @param string $var
598 * @return $this
599 */
600 public function setField2($var)
601 {
602 GPBUtil::checkString($var, True);
603 $this->writeOneof(15, $var);
604
605 return $this;
606 }
607
608 /**
609 * Generated from protobuf field <code>string field_3 = 16;</code>
610 * @return string
611 */
612 public function getField3()
613 {
614 return $this->readOneof(16);
615 }
616
617 public function hasField3()
618 {
619 return $this->hasOneof(16);
620 }
621
622 /**
623 * Generated from protobuf field <code>string field_3 = 16;</code>
624 * @param string $var
625 * @return $this
626 */
627 public function setField3($var)
628 {
629 GPBUtil::checkString($var, True);
630 $this->writeOneof(16, $var);
631
632 return $this;
633 }
634
635 /**
636 * @return string
637 */
638 public function getOneofField()
639 {
640 return $this->whichOneof("oneof_field");
641 }
642
643 }
644
645