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_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 = 'ODMS_VALIDATE'.freeze, CURRENT_PHASE_ODMS_PREPARE = 'ODMS_PREPARE'.freeze, CURRENT_PHASE_ODMS_INITIAL_LOAD_EXPORT = 'ODMS_INITIAL_LOAD_EXPORT'.freeze, CURRENT_PHASE_ODMS_DATA_UPLOAD = 'ODMS_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
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 86 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.
48 49 50 |
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 48 def current_phase @current_phase end |
#current_status ⇒ String
[Required] Current status of the job.
43 44 45 |
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 43 def current_status @current_status end |
#phases ⇒ Array<OCI::DatabaseMigration::Models::PhaseStatus>
[Required] List of phase status for the job.
53 54 55 |
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 53 def phases @phases end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
56 57 58 59 60 61 62 63 64 |
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 56 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.
67 68 69 70 71 72 73 74 75 |
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 67 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.
140 141 142 143 144 145 146 147 |
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 140 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
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 172 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
152 153 154 |
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 152 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
161 162 163 |
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 161 def hash [current_status, current_phase, phases].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
205 206 207 208 209 210 211 212 213 214 |
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 205 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
199 200 201 |
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 199 def to_s to_hash.to_s end |