grpc.testing.HookRequest */ class HookRequest extends \Google\Protobuf\Internal\Message { /** * Generated from protobuf field .grpc.testing.HookRequest.HookRequestCommand command = 1; */ protected $command = 0; /** * Generated from protobuf field int32 grpc_code_to_return = 2; */ protected $grpc_code_to_return = 0; /** * Generated from protobuf field string grpc_status_description = 3; */ protected $grpc_status_description = ''; /** * Server port to listen to * * Generated from protobuf field int32 server_port = 4; */ protected $server_port = 0; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type int $command * @type int $grpc_code_to_return * @type string $grpc_status_description * @type int $server_port * Server port to listen to * } */ public function __construct($data = NULL) { \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); parent::__construct($data); } /** * Generated from protobuf field .grpc.testing.HookRequest.HookRequestCommand command = 1; * @return int */ public function getCommand() { return $this->command; } /** * Generated from protobuf field .grpc.testing.HookRequest.HookRequestCommand command = 1; * @param int $var * @return $this */ public function setCommand($var) { GPBUtil::checkEnum($var, \Grpc\Testing\HookRequest\HookRequestCommand::class); $this->command = $var; return $this; } /** * Generated from protobuf field int32 grpc_code_to_return = 2; * @return int */ public function getGrpcCodeToReturn() { return $this->grpc_code_to_return; } /** * Generated from protobuf field int32 grpc_code_to_return = 2; * @param int $var * @return $this */ public function setGrpcCodeToReturn($var) { GPBUtil::checkInt32($var); $this->grpc_code_to_return = $var; return $this; } /** * Generated from protobuf field string grpc_status_description = 3; * @return string */ public function getGrpcStatusDescription() { return $this->grpc_status_description; } /** * Generated from protobuf field string grpc_status_description = 3; * @param string $var * @return $this */ public function setGrpcStatusDescription($var) { GPBUtil::checkString($var, True); $this->grpc_status_description = $var; return $this; } /** * Server port to listen to * * Generated from protobuf field int32 server_port = 4; * @return int */ public function getServerPort() { return $this->server_port; } /** * Server port to listen to * * Generated from protobuf field int32 server_port = 4; * @param int $var * @return $this */ public function setServerPort($var) { GPBUtil::checkInt32($var); $this->server_port = $var; return $this; } }