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

Constructor Details

#initialize(**args) ⇒ Database

Returns a new instance of Database.



882
883
884
# File 'generated/google/apis/spanner_v1/classes.rb', line 882

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)


862
863
864
# File 'generated/google/apis/spanner_v1/classes.rb', line 862

def create_time
  @create_time
end

#nameString

Required. The name of the database. Values are of the form projects// instances//databases/, where `is as specified in theCREATE DATABASE statement. This name can be passed to other API methods to identify the database. Corresponds to the JSON propertyname`

Returns:

  • (String)


870
871
872
# File 'generated/google/apis/spanner_v1/classes.rb', line 870

def name
  @name
end

#restore_infoGoogle::Apis::SpannerV1::RestoreInfo

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



875
876
877
# File 'generated/google/apis/spanner_v1/classes.rb', line 875

def restore_info
  @restore_info
end

#stateString

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

Returns:

  • (String)


880
881
882
# File 'generated/google/apis/spanner_v1/classes.rb', line 880

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



887
888
889
890
891
892
# File 'generated/google/apis/spanner_v1/classes.rb', line 887

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