Imported Upstream version 1.41.0
[platform/upstream/grpc.git] / src / php / tests / interop / Grpc / Testing / StreamingOutputCallRequest.php
1 <?php
2 # Generated by the protocol buffer compiler.  DO NOT EDIT!
3 # source: src/proto/grpc/testing/messages.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  * Server-streaming request.
13  *
14  * Generated from protobuf message <code>grpc.testing.StreamingOutputCallRequest</code>
15  */
16 class StreamingOutputCallRequest extends \Google\Protobuf\Internal\Message
17 {
18     /**
19      * Desired payload type in the response from the server.
20      * If response_type is RANDOM, the payload from each response in the stream
21      * might be of different types. This is to simulate a mixed type of payload
22      * stream.
23      *
24      * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code>
25      */
26     protected $response_type = 0;
27     /**
28      * Configuration for each expected response message.
29      *
30      * Generated from protobuf field <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
31      */
32     private $response_parameters;
33     /**
34      * Optional input payload sent along with the request.
35      *
36      * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code>
37      */
38     protected $payload = null;
39     /**
40      * Whether server should return a given status
41      *
42      * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code>
43      */
44     protected $response_status = null;
45
46     /**
47      * Constructor.
48      *
49      * @param array $data {
50      *     Optional. Data for populating the Message object.
51      *
52      *     @type int $response_type
53      *           Desired payload type in the response from the server.
54      *           If response_type is RANDOM, the payload from each response in the stream
55      *           might be of different types. This is to simulate a mixed type of payload
56      *           stream.
57      *     @type \Grpc\Testing\ResponseParameters[]|\Google\Protobuf\Internal\RepeatedField $response_parameters
58      *           Configuration for each expected response message.
59      *     @type \Grpc\Testing\Payload $payload
60      *           Optional input payload sent along with the request.
61      *     @type \Grpc\Testing\EchoStatus $response_status
62      *           Whether server should return a given status
63      * }
64      */
65     public function __construct($data = NULL) {
66         \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
67         parent::__construct($data);
68     }
69
70     /**
71      * Desired payload type in the response from the server.
72      * If response_type is RANDOM, the payload from each response in the stream
73      * might be of different types. This is to simulate a mixed type of payload
74      * stream.
75      *
76      * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code>
77      * @return int
78      */
79     public function getResponseType()
80     {
81         return $this->response_type;
82     }
83
84     /**
85      * Desired payload type in the response from the server.
86      * If response_type is RANDOM, the payload from each response in the stream
87      * might be of different types. This is to simulate a mixed type of payload
88      * stream.
89      *
90      * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code>
91      * @param int $var
92      * @return $this
93      */
94     public function setResponseType($var)
95     {
96         GPBUtil::checkEnum($var, \Grpc\Testing\PayloadType::class);
97         $this->response_type = $var;
98
99         return $this;
100     }
101
102     /**
103      * Configuration for each expected response message.
104      *
105      * Generated from protobuf field <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
106      * @return \Google\Protobuf\Internal\RepeatedField
107      */
108     public function getResponseParameters()
109     {
110         return $this->response_parameters;
111     }
112
113     /**
114      * Configuration for each expected response message.
115      *
116      * Generated from protobuf field <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
117      * @param \Grpc\Testing\ResponseParameters[]|\Google\Protobuf\Internal\RepeatedField $var
118      * @return $this
119      */
120     public function setResponseParameters($var)
121     {
122         $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ResponseParameters::class);
123         $this->response_parameters = $arr;
124
125         return $this;
126     }
127
128     /**
129      * Optional input payload sent along with the request.
130      *
131      * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code>
132      * @return \Grpc\Testing\Payload|null
133      */
134     public function getPayload()
135     {
136         return $this->payload;
137     }
138
139     public function hasPayload()
140     {
141         return isset($this->payload);
142     }
143
144     public function clearPayload()
145     {
146         unset($this->payload);
147     }
148
149     /**
150      * Optional input payload sent along with the request.
151      *
152      * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code>
153      * @param \Grpc\Testing\Payload $var
154      * @return $this
155      */
156     public function setPayload($var)
157     {
158         GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class);
159         $this->payload = $var;
160
161         return $this;
162     }
163
164     /**
165      * Whether server should return a given status
166      *
167      * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code>
168      * @return \Grpc\Testing\EchoStatus|null
169      */
170     public function getResponseStatus()
171     {
172         return $this->response_status;
173     }
174
175     public function hasResponseStatus()
176     {
177         return isset($this->response_status);
178     }
179
180     public function clearResponseStatus()
181     {
182         unset($this->response_status);
183     }
184
185     /**
186      * Whether server should return a given status
187      *
188      * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code>
189      * @param \Grpc\Testing\EchoStatus $var
190      * @return $this
191      */
192     public function setResponseStatus($var)
193     {
194         GPBUtil::checkMessage($var, \Grpc\Testing\EchoStatus::class);
195         $this->response_status = $var;
196
197         return $this;
198     }
199
200 }
201