Class: OCI::DatabaseMigration::Models::MigrationJobProgressResource
- Inherits:
-
Object
- Object
- OCI::DatabaseMigration::Models::MigrationJobProgressResource
- Defined in:
- lib/oci/database_migration/models/migration_job_progress_resource.rb
Overview
Progress details of a Migration Job.
Constant Summary collapse
- CURRENT_STATUS_ENUM =
[ CURRENT_STATUS_PENDING = 'PENDING'.freeze, CURRENT_STATUS_STARTED = 'STARTED'.freeze, CURRENT_STATUS_COMPLETED = 'COMPLETED'.freeze, CURRENT_STATUS_FAILED = 'FAILED'.freeze, CURRENT_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- CURRENT_PHASE_ENUM =
[ CURRENT_PHASE_ODMS_VALIDATE_TGT = 'ODMS_VALIDATE_TGT'.freeze, CURRENT_PHASE_ODMS_VALIDATE_SRC = 'ODMS_VALIDATE_SRC'.freeze, CURRENT_PHASE_ODMS_VALIDATE_PREMIGRATION_ADVISOR = 'ODMS_VALIDATE_PREMIGRATION_ADVISOR'.freeze, CURRENT_PHASE_ODMS_VALIDATE_GG_HUB = 'ODMS_VALIDATE_GG_HUB'.freeze, CURRENT_PHASE_ODMS_VALIDATE_DATAPUMP_SETTINGS = 'ODMS_VALIDATE_DATAPUMP_SETTINGS'.freeze, CURRENT_PHASE_ODMS_VALIDATE_DATAPUMP_SETTINGS_SRC = 'ODMS_VALIDATE_DATAPUMP_SETTINGS_SRC'.freeze, CURRENT_PHASE_ODMS_VALIDATE_DATAPUMP_SETTINGS_TGT = 'ODMS_VALIDATE_DATAPUMP_SETTINGS_TGT'.freeze, CURRENT_PHASE_ODMS_VALIDATE_DATAPUMP_SRC = 'ODMS_VALIDATE_DATAPUMP_SRC'.freeze, CURRENT_PHASE_ODMS_VALIDATE_DATAPUMP_ESTIMATE_SRC = 'ODMS_VALIDATE_DATAPUMP_ESTIMATE_SRC'.freeze, CURRENT_PHASE_ODMS_FETCH_METADATA_SRC = 'ODMS_FETCH_METADATA_SRC'.freeze, CURRENT_PHASE_ODMS_FETCH_METADATA_TGT = 'ODMS_FETCH_METADATA_TGT'.freeze, CURRENT_PHASE_ODMS_VALIDATE = 'ODMS_VALIDATE'.freeze, CURRENT_PHASE_ODMS_PREPARE = 'ODMS_PREPARE'.freeze, CURRENT_PHASE_ODMS_INITIALIZE_REPLICATION_INFRASTRUCTURE = 'ODMS_INITIALIZE_REPLICATION_INFRASTRUCTURE'.freeze, CURRENT_PHASE_ODMS_INITIAL_LOAD_EXPORT = 'ODMS_INITIAL_LOAD_EXPORT'.freeze, CURRENT_PHASE_ODMS_DATA_UPLOAD = 'ODMS_DATA_UPLOAD'.freeze, CURRENT_PHASE_ODMS_METADATA_TRANSFER = 'ODMS_METADATA_TRANSFER'.freeze, CURRENT_PHASE_ODMS_INITIAL_LOAD_EXPORT_DATA_UPLOAD = 'ODMS_INITIAL_LOAD_EXPORT_DATA_UPLOAD'.freeze, CURRENT_PHASE_ODMS_INITIAL_LOAD_IMPORT = 'ODMS_INITIAL_LOAD_IMPORT'.freeze, CURRENT_PHASE_ODMS_POST_INITIAL_LOAD = 'ODMS_POST_INITIAL_LOAD'.freeze, CURRENT_PHASE_ODMS_PREPARE_REPLICATION_TARGET = 'ODMS_PREPARE_REPLICATION_TARGET'.freeze, CURRENT_PHASE_ODMS_MONITOR_REPLICATION_LAG = 'ODMS_MONITOR_REPLICATION_LAG'.freeze, CURRENT_PHASE_ODMS_SWITCHOVER = 'ODMS_SWITCHOVER'.freeze, CURRENT_PHASE_ODMS_CLEANUP = 'ODMS_CLEANUP'.freeze, CURRENT_PHASE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#current_phase ⇒ String
[Required] Current phase of the job.
-
#current_status ⇒ String
[Required] Current status of the job.
-
#phases ⇒ Array<OCI::DatabaseMigration::Models::PhaseStatus>
[Required] List of phase status for the job.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ MigrationJobProgressResource
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ MigrationJobProgressResource
Initializes the object
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/oci/database_migration/models/migration_job_progress_resource.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.current_status = attributes[:'currentStatus'] if attributes[:'currentStatus'] raise 'You cannot provide both :currentStatus and :current_status' if attributes.key?(:'currentStatus') && attributes.key?(:'current_status') self.current_status = attributes[:'current_status'] if attributes[:'current_status'] self.current_phase = attributes[:'currentPhase'] if attributes[:'currentPhase'] raise 'You cannot provide both :currentPhase and :current_phase' if attributes.key?(:'currentPhase') && attributes.key?(:'current_phase') self.current_phase = attributes[:'current_phase'] if attributes[:'current_phase'] self.phases = attributes[:'phases'] if attributes[:'phases'] end |
Instance Attribute Details
#current_phase ⇒ String
[Required] Current phase of the job.
57 58 59 |
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 57 def current_phase @current_phase end |
#current_status ⇒ String
[Required] Current status of the job.
52 53 54 |
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 52 def current_status @current_status end |
#phases ⇒ Array<OCI::DatabaseMigration::Models::PhaseStatus>
[Required] List of phase status for the job.
62 63 64 |
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 62 def phases @phases end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
65 66 67 68 69 70 71 72 73 |
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 65 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'current_status': :'currentStatus', 'current_phase': :'currentPhase', 'phases': :'phases' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
76 77 78 79 80 81 82 83 84 |
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 76 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'current_status': :'String', 'current_phase': :'String', 'phases': :'Array<OCI::DatabaseMigration::Models::PhaseStatus>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
149 150 151 152 153 154 155 156 |
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 149 def ==(other) return true if equal?(other) self.class == other.class && current_status == other.current_status && current_phase == other.current_phase && phases == other.phases end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 181 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
161 162 163 |
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 161 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
170 171 172 |
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 170 def hash [current_status, current_phase, phases].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
214 215 216 217 218 219 220 221 222 223 |
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 214 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_s ⇒ String
Returns the string representation of the object
208 209 210 |
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 208 def to_s to_hash.to_s end |