Class: OCI::DatabaseManagement::Models::OptimizerStatisticsCollectionOperationSummary

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

Overview

The summary of the Optimizer Statistics Collection operation.

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 = 'UNKNOWN'.freeze,
  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 = {}) ⇒ OptimizerStatisticsCollectionOperationSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :id (Integer)

    The value to assign to the #id property

  • :operation_name (String)

    The value to assign to the #operation_name property

  • :target (String)

    The value to assign to the #target property

  • :job_name (String)

    The value to assign to the #job_name property

  • :status (String)

    The value to assign to the #status property

  • :start_time (String)

    The value to assign to the #start_time property

  • :end_time (String)

    The value to assign to the #end_time property

  • :duration_in_seconds (Float)

    The value to assign to the #duration_in_seconds property

  • :completed_count (Integer)

    The value to assign to the #completed_count property

  • :in_progress_count (Integer)

    The value to assign to the #in_progress_count property

  • :failed_count (Integer)

    The value to assign to the #failed_count property

  • :timed_out_count (Integer)

    The value to assign to the #timed_out_count property

  • :total_objects_count (Integer)

    The value to assign to the #total_objects_count property



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
202
203
204
205
206
207
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation_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.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_countInteger

The number of objects for which statistics collection is completed.

Returns:

  • (Integer)


55
56
57
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation_summary.rb', line 55

def completed_count
  @completed_count
end

#duration_in_secondsFloat

[Required] The time it takes to complete the operation (in seconds).

Returns:

  • (Float)


51
52
53
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation_summary.rb', line 51

def duration_in_seconds
  @duration_in_seconds
end

#end_timeString

[Required] The end time of the operation.

Returns:

  • (String)


47
48
49
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation_summary.rb', line 47

def end_time
  @end_time
end

#failed_countInteger

The number of objects for which statistics collection failed.

Returns:

  • (Integer)


63
64
65
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation_summary.rb', line 63

def failed_count
  @failed_count
end

#idInteger

[Required] The ID of the operation.

Returns:

  • (Integer)


23
24
25
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation_summary.rb', line 23

def id
  @id
end

#in_progress_countInteger

The number of objects for which statistics collection is in progress.

Returns:

  • (Integer)


59
60
61
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation_summary.rb', line 59

def in_progress_count
  @in_progress_count
end

#job_nameString

[Required] The name of the job.

Returns:

  • (String)


35
36
37
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation_summary.rb', line 35

def job_name
  @job_name
end

#operation_nameString

[Required] The name of the operation.

Returns:

  • (String)


27
28
29
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation_summary.rb', line 27

def operation_name
  @operation_name
end

#start_timeString

[Required] The start time of the operation.

Returns:

  • (String)


43
44
45
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation_summary.rb', line 43

def start_time
  @start_time
end

#statusString

[Required] The status of the operation such as Completed, and Failed.

Returns:

  • (String)


39
40
41
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation_summary.rb', line 39

def status
  @status
end

#targetString

[Required] The target object type such as Table, Index, and Partition.

Returns:

  • (String)


31
32
33
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation_summary.rb', line 31

def target
  @target
end

#timed_out_countInteger

The number of objects for which statistics collection timed out.

Returns:

  • (Integer)


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

def timed_out_count
  @timed_out_count
end

#total_objects_countInteger

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.

Returns:

  • (Integer)


73
74
75
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation_summary.rb', line 73

def total_objects_count
  @total_objects_count
end

Class Method Details

.attribute_mapObject

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



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation_summary.rb', line 76

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    '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_typesObject

Attribute type mapping.



97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation_summary.rb', line 97

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    '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.

Parameters:

  • other (Object)

    the other object to be compared



229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation_summary.rb', line 229

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

  self.class == other.class &&
    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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation_summary.rb', line 271

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


251
252
253
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation_summary.rb', line 251

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



260
261
262
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation_summary.rb', line 260

def hash
  [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_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



304
305
306
307
308
309
310
311
312
313
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation_summary.rb', line 304

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



298
299
300
# File 'lib/oci/database_management/models/optimizer_statistics_collection_operation_summary.rb', line 298

def to_s
  to_hash.to_s
end