Class Role.Builder (3.16.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
TypeDescription
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
NameDescription
valuesIterable<String>

The includedPermissions to add.

Returns
TypeDescription
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
NameDescription
valueString

The includedPermissions to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the includedPermissions to add.

Returns
TypeDescription
Role.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Role.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Role.Builder
Overrides

build()

public Role build()
Returns
TypeDescription
Role

buildPartial()

public Role buildPartial()
Returns
TypeDescription
Role

clear()

public Role.Builder clear()
Returns
TypeDescription
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
TypeDescription
Role.Builder

This builder for chaining.

clearDescription()

public Role.Builder clearDescription()

Optional. A human-readable description for the role.

string description = 3;

Returns
TypeDescription
Role.Builder

This builder for chaining.

clearEtag()

public Role.Builder clearEtag()

Used to perform a consistent read-modify-write.

bytes etag = 9;

Returns
TypeDescription
Role.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Role.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
Role.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Role.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
Role.Builder

This builder for chaining.

clone()

public Role.Builder clone()
Returns
TypeDescription
Role.Builder
Overrides

getDefaultInstanceForType()

public Role getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
boolean

The deleted.

getDescription()

public String getDescription()

Optional. A human-readable description for the role.

string description = 3;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. A human-readable description for the role.

string description = 3;

Returns
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getEtag()

public ByteString getEtag()

Used to perform a consistent read-modify-write.

bytes etag = 9;

Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for title.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Role other)

public Role.Builder mergeFrom(Role other)
Parameter
NameDescription
otherRole
Returns
TypeDescription
Role.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Role.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Role.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Role.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Role.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Role.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueboolean

The deleted to set.

Returns
TypeDescription
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
NameDescription
valueString

The description to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The etag to set.

Returns
TypeDescription
Role.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Role.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The includedPermissions to set.

Returns
TypeDescription
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
NameDescription
valueString

The name to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueRole.RoleLaunchStage

The stage to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
valueString

The title to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for title to set.

Returns
TypeDescription
Role.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Role.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Role.Builder
Overrides