public final class Role extends Object implements Serializable
Policy
. Project owners can grant access to team members to access
project's resources and APIs by granting IAM roles to team members.Modifier and Type | Method and Description |
---|---|
static Role |
editor()
Returns the editor role.
|
boolean |
equals(Object obj) |
String |
getValue()
Returns the string identifier for this role.
|
int |
hashCode() |
static Role |
of(String value)
Returns a new role given its string value.
|
static Role |
owner()
Returns the owner role.
|
String |
toString() |
static Role |
viewer()
Returns the viewer role.
|
public String getValue()
"roles/viewer"
, "roles/editor"
, or "roles/owner"
.public static Role viewer()
public static Role editor()
public static Role owner()
public static Role of(String value)
If the value contains no slash character ('/'
), the prefix "roles/""
is
prepended. This slightly simplifies usage for predefined roles. For custom roles, call this
method with the fully-qualified name, eg "projects/XXX/roles/YYY"
.
value
- the string value for the roleCopyright © 2019 Google LLC. All rights reserved.