Class AccessBinding.Builder (0.34.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
TypeDescription
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
NameDescription
valuesIterable<String>

The roles to add.

Returns
TypeDescription
AccessBinding.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

The roles to add.

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

The bytes of the roles to add.

Returns
TypeDescription
AccessBinding.Builder

This builder for chaining.

build()

public AccessBinding build()
Returns
TypeDescription
AccessBinding

buildPartial()

public AccessBinding buildPartial()
Returns
TypeDescription
AccessBinding

clear()

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

clearAccessTarget()

public AccessBinding.Builder clearAccessTarget()
Returns
TypeDescription
AccessBinding.Builder

clearField(Descriptors.FieldDescriptor field)

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

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public AccessBinding.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
AccessBinding.Builder

This builder for chaining.

clone()

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

getAccessTargetCase()

public AccessBinding.AccessTargetCase getAccessTargetCase()
Returns
TypeDescription
AccessBinding.AccessTargetCase

getDefaultInstanceForType()

public AccessBinding getDefaultInstanceForType()
Returns
TypeDescription
AccessBinding

getDescriptorForType()

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

The index of the element to return.

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

The index of the value to return.

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

Whether the user field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(AccessBinding other)

public AccessBinding.Builder mergeFrom(AccessBinding other)
Parameter
NameDescription
otherAccessBinding
Returns
TypeDescription
AccessBinding.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

The name to set.

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

The bytes for name to set.

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

The index to set the value at.

valueString

The roles to set.

Returns
TypeDescription
AccessBinding.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final AccessBinding.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueString

The user to set.

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

The bytes for user to set.

Returns
TypeDescription
AccessBinding.Builder

This builder for chaining.