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.



1679
1680
1681
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1679

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



1651
1652
1653
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1651

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)


1659
1660
1661
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1659

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)


1665
1666
1667
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1665

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



1670
1671
1672
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1670

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)


1677
1678
1679
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1677

def user
  @user
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1684
1685
1686
1687
1688
1689
1690
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1684

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