Class: OCI::DatabaseMigration::Models::MigrationJobProgressResource

Inherits:
Object
  • Object
show all
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_GG_SERVICE = 'ODMS_VALIDATE_GG_SERVICE'.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_INITIALIZE_GGS = 'ODMS_INITIALIZE_GGS'.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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ MigrationJobProgressResource

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 92

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_phaseString

[Required] Current phase of the job.

Returns:

  • (String)


54
55
56
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 54

def current_phase
  @current_phase
end

#current_statusString

[Required] Current status of the job.

Returns:

  • (String)


49
50
51
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 49

def current_status
  @current_status
end

#phasesArray<OCI::DatabaseMigration::Models::PhaseStatus>

[Required] List of phase status for the job.



59
60
61
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 59

def phases
  @phases
end

Class Method Details

.attribute_mapObject

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



62
63
64
65
66
67
68
69
70
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 62

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'current_status': :'currentStatus',
    'current_phase': :'currentPhase',
    'phases': :'phases'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



73
74
75
76
77
78
79
80
81
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 73

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.

Parameters:

  • other (Object)

    the other object to be compared



146
147
148
149
150
151
152
153
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 146

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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 178

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


158
159
160
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 158

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



167
168
169
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 167

def hash
  [current_status, current_phase, phases].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



211
212
213
214
215
216
217
218
219
220
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 211

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



205
206
207
# File 'lib/oci/database_migration/models/migration_job_progress_resource.rb', line 205

def to_s
  to_hash.to_s
end