Class ResourceAccessSpec.Builder (1.52.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
Type Description
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
Name Description
values Iterable<String>

The owners to add.

Returns
Type Description
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
Name Description
values Iterable<String>

The readers to add.

Returns
Type Description
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
Name Description
values Iterable<String>

The writers to add.

Returns
Type Description
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
Name Description
value String

The owners to add.

Returns
Type Description
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
Name Description
value ByteString

The bytes of the owners to add.

Returns
Type Description
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
Name Description
value String

The readers to add.

Returns
Type Description
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
Name Description
value ByteString

The bytes of the readers to add.

Returns
Type Description
ResourceAccessSpec.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ResourceAccessSpec.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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
Name Description
value String

The writers to add.

Returns
Type Description
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
Name Description
value ByteString

The bytes of the writers to add.

Returns
Type Description
ResourceAccessSpec.Builder

This builder for chaining.

build()

public ResourceAccessSpec build()
Returns
Type Description
ResourceAccessSpec

buildPartial()

public ResourceAccessSpec buildPartial()
Returns
Type Description
ResourceAccessSpec

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

public ResourceAccessSpec.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
ResourceAccessSpec.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public ResourceAccessSpec getDefaultInstanceForType()
Returns
Type Description
ResourceAccessSpec

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
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
Name Description
index int

The index of the element to return.

Returns
Type Description
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
Name Description
index int

The index of the value to return.

Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
index int

The index of the element to return.

Returns
Type Description
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
Name Description
index int

The index of the value to return.

Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
index int

The index of the element to return.

Returns
Type Description
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
Name Description
index int

The index of the value to return.

Returns
Type Description
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
Type Description
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
Type Description
ProtocolStringList

A list containing the writers.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ResourceAccessSpec other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

public ResourceAccessSpec.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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
Name Description
index int

The index to set the value at.

value String

The owners to set.

Returns
Type Description
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
Name Description
index int

The index to set the value at.

value String

The readers to set.

Returns
Type Description
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
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
ResourceAccessSpec.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final ResourceAccessSpec.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
index int

The index to set the value at.

value String

The writers to set.

Returns
Type Description
ResourceAccessSpec.Builder

This builder for chaining.