Class AccessBinding.Builder (0.53.0)

public static final class AccessBinding.Builder extends GeneratedMessageV3.Builder<AccessBinding.Builder> implements AccessBindingOrBuilder

A binding of a user to a set of roles.

Protobuf type google.analytics.admin.v1alpha.AccessBinding

Static Methods

getDescriptor()

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

Methods

addAllRoles(Iterable<String> values)

public AccessBinding.Builder addAllRoles(Iterable<String> values)

A list of roles for to grant to the parent resource.

Valid values: predefinedRoles/viewer predefinedRoles/analyst predefinedRoles/editor predefinedRoles/admin predefinedRoles/no-cost-data predefinedRoles/no-revenue-data

For users, if an empty list of roles is set, this AccessBinding will be deleted.

repeated string roles = 3;

Parameter
Name Description
values Iterable<String>

The roles to add.

Returns
Type Description
AccessBinding.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addRoles(String value)

public AccessBinding.Builder addRoles(String value)

A list of roles for to grant to the parent resource.

Valid values: predefinedRoles/viewer predefinedRoles/analyst predefinedRoles/editor predefinedRoles/admin predefinedRoles/no-cost-data predefinedRoles/no-revenue-data

For users, if an empty list of roles is set, this AccessBinding will be deleted.

repeated string roles = 3;

Parameter
Name Description
value String

The roles to add.

Returns
Type Description
AccessBinding.Builder

This builder for chaining.

addRolesBytes(ByteString value)

public AccessBinding.Builder addRolesBytes(ByteString value)

A list of roles for to grant to the parent resource.

Valid values: predefinedRoles/viewer predefinedRoles/analyst predefinedRoles/editor predefinedRoles/admin predefinedRoles/no-cost-data predefinedRoles/no-revenue-data

For users, if an empty list of roles is set, this AccessBinding will be deleted.

repeated string roles = 3;

Parameter
Name Description
value ByteString

The bytes of the roles to add.

Returns
Type Description
AccessBinding.Builder

This builder for chaining.

build()

public AccessBinding build()
Returns
Type Description
AccessBinding

buildPartial()

public AccessBinding buildPartial()
Returns
Type Description
AccessBinding

clear()

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

clearAccessTarget()

public AccessBinding.Builder clearAccessTarget()
Returns
Type Description
AccessBinding.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public AccessBinding.Builder clearName()

Output only. Resource name of this binding.

Format: accounts/{account}/accessBindings/{access_binding} or properties/{property}/accessBindings/{access_binding}

Example: "accounts/100/accessBindings/200"

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

Returns
Type Description
AccessBinding.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearRoles()

public AccessBinding.Builder clearRoles()

A list of roles for to grant to the parent resource.

Valid values: predefinedRoles/viewer predefinedRoles/analyst predefinedRoles/editor predefinedRoles/admin predefinedRoles/no-cost-data predefinedRoles/no-revenue-data

For users, if an empty list of roles is set, this AccessBinding will be deleted.

repeated string roles = 3;

Returns
Type Description
AccessBinding.Builder

This builder for chaining.

clearUser()

public AccessBinding.Builder clearUser()

If set, the email address of the user to set roles for. Format: "someuser@gmail.com"

string user = 2;

Returns
Type Description
AccessBinding.Builder

This builder for chaining.

clone()

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

getAccessTargetCase()

public AccessBinding.AccessTargetCase getAccessTargetCase()
Returns
Type Description
AccessBinding.AccessTargetCase

getDefaultInstanceForType()

public AccessBinding getDefaultInstanceForType()
Returns
Type Description
AccessBinding

getDescriptorForType()

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

getName()

public String getName()

Output only. Resource name of this binding.

Format: accounts/{account}/accessBindings/{access_binding} or properties/{property}/accessBindings/{access_binding}

Example: "accounts/100/accessBindings/200"

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

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. Resource name of this binding.

Format: accounts/{account}/accessBindings/{access_binding} or properties/{property}/accessBindings/{access_binding}

Example: "accounts/100/accessBindings/200"

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

Returns
Type Description
ByteString

The bytes for name.

getRoles(int index)

public String getRoles(int index)

A list of roles for to grant to the parent resource.

Valid values: predefinedRoles/viewer predefinedRoles/analyst predefinedRoles/editor predefinedRoles/admin predefinedRoles/no-cost-data predefinedRoles/no-revenue-data

For users, if an empty list of roles is set, this AccessBinding will be deleted.

repeated string roles = 3;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The roles at the given index.

getRolesBytes(int index)

public ByteString getRolesBytes(int index)

A list of roles for to grant to the parent resource.

Valid values: predefinedRoles/viewer predefinedRoles/analyst predefinedRoles/editor predefinedRoles/admin predefinedRoles/no-cost-data predefinedRoles/no-revenue-data

For users, if an empty list of roles is set, this AccessBinding will be deleted.

repeated string roles = 3;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the roles at the given index.

getRolesCount()

public int getRolesCount()

A list of roles for to grant to the parent resource.

Valid values: predefinedRoles/viewer predefinedRoles/analyst predefinedRoles/editor predefinedRoles/admin predefinedRoles/no-cost-data predefinedRoles/no-revenue-data

For users, if an empty list of roles is set, this AccessBinding will be deleted.

repeated string roles = 3;

Returns
Type Description
int

The count of roles.

getRolesList()

public ProtocolStringList getRolesList()

A list of roles for to grant to the parent resource.

Valid values: predefinedRoles/viewer predefinedRoles/analyst predefinedRoles/editor predefinedRoles/admin predefinedRoles/no-cost-data predefinedRoles/no-revenue-data

For users, if an empty list of roles is set, this AccessBinding will be deleted.

repeated string roles = 3;

Returns
Type Description
ProtocolStringList

A list containing the roles.

getUser()

public String getUser()

If set, the email address of the user to set roles for. Format: "someuser@gmail.com"

string user = 2;

Returns
Type Description
String

The user.

getUserBytes()

public ByteString getUserBytes()

If set, the email address of the user to set roles for. Format: "someuser@gmail.com"

string user = 2;

Returns
Type Description
ByteString

The bytes for user.

hasUser()

public boolean hasUser()

If set, the email address of the user to set roles for. Format: "someuser@gmail.com"

string user = 2;

Returns
Type Description
boolean

Whether the user field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(AccessBinding other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public AccessBinding.Builder setName(String value)

Output only. Resource name of this binding.

Format: accounts/{account}/accessBindings/{access_binding} or properties/{property}/accessBindings/{access_binding}

Example: "accounts/100/accessBindings/200"

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
AccessBinding.Builder

This builder for chaining.

setNameBytes(ByteString value)

public AccessBinding.Builder setNameBytes(ByteString value)

Output only. Resource name of this binding.

Format: accounts/{account}/accessBindings/{access_binding} or properties/{property}/accessBindings/{access_binding}

Example: "accounts/100/accessBindings/200"

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
AccessBinding.Builder

This builder for chaining.

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

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

setRoles(int index, String value)

public AccessBinding.Builder setRoles(int index, String value)

A list of roles for to grant to the parent resource.

Valid values: predefinedRoles/viewer predefinedRoles/analyst predefinedRoles/editor predefinedRoles/admin predefinedRoles/no-cost-data predefinedRoles/no-revenue-data

For users, if an empty list of roles is set, this AccessBinding will be deleted.

repeated string roles = 3;

Parameters
Name Description
index int

The index to set the value at.

value String

The roles to set.

Returns
Type Description
AccessBinding.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setUser(String value)

public AccessBinding.Builder setUser(String value)

If set, the email address of the user to set roles for. Format: "someuser@gmail.com"

string user = 2;

Parameter
Name Description
value String

The user to set.

Returns
Type Description
AccessBinding.Builder

This builder for chaining.

setUserBytes(ByteString value)

public AccessBinding.Builder setUserBytes(ByteString value)

If set, the email address of the user to set roles for. Format: "someuser@gmail.com"

string user = 2;

Parameter
Name Description
value ByteString

The bytes for user to set.

Returns
Type Description
AccessBinding.Builder

This builder for chaining.