Class Role (3.40.0)

public final class Role extends GeneratedMessageV3 implements RoleOrBuilder

A role in the Identity and Access Management API.

Protobuf type google.iam.admin.v1.Role

Implements

RoleOrBuilder

Static Fields

DELETED_FIELD_NUMBER

public static final int DELETED_FIELD_NUMBER
Field Value
Type Description
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
Type Description
int

ETAG_FIELD_NUMBER

public static final int ETAG_FIELD_NUMBER
Field Value
Type Description
int

INCLUDED_PERMISSIONS_FIELD_NUMBER

public static final int INCLUDED_PERMISSIONS_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

STAGE_FIELD_NUMBER

public static final int STAGE_FIELD_NUMBER
Field Value
Type Description
int

TITLE_FIELD_NUMBER

public static final int TITLE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Role getDefaultInstance()
Returns
Type Description
Role

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static Role.Builder newBuilder()
Returns
Type Description
Role.Builder

newBuilder(Role prototype)

public static Role.Builder newBuilder(Role prototype)
Parameter
Name Description
prototype Role
Returns
Type Description
Role.Builder

parseDelimitedFrom(InputStream input)

public static Role parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Role
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Role parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Role
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Role parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Role
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Role parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Role
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Role parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Role
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Role parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Role
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Role parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Role
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Role parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Role
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Role parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Role
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Role parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Role
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Role parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Role
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Role parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Role
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Role> parser()
Returns
Type Description
Parser<Role>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public Role getDefaultInstanceForType()
Returns
Type Description
Role

getDeleted()

public boolean getDeleted()

The current deleted state of the role. This field is read only. It will be ignored in calls to CreateRole and UpdateRole.

bool deleted = 11;

Returns
Type Description
boolean

The deleted.

getDescription()

public String getDescription()

Optional. A human-readable description for the role.

string description = 3;

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. A human-readable description for the role.

string description = 3;

Returns
Type Description
ByteString

The bytes for description.

getEtag()

public ByteString getEtag()

Used to perform a consistent read-modify-write.

bytes etag = 9;

Returns
Type Description
ByteString

The etag.

getIncludedPermissions(int index)

public String getIncludedPermissions(int index)

The names of the permissions this role grants when bound in an IAM policy.

repeated string included_permissions = 7;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The includedPermissions at the given index.

getIncludedPermissionsBytes(int index)

public ByteString getIncludedPermissionsBytes(int index)

The names of the permissions this role grants when bound in an IAM policy.

repeated string included_permissions = 7;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the includedPermissions at the given index.

getIncludedPermissionsCount()

public int getIncludedPermissionsCount()

The names of the permissions this role grants when bound in an IAM policy.

repeated string included_permissions = 7;

Returns
Type Description
int

The count of includedPermissions.

getIncludedPermissionsList()

public ProtocolStringList getIncludedPermissionsList()

The names of the permissions this role grants when bound in an IAM policy.

repeated string included_permissions = 7;

Returns
Type Description
ProtocolStringList

A list containing the includedPermissions.

getName()

public String getName()

The name of the role.

When Role is used in CreateRole, the role name must not be set.

When Role is used in output and other input such as UpdateRole, the role name is the complete path, e.g., roles/logging.viewer for predefined roles and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

The name of the role.

When Role is used in CreateRole, the role name must not be set.

When Role is used in output and other input such as UpdateRole, the role name is the complete path, e.g., roles/logging.viewer for predefined roles and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<Role> getParserForType()
Returns
Type Description
Parser<Role>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getStage()

public Role.RoleLaunchStage getStage()

The current launch stage of the role. If the ALPHA launch stage has been selected for a role, the stage field will not be included in the returned definition for the role.

.google.iam.admin.v1.Role.RoleLaunchStage stage = 8;

Returns
Type Description
Role.RoleLaunchStage

The stage.

getStageValue()

public int getStageValue()

The current launch stage of the role. If the ALPHA launch stage has been selected for a role, the stage field will not be included in the returned definition for the role.

.google.iam.admin.v1.Role.RoleLaunchStage stage = 8;

Returns
Type Description
int

The enum numeric value on the wire for stage.

getTitle()

public String getTitle()

Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes.

string title = 2;

Returns
Type Description
String

The title.

getTitleBytes()

public ByteString getTitleBytes()

Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes.

string title = 2;

Returns
Type Description
ByteString

The bytes for title.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Role.Builder newBuilderForType()
Returns
Type Description
Role.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Role.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Role.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Role.Builder toBuilder()
Returns
Type Description
Role.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException