Debian Codegraph @

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

raw
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 * Unary response, as configured by the request.
13 *
14 * Generated from protobuf message <code>grpc.testing.SimpleResponse</code>
15 */
16 class SimpleResponse extends \Google\Protobuf\Internal\Message
17 {
18 /**
19 * Payload to increase message size.
20 *
21 * Generated from protobuf field <code>.grpc.testing.Payload payload = 1;</code>
22 */
23 protected $payload = null;
24 /**
25 * The user the request came from, for verifying authentication was
26 * successful when the client expected it.
27 *
28 * Generated from protobuf field <code>string username = 2;</code>
29 */
30 protected $username = '';
31 /**
32 * OAuth scope.
33 *
34 * Generated from protobuf field <code>string oauth_scope = 3;</code>
35 */
36 protected $oauth_scope = '';
37 /**
38 * Server ID. This must be unique among different server instances,
39 * but the same across all RPC's made to a particular server instance.
40 *
41 * Generated from protobuf field <code>string server_id = 4;</code>
42 */
43 protected $server_id = '';
44 /**
45 * gRPCLB Path.
46 *
47 * Generated from protobuf field <code>.grpc.testing.GrpclbRouteType grpclb_route_type = 5;</code>
48 */
49 protected $grpclb_route_type = 0;
50 /**
51 * Server hostname.
52 *
53 * Generated from protobuf field <code>string hostname = 6;</code>
54 */
55 protected $hostname = '';
56
57 /**
58 * Constructor.
59 *
60 * @param array $data {
61 * Optional. Data for populating the Message object.
62 *
63 * @type \Grpc\Testing\Payload $payload
64 * Payload to increase message size.
65 * @type string $username
66 * The user the request came from, for verifying authentication was
67 * successful when the client expected it.
68 * @type string $oauth_scope
69 * OAuth scope.
70 * @type string $server_id
71 * Server ID. This must be unique among different server instances,
72 * but the same across all RPC's made to a particular server instance.
73 * @type int $grpclb_route_type
74 * gRPCLB Path.
75 * @type string $hostname
76 * Server hostname.
77 * }
78 */
79 public function __construct($data = NULL) {
80 \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
81 parent::__construct($data);
82 }
83
84 /**
85 * Payload to increase message size.
86 *
87 * Generated from protobuf field <code>.grpc.testing.Payload payload = 1;</code>
88 * @return \Grpc\Testing\Payload
89 */
90 public function getPayload()
91 {
92 return $this->payload;
93 }
94
95 /**
96 * Payload to increase message size.
97 *
98 * Generated from protobuf field <code>.grpc.testing.Payload payload = 1;</code>
99 * @param \Grpc\Testing\Payload $var
100 * @return $this
101 */
102 public function setPayload($var)
103 {
104 GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class);
105 $this->payload = $var;
106
107 return $this;
108 }
109
110 /**
111 * The user the request came from, for verifying authentication was
112 * successful when the client expected it.
113 *
114 * Generated from protobuf field <code>string username = 2;</code>
115 * @return string
116 */
117 public function getUsername()
118 {
119 return $this->username;
120 }
121
122 /**
123 * The user the request came from, for verifying authentication was
124 * successful when the client expected it.
125 *
126 * Generated from protobuf field <code>string username = 2;</code>
127 * @param string $var
128 * @return $this
129 */
130 public function setUsername($var)
131 {
132 GPBUtil::checkString($var, True);
133 $this->username = $var;
134
135 return $this;
136 }
137
138 /**
139 * OAuth scope.
140 *
141 * Generated from protobuf field <code>string oauth_scope = 3;</code>
142 * @return string
143 */
144 public function getOauthScope()
145 {
146 return $this->oauth_scope;
147 }
148
149 /**
150 * OAuth scope.
151 *
152 * Generated from protobuf field <code>string oauth_scope = 3;</code>
153 * @param string $var
154 * @return $this
155 */
156 public function setOauthScope($var)
157 {
158 GPBUtil::checkString($var, True);
159 $this->oauth_scope = $var;
160
161 return $this;
162 }
163
164 /**
165 * Server ID. This must be unique among different server instances,
166 * but the same across all RPC's made to a particular server instance.
167 *
168 * Generated from protobuf field <code>string server_id = 4;</code>
169 * @return string
170 */
171 public function getServerId()
172 {
173 return $this->server_id;
174 }
175
176 /**
177 * Server ID. This must be unique among different server instances,
178 * but the same across all RPC's made to a particular server instance.
179 *
180 * Generated from protobuf field <code>string server_id = 4;</code>
181 * @param string $var
182 * @return $this
183 */
184 public function setServerId($var)
185 {
186 GPBUtil::checkString($var, True);
187 $this->server_id = $var;
188
189 return $this;
190 }
191
192 /**
193 * gRPCLB Path.
194 *
195 * Generated from protobuf field <code>.grpc.testing.GrpclbRouteType grpclb_route_type = 5;</code>
196 * @return int
197 */
198 public function getGrpclbRouteType()
199 {
200 return $this->grpclb_route_type;
201 }
202
203 /**
204 * gRPCLB Path.
205 *
206 * Generated from protobuf field <code>.grpc.testing.GrpclbRouteType grpclb_route_type = 5;</code>
207 * @param int $var
208 * @return $this
209 */
210 public function setGrpclbRouteType($var)
211 {
212 GPBUtil::checkEnum($var, \Grpc\Testing\GrpclbRouteType::class);
213 $this->grpclb_route_type = $var;
214
215 return $this;
216 }
217
218 /**
219 * Server hostname.
220 *
221 * Generated from protobuf field <code>string hostname = 6;</code>
222 * @return string
223 */
224 public function getHostname()
225 {
226 return $this->hostname;
227 }
228
229 /**
230 * Server hostname.
231 *
232 * Generated from protobuf field <code>string hostname = 6;</code>
233 * @param string $var
234 * @return $this
235 */
236 public function setHostname($var)
237 {
238 GPBUtil::checkString($var, True);
239 $this->hostname = $var;
240
241 return $this;
242 }
243
244 }
245