Class: Google::Apis::SpannerV1::Database

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

Overview

A Cloud Spanner database.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Database

Returns a new instance of Database.



1030
1031
1032
# File 'generated/google/apis/spanner_v1/classes.rb', line 1030

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

Instance Attribute Details

#create_timeString

Output only. If exists, the time at which the database creation started. Corresponds to the JSON property createTime

Returns:

  • (String)


1009
1010
1011
# File 'generated/google/apis/spanner_v1/classes.rb', line 1009

def create_time
  @create_time
end

#nameString

Required. The name of the database. Values are of the form projects/<project>/instances/<instance>/databases/<database>, where <database> is as specified in the CREATE DATABASE statement. This name can be passed to other API methods to identify the database. Corresponds to the JSON property name

Returns:

  • (String)


1018
1019
1020
# File 'generated/google/apis/spanner_v1/classes.rb', line 1018

def name
  @name
end

#restore_infoGoogle::Apis::SpannerV1::RestoreInfo

Information about the database restore. Corresponds to the JSON property restoreInfo



1023
1024
1025
# File 'generated/google/apis/spanner_v1/classes.rb', line 1023

def restore_info
  @restore_info
end

#stateString

Output only. The current database state. Corresponds to the JSON property state

Returns:

  • (String)


1028
1029
1030
# File 'generated/google/apis/spanner_v1/classes.rb', line 1028

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1035
1036
1037
1038
1039
1040
# File 'generated/google/apis/spanner_v1/classes.rb', line 1035

def update!(**args)
  @create_time = args[:create_time] if args.key?(:create_time)
  @name = args[:name] if args.key?(:name)
  @restore_info = args[:restore_info] if args.key?(:restore_info)
  @state = args[:state] if args.key?(:state)
end