grpc.testing.SimpleResponse */ class SimpleResponse extends \Google\Protobuf\Internal\Message { /** * Payload to increase message size. * * Generated from protobuf field .grpc.testing.Payload payload = 1; */ protected $payload = null; /** * The user the request came from, for verifying authentication was * successful when the client expected it. * * Generated from protobuf field string username = 2; */ protected $username = ''; /** * OAuth scope. * * Generated from protobuf field string oauth_scope = 3; */ protected $oauth_scope = ''; /** * Server ID. This must be unique among different server instances, * but the same across all RPC's made to a particular server instance. * * Generated from protobuf field string server_id = 4; */ protected $server_id = ''; /** * gRPCLB Path. * * Generated from protobuf field .grpc.testing.GrpclbRouteType grpclb_route_type = 5; */ protected $grpclb_route_type = 0; /** * Server hostname. * * Generated from protobuf field string hostname = 6; */ protected $hostname = ''; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type \Grpc\Testing\Payload $payload * Payload to increase message size. * @type string $username * The user the request came from, for verifying authentication was * successful when the client expected it. * @type string $oauth_scope * OAuth scope. * @type string $server_id * Server ID. This must be unique among different server instances, * but the same across all RPC's made to a particular server instance. * @type int $grpclb_route_type * gRPCLB Path. * @type string $hostname * Server hostname. * } */ public function __construct($data = NULL) { \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); parent::__construct($data); } /** * Payload to increase message size. * * Generated from protobuf field .grpc.testing.Payload payload = 1; * @return \Grpc\Testing\Payload */ public function getPayload() { return isset($this->payload) ? $this->payload : null; } public function hasPayload() { return isset($this->payload); } public function clearPayload() { unset($this->payload); } /** * Payload to increase message size. * * Generated from protobuf field .grpc.testing.Payload payload = 1; * @param \Grpc\Testing\Payload $var * @return $this */ public function setPayload($var) { GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class); $this->payload = $var; return $this; } /** * The user the request came from, for verifying authentication was * successful when the client expected it. * * Generated from protobuf field string username = 2; * @return string */ public function getUsername() { return $this->username; } /** * The user the request came from, for verifying authentication was * successful when the client expected it. * * Generated from protobuf field string username = 2; * @param string $var * @return $this */ public function setUsername($var) { GPBUtil::checkString($var, True); $this->username = $var; return $this; } /** * OAuth scope. * * Generated from protobuf field string oauth_scope = 3; * @return string */ public function getOauthScope() { return $this->oauth_scope; } /** * OAuth scope. * * Generated from protobuf field string oauth_scope = 3; * @param string $var * @return $this */ public function setOauthScope($var) { GPBUtil::checkString($var, True); $this->oauth_scope = $var; return $this; } /** * Server ID. This must be unique among different server instances, * but the same across all RPC's made to a particular server instance. * * Generated from protobuf field string server_id = 4; * @return string */ public function getServerId() { return $this->server_id; } /** * Server ID. This must be unique among different server instances, * but the same across all RPC's made to a particular server instance. * * Generated from protobuf field string server_id = 4; * @param string $var * @return $this */ public function setServerId($var) { GPBUtil::checkString($var, True); $this->server_id = $var; return $this; } /** * gRPCLB Path. * * Generated from protobuf field .grpc.testing.GrpclbRouteType grpclb_route_type = 5; * @return int */ public function getGrpclbRouteType() { return $this->grpclb_route_type; } /** * gRPCLB Path. * * Generated from protobuf field .grpc.testing.GrpclbRouteType grpclb_route_type = 5; * @param int $var * @return $this */ public function setGrpclbRouteType($var) { GPBUtil::checkEnum($var, \Grpc\Testing\GrpclbRouteType::class); $this->grpclb_route_type = $var; return $this; } /** * Server hostname. * * Generated from protobuf field string hostname = 6; * @return string */ public function getHostname() { return $this->hostname; } /** * Server hostname. * * Generated from protobuf field string hostname = 6; * @param string $var * @return $this */ public function setHostname($var) { GPBUtil::checkString($var, True); $this->hostname = $var; return $this; } }