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.

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



90
91
92
93
94
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
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 90

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)


29
30
31
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 29

def estimate
  @estimate
end

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

Exclude paratemers for Export and Import.

Returns:

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


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

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)


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

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)


44
45
46
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 44

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)


25
26
27
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 25

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)


34
35
36
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 34

def table_exists_action
  @table_exists_action
end

Class Method Details

.attribute_mapObject

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



51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 51

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.



65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 65

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



157
158
159
160
161
162
163
164
165
166
167
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 157

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



192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 192

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


172
173
174
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 172

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



181
182
183
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 181

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



225
226
227
228
229
230
231
232
233
234
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 225

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



219
220
221
# File 'lib/oci/database_migration/models/create_data_pump_parameters.rb', line 219

def to_s
  to_hash.to_s
end