Class GcpUserAccessBinding.Builder (1.56.0)

public static final class GcpUserAccessBinding.Builder extends GeneratedMessageV3.Builder<GcpUserAccessBinding.Builder> implements GcpUserAccessBindingOrBuilder

Restricts access to Cloud Console and Google Cloud APIs for a set of users using Context-Aware Access.

Protobuf type google.identity.accesscontextmanager.v1.GcpUserAccessBinding

Static Methods

getDescriptor()

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

Methods

addAccessLevels(String value)

public GcpUserAccessBinding.Builder addAccessLevels(String value)

Required. Access level that a user must have to be granted access. Only one access level is supported, not multiple. This repeated field must have exactly one element. Example: "accessPolicies/9522/accessLevels/device_trusted"

repeated string access_levels = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The accessLevels to add.

Returns
Type Description
GcpUserAccessBinding.Builder

This builder for chaining.

addAccessLevelsBytes(ByteString value)

public GcpUserAccessBinding.Builder addAccessLevelsBytes(ByteString value)

Required. Access level that a user must have to be granted access. Only one access level is supported, not multiple. This repeated field must have exactly one element. Example: "accessPolicies/9522/accessLevels/device_trusted"

repeated string access_levels = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes of the accessLevels to add.

Returns
Type Description
GcpUserAccessBinding.Builder

This builder for chaining.

addAllAccessLevels(Iterable<String> values)

public GcpUserAccessBinding.Builder addAllAccessLevels(Iterable<String> values)

Required. Access level that a user must have to be granted access. Only one access level is supported, not multiple. This repeated field must have exactly one element. Example: "accessPolicies/9522/accessLevels/device_trusted"

repeated string access_levels = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
values Iterable<String>

The accessLevels to add.

Returns
Type Description
GcpUserAccessBinding.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public GcpUserAccessBinding build()
Returns
Type Description
GcpUserAccessBinding

buildPartial()

public GcpUserAccessBinding buildPartial()
Returns
Type Description
GcpUserAccessBinding

clear()

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

clearAccessLevels()

public GcpUserAccessBinding.Builder clearAccessLevels()

Required. Access level that a user must have to be granted access. Only one access level is supported, not multiple. This repeated field must have exactly one element. Example: "accessPolicies/9522/accessLevels/device_trusted"

repeated string access_levels = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
GcpUserAccessBinding.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearGroupKey()

public GcpUserAccessBinding.Builder clearGroupKey()

Required. Immutable. Google Group id whose members are subject to this binding's restrictions. See "id" in the G Suite Directory API's Groups resource. If a group's email address/alias is changed, this resource will continue to point at the changed group. This field does not accept group email addresses or aliases. Example: "01d520gv4vjcrht"

string group_key = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
GcpUserAccessBinding.Builder

This builder for chaining.

clearName()

public GcpUserAccessBinding.Builder clearName()

Immutable. Assigned by the server during creation. The last segment has an arbitrary length and has only URI unreserved characters (as defined by RFC 3986 Section 2.3). Should not be specified by the client during creation. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N"

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
GcpUserAccessBinding.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

public GcpUserAccessBinding.Builder clone()
Returns
Type Description
GcpUserAccessBinding.Builder
Overrides

getAccessLevels(int index)

public String getAccessLevels(int index)

Required. Access level that a user must have to be granted access. Only one access level is supported, not multiple. This repeated field must have exactly one element. Example: "accessPolicies/9522/accessLevels/device_trusted"

repeated string access_levels = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The accessLevels at the given index.

getAccessLevelsBytes(int index)

public ByteString getAccessLevelsBytes(int index)

Required. Access level that a user must have to be granted access. Only one access level is supported, not multiple. This repeated field must have exactly one element. Example: "accessPolicies/9522/accessLevels/device_trusted"

repeated string access_levels = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the accessLevels at the given index.

getAccessLevelsCount()

public int getAccessLevelsCount()

Required. Access level that a user must have to be granted access. Only one access level is supported, not multiple. This repeated field must have exactly one element. Example: "accessPolicies/9522/accessLevels/device_trusted"

repeated string access_levels = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
int

The count of accessLevels.

getAccessLevelsList()

public ProtocolStringList getAccessLevelsList()

Required. Access level that a user must have to be granted access. Only one access level is supported, not multiple. This repeated field must have exactly one element. Example: "accessPolicies/9522/accessLevels/device_trusted"

repeated string access_levels = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ProtocolStringList

A list containing the accessLevels.

getDefaultInstanceForType()

public GcpUserAccessBinding getDefaultInstanceForType()
Returns
Type Description
GcpUserAccessBinding

getDescriptorForType()

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

getGroupKey()

public String getGroupKey()

Required. Immutable. Google Group id whose members are subject to this binding's restrictions. See "id" in the G Suite Directory API's Groups resource. If a group's email address/alias is changed, this resource will continue to point at the changed group. This field does not accept group email addresses or aliases. Example: "01d520gv4vjcrht"

string group_key = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The groupKey.

getGroupKeyBytes()

public ByteString getGroupKeyBytes()

Required. Immutable. Google Group id whose members are subject to this binding's restrictions. See "id" in the G Suite Directory API's Groups resource. If a group's email address/alias is changed, this resource will continue to point at the changed group. This field does not accept group email addresses or aliases. Example: "01d520gv4vjcrht"

string group_key = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for groupKey.

getName()

public String getName()

Immutable. Assigned by the server during creation. The last segment has an arbitrary length and has only URI unreserved characters (as defined by RFC 3986 Section 2.3). Should not be specified by the client during creation. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N"

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Immutable. Assigned by the server during creation. The last segment has an arbitrary length and has only URI unreserved characters (as defined by RFC 3986 Section 2.3). Should not be specified by the client during creation. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N"

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for name.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(GcpUserAccessBinding other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAccessLevels(int index, String value)

public GcpUserAccessBinding.Builder setAccessLevels(int index, String value)

Required. Access level that a user must have to be granted access. Only one access level is supported, not multiple. This repeated field must have exactly one element. Example: "accessPolicies/9522/accessLevels/device_trusted"

repeated string access_levels = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameters
Name Description
index int

The index to set the value at.

value String

The accessLevels to set.

Returns
Type Description
GcpUserAccessBinding.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setGroupKey(String value)

public GcpUserAccessBinding.Builder setGroupKey(String value)

Required. Immutable. Google Group id whose members are subject to this binding's restrictions. See "id" in the G Suite Directory API's Groups resource. If a group's email address/alias is changed, this resource will continue to point at the changed group. This field does not accept group email addresses or aliases. Example: "01d520gv4vjcrht"

string group_key = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The groupKey to set.

Returns
Type Description
GcpUserAccessBinding.Builder

This builder for chaining.

setGroupKeyBytes(ByteString value)

public GcpUserAccessBinding.Builder setGroupKeyBytes(ByteString value)

Required. Immutable. Google Group id whose members are subject to this binding's restrictions. See "id" in the G Suite Directory API's Groups resource. If a group's email address/alias is changed, this resource will continue to point at the changed group. This field does not accept group email addresses or aliases. Example: "01d520gv4vjcrht"

string group_key = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for groupKey to set.

Returns
Type Description
GcpUserAccessBinding.Builder

This builder for chaining.

setName(String value)

public GcpUserAccessBinding.Builder setName(String value)

Immutable. Assigned by the server during creation. The last segment has an arbitrary length and has only URI unreserved characters (as defined by RFC 3986 Section 2.3). Should not be specified by the client during creation. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N"

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
GcpUserAccessBinding.Builder

This builder for chaining.

setNameBytes(ByteString value)

public GcpUserAccessBinding.Builder setNameBytes(ByteString value)

Immutable. Assigned by the server during creation. The last segment has an arbitrary length and has only URI unreserved characters (as defined by RFC 3986 Section 2.3). Should not be specified by the client during creation. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N"

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
GcpUserAccessBinding.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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