Class: Google::Apis::DatamigrationV1::SetTablePrimaryKey
- Inherits:
-
Object
- Object
- Google::Apis::DatamigrationV1::SetTablePrimaryKey
- 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
-
#primary_key ⇒ String
Optional.
-
#primary_key_columns ⇒ Array<String>
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ SetTablePrimaryKey
constructor
A new instance of SetTablePrimaryKey.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ SetTablePrimaryKey
Returns a new instance of SetTablePrimaryKey.
5431 5432 5433 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 5431 def initialize(**args) update!(**args) end |
Instance Attribute Details
#primary_key ⇒ String
Optional. Name for the primary key
Corresponds to the JSON property primaryKey
5424 5425 5426 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 5424 def primary_key @primary_key end |
#primary_key_columns ⇒ Array<String>
Required. List of column names for the primary key
Corresponds to the JSON property primaryKeyColumns
5429 5430 5431 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 5429 def primary_key_columns @primary_key_columns end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
5436 5437 5438 5439 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 5436 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 |