api.CreateUserRequest
*/
class CreateUserRequest extends \Google\Protobuf\Internal\Message
{
/**
* User object to create.
*
* Generated from protobuf field .api.User user = 1;
*/
protected $user = null;
/**
* Password to set for the user.
*
* Generated from protobuf field string password = 2;
*/
protected $password = '';
/**
* Add the user to the following tenants.
*
* Generated from protobuf field repeated .api.UserTenant tenants = 3;
*/
private $tenants;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Chirpstack\Api\User $user
* User object to create.
* @type string $password
* Password to set for the user.
* @type array<\Chirpstack\Api\UserTenant>|\Google\Protobuf\Internal\RepeatedField $tenants
* Add the user to the following tenants.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Chirpstack\Api\User::initOnce();
parent::__construct($data);
}
/**
* User object to create.
*
* Generated from protobuf field .api.User user = 1;
* @return \Chirpstack\Api\User|null
*/
public function getUser()
{
return $this->user;
}
public function hasUser()
{
return isset($this->user);
}
public function clearUser()
{
unset($this->user);
}
/**
* User object to create.
*
* Generated from protobuf field .api.User user = 1;
* @param \Chirpstack\Api\User $var
* @return $this
*/
public function setUser($var)
{
GPBUtil::checkMessage($var, \Chirpstack\Api\User::class);
$this->user = $var;
return $this;
}
/**
* Password to set for the user.
*
* Generated from protobuf field string password = 2;
* @return string
*/
public function getPassword()
{
return $this->password;
}
/**
* Password to set for the user.
*
* 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;
}
/**
* Add the user to the following tenants.
*
* Generated from protobuf field repeated .api.UserTenant tenants = 3;
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getTenants()
{
return $this->tenants;
}
/**
* Add the user to the following tenants.
*
* Generated from protobuf field repeated .api.UserTenant tenants = 3;
* @param array<\Chirpstack\Api\UserTenant>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setTenants($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Chirpstack\Api\UserTenant::class);
$this->tenants = $arr;
return $this;
}
}