2 # Generated by the protocol buffer compiler. DO NOT EDIT!
3 # source: src/proto/grpc/testing/messages.proto
5 namespace Grpc\Testing;
7 use Google\Protobuf\Internal\GPBType;
8 use Google\Protobuf\Internal\RepeatedField;
9 use Google\Protobuf\Internal\GPBUtil;
12 * Unary response, as configured by the request.
14 * Generated from protobuf message <code>grpc.testing.SimpleResponse</code>
16 class SimpleResponse extends \Google\Protobuf\Internal\Message
19 * Payload to increase message size.
21 * Generated from protobuf field <code>.grpc.testing.Payload payload = 1;</code>
23 protected $payload = null;
25 * The user the request came from, for verifying authentication was
26 * successful when the client expected it.
28 * Generated from protobuf field <code>string username = 2;</code>
30 protected $username = '';
34 * Generated from protobuf field <code>string oauth_scope = 3;</code>
36 protected $oauth_scope = '';
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.
41 * Generated from protobuf field <code>string server_id = 4;</code>
43 protected $server_id = '';
47 * Generated from protobuf field <code>.grpc.testing.GrpclbRouteType grpclb_route_type = 5;</code>
49 protected $grpclb_route_type = 0;
53 * Generated from protobuf field <code>string hostname = 6;</code>
55 protected $hostname = '';
60 * @param array $data {
61 * Optional. Data for populating the Message object.
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
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
75 * @type string $hostname
79 public function __construct($data = NULL) {
80 \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
81 parent::__construct($data);
85 * Payload to increase message size.
87 * Generated from protobuf field <code>.grpc.testing.Payload payload = 1;</code>
88 * @return \Grpc\Testing\Payload|null
90 public function getPayload()
92 return $this->payload;
95 public function hasPayload()
97 return isset($this->payload);
100 public function clearPayload()
102 unset($this->payload);
106 * Payload to increase message size.
108 * Generated from protobuf field <code>.grpc.testing.Payload payload = 1;</code>
109 * @param \Grpc\Testing\Payload $var
112 public function setPayload($var)
114 GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class);
115 $this->payload = $var;
121 * The user the request came from, for verifying authentication was
122 * successful when the client expected it.
124 * Generated from protobuf field <code>string username = 2;</code>
127 public function getUsername()
129 return $this->username;
133 * The user the request came from, for verifying authentication was
134 * successful when the client expected it.
136 * Generated from protobuf field <code>string username = 2;</code>
140 public function setUsername($var)
142 GPBUtil::checkString($var, True);
143 $this->username = $var;
151 * Generated from protobuf field <code>string oauth_scope = 3;</code>
154 public function getOauthScope()
156 return $this->oauth_scope;
162 * Generated from protobuf field <code>string oauth_scope = 3;</code>
166 public function setOauthScope($var)
168 GPBUtil::checkString($var, True);
169 $this->oauth_scope = $var;
175 * Server ID. This must be unique among different server instances,
176 * but the same across all RPC's made to a particular server instance.
178 * Generated from protobuf field <code>string server_id = 4;</code>
181 public function getServerId()
183 return $this->server_id;
187 * Server ID. This must be unique among different server instances,
188 * but the same across all RPC's made to a particular server instance.
190 * Generated from protobuf field <code>string server_id = 4;</code>
194 public function setServerId($var)
196 GPBUtil::checkString($var, True);
197 $this->server_id = $var;
205 * Generated from protobuf field <code>.grpc.testing.GrpclbRouteType grpclb_route_type = 5;</code>
208 public function getGrpclbRouteType()
210 return $this->grpclb_route_type;
216 * Generated from protobuf field <code>.grpc.testing.GrpclbRouteType grpclb_route_type = 5;</code>
220 public function setGrpclbRouteType($var)
222 GPBUtil::checkEnum($var, \Grpc\Testing\GrpclbRouteType::class);
223 $this->grpclb_route_type = $var;
231 * Generated from protobuf field <code>string hostname = 6;</code>
234 public function getHostname()
236 return $this->hostname;
242 * Generated from protobuf field <code>string hostname = 6;</code>
246 public function setHostname($var)
248 GPBUtil::checkString($var, True);
249 $this->hostname = $var;