Class: Google::Apis::AlloydbV1::UserPassword

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/alloydb_v1/classes.rb,
lib/google/apis/alloydb_v1/representations.rb,
lib/google/apis/alloydb_v1/representations.rb

Overview

The username/password for a database user. Used for specifying initial users at cluster creation time.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ UserPassword

Returns a new instance of UserPassword.



2881
2882
2883
# File 'lib/google/apis/alloydb_v1/classes.rb', line 2881

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#passwordString

The initial password for the user. Corresponds to the JSON property password

Returns:

  • (String)


2874
2875
2876
# File 'lib/google/apis/alloydb_v1/classes.rb', line 2874

def password
  @password
end

#userString

The database username. Corresponds to the JSON property user

Returns:

  • (String)


2879
2880
2881
# File 'lib/google/apis/alloydb_v1/classes.rb', line 2879

def user
  @user
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2886
2887
2888
2889
# File 'lib/google/apis/alloydb_v1/classes.rb', line 2886

def update!(**args)
  @password = args[:password] if args.key?(:password)
  @user = args[:user] if args.key?(:user)
end