Class GcpUserAccessBinding.Builder (1.15.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
TypeDescription
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
NameDescription
valueString

The accessLevels to add.

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

The bytes of the accessLevels to add.

Returns
TypeDescription
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
NameDescription
valuesIterable<String>

The accessLevels to add.

Returns
TypeDescription
GcpUserAccessBinding.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public GcpUserAccessBinding build()
Returns
TypeDescription
GcpUserAccessBinding

buildPartial()

public GcpUserAccessBinding buildPartial()
Returns
TypeDescription
GcpUserAccessBinding

clear()

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

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public GcpUserAccessBinding.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
GcpUserAccessBinding.Builder
Overrides

clone()

public GcpUserAccessBinding.Builder clone()
Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

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

The index of the value to return.

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

A list containing the accessLevels.

getDefaultInstanceForType()

public GcpUserAccessBinding getDefaultInstanceForType()
Returns
TypeDescription
GcpUserAccessBinding

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for name.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(GcpUserAccessBinding other)

public GcpUserAccessBinding.Builder mergeFrom(GcpUserAccessBinding other)
Parameter
NameDescription
otherGcpUserAccessBinding
Returns
TypeDescription
GcpUserAccessBinding.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

The index to set the value at.

valueString

The accessLevels to set.

Returns
TypeDescription
GcpUserAccessBinding.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

The groupKey to set.

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

The bytes for groupKey to set.

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

The name to set.

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

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
GcpUserAccessBinding.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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