Class User.Builder (0.30.0)

public static final class User.Builder extends GeneratedMessageV3.Builder<User.Builder> implements UserOrBuilder

Message describing User object.

Protobuf type google.cloud.alloydb.v1beta.User

Implements

UserOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllDatabaseRoles(Iterable<String> values)

public User.Builder addAllDatabaseRoles(Iterable<String> values)

Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.

repeated string database_roles = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valuesIterable<String>

The databaseRoles to add.

Returns
TypeDescription
User.Builder

This builder for chaining.

addDatabaseRoles(String value)

public User.Builder addDatabaseRoles(String value)

Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.

repeated string database_roles = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The databaseRoles to add.

Returns
TypeDescription
User.Builder

This builder for chaining.

addDatabaseRolesBytes(ByteString value)

public User.Builder addDatabaseRolesBytes(ByteString value)

Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.

repeated string database_roles = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes of the databaseRoles to add.

Returns
TypeDescription
User.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public User build()
Returns
TypeDescription
User

buildPartial()

public User buildPartial()
Returns
TypeDescription
User

clear()

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

clearDatabaseRoles()

public User.Builder clearDatabaseRoles()

Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.

repeated string database_roles = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
User.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public User.Builder clearName()

Output only. Name of the resource in the form of projects/{project}/locations/{location}/cluster/{cluster}/users/{user}.

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

Returns
TypeDescription
User.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPassword()

public User.Builder clearPassword()

Input only. Password for the user.

string password = 2 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
TypeDescription
User.Builder

This builder for chaining.

clearUserType()

public User.Builder clearUserType()

Optional. Type of this user.

.google.cloud.alloydb.v1beta.User.UserType user_type = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
User.Builder

This builder for chaining.

clone()

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

getDatabaseRoles(int index)

public String getDatabaseRoles(int index)

Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.

repeated string database_roles = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The databaseRoles at the given index.

getDatabaseRolesBytes(int index)

public ByteString getDatabaseRolesBytes(int index)

Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.

repeated string database_roles = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the databaseRoles at the given index.

getDatabaseRolesCount()

public int getDatabaseRolesCount()

Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.

repeated string database_roles = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The count of databaseRoles.

getDatabaseRolesList()

public ProtocolStringList getDatabaseRolesList()

Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.

repeated string database_roles = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ProtocolStringList

A list containing the databaseRoles.

getDefaultInstanceForType()

public User getDefaultInstanceForType()
Returns
TypeDescription
User

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getName()

public String getName()

Output only. Name of the resource in the form of projects/{project}/locations/{location}/cluster/{cluster}/users/{user}.

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

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. Name of the resource in the form of projects/{project}/locations/{location}/cluster/{cluster}/users/{user}.

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

Returns
TypeDescription
ByteString

The bytes for name.

getPassword()

public String getPassword()

Input only. Password for the user.

string password = 2 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
TypeDescription
String

The password.

getPasswordBytes()

public ByteString getPasswordBytes()

Input only. Password for the user.

string password = 2 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for password.

getUserType()

public User.UserType getUserType()

Optional. Type of this user.

.google.cloud.alloydb.v1beta.User.UserType user_type = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
User.UserType

The userType.

getUserTypeValue()

public int getUserTypeValue()

Optional. Type of this user.

.google.cloud.alloydb.v1beta.User.UserType user_type = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The enum numeric value on the wire for userType.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(User other)

public User.Builder mergeFrom(User other)
Parameter
NameDescription
otherUser
Returns
TypeDescription
User.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setDatabaseRoles(int index, String value)

public User.Builder setDatabaseRoles(int index, String value)

Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.

repeated string database_roles = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The databaseRoles to set.

Returns
TypeDescription
User.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public User.Builder setName(String value)

Output only. Name of the resource in the form of projects/{project}/locations/{location}/cluster/{cluster}/users/{user}.

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

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
User.Builder

This builder for chaining.

setNameBytes(ByteString value)

public User.Builder setNameBytes(ByteString value)

Output only. Name of the resource in the form of projects/{project}/locations/{location}/cluster/{cluster}/users/{user}.

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

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
User.Builder

This builder for chaining.

setPassword(String value)

public User.Builder setPassword(String value)

Input only. Password for the user.

string password = 2 [(.google.api.field_behavior) = INPUT_ONLY];

Parameter
NameDescription
valueString

The password to set.

Returns
TypeDescription
User.Builder

This builder for chaining.

setPasswordBytes(ByteString value)

public User.Builder setPasswordBytes(ByteString value)

Input only. Password for the user.

string password = 2 [(.google.api.field_behavior) = INPUT_ONLY];

Parameter
NameDescription
valueByteString

The bytes for password to set.

Returns
TypeDescription
User.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

setUserType(User.UserType value)

public User.Builder setUserType(User.UserType value)

Optional. Type of this user.

.google.cloud.alloydb.v1beta.User.UserType user_type = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueUser.UserType

The userType to set.

Returns
TypeDescription
User.Builder

This builder for chaining.

setUserTypeValue(int value)

public User.Builder setUserTypeValue(int value)

Optional. Type of this user.

.google.cloud.alloydb.v1beta.User.UserType user_type = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueint

The enum numeric value on the wire for userType to set.

Returns
TypeDescription
User.Builder

This builder for chaining.