Class: OCI::DatabaseMigration::Models::CreateDataPumpParameters

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/database_migration/models/create_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
].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
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CreateDataPumpParameters

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



95
96
97
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
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 95

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)


32
33
34
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 32

def estimate
  @estimate
end

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

Exclude paratemers for Export and Import.

Returns:

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


42
43
44
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 42

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)


53
54
55
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 53

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)


48
49
50
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 48

def import_parallelism_degree
  @import_parallelism_degree
end

#is_clusterBOOLEAN

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

Returns:

  • (BOOLEAN)


27
28
29
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 27

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)


37
38
39
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 37

def table_exists_action
  @table_exists_action
end

Class Method Details

.attribute_mapObject

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



56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 56

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.



70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 70

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



162
163
164
165
166
167
168
169
170
171
172
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 162

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



197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 197

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


177
178
179
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 177

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



186
187
188
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 186

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



230
231
232
233
234
235
236
237
238
239
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 230

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



224
225
226
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 224

def to_s
  to_hash.to_s
end