Class: OCI::Dblm::Models::PatchActivityDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/dblm/models/patch_activity_details.rb

Overview

Details of deploy, update and migrate-listener(only for single Instance database) operations for this resource.

Constant Summary collapse

DEPLOY_STATUS_ENUM =
[
  DEPLOY_STATUS_SCHEDULED = 'SCHEDULED'.freeze,
  DEPLOY_STATUS_RUNNING = 'RUNNING'.freeze,
  DEPLOY_STATUS_COMPLETED = 'COMPLETED'.freeze,
  DEPLOY_STATUS_FAILED = 'FAILED'.freeze,
  DEPLOY_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
UPDATE_STATUS_ENUM =
[
  UPDATE_STATUS_SCHEDULED = 'SCHEDULED'.freeze,
  UPDATE_STATUS_RUNNING = 'RUNNING'.freeze,
  UPDATE_STATUS_COMPLETED = 'COMPLETED'.freeze,
  UPDATE_STATUS_FAILED = 'FAILED'.freeze,
  UPDATE_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
MIGRATE_LISTENER_STATUS_ENUM =
[
  MIGRATE_LISTENER_STATUS_SCHEDULED = 'SCHEDULED'.freeze,
  MIGRATE_LISTENER_STATUS_RUNNING = 'RUNNING'.freeze,
  MIGRATE_LISTENER_STATUS_COMPLETED = 'COMPLETED'.freeze,
  MIGRATE_LISTENER_STATUS_FAILED = 'FAILED'.freeze,
  MIGRATE_LISTENER_STATUS_NA = 'NA'.freeze,
  MIGRATE_LISTENER_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 = {}) ⇒ PatchActivityDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# File 'lib/oci/dblm/models/patch_activity_details.rb', line 122

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

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

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

  self.deploy_task_id = attributes[:'deployTaskId'] if attributes[:'deployTaskId']

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

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

  self.deploy_status = attributes[:'deployStatus'] if attributes[:'deployStatus']

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

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

  self.update_operation_id = attributes[:'updateOperationId'] if attributes[:'updateOperationId']

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

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

  self.update_task_id = attributes[:'updateTaskId'] if attributes[:'updateTaskId']

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

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

  self.update_status = attributes[:'updateStatus'] if attributes[:'updateStatus']

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

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

  self.migrate_listener_operation_id = attributes[:'migrateListenerOperationId'] if attributes[:'migrateListenerOperationId']

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

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

  self.migrate_listener_task_id = attributes[:'migrateListenerTaskId'] if attributes[:'migrateListenerTaskId']

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

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

  self.migrate_listener_status = attributes[:'migrateListenerStatus'] if attributes[:'migrateListenerStatus']

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

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

Instance Attribute Details

#deploy_operation_idString

Operation Identifier for deploy operation.

Returns:

  • (String)


39
40
41
# File 'lib/oci/dblm/models/patch_activity_details.rb', line 39

def deploy_operation_id
  @deploy_operation_id
end

#deploy_statusString

Status of deploy operation.

Returns:

  • (String)


47
48
49
# File 'lib/oci/dblm/models/patch_activity_details.rb', line 47

def deploy_status
  @deploy_status
end

#deploy_task_idString

Task identifier for deploy operation.

Returns:

  • (String)


43
44
45
# File 'lib/oci/dblm/models/patch_activity_details.rb', line 43

def deploy_task_id
  @deploy_task_id
end

#migrate_listener_operation_idString

Operation Identifier for migrate listener operation.

Returns:

  • (String)


63
64
65
# File 'lib/oci/dblm/models/patch_activity_details.rb', line 63

def migrate_listener_operation_id
  @migrate_listener_operation_id
end

#migrate_listener_statusString

Status of migrate listener operation.

Returns:

  • (String)


71
72
73
# File 'lib/oci/dblm/models/patch_activity_details.rb', line 71

def migrate_listener_status
  @migrate_listener_status
end

#migrate_listener_task_idString

Task identifier for migrate listener operation.

Returns:

  • (String)


67
68
69
# File 'lib/oci/dblm/models/patch_activity_details.rb', line 67

def migrate_listener_task_id
  @migrate_listener_task_id
end

#update_operation_idString

Operation Identifier for update operation.

Returns:

  • (String)


51
52
53
# File 'lib/oci/dblm/models/patch_activity_details.rb', line 51

def update_operation_id
  @update_operation_id
end

#update_statusString

Status of update operation.

Returns:

  • (String)


59
60
61
# File 'lib/oci/dblm/models/patch_activity_details.rb', line 59

def update_status
  @update_status
end

#update_task_idString

Task identifier for update operation.

Returns:

  • (String)


55
56
57
# File 'lib/oci/dblm/models/patch_activity_details.rb', line 55

def update_task_id
  @update_task_id
end

Class Method Details

.attribute_mapObject

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



74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/oci/dblm/models/patch_activity_details.rb', line 74

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'deploy_operation_id': :'deployOperationId',
    'deploy_task_id': :'deployTaskId',
    'deploy_status': :'deployStatus',
    'update_operation_id': :'updateOperationId',
    'update_task_id': :'updateTaskId',
    'update_status': :'updateStatus',
    'migrate_listener_operation_id': :'migrateListenerOperationId',
    'migrate_listener_task_id': :'migrateListenerTaskId',
    'migrate_listener_status': :'migrateListenerStatus'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'deploy_operation_id': :'String',
    'deploy_task_id': :'String',
    'deploy_status': :'String',
    'update_operation_id': :'String',
    'update_task_id': :'String',
    'update_status': :'String',
    'migrate_listener_operation_id': :'String',
    'migrate_listener_task_id': :'String',
    'migrate_listener_status': :'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



229
230
231
232
233
234
235
236
237
238
239
240
241
242
# File 'lib/oci/dblm/models/patch_activity_details.rb', line 229

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

  self.class == other.class &&
    deploy_operation_id == other.deploy_operation_id &&
    deploy_task_id == other.deploy_task_id &&
    deploy_status == other.deploy_status &&
    update_operation_id == other.update_operation_id &&
    update_task_id == other.update_task_id &&
    update_status == other.update_status &&
    migrate_listener_operation_id == other.migrate_listener_operation_id &&
    migrate_listener_task_id == other.migrate_listener_task_id &&
    migrate_listener_status == other.migrate_listener_status
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



267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# File 'lib/oci/dblm/models/patch_activity_details.rb', line 267

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


247
248
249
# File 'lib/oci/dblm/models/patch_activity_details.rb', line 247

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



256
257
258
# File 'lib/oci/dblm/models/patch_activity_details.rb', line 256

def hash
  [deploy_operation_id, deploy_task_id, deploy_status, update_operation_id, update_task_id, update_status, migrate_listener_operation_id, migrate_listener_task_id, migrate_listener_status].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



300
301
302
303
304
305
306
307
308
309
# File 'lib/oci/dblm/models/patch_activity_details.rb', line 300

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



294
295
296
# File 'lib/oci/dblm/models/patch_activity_details.rb', line 294

def to_s
  to_hash.to_s
end