Class: OCI::DatabaseMigration::Models::PhaseStatus

Inherits:
Object
  • Object
show all
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_PREMIGRATION_ADVISOR = 'ODMS_VALIDATE_PREMIGRATION_ADVISOR'.freeze,
  NAME_ODMS_VALIDATE_GG_HUB = 'ODMS_VALIDATE_GG_HUB'.freeze,
  NAME_ODMS_VALIDATE_GG_SERVICE = 'ODMS_VALIDATE_GG_SERVICE'.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_DATAPUMP_SRC = 'ODMS_VALIDATE_DATAPUMP_SRC'.freeze,
  NAME_ODMS_VALIDATE_DATAPUMP_ESTIMATE_SRC = 'ODMS_VALIDATE_DATAPUMP_ESTIMATE_SRC'.freeze,
  NAME_ODMS_INITIALIZE_GGS = 'ODMS_INITIALIZE_GGS'.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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ PhaseStatus

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# File 'lib/oci/database_migration/models/phase_status.rb', line 138

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.is_advisor_report_available = attributes[:'isAdvisorReportAvailable'] unless attributes[:'isAdvisorReportAvailable'].nil?

  raise 'You cannot provide both :isAdvisorReportAvailable and :is_advisor_report_available' if attributes.key?(:'isAdvisorReportAvailable') && attributes.key?(:'is_advisor_report_available')

  self.is_advisor_report_available = attributes[:'is_advisor_report_available'] unless attributes[:'is_advisor_report_available'].nil?

  self.issue = attributes[:'issue'] if attributes[:'issue']

  self.action = attributes[:'action'] if attributes[:'action']

  self.extract = attributes[:'extract'] if attributes[:'extract']

  self.log_location = attributes[:'logLocation'] if attributes[:'logLocation']

  raise 'You cannot provide both :logLocation and :log_location' if attributes.key?(:'logLocation') && attributes.key?(:'log_location')

  self.log_location = attributes[:'log_location'] if attributes[:'log_location']

  self.progress = attributes[:'progress'] if attributes[:'progress']
end

Instance Attribute Details

#actionString

The text describing the action required to fix the issue

Returns:

  • (String)


74
75
76
# File 'lib/oci/database_migration/models/phase_status.rb', line 74

def action
  @action
end

#duration_in_msInteger

[Required] Duration of the phase in milliseconds

Returns:

  • (Integer)


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

def duration_in_ms
  @duration_in_ms
end

#extractArray<OCI::DatabaseMigration::Models::PhaseExtractEntry>

Summary of phase status results.



79
80
81
# File 'lib/oci/database_migration/models/phase_status.rb', line 79

def extract
  @extract
end

#is_advisor_report_availableBOOLEAN

True if a Pre-Migration Advisor report is available for this phase. False or null if no report is available.

Returns:

  • (BOOLEAN)


64
65
66
# File 'lib/oci/database_migration/models/phase_status.rb', line 64

def is_advisor_report_available
  @is_advisor_report_available
end

#issueString

The text describing the root cause of the reported issue

Returns:

  • (String)


69
70
71
# File 'lib/oci/database_migration/models/phase_status.rb', line 69

def issue
  @issue
end

#log_locationOCI::DatabaseMigration::Models::LogLocationBucketDetails



82
83
84
# File 'lib/oci/database_migration/models/phase_status.rb', line 82

def log_location
  @log_location
end

#nameString

[Required] Phase name

Returns:

  • (String)


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

def name
  @name
end

#progressInteger

Percent progress of job phase.

Returns:

  • (Integer)


87
88
89
# File 'lib/oci/database_migration/models/phase_status.rb', line 87

def progress
  @progress
end

#statusString

[Required] Phase status

Returns:

  • (String)


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

def status
  @status
end

Class Method Details

.attribute_mapObject

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



90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/oci/database_migration/models/phase_status.rb', line 90

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'name': :'name',
    'status': :'status',
    'duration_in_ms': :'durationInMs',
    'is_advisor_report_available': :'isAdvisorReportAvailable',
    'issue': :'issue',
    'action': :'action',
    'extract': :'extract',
    'log_location': :'logLocation',
    'progress': :'progress'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'lib/oci/database_migration/models/phase_status.rb', line 107

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'name': :'String',
    'status': :'String',
    'duration_in_ms': :'Integer',
    'is_advisor_report_available': :'BOOLEAN',
    'issue': :'String',
    'action': :'String',
    'extract': :'Array<OCI::DatabaseMigration::Models::PhaseExtractEntry>',
    'log_location': :'OCI::DatabaseMigration::Models::LogLocationBucketDetails',
    'progress': :'Integer'
    # 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



208
209
210
211
212
213
214
215
216
217
218
219
220
221
# File 'lib/oci/database_migration/models/phase_status.rb', line 208

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    name == other.name &&
    status == other.status &&
    duration_in_ms == other.duration_in_ms &&
    is_advisor_report_available == other.is_advisor_report_available &&
    issue == other.issue &&
    action == other.action &&
    extract == other.extract &&
    log_location == other.log_location &&
    progress == other.progress
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



246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
# File 'lib/oci/database_migration/models/phase_status.rb', line 246

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


226
227
228
# File 'lib/oci/database_migration/models/phase_status.rb', line 226

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



235
236
237
# File 'lib/oci/database_migration/models/phase_status.rb', line 235

def hash
  [name, status, duration_in_ms, is_advisor_report_available, issue, action, extract, log_location, progress].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



279
280
281
282
283
284
285
286
287
288
# File 'lib/oci/database_migration/models/phase_status.rb', line 279

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



273
274
275
# File 'lib/oci/database_migration/models/phase_status.rb', line 273

def to_s
  to_hash.to_s
end