Class: OCI::DatabaseMigration::Models::PhaseStatus
- Inherits:
-
Object
- Object
- OCI::DatabaseMigration::Models::PhaseStatus
- Defined in:
- lib/oci/database_migration/models/phase_status.rb
Overview
Job phase status details.
Constant Summary collapse
- NAME_ENUM =
[ NAME_ODMS_VALIDATE_TGT = 'ODMS_VALIDATE_TGT'.freeze, NAME_ODMS_VALIDATE_SRC = 'ODMS_VALIDATE_SRC'.freeze, NAME_ODMS_VALIDATE_GG_HUB = 'ODMS_VALIDATE_GG_HUB'.freeze, NAME_ODMS_VALIDATE_DATAPUMP_SETTINGS = 'ODMS_VALIDATE_DATAPUMP_SETTINGS'.freeze, NAME_ODMS_VALIDATE_DATAPUMP_SETTINGS_SRC = 'ODMS_VALIDATE_DATAPUMP_SETTINGS_SRC'.freeze, NAME_ODMS_VALIDATE_DATAPUMP_SETTINGS_TGT = 'ODMS_VALIDATE_DATAPUMP_SETTINGS_TGT'.freeze, NAME_ODMS_VALIDATE = 'ODMS_VALIDATE'.freeze, NAME_ODMS_PREPARE = 'ODMS_PREPARE'.freeze, NAME_ODMS_INITIAL_LOAD_EXPORT = 'ODMS_INITIAL_LOAD_EXPORT'.freeze, NAME_ODMS_DATA_UPLOAD = 'ODMS_DATA_UPLOAD'.freeze, NAME_ODMS_INITIAL_LOAD_IMPORT = 'ODMS_INITIAL_LOAD_IMPORT'.freeze, NAME_ODMS_POST_INITIAL_LOAD = 'ODMS_POST_INITIAL_LOAD'.freeze, NAME_ODMS_PREPARE_REPLICATION_TARGET = 'ODMS_PREPARE_REPLICATION_TARGET'.freeze, NAME_ODMS_MONITOR_REPLICATION_LAG = 'ODMS_MONITOR_REPLICATION_LAG'.freeze, NAME_ODMS_SWITCHOVER = 'ODMS_SWITCHOVER'.freeze, NAME_ODMS_CLEANUP = 'ODMS_CLEANUP'.freeze, NAME_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- STATUS_ENUM =
[ STATUS_PENDING = 'PENDING'.freeze, STATUS_STARTED = 'STARTED'.freeze, STATUS_COMPLETED = 'COMPLETED'.freeze, STATUS_FAILED = 'FAILED'.freeze, STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#duration_in_ms ⇒ Integer
[Required] Duration of the phase in milliseconds.
-
#name ⇒ String
[Required] Phase name.
-
#progress ⇒ Integer
Percent progress of job phase.
-
#status ⇒ String
[Required] Phase status.
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 = {}) ⇒ PhaseStatus
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 = {}) ⇒ PhaseStatus
Initializes the object
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/oci/database_migration/models/phase_status.rb', line 94 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.name = attributes[:'name'] if attributes[:'name'] self.status = attributes[:'status'] if attributes[:'status'] self.duration_in_ms = attributes[:'durationInMs'] if attributes[:'durationInMs'] raise 'You cannot provide both :durationInMs and :duration_in_ms' if attributes.key?(:'durationInMs') && attributes.key?(:'duration_in_ms') self.duration_in_ms = attributes[:'duration_in_ms'] if attributes[:'duration_in_ms'] self.progress = attributes[:'progress'] if attributes[:'progress'] end |
Instance Attribute Details
#duration_in_ms ⇒ Integer
[Required] Duration of the phase in milliseconds
53 54 55 |
# File 'lib/oci/database_migration/models/phase_status.rb', line 53 def duration_in_ms @duration_in_ms end |
#name ⇒ String
[Required] Phase name
43 44 45 |
# File 'lib/oci/database_migration/models/phase_status.rb', line 43 def name @name end |
#progress ⇒ Integer
Percent progress of job phase.
58 59 60 |
# File 'lib/oci/database_migration/models/phase_status.rb', line 58 def progress @progress end |
#status ⇒ String
[Required] Phase status
48 49 50 |
# File 'lib/oci/database_migration/models/phase_status.rb', line 48 def status @status end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
61 62 63 64 65 66 67 68 69 70 |
# File 'lib/oci/database_migration/models/phase_status.rb', line 61 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'name': :'name', 'status': :'status', 'duration_in_ms': :'durationInMs', 'progress': :'progress' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
73 74 75 76 77 78 79 80 81 82 |
# File 'lib/oci/database_migration/models/phase_status.rb', line 73 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'name': :'String', 'status': :'String', 'duration_in_ms': :'Integer', 'progress': :'Integer' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
146 147 148 149 150 151 152 153 154 |
# File 'lib/oci/database_migration/models/phase_status.rb', line 146 def ==(other) return true if equal?(other) self.class == other.class && name == other.name && status == other.status && duration_in_ms == other.duration_in_ms && progress == other.progress end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/oci/database_migration/models/phase_status.rb', line 179 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
159 160 161 |
# File 'lib/oci/database_migration/models/phase_status.rb', line 159 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
168 169 170 |
# File 'lib/oci/database_migration/models/phase_status.rb', line 168 def hash [name, status, duration_in_ms, progress].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
212 213 214 215 216 217 218 219 220 221 |
# File 'lib/oci/database_migration/models/phase_status.rb', line 212 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
206 207 208 |
# File 'lib/oci/database_migration/models/phase_status.rb', line 206 def to_s to_hash.to_s end |