Class: OCI::DatabaseMigration::Models::DataPumpParameters

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/database_migration/models/data_pump_parameters.rb

Overview

Optional parameters for Data Pump Export and Import. Refer to Configuring Optional Initial Load Advanced Settings

Constant Summary collapse

ESTIMATE_ENUM =
[
  ESTIMATE_BLOCKS = 'BLOCKS'.freeze,
  ESTIMATE_STATISTICS = 'STATISTICS'.freeze,
  ESTIMATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
TABLE_EXISTS_ACTION_ENUM =
[
  TABLE_EXISTS_ACTION_TRUNCATE = 'TRUNCATE'.freeze,
  TABLE_EXISTS_ACTION_REPLACE = 'REPLACE'.freeze,
  TABLE_EXISTS_ACTION_APPEND = 'APPEND'.freeze,
  TABLE_EXISTS_ACTION_SKIP = 'SKIP'.freeze,
  TABLE_EXISTS_ACTION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ DataPumpParameters

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):

  • :is_cluster (BOOLEAN)

    The value to assign to the #is_cluster property

  • :estimate (String)

    The value to assign to the #estimate property

  • :table_exists_action (String)

    The value to assign to the #table_exists_action property

  • :exclude_parameters (Array<OCI::DatabaseMigration::Models::DataPumpExcludeParameters>)

    The value to assign to the #exclude_parameters property

  • :import_parallelism_degree (Integer)

    The value to assign to the #import_parallelism_degree property

  • :export_parallelism_degree (Integer)

    The value to assign to the #export_parallelism_degree property



98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# File 'lib/oci/database_migration/models/data_pump_parameters.rb', line 98

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.is_cluster = attributes[:'isCluster'] unless attributes[:'isCluster'].nil?
  self.is_cluster = true if is_cluster.nil? && !attributes.key?(:'isCluster') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :isCluster and :is_cluster' if attributes.key?(:'isCluster') && attributes.key?(:'is_cluster')

  self.is_cluster = attributes[:'is_cluster'] unless attributes[:'is_cluster'].nil?
  self.is_cluster = true if is_cluster.nil? && !attributes.key?(:'isCluster') && !attributes.key?(:'is_cluster') # rubocop:disable Style/StringLiterals

  self.estimate = attributes[:'estimate'] if attributes[:'estimate']
  self.estimate = "STATISTICS" if estimate.nil? && !attributes.key?(:'estimate') # rubocop:disable Style/StringLiterals

  self.table_exists_action = attributes[:'tableExistsAction'] if attributes[:'tableExistsAction']
  self.table_exists_action = "SKIP" if table_exists_action.nil? && !attributes.key?(:'tableExistsAction') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :tableExistsAction and :table_exists_action' if attributes.key?(:'tableExistsAction') && attributes.key?(:'table_exists_action')

  self.table_exists_action = attributes[:'table_exists_action'] if attributes[:'table_exists_action']
  self.table_exists_action = "SKIP" if table_exists_action.nil? && !attributes.key?(:'tableExistsAction') && !attributes.key?(:'table_exists_action') # rubocop:disable Style/StringLiterals

  self.exclude_parameters = attributes[:'excludeParameters'] if attributes[:'excludeParameters']

  raise 'You cannot provide both :excludeParameters and :exclude_parameters' if attributes.key?(:'excludeParameters') && attributes.key?(:'exclude_parameters')

  self.exclude_parameters = attributes[:'exclude_parameters'] if attributes[:'exclude_parameters']

  self.import_parallelism_degree = attributes[:'importParallelismDegree'] if attributes[:'importParallelismDegree']

  raise 'You cannot provide both :importParallelismDegree and :import_parallelism_degree' if attributes.key?(:'importParallelismDegree') && attributes.key?(:'import_parallelism_degree')

  self.import_parallelism_degree = attributes[:'import_parallelism_degree'] if attributes[:'import_parallelism_degree']

  self.export_parallelism_degree = attributes[:'exportParallelismDegree'] if attributes[:'exportParallelismDegree']

  raise 'You cannot provide both :exportParallelismDegree and :export_parallelism_degree' if attributes.key?(:'exportParallelismDegree') && attributes.key?(:'export_parallelism_degree')

  self.export_parallelism_degree = attributes[:'export_parallelism_degree'] if attributes[:'export_parallelism_degree']
end

Instance Attribute Details

#estimateString

Estimate size of dumps that will be generated.

Returns:

  • (String)


35
36
37
# File 'lib/oci/database_migration/models/data_pump_parameters.rb', line 35

def estimate
  @estimate
end

#exclude_parametersArray<OCI::DatabaseMigration::Models::DataPumpExcludeParameters>

Exclude paratemers for Export and Import.

Returns:

  • (Array<OCI::DatabaseMigration::Models::DataPumpExcludeParameters>)


45
46
47
# File 'lib/oci/database_migration/models/data_pump_parameters.rb', line 45

def exclude_parameters
  @exclude_parameters
end

#export_parallelism_degreeInteger

Maximum number of worker processes that can be used for a Data Pump Export job.

Returns:

  • (Integer)


56
57
58
# File 'lib/oci/database_migration/models/data_pump_parameters.rb', line 56

def export_parallelism_degree
  @export_parallelism_degree
end

#import_parallelism_degreeInteger

Maximum number of worker processes that can be used for a Data Pump Import job. For an Autonomous Database, ODMS will automatically query its CPU core count and set this property.

Returns:

  • (Integer)


51
52
53
# File 'lib/oci/database_migration/models/data_pump_parameters.rb', line 51

def import_parallelism_degree
  @import_parallelism_degree
end

#is_clusterBOOLEAN

Set to false to force Data Pump worker processes to run on one instance.

Returns:

  • (BOOLEAN)


30
31
32
# File 'lib/oci/database_migration/models/data_pump_parameters.rb', line 30

def is_cluster
  @is_cluster
end

#table_exists_actionString

IMPORT: Specifies the action to be performed when data is loaded into a preexisting table.

Returns:

  • (String)


40
41
42
# File 'lib/oci/database_migration/models/data_pump_parameters.rb', line 40

def table_exists_action
  @table_exists_action
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/oci/database_migration/models/data_pump_parameters.rb', line 59

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'is_cluster': :'isCluster',
    'estimate': :'estimate',
    'table_exists_action': :'tableExistsAction',
    'exclude_parameters': :'excludeParameters',
    'import_parallelism_degree': :'importParallelismDegree',
    'export_parallelism_degree': :'exportParallelismDegree'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/oci/database_migration/models/data_pump_parameters.rb', line 73

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'is_cluster': :'BOOLEAN',
    'estimate': :'String',
    'table_exists_action': :'String',
    'exclude_parameters': :'Array<OCI::DatabaseMigration::Models::DataPumpExcludeParameters>',
    'import_parallelism_degree': :'Integer',
    'export_parallelism_degree': :'Integer'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



175
176
177
178
179
180
181
182
183
184
185
# File 'lib/oci/database_migration/models/data_pump_parameters.rb', line 175

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    is_cluster == other.is_cluster &&
    estimate == other.estimate &&
    table_exists_action == other.table_exists_action &&
    exclude_parameters == other.exclude_parameters &&
    import_parallelism_degree == other.import_parallelism_degree &&
    export_parallelism_degree == other.export_parallelism_degree
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
# File 'lib/oci/database_migration/models/data_pump_parameters.rb', line 210

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  self.class.swagger_types.each_pair do |key, type|
    if type =~ /^Array<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        public_method("#{key}=").call(
          attributes[self.class.attribute_map[key]]
            .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
        )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      public_method("#{key}=").call(
        OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
      )
    end
    # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(other) ⇒ Boolean

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


190
191
192
# File 'lib/oci/database_migration/models/data_pump_parameters.rb', line 190

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



199
200
201
# File 'lib/oci/database_migration/models/data_pump_parameters.rb', line 199

def hash
  [is_cluster, estimate, table_exists_action, exclude_parameters, import_parallelism_degree, export_parallelism_degree].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



243
244
245
246
247
248
249
250
251
252
# File 'lib/oci/database_migration/models/data_pump_parameters.rb', line 243

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = public_method(attr).call
    next if value.nil? && !instance_variable_defined?("@#{attr}")

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



237
238
239
# File 'lib/oci/database_migration/models/data_pump_parameters.rb', line 237

def to_s
  to_hash.to_s
end