# AlloyDB V1 API - Class Google::Cloud::AlloyDB::V1::User (v1.9.0)

1.9.0 (latest) 1.7.0 1.6.2 1.5.0 1.4.0 1.3.1 1.2.0 1.1.0 1.0.1 0.12.0 0.11.0 0.10.0 0.9.2 0.8.2 0.7.0 0.6.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the AlloyDB V1 API class Google::Cloud::AlloyDB::V1::User.

Message describing User object.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #database_roles

    def database_roles() -> ::Array<::String>

**Returns**

- (::Array\<::String\>) --- Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.

### #database_roles=

    def database_roles=(value) -> ::Array<::String>

**Parameter**

- **value** (::Array\<::String\>) --- Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.
**Returns**

- (::Array\<::String\>) --- Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.

### #keep_extra_roles

    def keep_extra_roles() -> ::Boolean

**Returns**

- (::Boolean) --- Input only. If the user already exists and it has additional roles, keep them granted.

### #keep_extra_roles=

    def keep_extra_roles=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- Input only. If the user already exists and it has additional roles, keep them granted.
**Returns**

- (::Boolean) --- Input only. If the user already exists and it has additional roles, keep them granted.

### #name

    def name() -> ::String

**Returns**

- (::String) --- Output only. Name of the resource in the form of projects/{project}/locations/{location}/cluster/{cluster}/users/{user}.

### #password

    def password() -> ::String

**Returns**

- (::String) --- Input only. Password for the user.

### #password=

    def password=(value) -> ::String

**Parameter**

- **value** (::String) --- Input only. Password for the user.
**Returns**

- (::String) --- Input only. Password for the user.

### #user_type

    def user_type() -> ::Google::Cloud::AlloyDB::V1::User::UserType

**Returns**

- ([::Google::Cloud::AlloyDB::V1::User::UserType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-alloy_db-v1/latest/Google-Cloud-AlloyDB-V1-User-UserType)) --- Optional. Type of this user.

### #user_type=

    def user_type=(value) -> ::Google::Cloud::AlloyDB::V1::User::UserType

**Parameter**

- **value** ([::Google::Cloud::AlloyDB::V1::User::UserType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-alloy_db-v1/latest/Google-Cloud-AlloyDB-V1-User-UserType)) --- Optional. Type of this user.
**Returns**

- ([::Google::Cloud::AlloyDB::V1::User::UserType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-alloy_db-v1/latest/Google-Cloud-AlloyDB-V1-User-UserType)) --- Optional. Type of this user.