Class: OCI::DatabaseManagement::Models::SqlTuningAdvisorTaskFindingSummary

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

Overview

A summary of the findings of the objects in a tuning task that match a given filter. This includes the kind of findings that were reported, whether the benefits were analyzed, and the number of benefits obtained.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ SqlTuningAdvisorTaskFindingSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 156

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

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

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

  self.sql_tuning_advisor_task_object_id = attributes[:'sqlTuningAdvisorTaskObjectId'] if attributes[:'sqlTuningAdvisorTaskObjectId']

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

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

  self.sql_tuning_advisor_task_object_execution_id = attributes[:'sqlTuningAdvisorTaskObjectExecutionId'] if attributes[:'sqlTuningAdvisorTaskObjectExecutionId']

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

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

  self.sql_text = attributes[:'sqlText'] if attributes[:'sqlText']

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

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

  self.parsing_schema = attributes[:'parsingSchema'] if attributes[:'parsingSchema']

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

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

  self.sql_key = attributes[:'sqlKey'] if attributes[:'sqlKey']

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

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

  self.db_time_benefit = attributes[:'dbTimeBenefit'] if attributes[:'dbTimeBenefit']

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

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

  self.per_execution_percentage = attributes[:'perExecutionPercentage'] if attributes[:'perExecutionPercentage']

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

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

  self.is_stats_finding_present = attributes[:'isStatsFindingPresent'] unless attributes[:'isStatsFindingPresent'].nil?

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

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

  self.is_sql_profile_finding_present = attributes[:'isSqlProfileFindingPresent'] unless attributes[:'isSqlProfileFindingPresent'].nil?

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

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

  self.is_sql_profile_finding_implemented = attributes[:'isSqlProfileFindingImplemented'] unless attributes[:'isSqlProfileFindingImplemented'].nil?

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

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

  self.is_index_finding_present = attributes[:'isIndexFindingPresent'] unless attributes[:'isIndexFindingPresent'].nil?

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

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

  self.is_restructure_sql_finding_present = attributes[:'isRestructureSqlFindingPresent'] unless attributes[:'isRestructureSqlFindingPresent'].nil?

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

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

  self.is_alternative_plan_finding_present = attributes[:'isAlternativePlanFindingPresent'] unless attributes[:'isAlternativePlanFindingPresent'].nil?

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

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

  self.is_miscellaneous_finding_present = attributes[:'isMiscellaneousFindingPresent'] unless attributes[:'isMiscellaneousFindingPresent'].nil?

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

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

  self.is_error_finding_present = attributes[:'isErrorFindingPresent'] unless attributes[:'isErrorFindingPresent'].nil?

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

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

  self.is_timeout_finding_present = attributes[:'isTimeoutFindingPresent'] unless attributes[:'isTimeoutFindingPresent'].nil?

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

  self.is_timeout_finding_present = attributes[:'is_timeout_finding_present'] unless attributes[:'is_timeout_finding_present'].nil?
end

Instance Attribute Details

#db_time_benefitFloat

The time benefit (in seconds) for the highest-rated finding for this object.

Returns:

  • (Float)


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

def db_time_benefit
  @db_time_benefit
end

#is_alternative_plan_finding_presentBOOLEAN

Indicates whether an alternative execution plan was reported for this SQL statement.

Returns:

  • (BOOLEAN)


69
70
71
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 69

def is_alternative_plan_finding_present
  @is_alternative_plan_finding_present
end

#is_error_finding_presentBOOLEAN

Indicates whether there is an error in this SQL statement.

Returns:

  • (BOOLEAN)


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

def is_error_finding_present
  @is_error_finding_present
end

#is_index_finding_presentBOOLEAN

Indicates whether an index recommendation was reported for this SQL statement.

Returns:

  • (BOOLEAN)


61
62
63
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 61

def is_index_finding_present
  @is_index_finding_present
end

#is_miscellaneous_finding_presentBOOLEAN

Indicates whether a miscellaneous finding was reported for this SQL statement.

Returns:

  • (BOOLEAN)


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

def is_miscellaneous_finding_present
  @is_miscellaneous_finding_present
end

#is_restructure_sql_finding_presentBOOLEAN

Indicates whether a restructure SQL recommendation was reported for this SQL statement.

Returns:

  • (BOOLEAN)


65
66
67
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 65

def is_restructure_sql_finding_present
  @is_restructure_sql_finding_present
end

#is_sql_profile_finding_implementedBOOLEAN

Indicates whether a SQL Profile recommendation has been implemented for this SQL statement.

Returns:

  • (BOOLEAN)


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

def is_sql_profile_finding_implemented
  @is_sql_profile_finding_implemented
end

#is_sql_profile_finding_presentBOOLEAN

Indicates whether a SQL Profile recommendation was reported for this SQL statement.

Returns:

  • (BOOLEAN)


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

def is_sql_profile_finding_present
  @is_sql_profile_finding_present
end

#is_stats_finding_presentBOOLEAN

Indicates whether a statistics recommendation was reported for this SQL statement.

Returns:

  • (BOOLEAN)


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

def is_stats_finding_present
  @is_stats_finding_present
end

#is_timeout_finding_presentBOOLEAN

Indicates whether the task timed out.

Returns:

  • (BOOLEAN)


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

def is_timeout_finding_present
  @is_timeout_finding_present
end

#parsing_schemaString

[Required] The parsing schema of the object.

Returns:

  • (String)


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

def parsing_schema
  @parsing_schema
end

#per_execution_percentageInteger

The per-execution percentage benefit.

Returns:

  • (Integer)


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

def per_execution_percentage
  @per_execution_percentage
end

#sql_keyString

[Required] The unique key of this SQL statement.

Returns:

  • (String)


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

def sql_key
  @sql_key
end

#sql_textString

[Required] The text of the SQL statement.

Returns:

  • (String)


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

def sql_text
  @sql_text
end

#sql_tuning_advisor_task_idInteger

[Required] The unique identifier of the SQL Tuning Advisor task. This is not the OCID.

Returns:

  • (Integer)


15
16
17
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 15

def sql_tuning_advisor_task_id
  @sql_tuning_advisor_task_id
end

#sql_tuning_advisor_task_object_execution_idInteger

[Required] The execution id of the analyzed SQL object. This is not the OCID.

Returns:

  • (Integer)


25
26
27
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 25

def sql_tuning_advisor_task_object_execution_id
  @sql_tuning_advisor_task_object_execution_id
end

#sql_tuning_advisor_task_object_idInteger

[Required] The key of the object to which these recommendations apply. This is not the OCID.

Returns:

  • (Integer)


21
22
23
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 21

def sql_tuning_advisor_task_object_id
  @sql_tuning_advisor_task_object_id
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
103
104
105
106
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 84

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'sql_tuning_advisor_task_id': :'sqlTuningAdvisorTaskId',
    'sql_tuning_advisor_task_object_id': :'sqlTuningAdvisorTaskObjectId',
    'sql_tuning_advisor_task_object_execution_id': :'sqlTuningAdvisorTaskObjectExecutionId',
    'sql_text': :'sqlText',
    'parsing_schema': :'parsingSchema',
    'sql_key': :'sqlKey',
    'db_time_benefit': :'dbTimeBenefit',
    'per_execution_percentage': :'perExecutionPercentage',
    'is_stats_finding_present': :'isStatsFindingPresent',
    'is_sql_profile_finding_present': :'isSqlProfileFindingPresent',
    'is_sql_profile_finding_implemented': :'isSqlProfileFindingImplemented',
    'is_index_finding_present': :'isIndexFindingPresent',
    'is_restructure_sql_finding_present': :'isRestructureSqlFindingPresent',
    'is_alternative_plan_finding_present': :'isAlternativePlanFindingPresent',
    'is_miscellaneous_finding_present': :'isMiscellaneousFindingPresent',
    'is_error_finding_present': :'isErrorFindingPresent',
    'is_timeout_finding_present': :'isTimeoutFindingPresent'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 109

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'sql_tuning_advisor_task_id': :'Integer',
    'sql_tuning_advisor_task_object_id': :'Integer',
    'sql_tuning_advisor_task_object_execution_id': :'Integer',
    'sql_text': :'String',
    'parsing_schema': :'String',
    'sql_key': :'String',
    'db_time_benefit': :'Float',
    'per_execution_percentage': :'Integer',
    'is_stats_finding_present': :'BOOLEAN',
    'is_sql_profile_finding_present': :'BOOLEAN',
    'is_sql_profile_finding_implemented': :'BOOLEAN',
    'is_index_finding_present': :'BOOLEAN',
    'is_restructure_sql_finding_present': :'BOOLEAN',
    'is_alternative_plan_finding_present': :'BOOLEAN',
    'is_miscellaneous_finding_present': :'BOOLEAN',
    'is_error_finding_present': :'BOOLEAN',
    'is_timeout_finding_present': :'BOOLEAN'
    # 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



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/sql_tuning_advisor_task_finding_summary.rb', line 272

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

  self.class == other.class &&
    sql_tuning_advisor_task_id == other.sql_tuning_advisor_task_id &&
    sql_tuning_advisor_task_object_id == other.sql_tuning_advisor_task_object_id &&
    sql_tuning_advisor_task_object_execution_id == other.sql_tuning_advisor_task_object_execution_id &&
    sql_text == other.sql_text &&
    parsing_schema == other.parsing_schema &&
    sql_key == other.sql_key &&
    db_time_benefit == other.db_time_benefit &&
    per_execution_percentage == other.per_execution_percentage &&
    is_stats_finding_present == other.is_stats_finding_present &&
    is_sql_profile_finding_present == other.is_sql_profile_finding_present &&
    is_sql_profile_finding_implemented == other.is_sql_profile_finding_implemented &&
    is_index_finding_present == other.is_index_finding_present &&
    is_restructure_sql_finding_present == other.is_restructure_sql_finding_present &&
    is_alternative_plan_finding_present == other.is_alternative_plan_finding_present &&
    is_miscellaneous_finding_present == other.is_miscellaneous_finding_present &&
    is_error_finding_present == other.is_error_finding_present &&
    is_timeout_finding_present == other.is_timeout_finding_present
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



318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 318

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


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

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



307
308
309
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 307

def hash
  [sql_tuning_advisor_task_id, sql_tuning_advisor_task_object_id, sql_tuning_advisor_task_object_execution_id, sql_text, parsing_schema, sql_key, db_time_benefit, per_execution_percentage, is_stats_finding_present, is_sql_profile_finding_present, is_sql_profile_finding_implemented, is_index_finding_present, is_restructure_sql_finding_present, is_alternative_plan_finding_present, is_miscellaneous_finding_present, is_error_finding_present, is_timeout_finding_present].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



351
352
353
354
355
356
357
358
359
360
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 351

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



345
346
347
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 345

def to_s
  to_hash.to_s
end