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.
| 4104 4105 4106 | # File 'lib/google/apis/datamigration_v1/classes.rb', line 4104 def initialize(**args) update!(**args) end | 
Instance Attribute Details
#primary_key ⇒ String
Optional. Name for the primary key
Corresponds to the JSON property primaryKey
| 4097 4098 4099 | # File 'lib/google/apis/datamigration_v1/classes.rb', line 4097 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
| 4102 4103 4104 | # File 'lib/google/apis/datamigration_v1/classes.rb', line 4102 def primary_key_columns @primary_key_columns end | 
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
| 4109 4110 4111 4112 | # File 'lib/google/apis/datamigration_v1/classes.rb', line 4109 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 |