Class User.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<User.Builder>
com.google.cloud.alloydb.v1beta.User.Builder
All Implemented Interfaces:
UserOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
User

public static final class User.Builder extends com.google.protobuf.GeneratedMessage.Builder<User.Builder> implements UserOrBuilder
 Message describing User object.
 
Protobuf type google.cloud.alloydb.v1beta.User
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<User.Builder>
    • clear

      public User.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<User.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<User.Builder>
    • getDefaultInstanceForType

      public User getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public User build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public User buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public User.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<User.Builder>
    • mergeFrom

      public User.Builder mergeFrom(User other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<User.Builder>
    • mergeFrom

      public User.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<User.Builder>
      Throws:
      IOException
    • 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];
      Specified by:
      getName in interface UserOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.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];
      Specified by:
      getNameBytes in interface UserOrBuilder
      Returns:
      The bytes for name.
    • setName

      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];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • setNameBytes

      public User.Builder setNameBytes(com.google.protobuf.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];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getPassword

      public String getPassword()
       Input only. Password for the user.
       
      string password = 2 [(.google.api.field_behavior) = INPUT_ONLY];
      Specified by:
      getPassword in interface UserOrBuilder
      Returns:
      The password.
    • getPasswordBytes

      public com.google.protobuf.ByteString getPasswordBytes()
       Input only. Password for the user.
       
      string password = 2 [(.google.api.field_behavior) = INPUT_ONLY];
      Specified by:
      getPasswordBytes in interface UserOrBuilder
      Returns:
      The bytes for password.
    • setPassword

      public User.Builder setPassword(String value)
       Input only. Password for the user.
       
      string password = 2 [(.google.api.field_behavior) = INPUT_ONLY];
      Parameters:
      value - The password to set.
      Returns:
      This builder for chaining.
    • clearPassword

      public User.Builder clearPassword()
       Input only. Password for the user.
       
      string password = 2 [(.google.api.field_behavior) = INPUT_ONLY];
      Returns:
      This builder for chaining.
    • setPasswordBytes

      public User.Builder setPasswordBytes(com.google.protobuf.ByteString value)
       Input only. Password for the user.
       
      string password = 2 [(.google.api.field_behavior) = INPUT_ONLY];
      Parameters:
      value - The bytes for password to set.
      Returns:
      This builder for chaining.
    • getDatabaseRolesList

      public com.google.protobuf.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];
      Specified by:
      getDatabaseRolesList in interface UserOrBuilder
      Returns:
      A list containing the databaseRoles.
    • 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];
      Specified by:
      getDatabaseRolesCount in interface UserOrBuilder
      Returns:
      The count of databaseRoles.
    • getDatabaseRoles

      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];
      Specified by:
      getDatabaseRoles in interface UserOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The databaseRoles at the given index.
    • getDatabaseRolesBytes

      public com.google.protobuf.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];
      Specified by:
      getDatabaseRolesBytes in interface UserOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the databaseRoles at the given index.
    • setDatabaseRoles

      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:
      index - The index to set the value at.
      value - The databaseRoles to set.
      Returns:
      This builder for chaining.
    • addDatabaseRoles

      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];
      Parameters:
      value - The databaseRoles to add.
      Returns:
      This builder for chaining.
    • addAllDatabaseRoles

      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];
      Parameters:
      values - The databaseRoles to add.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • addDatabaseRolesBytes

      public User.Builder addDatabaseRolesBytes(com.google.protobuf.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];
      Parameters:
      value - The bytes of the databaseRoles to add.
      Returns:
      This builder for chaining.
    • getUserTypeValue

      public int getUserTypeValue()
       Optional. Type of this user.
       
      .google.cloud.alloydb.v1beta.User.UserType user_type = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getUserTypeValue in interface UserOrBuilder
      Returns:
      The enum numeric value on the wire for userType.
    • setUserTypeValue

      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];
      Parameters:
      value - The enum numeric value on the wire for userType to set.
      Returns:
      This builder for chaining.
    • getUserType

      public User.UserType getUserType()
       Optional. Type of this user.
       
      .google.cloud.alloydb.v1beta.User.UserType user_type = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getUserType in interface UserOrBuilder
      Returns:
      The userType.
    • setUserType

      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];
      Parameters:
      value - The userType to set.
      Returns:
      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:
      This builder for chaining.
    • getKeepExtraRoles

      public boolean getKeepExtraRoles()
       Input only. If the user already exists and it has additional roles, keep
       them granted.
       
      bool keep_extra_roles = 6 [(.google.api.field_behavior) = INPUT_ONLY];
      Specified by:
      getKeepExtraRoles in interface UserOrBuilder
      Returns:
      The keepExtraRoles.
    • setKeepExtraRoles

      public User.Builder setKeepExtraRoles(boolean value)
       Input only. If the user already exists and it has additional roles, keep
       them granted.
       
      bool keep_extra_roles = 6 [(.google.api.field_behavior) = INPUT_ONLY];
      Parameters:
      value - The keepExtraRoles to set.
      Returns:
      This builder for chaining.
    • clearKeepExtraRoles

      public User.Builder clearKeepExtraRoles()
       Input only. If the user already exists and it has additional roles, keep
       them granted.
       
      bool keep_extra_roles = 6 [(.google.api.field_behavior) = INPUT_ONLY];
      Returns:
      This builder for chaining.