Class: Google::Apis::DatamigrationV1::SetTablePrimaryKey

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

Overview

Options to configure rule type SetTablePrimaryKey. The rule is used to specify the columns and name to configure/alter the primary key of a table. The rule filter field can refer to one entity. The rule scope can be one of: Table.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SetTablePrimaryKey

Returns a new instance of SetTablePrimaryKey.



4321
4322
4323
# File 'lib/google/apis/datamigration_v1/classes.rb', line 4321

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

Instance Attribute Details

#primary_keyString

Optional. Name for the primary key Corresponds to the JSON property primaryKey

Returns:

  • (String)


4314
4315
4316
# File 'lib/google/apis/datamigration_v1/classes.rb', line 4314

def primary_key
  @primary_key
end

#primary_key_columnsArray<String>

Required. List of column names for the primary key Corresponds to the JSON property primaryKeyColumns

Returns:

  • (Array<String>)


4319
4320
4321
# File 'lib/google/apis/datamigration_v1/classes.rb', line 4319

def primary_key_columns
  @primary_key_columns
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4326
4327
4328
4329
# File 'lib/google/apis/datamigration_v1/classes.rb', line 4326

def update!(**args)
  @primary_key = args[:primary_key] if args.key?(:primary_key)
  @primary_key_columns = args[:primary_key_columns] if args.key?(:primary_key_columns)
end