Class ResourceAccessSpec.Builder (1.34.0)

public static final class ResourceAccessSpec.Builder extends GeneratedMessageV3.Builder<ResourceAccessSpec.Builder> implements ResourceAccessSpecOrBuilder

ResourceAccessSpec holds the access control configuration to be enforced on the resources, for example, Cloud Storage bucket, BigQuery dataset, BigQuery table.

Protobuf type google.cloud.dataplex.v1.ResourceAccessSpec

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllOwners(Iterable<String> values)

public ResourceAccessSpec.Builder addAllOwners(Iterable<String> values)

Optional. The set of principals to be granted owner role on the resource.

repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valuesIterable<String>

The owners to add.

Returns
TypeDescription
ResourceAccessSpec.Builder

This builder for chaining.

addAllReaders(Iterable<String> values)

public ResourceAccessSpec.Builder addAllReaders(Iterable<String> values)

Optional. The format of strings follows the pattern followed by IAM in the bindings. user:{email}, serviceAccount:{email} group:{email}. The set of principals to be granted reader role on the resource.

repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valuesIterable<String>

The readers to add.

Returns
TypeDescription
ResourceAccessSpec.Builder

This builder for chaining.

addAllWriters(Iterable<String> values)

public ResourceAccessSpec.Builder addAllWriters(Iterable<String> values)

Optional. The set of principals to be granted writer role on the resource.

repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valuesIterable<String>

The writers to add.

Returns
TypeDescription
ResourceAccessSpec.Builder

This builder for chaining.

addOwners(String value)

public ResourceAccessSpec.Builder addOwners(String value)

Optional. The set of principals to be granted owner role on the resource.

repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The owners to add.

Returns
TypeDescription
ResourceAccessSpec.Builder

This builder for chaining.

addOwnersBytes(ByteString value)

public ResourceAccessSpec.Builder addOwnersBytes(ByteString value)

Optional. The set of principals to be granted owner role on the resource.

repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes of the owners to add.

Returns
TypeDescription
ResourceAccessSpec.Builder

This builder for chaining.

addReaders(String value)

public ResourceAccessSpec.Builder addReaders(String value)

Optional. The format of strings follows the pattern followed by IAM in the bindings. user:{email}, serviceAccount:{email} group:{email}. The set of principals to be granted reader role on the resource.

repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The readers to add.

Returns
TypeDescription
ResourceAccessSpec.Builder

This builder for chaining.

addReadersBytes(ByteString value)

public ResourceAccessSpec.Builder addReadersBytes(ByteString value)

Optional. The format of strings follows the pattern followed by IAM in the bindings. user:{email}, serviceAccount:{email} group:{email}. The set of principals to be granted reader role on the resource.

repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes of the readers to add.

Returns
TypeDescription
ResourceAccessSpec.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addWriters(String value)

public ResourceAccessSpec.Builder addWriters(String value)

Optional. The set of principals to be granted writer role on the resource.

repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The writers to add.

Returns
TypeDescription
ResourceAccessSpec.Builder

This builder for chaining.

addWritersBytes(ByteString value)

public ResourceAccessSpec.Builder addWritersBytes(ByteString value)

Optional. The set of principals to be granted writer role on the resource.

repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes of the writers to add.

Returns
TypeDescription
ResourceAccessSpec.Builder

This builder for chaining.

build()

public ResourceAccessSpec build()
Returns
TypeDescription
ResourceAccessSpec

buildPartial()

public ResourceAccessSpec buildPartial()
Returns
TypeDescription
ResourceAccessSpec

clear()

public ResourceAccessSpec.Builder clear()
Returns
TypeDescription
ResourceAccessSpec.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public ResourceAccessSpec.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
ResourceAccessSpec.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearOwners()

public ResourceAccessSpec.Builder clearOwners()

Optional. The set of principals to be granted owner role on the resource.

repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ResourceAccessSpec.Builder

This builder for chaining.

clearReaders()

public ResourceAccessSpec.Builder clearReaders()

Optional. The format of strings follows the pattern followed by IAM in the bindings. user:{email}, serviceAccount:{email} group:{email}. The set of principals to be granted reader role on the resource.

repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ResourceAccessSpec.Builder

This builder for chaining.

clearWriters()

public ResourceAccessSpec.Builder clearWriters()

Optional. The set of principals to be granted writer role on the resource.

repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ResourceAccessSpec.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public ResourceAccessSpec getDefaultInstanceForType()
Returns
TypeDescription
ResourceAccessSpec

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getOwners(int index)

public String getOwners(int index)

Optional. The set of principals to be granted owner role on the resource.

repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The owners at the given index.

getOwnersBytes(int index)

public ByteString getOwnersBytes(int index)

Optional. The set of principals to be granted owner role on the resource.

repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the owners at the given index.

getOwnersCount()

public int getOwnersCount()

Optional. The set of principals to be granted owner role on the resource.

repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The count of owners.

getOwnersList()

public ProtocolStringList getOwnersList()

Optional. The set of principals to be granted owner role on the resource.

repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ProtocolStringList

A list containing the owners.

getReaders(int index)

public String getReaders(int index)

Optional. The format of strings follows the pattern followed by IAM in the bindings. user:{email}, serviceAccount:{email} group:{email}. The set of principals to be granted reader role on the resource.

repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The readers at the given index.

getReadersBytes(int index)

public ByteString getReadersBytes(int index)

Optional. The format of strings follows the pattern followed by IAM in the bindings. user:{email}, serviceAccount:{email} group:{email}. The set of principals to be granted reader role on the resource.

repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the readers at the given index.

getReadersCount()

public int getReadersCount()

Optional. The format of strings follows the pattern followed by IAM in the bindings. user:{email}, serviceAccount:{email} group:{email}. The set of principals to be granted reader role on the resource.

repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The count of readers.

getReadersList()

public ProtocolStringList getReadersList()

Optional. The format of strings follows the pattern followed by IAM in the bindings. user:{email}, serviceAccount:{email} group:{email}. The set of principals to be granted reader role on the resource.

repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ProtocolStringList

A list containing the readers.

getWriters(int index)

public String getWriters(int index)

Optional. The set of principals to be granted writer role on the resource.

repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The writers at the given index.

getWritersBytes(int index)

public ByteString getWritersBytes(int index)

Optional. The set of principals to be granted writer role on the resource.

repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the writers at the given index.

getWritersCount()

public int getWritersCount()

Optional. The set of principals to be granted writer role on the resource.

repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The count of writers.

getWritersList()

public ProtocolStringList getWritersList()

Optional. The set of principals to be granted writer role on the resource.

repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ProtocolStringList

A list containing the writers.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ResourceAccessSpec other)

public ResourceAccessSpec.Builder mergeFrom(ResourceAccessSpec other)
Parameter
NameDescription
otherResourceAccessSpec
Returns
TypeDescription
ResourceAccessSpec.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ResourceAccessSpec.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ResourceAccessSpec.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

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

setOwners(int index, String value)

public ResourceAccessSpec.Builder setOwners(int index, String value)

Optional. The set of principals to be granted owner role on the resource.

repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The owners to set.

Returns
TypeDescription
ResourceAccessSpec.Builder

This builder for chaining.

setReaders(int index, String value)

public ResourceAccessSpec.Builder setReaders(int index, String value)

Optional. The format of strings follows the pattern followed by IAM in the bindings. user:{email}, serviceAccount:{email} group:{email}. The set of principals to be granted reader role on the resource.

repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The readers to set.

Returns
TypeDescription
ResourceAccessSpec.Builder

This builder for chaining.

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

public ResourceAccessSpec.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
ResourceAccessSpec.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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

setWriters(int index, String value)

public ResourceAccessSpec.Builder setWriters(int index, String value)

Optional. The set of principals to be granted writer role on the resource.

repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The writers to set.

Returns
TypeDescription
ResourceAccessSpec.Builder

This builder for chaining.