google.iam.admin.v1.CreateRoleRequest
*/
class CreateRoleRequest extends \Google\Protobuf\Internal\Message
{
/**
* The `parent` parameter's value depends on the target resource for the
* request, namely
* [`projects`](/iam/reference/rest/v1/projects.roles) or
* [`organizations`](/iam/reference/rest/v1/organizations.roles). Each
* resource type's `parent` value format is described below:
* * [`projects.roles.create()`](/iam/reference/rest/v1/projects.roles/create):
* `projects/{PROJECT_ID}`. This method creates project-level
* [custom roles](/iam/docs/understanding-custom-roles).
* Example request URL:
* `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles`
* * [`organizations.roles.create()`](/iam/reference/rest/v1/organizations.roles/create):
* `organizations/{ORGANIZATION_ID}`. This method creates organization-level
* [custom roles](/iam/docs/understanding-custom-roles). Example request
* URL:
* `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles`
* Note: Wildcard (*) values are invalid; you must specify a complete project
* ID or organization ID.
*
* Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = {
*/
private $parent = '';
/**
* The role ID to use for this role.
*
* Generated from protobuf field string role_id = 2;
*/
private $role_id = '';
/**
* The Role resource to create.
*
* Generated from protobuf field .google.iam.admin.v1.Role role = 3;
*/
private $role = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $parent
* The `parent` parameter's value depends on the target resource for the
* request, namely
* [`projects`](/iam/reference/rest/v1/projects.roles) or
* [`organizations`](/iam/reference/rest/v1/organizations.roles). Each
* resource type's `parent` value format is described below:
* * [`projects.roles.create()`](/iam/reference/rest/v1/projects.roles/create):
* `projects/{PROJECT_ID}`. This method creates project-level
* [custom roles](/iam/docs/understanding-custom-roles).
* Example request URL:
* `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles`
* * [`organizations.roles.create()`](/iam/reference/rest/v1/organizations.roles/create):
* `organizations/{ORGANIZATION_ID}`. This method creates organization-level
* [custom roles](/iam/docs/understanding-custom-roles). Example request
* URL:
* `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles`
* Note: Wildcard (*) values are invalid; you must specify a complete project
* ID or organization ID.
* @type string $role_id
* The role ID to use for this role.
* @type \Google\Iam\Admin\V1\Role $role
* The Role resource to create.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Iam\Admin\V1\Iam::initOnce();
parent::__construct($data);
}
/**
* The `parent` parameter's value depends on the target resource for the
* request, namely
* [`projects`](/iam/reference/rest/v1/projects.roles) or
* [`organizations`](/iam/reference/rest/v1/organizations.roles). Each
* resource type's `parent` value format is described below:
* * [`projects.roles.create()`](/iam/reference/rest/v1/projects.roles/create):
* `projects/{PROJECT_ID}`. This method creates project-level
* [custom roles](/iam/docs/understanding-custom-roles).
* Example request URL:
* `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles`
* * [`organizations.roles.create()`](/iam/reference/rest/v1/organizations.roles/create):
* `organizations/{ORGANIZATION_ID}`. This method creates organization-level
* [custom roles](/iam/docs/understanding-custom-roles). Example request
* URL:
* `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles`
* Note: Wildcard (*) values are invalid; you must specify a complete project
* ID or organization ID.
*
* Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = {
* @return string
*/
public function getParent()
{
return $this->parent;
}
/**
* The `parent` parameter's value depends on the target resource for the
* request, namely
* [`projects`](/iam/reference/rest/v1/projects.roles) or
* [`organizations`](/iam/reference/rest/v1/organizations.roles). Each
* resource type's `parent` value format is described below:
* * [`projects.roles.create()`](/iam/reference/rest/v1/projects.roles/create):
* `projects/{PROJECT_ID}`. This method creates project-level
* [custom roles](/iam/docs/understanding-custom-roles).
* Example request URL:
* `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles`
* * [`organizations.roles.create()`](/iam/reference/rest/v1/organizations.roles/create):
* `organizations/{ORGANIZATION_ID}`. This method creates organization-level
* [custom roles](/iam/docs/understanding-custom-roles). Example request
* URL:
* `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles`
* Note: Wildcard (*) values are invalid; you must specify a complete project
* ID or organization ID.
*
* Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = {
* @param string $var
* @return $this
*/
public function setParent($var)
{
GPBUtil::checkString($var, True);
$this->parent = $var;
return $this;
}
/**
* The role ID to use for this role.
*
* Generated from protobuf field string role_id = 2;
* @return string
*/
public function getRoleId()
{
return $this->role_id;
}
/**
* The role ID to use for this role.
*
* Generated from protobuf field string role_id = 2;
* @param string $var
* @return $this
*/
public function setRoleId($var)
{
GPBUtil::checkString($var, True);
$this->role_id = $var;
return $this;
}
/**
* The Role resource to create.
*
* Generated from protobuf field .google.iam.admin.v1.Role role = 3;
* @return \Google\Iam\Admin\V1\Role
*/
public function getRole()
{
return $this->role;
}
/**
* The Role resource to create.
*
* Generated from protobuf field .google.iam.admin.v1.Role role = 3;
* @param \Google\Iam\Admin\V1\Role $var
* @return $this
*/
public function setRole($var)
{
GPBUtil::checkMessage($var, \Google\Iam\Admin\V1\Role::class);
$this->role = $var;
return $this;
}
}