Class: OCI::DatabaseManagement::Models::HistoricAddmResult

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/database_management/models/historic_addm_result.rb

Overview

The details of the historic ADDM task.

Constant Summary collapse

STATUS_ENUM =
[
  STATUS_INITIAL = 'INITIAL'.freeze,
  STATUS_EXECUTING = 'EXECUTING'.freeze,
  STATUS_INTERRUPTED = 'INTERRUPTED'.freeze,
  STATUS_COMPLETED = 'COMPLETED'.freeze,
  STATUS_ERROR = 'ERROR'.freeze,
  STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
HOW_CREATED_ENUM =
[
  HOW_CREATED_AUTO = 'AUTO'.freeze,
  HOW_CREATED_MANUAL = 'MANUAL'.freeze,
  HOW_CREATED_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ HistoricAddmResult

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :is_newly_created (BOOLEAN)

    The value to assign to the #is_newly_created property

  • :task_name (String)

    The value to assign to the #task_name property

  • :task_id (Integer)

    The value to assign to the #task_id property

  • :description (String)

    The value to assign to the #description property

  • :db_user (String)

    The value to assign to the #db_user property

  • :status (String)

    The value to assign to the #status property

  • :time_created (DateTime)

    The value to assign to the #time_created property

  • :how_created (String)

    The value to assign to the #how_created property

  • :start_snapshot_time (DateTime)

    The value to assign to the #start_snapshot_time property

  • :end_snapshot_time (DateTime)

    The value to assign to the #end_snapshot_time property

  • :begin_snapshot_id (Integer)

    The value to assign to the #begin_snapshot_id property

  • :end_snapshot_id (Integer)

    The value to assign to the #end_snapshot_id property

  • :findings (Integer)

    The value to assign to the #findings property



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
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
# File 'lib/oci/database_management/models/historic_addm_result.rb', line 144

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

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

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

  self.task_name = attributes[:'taskName'] if attributes[:'taskName']

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

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

  self.task_id = attributes[:'taskId'] if attributes[:'taskId']

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

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

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

  self.db_user = attributes[:'dbUser'] if attributes[:'dbUser']

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

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

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

  self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']

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

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

  self.how_created = attributes[:'howCreated'] if attributes[:'howCreated']

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

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

  self.start_snapshot_time = attributes[:'startSnapshotTime'] if attributes[:'startSnapshotTime']

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

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

  self.end_snapshot_time = attributes[:'endSnapshotTime'] if attributes[:'endSnapshotTime']

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

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

  self.begin_snapshot_id = attributes[:'beginSnapshotId'] if attributes[:'beginSnapshotId']

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

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

  self.end_snapshot_id = attributes[:'endSnapshotId'] if attributes[:'endSnapshotId']

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

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

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

Instance Attribute Details

#begin_snapshot_idInteger

The ID number of the beginning AWR snapshot.

Returns:

  • (Integer)


72
73
74
# File 'lib/oci/database_management/models/historic_addm_result.rb', line 72

def begin_snapshot_id
  @begin_snapshot_id
end

#db_userString

The database user who owns the historic ADDM task.

Returns:

  • (String)


45
46
47
# File 'lib/oci/database_management/models/historic_addm_result.rb', line 45

def db_user
  @db_user
end

#descriptionString

The description of the ADDM task.

Returns:

  • (String)


41
42
43
# File 'lib/oci/database_management/models/historic_addm_result.rb', line 41

def description
  @description
end

#end_snapshot_idInteger

The ID number of the ending AWR snapshot.

Returns:

  • (Integer)


77
78
79
# File 'lib/oci/database_management/models/historic_addm_result.rb', line 77

def end_snapshot_id
  @end_snapshot_id
end

#end_snapshot_timeDateTime

The timestamp of the ending AWR snapshot used in the ADDM task as defined by date-time RFC3339 format.

Returns:

  • (DateTime)


67
68
69
# File 'lib/oci/database_management/models/historic_addm_result.rb', line 67

def end_snapshot_time
  @end_snapshot_time
end

#findingsInteger

The number of ADDM findings.

Returns:

  • (Integer)


81
82
83
# File 'lib/oci/database_management/models/historic_addm_result.rb', line 81

def findings
  @findings
end

#how_createdString

A description of how the task was created.

Returns:

  • (String)


57
58
59
# File 'lib/oci/database_management/models/historic_addm_result.rb', line 57

def how_created
  @how_created
end

#is_newly_createdBOOLEAN

Specifies whether the ADDM task returned had already existed or was newly created by the api call.

Returns:

  • (BOOLEAN)


29
30
31
# File 'lib/oci/database_management/models/historic_addm_result.rb', line 29

def is_newly_created
  @is_newly_created
end

#start_snapshot_timeDateTime

The timestamp of the beginning AWR snapshot used in the ADDM task as defined by date-time RFC3339 format.

Returns:

  • (DateTime)


62
63
64
# File 'lib/oci/database_management/models/historic_addm_result.rb', line 62

def start_snapshot_time
  @start_snapshot_time
end

#statusString

The status of the ADDM task.

Returns:

  • (String)


49
50
51
# File 'lib/oci/database_management/models/historic_addm_result.rb', line 49

def status
  @status
end

#task_idInteger

**[Required]** The ID of the historic ADDM task.

Returns:

  • (Integer)


37
38
39
# File 'lib/oci/database_management/models/historic_addm_result.rb', line 37

def task_id
  @task_id
end

#task_nameString

The name of the historic ADDM task.

Returns:

  • (String)


33
34
35
# File 'lib/oci/database_management/models/historic_addm_result.rb', line 33

def task_name
  @task_name
end

#time_createdDateTime

**[Required]** The creation date of the ADDM task.

Returns:

  • (DateTime)


53
54
55
# File 'lib/oci/database_management/models/historic_addm_result.rb', line 53

def time_created
  @time_created
end

Class Method Details

.attribute_mapObject

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



84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/oci/database_management/models/historic_addm_result.rb', line 84

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'is_newly_created': :'isNewlyCreated',
    'task_name': :'taskName',
    'task_id': :'taskId',
    'description': :'description',
    'db_user': :'dbUser',
    'status': :'status',
    'time_created': :'timeCreated',
    'how_created': :'howCreated',
    'start_snapshot_time': :'startSnapshotTime',
    'end_snapshot_time': :'endSnapshotTime',
    'begin_snapshot_id': :'beginSnapshotId',
    'end_snapshot_id': :'endSnapshotId',
    'findings': :'findings'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# File 'lib/oci/database_management/models/historic_addm_result.rb', line 105

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'is_newly_created': :'BOOLEAN',
    'task_name': :'String',
    'task_id': :'Integer',
    'description': :'String',
    'db_user': :'String',
    'status': :'String',
    'time_created': :'DateTime',
    'how_created': :'String',
    'start_snapshot_time': :'DateTime',
    'end_snapshot_time': :'DateTime',
    'begin_snapshot_id': :'Integer',
    'end_snapshot_id': :'Integer',
    'findings': :'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



250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# File 'lib/oci/database_management/models/historic_addm_result.rb', line 250

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

  self.class == other.class &&
    is_newly_created == other.is_newly_created &&
    task_name == other.task_name &&
    task_id == other.task_id &&
    description == other.description &&
    db_user == other.db_user &&
    status == other.status &&
    time_created == other.time_created &&
    how_created == other.how_created &&
    start_snapshot_time == other.start_snapshot_time &&
    end_snapshot_time == other.end_snapshot_time &&
    begin_snapshot_id == other.begin_snapshot_id &&
    end_snapshot_id == other.end_snapshot_id &&
    findings == other.findings
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



292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
# File 'lib/oci/database_management/models/historic_addm_result.rb', line 292

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


272
273
274
# File 'lib/oci/database_management/models/historic_addm_result.rb', line 272

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



281
282
283
# File 'lib/oci/database_management/models/historic_addm_result.rb', line 281

def hash
  [is_newly_created, task_name, task_id, description, db_user, status, time_created, how_created, start_snapshot_time, end_snapshot_time, begin_snapshot_id, end_snapshot_id, findings].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



325
326
327
328
329
330
331
332
333
334
# File 'lib/oci/database_management/models/historic_addm_result.rb', line 325

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



319
320
321
# File 'lib/oci/database_management/models/historic_addm_result.rb', line 319

def to_s
  to_hash.to_s
end