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_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_FETCH_METADATA_SRC = 'ODMS_FETCH_METADATA_SRC'.freeze,
  NAME_ODMS_FETCH_METADATA_TGT = 'ODMS_FETCH_METADATA_TGT'.freeze,
  NAME_ODMS_VALIDATE = 'ODMS_VALIDATE'.freeze,
  NAME_ODMS_PREPARE = 'ODMS_PREPARE'.freeze,
  NAME_ODMS_INITIALIZE_REPLICATION_INFRASTRUCTURE = 'ODMS_INITIALIZE_REPLICATION_INFRASTRUCTURE'.freeze,
  NAME_ODMS_INITIAL_LOAD_EXPORT = 'ODMS_INITIAL_LOAD_EXPORT'.freeze,
  NAME_ODMS_DATA_UPLOAD = 'ODMS_DATA_UPLOAD'.freeze,
  NAME_ODMS_METADATA_TRANSFER = 'ODMS_METADATA_TRANSFER'.freeze,
  NAME_ODMS_INITIAL_LOAD_EXPORT_DATA_UPLOAD = 'ODMS_INITIAL_LOAD_EXPORT_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
EDITABLE_PARAMETER_FILES_ENUM =
[
  EDITABLE_PARAMETER_FILES_EXTRACT = 'EXTRACT'.freeze,
  EDITABLE_PARAMETER_FILES_REPLICAT = 'REPLICAT'.freeze,
  EDITABLE_PARAMETER_FILES_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):



171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# File 'lib/oci/database_migration/models/phase_status.rb', line 171

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']

  self.is_suspend_available = attributes[:'isSuspendAvailable'] unless attributes[:'isSuspendAvailable'].nil?

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

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

  self.editable_parameter_files = attributes[:'editableParameterFiles'] if attributes[:'editableParameterFiles']

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

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

  self.group_display_name = attributes[:'groupDisplayName'] if attributes[:'groupDisplayName']

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

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

Instance Attribute Details

#actionString

The text describing the action required to fix the issue

Returns:

  • (String)


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

def action
  @action
end

#duration_in_msInteger

[Required] Duration of the phase in milliseconds

Returns:

  • (Integer)


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

def duration_in_ms
  @duration_in_ms
end

#editable_parameter_filesArray<String>

Attribute that returns an array of names and types of GoldenGate configuration files that are available for read or update.

Returns:

  • (Array<String>)


106
107
108
# File 'lib/oci/database_migration/models/phase_status.rb', line 106

def editable_parameter_files
  @editable_parameter_files
end

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

Summary of phase status results.



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

def extract
  @extract
end

#group_display_nameString

Job Phase group display name e.g. 'Step 1: Migration'

Returns:

  • (String)


111
112
113
# File 'lib/oci/database_migration/models/phase_status.rb', line 111

def group_display_name
  @group_display_name
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)


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

def is_advisor_report_available
  @is_advisor_report_available
end

#is_suspend_availableBOOLEAN

This is returned as true if the current phase can be suspended.

Returns:

  • (BOOLEAN)


101
102
103
# File 'lib/oci/database_migration/models/phase_status.rb', line 101

def is_suspend_available
  @is_suspend_available
end

#issueString

The text describing the root cause of the reported issue

Returns:

  • (String)


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

def issue
  @issue
end

#log_locationOCI::DatabaseMigration::Models::LogLocationBucketDetails



91
92
93
# File 'lib/oci/database_migration/models/phase_status.rb', line 91

def log_location
  @log_location
end

#nameString

[Required] Phase name

Returns:

  • (String)


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

def name
  @name
end

#progressInteger

Percent progress of job phase.

Returns:

  • (Integer)


96
97
98
# File 'lib/oci/database_migration/models/phase_status.rb', line 96

def progress
  @progress
end

#statusString

[Required] Phase status

Returns:

  • (String)


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

def status
  @status
end

Class Method Details

.attribute_mapObject

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



114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/oci/database_migration/models/phase_status.rb', line 114

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',
    'is_suspend_available': :'isSuspendAvailable',
    'editable_parameter_files': :'editableParameterFiles',
    'group_display_name': :'groupDisplayName'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# File 'lib/oci/database_migration/models/phase_status.rb', line 134

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',
    'is_suspend_available': :'BOOLEAN',
    'editable_parameter_files': :'Array<String>',
    'group_display_name': :'String'
    # 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



279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
# File 'lib/oci/database_migration/models/phase_status.rb', line 279

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 &&
    is_suspend_available == other.is_suspend_available &&
    editable_parameter_files == other.editable_parameter_files &&
    group_display_name == other.group_display_name
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



320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
# File 'lib/oci/database_migration/models/phase_status.rb', line 320

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


300
301
302
# File 'lib/oci/database_migration/models/phase_status.rb', line 300

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



309
310
311
# File 'lib/oci/database_migration/models/phase_status.rb', line 309

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

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



353
354
355
356
357
358
359
360
361
362
# File 'lib/oci/database_migration/models/phase_status.rb', line 353

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



347
348
349
# File 'lib/oci/database_migration/models/phase_status.rb', line 347

def to_s
  to_hash.to_s
end