class OCI::DatabaseMigration::Models::UpdateDataPumpSettings
Optional settings for Data Pump Export and Import jobs
Constants
- JOB_MODE_ENUM
Attributes
@return [OCI::DatabaseMigration::Models::UpdateDataPumpParameters]
@return [OCI::DatabaseMigration::Models::UpdateDirectoryObject]
@return [OCI::DatabaseMigration::Models::UpdateDirectoryObject]
Data Pump job mode. Refer to [Data Pump Export Modes ](docs.oracle.com/en/database/oracle/oracle-database/19/sutil/oracle-data-pump-export-utility.html#GUID-8E497131-6B9B-4CC8-AA50-35F480CAC2C4)
@return [String]
Defines remappings to be applied to objects as they are processed. Refer to [METADATA_REMAP Procedure ](docs.oracle.com/en/database/oracle/oracle-database/19/arpls/DBMS_DATAPUMP.html#GUID-0FC32790-91E6-4781-87A3-229DE024CB3D) If specified, the list will be replaced entirely. Empty list will remove stored Metadata Remap details.
@return [Array<OCI::DatabaseMigration::Models::MetadataRemap>]
Public Class Methods
Attribute mapping from ruby-style variable name to JSON key.
# File lib/oci/database_migration/models/update_data_pump_settings.rb, line 42 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'job_mode': :'jobMode', 'data_pump_parameters': :'dataPumpParameters', 'metadata_remaps': :'metadataRemaps', 'export_directory_object': :'exportDirectoryObject', 'import_directory_object': :'importDirectoryObject' # rubocop:enable Style/SymbolLiteral } end
Initializes the object @param [Hash] attributes Model attributes in the form of hash @option attributes [String] :job_mode The value to assign to the {#job_mode} property @option attributes [OCI::DatabaseMigration::Models::UpdateDataPumpParameters] :data_pump_parameters The value to assign to the {#data_pump_parameters} property @option attributes [Array<OCI::DatabaseMigration::Models::MetadataRemap>] :metadata_remaps The value to assign to the {#metadata_remaps} property @option attributes [OCI::DatabaseMigration::Models::UpdateDirectoryObject] :export_directory_object The value to assign to the {#export_directory_object} property @option attributes [OCI::DatabaseMigration::Models::UpdateDirectoryObject] :import_directory_object The value to assign to the {#import_directory_object} property
# File lib/oci/database_migration/models/update_data_pump_settings.rb, line 78 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.job_mode = attributes[:'jobMode'] if attributes[:'jobMode'] raise 'You cannot provide both :jobMode and :job_mode' if attributes.key?(:'jobMode') && attributes.key?(:'job_mode') self.job_mode = attributes[:'job_mode'] if attributes[:'job_mode'] self.data_pump_parameters = attributes[:'dataPumpParameters'] if attributes[:'dataPumpParameters'] raise 'You cannot provide both :dataPumpParameters and :data_pump_parameters' if attributes.key?(:'dataPumpParameters') && attributes.key?(:'data_pump_parameters') self.data_pump_parameters = attributes[:'data_pump_parameters'] if attributes[:'data_pump_parameters'] self.metadata_remaps = attributes[:'metadataRemaps'] if attributes[:'metadataRemaps'] raise 'You cannot provide both :metadataRemaps and :metadata_remaps' if attributes.key?(:'metadataRemaps') && attributes.key?(:'metadata_remaps') self.metadata_remaps = attributes[:'metadata_remaps'] if attributes[:'metadata_remaps'] self.export_directory_object = attributes[:'exportDirectoryObject'] if attributes[:'exportDirectoryObject'] raise 'You cannot provide both :exportDirectoryObject and :export_directory_object' if attributes.key?(:'exportDirectoryObject') && attributes.key?(:'export_directory_object') self.export_directory_object = attributes[:'export_directory_object'] if attributes[:'export_directory_object'] self.import_directory_object = attributes[:'importDirectoryObject'] if attributes[:'importDirectoryObject'] raise 'You cannot provide both :importDirectoryObject and :import_directory_object' if attributes.key?(:'importDirectoryObject') && attributes.key?(:'import_directory_object') self.import_directory_object = attributes[:'import_directory_object'] if attributes[:'import_directory_object'] end
Attribute type mapping.
# File lib/oci/database_migration/models/update_data_pump_settings.rb, line 55 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'job_mode': :'String', 'data_pump_parameters': :'OCI::DatabaseMigration::Models::UpdateDataPumpParameters', 'metadata_remaps': :'Array<OCI::DatabaseMigration::Models::MetadataRemap>', 'export_directory_object': :'OCI::DatabaseMigration::Models::UpdateDirectoryObject', 'import_directory_object': :'OCI::DatabaseMigration::Models::UpdateDirectoryObject' # rubocop:enable Style/SymbolLiteral } end
Public Instance Methods
Checks equality by comparing each attribute. @param [Object] other the other object to be compared
# File lib/oci/database_migration/models/update_data_pump_settings.rb, line 130 def ==(other) return true if equal?(other) self.class == other.class && job_mode == other.job_mode && data_pump_parameters == other.data_pump_parameters && metadata_remaps == other.metadata_remaps && export_directory_object == other.export_directory_object && import_directory_object == other.import_directory_object end
Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself
# File lib/oci/database_migration/models/update_data_pump_settings.rb, line 164 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
@see the `==` method @param [Object] other the other object to be compared
# File lib/oci/database_migration/models/update_data_pump_settings.rb, line 144 def eql?(other) self == other end
Calculates hash code according to all attributes. @return [Fixnum] Hash code
# File lib/oci/database_migration/models/update_data_pump_settings.rb, line 153 def hash [job_mode, data_pump_parameters, metadata_remaps, export_directory_object, import_directory_object].hash end
Custom attribute writer method checking allowed values (enum). @param [Object] job_mode
Object
to be assigned
# File lib/oci/database_migration/models/update_data_pump_settings.rb, line 119 def job_mode=(job_mode) raise "Invalid value for 'job_mode': this must be one of the values in JOB_MODE_ENUM." if job_mode && !JOB_MODE_ENUM.include?(job_mode) @job_mode = job_mode end
Returns the object in the form of hash @return [Hash] Returns the object in the form of hash
# File lib/oci/database_migration/models/update_data_pump_settings.rb, line 197 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
Returns the string representation of the object @return [String] String presentation of the object
# File lib/oci/database_migration/models/update_data_pump_settings.rb, line 191 def to_s to_hash.to_s end
Private Instance Methods
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash
# File lib/oci/database_migration/models/update_data_pump_settings.rb, line 214 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end