Class: Google::Apis::SqlV1beta4::RestoreBackupContext

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

Overview

Database instance restore from backup context. Backup context contains source instance id and project id.

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) ⇒ RestoreBackupContext

Returns a new instance of RestoreBackupContext.



2176
2177
2178
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2176

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

Instance Attribute Details

#backup_run_idFixnum

The ID of the backup run to restore from. Corresponds to the JSON property backupRunId

Returns:

  • (Fixnum)


2159
2160
2161
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2159

def backup_run_id
  @backup_run_id
end

#instance_idString

The ID of the instance that the backup was taken from. Corresponds to the JSON property instanceId

Returns:

  • (String)


2164
2165
2166
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2164

def instance_id
  @instance_id
end

#kindString

This is always sql#restoreBackupContext. Corresponds to the JSON property kind

Returns:

  • (String)


2169
2170
2171
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2169

def kind
  @kind
end

#projectString

The full project ID of the source instance. Corresponds to the JSON property project

Returns:

  • (String)


2174
2175
2176
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2174

def project
  @project
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2181
2182
2183
2184
2185
2186
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2181

def update!(**args)
  @backup_run_id = args[:backup_run_id] if args.key?(:backup_run_id)
  @instance_id = args[:instance_id] if args.key?(:instance_id)
  @kind = args[:kind] if args.key?(:kind)
  @project = args[:project] if args.key?(:project)
end