Class User.Builder (0.38.0)

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

Message describing User object.

Protobuf type google.cloud.alloydb.v1alpha.User

Implements

UserOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
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
Name Description
values Iterable<String>

The databaseRoles to add.

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

The databaseRoles to add.

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

The bytes of the databaseRoles to add.

Returns
Type Description
User.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public User build()
Returns
Type Description
User

buildPartial()

public User buildPartial()
Returns
Type Description
User

clear()

public User.Builder clear()
Returns
Type Description
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
Type Description
User.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public User.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
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
Type Description
User.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPassword()

public User.Builder clearPassword()

Input only. Password for the user.

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

Returns
Type Description
User.Builder

This builder for chaining.

clearUserType()

public User.Builder clearUserType()

Optional. Type of this user.

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

Returns
Type Description
User.Builder

This builder for chaining.

clone()

public User.Builder clone()
Returns
Type Description
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
Name Description
index int

The index of the element to return.

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

The index of the value to return.

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

A list containing the databaseRoles.

getDefaultInstanceForType()

public User getDefaultInstanceForType()
Returns
Type Description
User

getDescriptorForType()

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

The password.

getPasswordBytes()

public ByteString getPasswordBytes()

Input only. Password for the user.

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

Returns
Type Description
ByteString

The bytes for password.

getUserType()

public User.UserType getUserType()

Optional. Type of this user.

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

Returns
Type Description
User.UserType

The userType.

getUserTypeValue()

public int getUserTypeValue()

Optional. Type of this user.

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

Returns
Type Description
int

The enum numeric value on the wire for userType.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(User other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

The index to set the value at.

value String

The databaseRoles to set.

Returns
Type Description
User.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

The name to set.

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

The bytes for name to set.

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

The password to set.

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

The bytes for password to set.

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

setUnknownFields(UnknownFieldSet unknownFields)

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

setUserType(User.UserType value)

public User.Builder setUserType(User.UserType value)

Optional. Type of this user.

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

Parameter
Name Description
value User.UserType

The userType to set.

Returns
Type Description
User.Builder

This builder for chaining.

setUserTypeValue(int value)

public User.Builder setUserTypeValue(int value)

Optional. Type of this user.

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

Parameter
Name Description
value int

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

Returns
Type Description
User.Builder

This builder for chaining.