Debian Codegraph @

src/php/tests/qps/generated_code/Grpc/Testing/PayloadConfig.php

raw
1 <?php
2 # Generated by the protocol buffer compiler. DO NOT EDIT!
3 # source: src/proto/grpc/testing/payloads.proto
4
5 namespace Grpc\Testing;
6
7 use Google\Protobuf\Internal\GPBType;
8 use Google\Protobuf\Internal\RepeatedField;
9 use Google\Protobuf\Internal\GPBUtil;
10
11 /**
12 * Generated from protobuf message <code>grpc.testing.PayloadConfig</code>
13 */
14 class PayloadConfig extends \Google\Protobuf\Internal\Message
15 {
16 protected $payload;
17
18 /**
19 * Constructor.
20 *
21 * @param array $data {
22 * Optional. Data for populating the Message object.
23 *
24 * @type \Grpc\Testing\ByteBufferParams $bytebuf_params
25 * @type \Grpc\Testing\SimpleProtoParams $simple_params
26 * @type \Grpc\Testing\ComplexProtoParams $complex_params
27 * }
28 */
29 public function __construct($data = NULL) {
30 \GPBMetadata\Src\Proto\Grpc\Testing\Payloads::initOnce();
31 parent::__construct($data);
32 }
33
34 /**
35 * Generated from protobuf field <code>.grpc.testing.ByteBufferParams bytebuf_params = 1;</code>
36 * @return \Grpc\Testing\ByteBufferParams
37 */
38 public function getBytebufParams()
39 {
40 return $this->readOneof(1);
41 }
42
43 /**
44 * Generated from protobuf field <code>.grpc.testing.ByteBufferParams bytebuf_params = 1;</code>
45 * @param \Grpc\Testing\ByteBufferParams $var
46 * @return $this
47 */
48 public function setBytebufParams($var)
49 {
50 GPBUtil::checkMessage($var, \Grpc\Testing\ByteBufferParams::class);
51 $this->writeOneof(1, $var);
52
53 return $this;
54 }
55
56 /**
57 * Generated from protobuf field <code>.grpc.testing.SimpleProtoParams simple_params = 2;</code>
58 * @return \Grpc\Testing\SimpleProtoParams
59 */
60 public function getSimpleParams()
61 {
62 return $this->readOneof(2);
63 }
64
65 /**
66 * Generated from protobuf field <code>.grpc.testing.SimpleProtoParams simple_params = 2;</code>
67 * @param \Grpc\Testing\SimpleProtoParams $var
68 * @return $this
69 */
70 public function setSimpleParams($var)
71 {
72 GPBUtil::checkMessage($var, \Grpc\Testing\SimpleProtoParams::class);
73 $this->writeOneof(2, $var);
74
75 return $this;
76 }
77
78 /**
79 * Generated from protobuf field <code>.grpc.testing.ComplexProtoParams complex_params = 3;</code>
80 * @return \Grpc\Testing\ComplexProtoParams
81 */
82 public function getComplexParams()
83 {
84 return $this->readOneof(3);
85 }
86
87 /**
88 * Generated from protobuf field <code>.grpc.testing.ComplexProtoParams complex_params = 3;</code>
89 * @param \Grpc\Testing\ComplexProtoParams $var
90 * @return $this
91 */
92 public function setComplexParams($var)
93 {
94 GPBUtil::checkMessage($var, \Grpc\Testing\ComplexProtoParams::class);
95 $this->writeOneof(3, $var);
96
97 return $this;
98 }
99
100 /**
101 * @return string
102 */
103 public function getPayload()
104 {
105 return $this->whichOneof("payload");
106 }
107
108 }
109