proto.Response */ class Response extends \Google\Protobuf\Internal\Message { /** * Generated from protobuf field int32 code = 1; */ protected $code = 0; /** * Generated from protobuf field string msg = 2; */ protected $msg = ''; /** * Generated from protobuf field map info = 5; */ private $info; protected $data; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type int $code * @type string $msg * @type string $token * @type string $message * @type array|\Google\Protobuf\Internal\MapField $info * } */ public function __construct($data = NULL) { \GPBMetadata\Demo1\Proto\User::initOnce(); parent::__construct($data); } /** * Generated from protobuf field int32 code = 1; * @return int */ public function getCode() { return $this->code; } /** * Generated from protobuf field int32 code = 1; * @param int $var * @return $this */ public function setCode($var) { GPBUtil::checkInt32($var); $this->code = $var; return $this; } /** * Generated from protobuf field string msg = 2; * @return string */ public function getMsg() { return $this->msg; } /** * Generated from protobuf field string msg = 2; * @param string $var * @return $this */ public function setMsg($var) { GPBUtil::checkString($var, True); $this->msg = $var; return $this; } /** * Generated from protobuf field string token = 3; * @return string */ public function getToken() { return $this->readOneof(3); } public function hasToken() { return $this->hasOneof(3); } /** * Generated from protobuf field string token = 3; * @param string $var * @return $this */ public function setToken($var) { GPBUtil::checkString($var, True); $this->writeOneof(3, $var); return $this; } /** * Generated from protobuf field string message = 4; * @return string */ public function getMessage() { return $this->readOneof(4); } public function hasMessage() { return $this->hasOneof(4); } /** * Generated from protobuf field string message = 4; * @param string $var * @return $this */ public function setMessage($var) { GPBUtil::checkString($var, True); $this->writeOneof(4, $var); return $this; } /** * Generated from protobuf field map info = 5; * @return \Google\Protobuf\Internal\MapField */ public function getInfo() { return $this->info; } /** * Generated from protobuf field map info = 5; * @param array|\Google\Protobuf\Internal\MapField $var * @return $this */ public function setInfo($var) { $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); $this->info = $arr; return $this; } /** * @return string */ public function getData() { return $this->whichOneof("data"); } }