Class: OCI::DatabaseManagement::Models::AddmTaskSummary
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::AddmTaskSummary
- Defined in:
- lib/oci/database_management/models/addm_task_summary.rb
Overview
The object containing the ADDM task metadata.
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
-
#begin_snapshot_id ⇒ Integer
The ID number of the beginning AWR snapshot.
-
#db_user ⇒ String
The database user who owns the ADDM task.
-
#description ⇒ String
The description of the ADDM task.
-
#end_snapshot_id ⇒ Integer
The ID number of the ending AWR snapshot.
-
#end_snapshot_time ⇒ DateTime
The timestamp of the ending AWR snapshot used in the ADDM task as defined by date-time RFC3339 format.
-
#findings ⇒ Integer
The number of ADDM findings.
-
#how_created ⇒ String
A description of how the task was created.
-
#start_snapshot_time ⇒ DateTime
The timestamp of the beginning AWR snapshot used in the ADDM task as defined by date-time RFC3339 format.
-
#status ⇒ String
The status of the ADDM task.
-
#task_id ⇒ Integer
**[Required]** The ID number of the ADDM task.
-
#task_name ⇒ String
The name of the ADDM task.
-
#time_created ⇒ DateTime
**[Required]** The creation date of the ADDM task.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ AddmTaskSummary
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ AddmTaskSummary
Initializes the object
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 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/oci/database_management/models/addm_task_summary.rb', line 136 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.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_id ⇒ Integer
The ID number of the beginning AWR snapshot.
67 68 69 |
# File 'lib/oci/database_management/models/addm_task_summary.rb', line 67 def begin_snapshot_id @begin_snapshot_id end |
#db_user ⇒ String
The database user who owns the ADDM task.
40 41 42 |
# File 'lib/oci/database_management/models/addm_task_summary.rb', line 40 def db_user @db_user end |
#description ⇒ String
The description of the ADDM task.
36 37 38 |
# File 'lib/oci/database_management/models/addm_task_summary.rb', line 36 def description @description end |
#end_snapshot_id ⇒ Integer
The ID number of the ending AWR snapshot.
72 73 74 |
# File 'lib/oci/database_management/models/addm_task_summary.rb', line 72 def end_snapshot_id @end_snapshot_id end |
#end_snapshot_time ⇒ DateTime
The timestamp of the ending AWR snapshot used in the ADDM task as defined by date-time RFC3339 format.
62 63 64 |
# File 'lib/oci/database_management/models/addm_task_summary.rb', line 62 def end_snapshot_time @end_snapshot_time end |
#findings ⇒ Integer
The number of ADDM findings.
76 77 78 |
# File 'lib/oci/database_management/models/addm_task_summary.rb', line 76 def findings @findings end |
#how_created ⇒ String
A description of how the task was created.
52 53 54 |
# File 'lib/oci/database_management/models/addm_task_summary.rb', line 52 def how_created @how_created end |
#start_snapshot_time ⇒ DateTime
The timestamp of the beginning AWR snapshot used in the ADDM task as defined by date-time RFC3339 format.
57 58 59 |
# File 'lib/oci/database_management/models/addm_task_summary.rb', line 57 def start_snapshot_time @start_snapshot_time end |
#status ⇒ String
The status of the ADDM task.
44 45 46 |
# File 'lib/oci/database_management/models/addm_task_summary.rb', line 44 def status @status end |
#task_id ⇒ Integer
**[Required]** The ID number of the ADDM task.
32 33 34 |
# File 'lib/oci/database_management/models/addm_task_summary.rb', line 32 def task_id @task_id end |
#task_name ⇒ String
The name of the ADDM task.
28 29 30 |
# File 'lib/oci/database_management/models/addm_task_summary.rb', line 28 def task_name @task_name end |
#time_created ⇒ DateTime
**[Required]** The creation date of the ADDM task.
48 49 50 |
# File 'lib/oci/database_management/models/addm_task_summary.rb', line 48 def time_created @time_created end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/oci/database_management/models/addm_task_summary.rb', line 79 def self.attribute_map { # rubocop:disable Style/SymbolLiteral '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_types ⇒ Object
Attribute type mapping.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/oci/database_management/models/addm_task_summary.rb', line 99 def self.swagger_types { # rubocop:disable Style/SymbolLiteral '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.
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
# File 'lib/oci/database_management/models/addm_task_summary.rb', line 236 def ==(other) return true if equal?(other) self.class == other.class && 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
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 |
# File 'lib/oci/database_management/models/addm_task_summary.rb', line 277 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
257 258 259 |
# File 'lib/oci/database_management/models/addm_task_summary.rb', line 257 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
266 267 268 |
# File 'lib/oci/database_management/models/addm_task_summary.rb', line 266 def hash [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_hash ⇒ Hash
Returns the object in the form of hash
310 311 312 313 314 315 316 317 318 319 |
# File 'lib/oci/database_management/models/addm_task_summary.rb', line 310 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_s ⇒ String
Returns the string representation of the object
304 305 306 |
# File 'lib/oci/database_management/models/addm_task_summary.rb', line 304 def to_s to_hash.to_s end |