google.iam.admin.v1.CreateServiceAccountRequest
*/
class CreateServiceAccountRequest extends \Google\Protobuf\Internal\Message
{
/**
* Required. The resource name of the project associated with the service
* accounts, such as `projects/my-project-123`.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
private $name = '';
/**
* Required. The account id that is used to generate the service account
* email address and a stable unique id. It is unique within a project,
* must be 6-30 characters long, and match the regular expression
* `[a-z]([-a-z0-9]*[a-z0-9])` to comply with RFC1035.
*
* Generated from protobuf field string account_id = 2 [(.google.api.field_behavior) = REQUIRED];
*/
private $account_id = '';
/**
* The [ServiceAccount][google.iam.admin.v1.ServiceAccount] resource to
* create. Currently, only the following values are user assignable:
* `display_name` and `description`.
*
* Generated from protobuf field .google.iam.admin.v1.ServiceAccount service_account = 3;
*/
private $service_account = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $name
* Required. The resource name of the project associated with the service
* accounts, such as `projects/my-project-123`.
* @type string $account_id
* Required. The account id that is used to generate the service account
* email address and a stable unique id. It is unique within a project,
* must be 6-30 characters long, and match the regular expression
* `[a-z]([-a-z0-9]*[a-z0-9])` to comply with RFC1035.
* @type \Google\Iam\Admin\V1\ServiceAccount $service_account
* The [ServiceAccount][google.iam.admin.v1.ServiceAccount] resource to
* create. Currently, only the following values are user assignable:
* `display_name` and `description`.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Iam\Admin\V1\Iam::initOnce();
parent::__construct($data);
}
/**
* Required. The resource name of the project associated with the service
* accounts, such as `projects/my-project-123`.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Required. The resource name of the project associated with the service
* accounts, such as `projects/my-project-123`.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
/**
* Required. The account id that is used to generate the service account
* email address and a stable unique id. It is unique within a project,
* must be 6-30 characters long, and match the regular expression
* `[a-z]([-a-z0-9]*[a-z0-9])` to comply with RFC1035.
*
* Generated from protobuf field string account_id = 2 [(.google.api.field_behavior) = REQUIRED];
* @return string
*/
public function getAccountId()
{
return $this->account_id;
}
/**
* Required. The account id that is used to generate the service account
* email address and a stable unique id. It is unique within a project,
* must be 6-30 characters long, and match the regular expression
* `[a-z]([-a-z0-9]*[a-z0-9])` to comply with RFC1035.
*
* Generated from protobuf field string account_id = 2 [(.google.api.field_behavior) = REQUIRED];
* @param string $var
* @return $this
*/
public function setAccountId($var)
{
GPBUtil::checkString($var, True);
$this->account_id = $var;
return $this;
}
/**
* The [ServiceAccount][google.iam.admin.v1.ServiceAccount] resource to
* create. Currently, only the following values are user assignable:
* `display_name` and `description`.
*
* Generated from protobuf field .google.iam.admin.v1.ServiceAccount service_account = 3;
* @return \Google\Iam\Admin\V1\ServiceAccount
*/
public function getServiceAccount()
{
return $this->service_account;
}
/**
* The [ServiceAccount][google.iam.admin.v1.ServiceAccount] resource to
* create. Currently, only the following values are user assignable:
* `display_name` and `description`.
*
* Generated from protobuf field .google.iam.admin.v1.ServiceAccount service_account = 3;
* @param \Google\Iam\Admin\V1\ServiceAccount $var
* @return $this
*/
public function setServiceAccount($var)
{
GPBUtil::checkMessage($var, \Google\Iam\Admin\V1\ServiceAccount::class);
$this->service_account = $var;
return $this;
}
}