proto.RegisterRequest */ class RegisterRequest extends \Google\Protobuf\Internal\Message { /** * Generated from protobuf field string username = 1; */ protected $username = ''; /** * Generated from protobuf field string password = 2; */ protected $password = ''; /** * Generated from protobuf field string email = 3; */ protected $email = ''; /** * Generated from protobuf field string mobile = 4; */ protected $mobile = ''; /** * Generated from protobuf field .proto.Sex sex = 5; */ protected $sex = 0; /** * Generated from protobuf field repeated string hobbies = 6; */ private $hobbies; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type string $username * @type string $password * @type string $email * @type string $mobile * @type int $sex * @type array|\Google\Protobuf\Internal\RepeatedField $hobbies * } */ public function __construct($data = NULL) { \GPBMetadata\Demo1\Proto\User::initOnce(); parent::__construct($data); } /** * Generated from protobuf field string username = 1; * @return string */ public function getUsername() { return $this->username; } /** * Generated from protobuf field string username = 1; * @param string $var * @return $this */ public function setUsername($var) { GPBUtil::checkString($var, True); $this->username = $var; return $this; } /** * Generated from protobuf field string password = 2; * @return string */ public function getPassword() { return $this->password; } /** * Generated from protobuf field string password = 2; * @param string $var * @return $this */ public function setPassword($var) { GPBUtil::checkString($var, True); $this->password = $var; return $this; } /** * Generated from protobuf field string email = 3; * @return string */ public function getEmail() { return $this->email; } /** * Generated from protobuf field string email = 3; * @param string $var * @return $this */ public function setEmail($var) { GPBUtil::checkString($var, True); $this->email = $var; return $this; } /** * Generated from protobuf field string mobile = 4; * @return string */ public function getMobile() { return $this->mobile; } /** * Generated from protobuf field string mobile = 4; * @param string $var * @return $this */ public function setMobile($var) { GPBUtil::checkString($var, True); $this->mobile = $var; return $this; } /** * Generated from protobuf field .proto.Sex sex = 5; * @return int */ public function getSex() { return $this->sex; } /** * Generated from protobuf field .proto.Sex sex = 5; * @param int $var * @return $this */ public function setSex($var) { GPBUtil::checkEnum($var, \Proto\Sex::class); $this->sex = $var; return $this; } /** * Generated from protobuf field repeated string hobbies = 6; * @return \Google\Protobuf\Internal\RepeatedField */ public function getHobbies() { return $this->hobbies; } /** * Generated from protobuf field repeated string hobbies = 6; * @param array|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setHobbies($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); $this->hobbies = $arr; return $this; } }