Class: OCI::GoldenGate::Models::DisasterRecoveryPrecheckResult

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/golden_gate/models/disaster_recovery_precheck_result.rb

Overview

A single precheck result.

Constant Summary collapse

STATUS_ENUM =
[
  STATUS_SUCCEEDED = 'SUCCEEDED'.freeze,
  STATUS_IN_PROGRESS = 'IN_PROGRESS'.freeze,
  STATUS_FAILED = 'FAILED'.freeze,
  STATUS_NEEDS_ATTENTION = 'NEEDS_ATTENTION'.freeze,
  STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
[
  RELATED_RESOURCE_TYPE_GOLDENGATEDEPLOYMENT = 'GOLDENGATEDEPLOYMENT'.freeze,
  RELATED_RESOURCE_TYPE_GOLDENGATECONNECTION = 'GOLDENGATECONNECTION'.freeze,
  RELATED_RESOURCE_TYPE_VAULTSECRET = 'VAULTSECRET'.freeze,
  RELATED_RESOURCE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ DisasterRecoveryPrecheckResult

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :key (String)

    The value to assign to the #key property

  • :display_name (String)

    The value to assign to the #display_name property

  • :description (String)

    The value to assign to the #description property

  • :corrective_action (String)

    The value to assign to the #corrective_action property

  • :status (String)

    The value to assign to the #status property

  • :related_resource_id (String)

    The value to assign to the #related_resource_id property

  • :related_resource_type (String)

    The value to assign to the #related_resource_type property

  • :code (String)

    The value to assign to the #code property



113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'lib/oci/golden_gate/models/disaster_recovery_precheck_result.rb', line 113

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.key = attributes[:'key'] if attributes[:'key']

  self.display_name = attributes[:'displayName'] if attributes[:'displayName']

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

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

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

  self.corrective_action = attributes[:'correctiveAction'] if attributes[:'correctiveAction']

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

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

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

  self.related_resource_id = attributes[:'relatedResourceId'] if attributes[:'relatedResourceId']

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

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

  self.related_resource_type = attributes[:'relatedResourceType'] if attributes[:'relatedResourceType']

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

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

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

Instance Attribute Details

#codeString

[Required] The code returned when GoldenGate reports an error while running a step during pipeline initialization. docs.oracle.com/en/middleware/goldengate/core/23/error-messages/ogg-00001-ogg-40000.html#GUID-97FF7AA7-7A5C-4AA7-B29F-3CC8D26761F2

Returns:

  • (String)


65
66
67
# File 'lib/oci/golden_gate/models/disaster_recovery_precheck_result.rb', line 65

def code
  @code
end

#corrective_actionString

The corrective action for non-passing checks. Null for passed checks.

Returns:

  • (String)


45
46
47
# File 'lib/oci/golden_gate/models/disaster_recovery_precheck_result.rb', line 45

def corrective_action
  @corrective_action
end

#descriptionString

[Required] Metadata about this specific object.

Returns:

  • (String)


40
41
42
# File 'lib/oci/golden_gate/models/disaster_recovery_precheck_result.rb', line 40

def description
  @description
end

#display_nameString

[Required] An object's Display Name.

Returns:

  • (String)


35
36
37
# File 'lib/oci/golden_gate/models/disaster_recovery_precheck_result.rb', line 35

def display_name
  @display_name
end

#keyString

[Required] UUID to uniquely identify the each check result.

Returns:

  • (String)


30
31
32
# File 'lib/oci/golden_gate/models/disaster_recovery_precheck_result.rb', line 30

def key
  @key
end

[Required] The OCID of the resource related to the corresponding check.

Returns:

  • (String)


54
55
56
# File 'lib/oci/golden_gate/models/disaster_recovery_precheck_result.rb', line 54

def related_resource_id
  @related_resource_id
end

[Required] Type of resource related to corresponding check.

Returns:

  • (String)


59
60
61
# File 'lib/oci/golden_gate/models/disaster_recovery_precheck_result.rb', line 59

def related_resource_type
  @related_resource_type
end

#statusString

[Required] Status of the DR precheck result.

Returns:

  • (String)


49
50
51
# File 'lib/oci/golden_gate/models/disaster_recovery_precheck_result.rb', line 49

def status
  @status
end

Class Method Details

.attribute_mapObject

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



68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/oci/golden_gate/models/disaster_recovery_precheck_result.rb', line 68

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'key',
    'display_name': :'displayName',
    'description': :'description',
    'corrective_action': :'correctiveAction',
    'status': :'status',
    'related_resource_id': :'relatedResourceId',
    'related_resource_type': :'relatedResourceType',
    'code': :'code'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/oci/golden_gate/models/disaster_recovery_precheck_result.rb', line 84

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'String',
    'display_name': :'String',
    'description': :'String',
    'corrective_action': :'String',
    'status': :'String',
    'related_resource_id': :'String',
    'related_resource_type': :'String',
    'code': :'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



185
186
187
188
189
190
191
192
193
194
195
196
197
# File 'lib/oci/golden_gate/models/disaster_recovery_precheck_result.rb', line 185

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

  self.class == other.class &&
    key == other.key &&
    display_name == other.display_name &&
    description == other.description &&
    corrective_action == other.corrective_action &&
    status == other.status &&
    related_resource_id == other.related_resource_id &&
    related_resource_type == other.related_resource_type &&
    code == other.code
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



222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
# File 'lib/oci/golden_gate/models/disaster_recovery_precheck_result.rb', line 222

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


202
203
204
# File 'lib/oci/golden_gate/models/disaster_recovery_precheck_result.rb', line 202

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



211
212
213
# File 'lib/oci/golden_gate/models/disaster_recovery_precheck_result.rb', line 211

def hash
  [key, display_name, description, corrective_action, status, related_resource_id, related_resource_type, code].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



255
256
257
258
259
260
261
262
263
264
# File 'lib/oci/golden_gate/models/disaster_recovery_precheck_result.rb', line 255

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



249
250
251
# File 'lib/oci/golden_gate/models/disaster_recovery_precheck_result.rb', line 249

def to_s
  to_hash.to_s
end