1<?php 2# Generated by the protocol buffer compiler. DO NOT EDIT! 3# source: src/proto/grpc/testing/messages.proto 4 5namespace Grpc\Testing; 6 7use Google\Protobuf\Internal\GPBType; 8use Google\Protobuf\Internal\RepeatedField; 9use Google\Protobuf\Internal\GPBUtil; 10 11/** 12 * Generated from protobuf message <code>grpc.testing.HookRequest</code> 13 */ 14class HookRequest extends \Google\Protobuf\Internal\Message 15{ 16 /** 17 * Generated from protobuf field <code>.grpc.testing.HookRequest.HookRequestCommand command = 1;</code> 18 */ 19 protected $command = 0; 20 /** 21 * Generated from protobuf field <code>int32 grpc_code_to_return = 2;</code> 22 */ 23 protected $grpc_code_to_return = 0; 24 /** 25 * Generated from protobuf field <code>string grpc_status_description = 3;</code> 26 */ 27 protected $grpc_status_description = ''; 28 /** 29 * Server port to listen to 30 * 31 * Generated from protobuf field <code>int32 server_port = 4;</code> 32 */ 33 protected $server_port = 0; 34 35 /** 36 * Constructor. 37 * 38 * @param array $data { 39 * Optional. Data for populating the Message object. 40 * 41 * @type int $command 42 * @type int $grpc_code_to_return 43 * @type string $grpc_status_description 44 * @type int $server_port 45 * Server port to listen to 46 * } 47 */ 48 public function __construct($data = NULL) { 49 \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); 50 parent::__construct($data); 51 } 52 53 /** 54 * Generated from protobuf field <code>.grpc.testing.HookRequest.HookRequestCommand command = 1;</code> 55 * @return int 56 */ 57 public function getCommand() 58 { 59 return $this->command; 60 } 61 62 /** 63 * Generated from protobuf field <code>.grpc.testing.HookRequest.HookRequestCommand command = 1;</code> 64 * @param int $var 65 * @return $this 66 */ 67 public function setCommand($var) 68 { 69 GPBUtil::checkEnum($var, \Grpc\Testing\HookRequest\HookRequestCommand::class); 70 $this->command = $var; 71 72 return $this; 73 } 74 75 /** 76 * Generated from protobuf field <code>int32 grpc_code_to_return = 2;</code> 77 * @return int 78 */ 79 public function getGrpcCodeToReturn() 80 { 81 return $this->grpc_code_to_return; 82 } 83 84 /** 85 * Generated from protobuf field <code>int32 grpc_code_to_return = 2;</code> 86 * @param int $var 87 * @return $this 88 */ 89 public function setGrpcCodeToReturn($var) 90 { 91 GPBUtil::checkInt32($var); 92 $this->grpc_code_to_return = $var; 93 94 return $this; 95 } 96 97 /** 98 * Generated from protobuf field <code>string grpc_status_description = 3;</code> 99 * @return string 100 */ 101 public function getGrpcStatusDescription() 102 { 103 return $this->grpc_status_description; 104 } 105 106 /** 107 * Generated from protobuf field <code>string grpc_status_description = 3;</code> 108 * @param string $var 109 * @return $this 110 */ 111 public function setGrpcStatusDescription($var) 112 { 113 GPBUtil::checkString($var, True); 114 $this->grpc_status_description = $var; 115 116 return $this; 117 } 118 119 /** 120 * Server port to listen to 121 * 122 * Generated from protobuf field <code>int32 server_port = 4;</code> 123 * @return int 124 */ 125 public function getServerPort() 126 { 127 return $this->server_port; 128 } 129 130 /** 131 * Server port to listen to 132 * 133 * Generated from protobuf field <code>int32 server_port = 4;</code> 134 * @param int $var 135 * @return $this 136 */ 137 public function setServerPort($var) 138 { 139 GPBUtil::checkInt32($var); 140 $this->server_port = $var; 141 142 return $this; 143 } 144 145} 146 147