Class 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.GeneratedMessageV3.Builder<User.Builder>
    implements UserOrBuilder
     Message describing User object.
     
    Protobuf type google.cloud.alloydb.v1alpha.User
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

        public User.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<User.Builder>
      • setField

        public User.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                     Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<User.Builder>
      • clearField

        public User.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<User.Builder>
      • clearOneof

        public User.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<User.Builder>
      • setRepeatedField

        public User.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                             int index,
                                             Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<User.Builder>
      • addRepeatedField

        public User.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                             Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<User.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>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.User.UserType user_type = 5 [(.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final User.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<User.Builder>
      • mergeUnknownFields

        public final User.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<User.Builder>