Class: Google::Apis::SpannerV1::Database
- Inherits:
-
Object
- Object
- Google::Apis::SpannerV1::Database
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/spanner_v1/classes.rb,
lib/google/apis/spanner_v1/representations.rb,
lib/google/apis/spanner_v1/representations.rb
Overview
A Cloud Spanner database.
Instance Attribute Summary collapse
-
#create_time ⇒ String
Output only.
-
#earliest_version_time ⇒ String
Output only.
-
#name ⇒ String
Required.
-
#restore_info ⇒ Google::Apis::SpannerV1::RestoreInfo
Information about the database restore.
-
#state ⇒ String
Output only.
-
#version_retention_period ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Database
constructor
A new instance of Database.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Database
Returns a new instance of Database.
951 952 953 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 951 def initialize(**args) update!(**args) end |
Instance Attribute Details
#create_time ⇒ String
Output only. If exists, the time at which the database creation started.
Corresponds to the JSON property createTime
918 919 920 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 918 def create_time @create_time end |
#earliest_version_time ⇒ String
Output only. Earliest timestamp at which older versions of the data can be
read.
Corresponds to the JSON property earliestVersionTime
924 925 926 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 924 def earliest_version_time @earliest_version_time end |
#name ⇒ String
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`
932 933 934 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 932 def name @name end |
#restore_info ⇒ Google::Apis::SpannerV1::RestoreInfo
Information about the database restore.
Corresponds to the JSON property restoreInfo
937 938 939 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 937 def restore_info @restore_info end |
#state ⇒ String
Output only. The current database state.
Corresponds to the JSON property state
942 943 944 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 942 def state @state end |
#version_retention_period ⇒ String
Output only. The period in which Cloud Spanner retains all versions of data
for the database. This is same as the value of version_retention_period
database option set using UpdateDatabaseDdl. Defaults to 1 hour, if not set.
Corresponds to the JSON property versionRetentionPeriod
949 950 951 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 949 def version_retention_period @version_retention_period end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
956 957 958 959 960 961 962 963 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 956 def update!(**args) @create_time = args[:create_time] if args.key?(:create_time) @earliest_version_time = args[:earliest_version_time] if args.key?(:earliest_version_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) @version_retention_period = args[:version_retention_period] if args.key?(:version_retention_period) end |