Class: OCI::DatabaseManagement::Models::OptimizerStatisticsCollectionOperation
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::OptimizerStatisticsCollectionOperation
- Defined in:
- lib/oci/database_management/models/optimizer_statistics_collection_operation.rb
Overview
The summary of the Optimizer Statistics Collection tasks, which includes details of the Managed Database and the execution.
Constant Summary collapse
- STATUS_ENUM =
[ STATUS_IN_PROGRESS = 'IN_PROGRESS'.freeze, STATUS_COMPLETED = 'COMPLETED'.freeze, STATUS_FAILED = 'FAILED'.freeze, STATUS_TIMED_OUT = 'TIMED_OUT'.freeze, STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#completed_count ⇒ Integer
The number of objects for which statistics collection is completed.
- #database ⇒ OCI::DatabaseManagement::Models::OptimizerDatabase
-
#duration_in_seconds ⇒ Float
[Required] The time it takes to complete the operation (in seconds).
-
#end_time ⇒ String
[Required] The end time of the operation.
-
#failed_count ⇒ Integer
The number of objects for which statistics collection failed.
-
#id ⇒ Integer
[Required] The ID of the operation.
-
#in_progress_count ⇒ Integer
The number of objects for which statistics collection is in progress.
-
#job_name ⇒ String
[Required] The name of the job.
-
#operation_name ⇒ String
[Required] The name of the operation.
-
#start_time ⇒ String
[Required] The start time of the operation.
-
#status ⇒ String
[Required] The status of the operation such as Completed, and Failed.
-
#target ⇒ String
[Required] The target object type such as Table, Index, and Partition.
-
#tasks ⇒ Array<OCI::DatabaseManagement::Models::OptimizerStatisticsOperationTask>
An array of Optimizer Statistics Collection task details.
-
#timed_out_count ⇒ Integer
The number of objects for which statistics collection timed out.
-
#total_objects_count ⇒ Integer
The total number of objects for which statistics is collected.
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 = {}) ⇒ OptimizerStatisticsCollectionOperation
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 = {}) ⇒ OptimizerStatisticsCollectionOperation
Initializes the object
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 216 217 218 219 220 221 222 223 |
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation.rb', line 148 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.database = attributes[:'database'] if attributes[:'database'] self.tasks = attributes[:'tasks'] if attributes[:'tasks'] self.id = attributes[:'id'] if attributes[:'id'] self.operation_name = attributes[:'operationName'] if attributes[:'operationName'] raise 'You cannot provide both :operationName and :operation_name' if attributes.key?(:'operationName') && attributes.key?(:'operation_name') self.operation_name = attributes[:'operation_name'] if attributes[:'operation_name'] self.target = attributes[:'target'] if attributes[:'target'] self.job_name = attributes[:'jobName'] if attributes[:'jobName'] raise 'You cannot provide both :jobName and :job_name' if attributes.key?(:'jobName') && attributes.key?(:'job_name') self.job_name = attributes[:'job_name'] if attributes[:'job_name'] self.status = attributes[:'status'] if attributes[:'status'] self.start_time = attributes[:'startTime'] if attributes[:'startTime'] raise 'You cannot provide both :startTime and :start_time' if attributes.key?(:'startTime') && attributes.key?(:'start_time') self.start_time = attributes[:'start_time'] if attributes[:'start_time'] self.end_time = attributes[:'endTime'] if attributes[:'endTime'] raise 'You cannot provide both :endTime and :end_time' if attributes.key?(:'endTime') && attributes.key?(:'end_time') self.end_time = attributes[:'end_time'] if attributes[:'end_time'] self.duration_in_seconds = attributes[:'durationInSeconds'] if attributes[:'durationInSeconds'] raise 'You cannot provide both :durationInSeconds and :duration_in_seconds' if attributes.key?(:'durationInSeconds') && attributes.key?(:'duration_in_seconds') self.duration_in_seconds = attributes[:'duration_in_seconds'] if attributes[:'duration_in_seconds'] self.completed_count = attributes[:'completedCount'] if attributes[:'completedCount'] raise 'You cannot provide both :completedCount and :completed_count' if attributes.key?(:'completedCount') && attributes.key?(:'completed_count') self.completed_count = attributes[:'completed_count'] if attributes[:'completed_count'] self.in_progress_count = attributes[:'inProgressCount'] if attributes[:'inProgressCount'] raise 'You cannot provide both :inProgressCount and :in_progress_count' if attributes.key?(:'inProgressCount') && attributes.key?(:'in_progress_count') self.in_progress_count = attributes[:'in_progress_count'] if attributes[:'in_progress_count'] self.failed_count = attributes[:'failedCount'] if attributes[:'failedCount'] raise 'You cannot provide both :failedCount and :failed_count' if attributes.key?(:'failedCount') && attributes.key?(:'failed_count') self.failed_count = attributes[:'failed_count'] if attributes[:'failed_count'] self.timed_out_count = attributes[:'timedOutCount'] if attributes[:'timedOutCount'] raise 'You cannot provide both :timedOutCount and :timed_out_count' if attributes.key?(:'timedOutCount') && attributes.key?(:'timed_out_count') self.timed_out_count = attributes[:'timed_out_count'] if attributes[:'timed_out_count'] self.total_objects_count = attributes[:'totalObjectsCount'] if attributes[:'totalObjectsCount'] raise 'You cannot provide both :totalObjectsCount and :total_objects_count' if attributes.key?(:'totalObjectsCount') && attributes.key?(:'total_objects_count') self.total_objects_count = attributes[:'total_objects_count'] if attributes[:'total_objects_count'] end |
Instance Attribute Details
#completed_count ⇒ Integer
The number of objects for which statistics collection is completed.
61 62 63 |
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation.rb', line 61 def completed_count @completed_count end |
#database ⇒ OCI::DatabaseManagement::Models::OptimizerDatabase
21 22 23 |
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation.rb', line 21 def database @database end |
#duration_in_seconds ⇒ Float
[Required] The time it takes to complete the operation (in seconds).
57 58 59 |
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation.rb', line 57 def duration_in_seconds @duration_in_seconds end |
#end_time ⇒ String
[Required] The end time of the operation.
53 54 55 |
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation.rb', line 53 def end_time @end_time end |
#failed_count ⇒ Integer
The number of objects for which statistics collection failed.
69 70 71 |
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation.rb', line 69 def failed_count @failed_count end |
#id ⇒ Integer
[Required] The ID of the operation.
29 30 31 |
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation.rb', line 29 def id @id end |
#in_progress_count ⇒ Integer
The number of objects for which statistics collection is in progress.
65 66 67 |
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation.rb', line 65 def in_progress_count @in_progress_count end |
#job_name ⇒ String
[Required] The name of the job.
41 42 43 |
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation.rb', line 41 def job_name @job_name end |
#operation_name ⇒ String
[Required] The name of the operation.
33 34 35 |
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation.rb', line 33 def operation_name @operation_name end |
#start_time ⇒ String
[Required] The start time of the operation.
49 50 51 |
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation.rb', line 49 def start_time @start_time end |
#status ⇒ String
[Required] The status of the operation such as Completed, and Failed.
45 46 47 |
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation.rb', line 45 def status @status end |
#target ⇒ String
[Required] The target object type such as Table, Index, and Partition.
37 38 39 |
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation.rb', line 37 def target @target end |
#tasks ⇒ Array<OCI::DatabaseManagement::Models::OptimizerStatisticsOperationTask>
An array of Optimizer Statistics Collection task details.
25 26 27 |
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation.rb', line 25 def tasks @tasks end |
#timed_out_count ⇒ Integer
The number of objects for which statistics collection timed out.
73 74 75 |
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation.rb', line 73 def timed_out_count @timed_out_count end |
#total_objects_count ⇒ Integer
The total number of objects for which statistics is collected. This number is the sum of all the objects with various statuses: completed, inProgress, failed, and timedOut.
79 80 81 |
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation.rb', line 79 def total_objects_count @total_objects_count end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
82 83 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/optimizer_statistics_collection_operation.rb', line 82 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'database': :'database', 'tasks': :'tasks', 'id': :'id', 'operation_name': :'operationName', 'target': :'target', 'job_name': :'jobName', 'status': :'status', 'start_time': :'startTime', 'end_time': :'endTime', 'duration_in_seconds': :'durationInSeconds', 'completed_count': :'completedCount', 'in_progress_count': :'inProgressCount', 'failed_count': :'failedCount', 'timed_out_count': :'timedOutCount', 'total_objects_count': :'totalObjectsCount' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation.rb', line 105 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'database': :'OCI::DatabaseManagement::Models::OptimizerDatabase', 'tasks': :'Array<OCI::DatabaseManagement::Models::OptimizerStatisticsOperationTask>', 'id': :'Integer', 'operation_name': :'String', 'target': :'String', 'job_name': :'String', 'status': :'String', 'start_time': :'String', 'end_time': :'String', 'duration_in_seconds': :'Float', 'completed_count': :'Integer', 'in_progress_count': :'Integer', 'failed_count': :'Integer', 'timed_out_count': :'Integer', 'total_objects_count': :'Integer' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation.rb', line 245 def ==(other) return true if equal?(other) self.class == other.class && database == other.database && tasks == other.tasks && id == other.id && operation_name == other.operation_name && target == other.target && job_name == other.job_name && status == other.status && start_time == other.start_time && end_time == other.end_time && duration_in_seconds == other.duration_in_seconds && completed_count == other.completed_count && in_progress_count == other.in_progress_count && failed_count == other.failed_count && timed_out_count == other.timed_out_count && total_objects_count == other.total_objects_count end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 |
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation.rb', line 289 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
269 270 271 |
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation.rb', line 269 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
278 279 280 |
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation.rb', line 278 def hash [database, tasks, id, operation_name, target, job_name, status, start_time, end_time, duration_in_seconds, completed_count, in_progress_count, failed_count, timed_out_count, total_objects_count].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
322 323 324 325 326 327 328 329 330 331 |
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation.rb', line 322 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
316 317 318 |
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation.rb', line 316 def to_s to_hash.to_s end |