Class Role.Builder (3.39.0)

public static final class Role.Builder extends GeneratedMessageV3.Builder<Role.Builder> implements RoleOrBuilder

A role in the Identity and Access Management API.

Protobuf type google.iam.admin.v1.Role

Implements

RoleOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllIncludedPermissions(Iterable<String> values)

public Role.Builder addAllIncludedPermissions(Iterable<String> values)

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

repeated string included_permissions = 7;

Parameter
Name Description
values Iterable<String>

The includedPermissions to add.

Returns
Type Description
Role.Builder

This builder for chaining.

addIncludedPermissions(String value)

public Role.Builder addIncludedPermissions(String value)

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

repeated string included_permissions = 7;

Parameter
Name Description
value String

The includedPermissions to add.

Returns
Type Description
Role.Builder

This builder for chaining.

addIncludedPermissionsBytes(ByteString value)

public Role.Builder addIncludedPermissionsBytes(ByteString value)

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

repeated string included_permissions = 7;

Parameter
Name Description
value ByteString

The bytes of the includedPermissions to add.

Returns
Type Description
Role.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Role.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Role.Builder
Overrides

build()

public Role build()
Returns
Type Description
Role

buildPartial()

public Role buildPartial()
Returns
Type Description
Role

clear()

public Role.Builder clear()
Returns
Type Description
Role.Builder
Overrides

clearDeleted()

public Role.Builder clearDeleted()

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
Role.Builder

This builder for chaining.

clearDescription()

public Role.Builder clearDescription()

Optional. A human-readable description for the role.

string description = 3;

Returns
Type Description
Role.Builder

This builder for chaining.

clearEtag()

public Role.Builder clearEtag()

Used to perform a consistent read-modify-write.

bytes etag = 9;

Returns
Type Description
Role.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Role.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Role.Builder
Overrides

clearIncludedPermissions()

public Role.Builder clearIncludedPermissions()

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

repeated string included_permissions = 7;

Returns
Type Description
Role.Builder

This builder for chaining.

clearName()

public Role.Builder clearName()

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
Role.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Role.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Role.Builder
Overrides

clearStage()

public Role.Builder clearStage()

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.Builder

This builder for chaining.

clearTitle()

public Role.Builder clearTitle()

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

string title = 2;

Returns
Type Description
Role.Builder

This builder for chaining.

clone()

public Role.Builder clone()
Returns
Type Description
Role.Builder
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.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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.

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.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Role other)

public Role.Builder mergeFrom(Role other)
Parameter
Name Description
other Role
Returns
Type Description
Role.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Role.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Role.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Role.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Role.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Role.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Role.Builder
Overrides

setDeleted(boolean value)

public Role.Builder setDeleted(boolean value)

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;

Parameter
Name Description
value boolean

The deleted to set.

Returns
Type Description
Role.Builder

This builder for chaining.

setDescription(String value)

public Role.Builder setDescription(String value)

Optional. A human-readable description for the role.

string description = 3;

Parameter
Name Description
value String

The description to set.

Returns
Type Description
Role.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Role.Builder setDescriptionBytes(ByteString value)

Optional. A human-readable description for the role.

string description = 3;

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
Role.Builder

This builder for chaining.

setEtag(ByteString value)

public Role.Builder setEtag(ByteString value)

Used to perform a consistent read-modify-write.

bytes etag = 9;

Parameter
Name Description
value ByteString

The etag to set.

Returns
Type Description
Role.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Role.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Role.Builder
Overrides

setIncludedPermissions(int index, String value)

public Role.Builder setIncludedPermissions(int index, String value)

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

repeated string included_permissions = 7;

Parameters
Name Description
index int

The index to set the value at.

value String

The includedPermissions to set.

Returns
Type Description
Role.Builder

This builder for chaining.

setName(String value)

public Role.Builder setName(String value)

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;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Role.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Role.Builder setNameBytes(ByteString value)

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;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Role.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Role.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Role.Builder
Overrides

setStage(Role.RoleLaunchStage value)

public Role.Builder setStage(Role.RoleLaunchStage value)

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;

Parameter
Name Description
value Role.RoleLaunchStage

The stage to set.

Returns
Type Description
Role.Builder

This builder for chaining.

setStageValue(int value)

public Role.Builder setStageValue(int value)

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;

Parameter
Name Description
value int

The enum numeric value on the wire for stage to set.

Returns
Type Description
Role.Builder

This builder for chaining.

setTitle(String value)

public Role.Builder setTitle(String value)

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

string title = 2;

Parameter
Name Description
value String

The title to set.

Returns
Type Description
Role.Builder

This builder for chaining.

setTitleBytes(ByteString value)

public Role.Builder setTitleBytes(ByteString value)

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

string title = 2;

Parameter
Name Description
value ByteString

The bytes for title to set.

Returns
Type Description
Role.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Role.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Role.Builder
Overrides