Class: Google::Apis::AlloydbV1::ImportClusterRequest

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

Import cluster request.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ImportClusterRequest

Returns a new instance of ImportClusterRequest.



1637
1638
1639
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1637

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

Instance Attribute Details

#csv_import_optionsGoogle::Apis::AlloydbV1::CsvImportOptions

Options for importing data in CSV format. Corresponds to the JSON property csvImportOptions



1609
1610
1611
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1609

def csv_import_options
  @csv_import_options
end

#databaseString

Optional. Name of the database to which the import will be done. For import from SQL file, this is required only if the file does not specify a database. Note - Value provided should be the same as expected from SELECT current_database(); and NOT as a resource reference. Corresponds to the JSON property database

Returns:

  • (String)


1617
1618
1619
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1617

def database
  @database
end

#gcs_uriString

Required. The path to the file in Google Cloud Storage where the source file for import will be stored. The URI is in the form gs://bucketName/fileName. Corresponds to the JSON property gcsUri

Returns:

  • (String)


1623
1624
1625
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1623

def gcs_uri
  @gcs_uri
end

#sql_import_optionsGoogle::Apis::AlloydbV1::SqlImportOptions

Options for importing data in SQL format. Corresponds to the JSON property sqlImportOptions



1628
1629
1630
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1628

def sql_import_options
  @sql_import_options
end

#userString

Optional. Database user to be used for importing the data. Note - Value provided should be the same as expected from SELECT current_user; and NOT as a resource reference. Corresponds to the JSON property user

Returns:

  • (String)


1635
1636
1637
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1635

def user
  @user
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1642
1643
1644
1645
1646
1647
1648
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1642

def update!(**args)
  @csv_import_options = args[:csv_import_options] if args.key?(:csv_import_options)
  @database = args[:database] if args.key?(:database)
  @gcs_uri = args[:gcs_uri] if args.key?(:gcs_uri)
  @sql_import_options = args[:sql_import_options] if args.key?(:sql_import_options)
  @user = args[:user] if args.key?(:user)
end