Class DatabaseRole.Builder (6.108.0)

public static final class DatabaseRole.Builder extends GeneratedMessage.Builder<DatabaseRole.Builder> implements DatabaseRoleOrBuilder

A Cloud Spanner database role.

Protobuf type google.spanner.admin.database.v1.DatabaseRole

Static Methods

getDescriptor()

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

Methods

build()

public DatabaseRole build()
Returns
Type Description
DatabaseRole

buildPartial()

public DatabaseRole buildPartial()
Returns
Type Description
DatabaseRole

clear()

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

clearName()

public DatabaseRole.Builder clearName()

Required. The name of the database role. Values are of the form projects/<project>/instances/<instance>/databases/<database>/databaseRoles/<role> where <role> is as specified in the CREATE ROLE DDL statement.

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

Returns
Type Description
DatabaseRole.Builder

This builder for chaining.

getDefaultInstanceForType()

public DatabaseRole getDefaultInstanceForType()
Returns
Type Description
DatabaseRole

getDescriptorForType()

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

getName()

public String getName()

Required. The name of the database role. Values are of the form projects/<project>/instances/<instance>/databases/<database>/databaseRoles/<role> where <role> is as specified in the CREATE ROLE DDL statement.

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

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. The name of the database role. Values are of the form projects/<project>/instances/<instance>/databases/<database>/databaseRoles/<role> where <role> is as specified in the CREATE ROLE DDL statement.

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

Returns
Type Description
ByteString

The bytes for name.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(DatabaseRole other)

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

setName(String value)

public DatabaseRole.Builder setName(String value)

Required. The name of the database role. Values are of the form projects/<project>/instances/<instance>/databases/<database>/databaseRoles/<role> where <role> is as specified in the CREATE ROLE DDL statement.

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
DatabaseRole.Builder

This builder for chaining.

setNameBytes(ByteString value)

public DatabaseRole.Builder setNameBytes(ByteString value)

Required. The name of the database role. Values are of the form projects/<project>/instances/<instance>/databases/<database>/databaseRoles/<role> where <role> is as specified in the CREATE ROLE DDL statement.

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
DatabaseRole.Builder

This builder for chaining.