Class: OCI::DatabaseManagement::Models::SqlTuningAdvisorTaskRecommendationSummary
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::SqlTuningAdvisorTaskRecommendationSummary
- Defined in:
- lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb
Overview
A recommendation for a given object in a SQL Tuning Task.
Constant Summary collapse
- RECOMMENDATION_TYPE_ENUM =
[ RECOMMENDATION_TYPE_STATISTICS = 'STATISTICS'.freeze, RECOMMENDATION_TYPE_INDEX = 'INDEX'.freeze, RECOMMENDATION_TYPE_SQL_PROFILE = 'SQL_PROFILE'.freeze, RECOMMENDATION_TYPE_RESTRUCTURE_SQL = 'RESTRUCTURE_SQL'.freeze, RECOMMENDATION_TYPE_ALTERNATIVE_PLANS = 'ALTERNATIVE_PLANS'.freeze, RECOMMENDATION_TYPE_ERROR = 'ERROR'.freeze, RECOMMENDATION_TYPE_MISCELLANEOUS = 'MISCELLANEOUS'.freeze, RECOMMENDATION_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#benefit ⇒ Float
The percentage benefit of this implementation.
-
#finding ⇒ String
Summary of the issue found in the SQL statement.
-
#implement_action_sql ⇒ String
Action sql to be implemented based on the recommendation result.
-
#is_parallel_execution ⇒ BOOLEAN
Indicates whether a SQL Profile recommendation uses parallel execution.
-
#rationale ⇒ String
Describes the reasoning behind the recommendation and how it relates to the finding.
-
#recommendation ⇒ String
The recommendation for a specific finding.
-
#recommendation_key ⇒ Integer
[Required] The unique identifier of the recommendation in the scope of the task.
-
#recommendation_type ⇒ String
[Required] Type of recommendation.
-
#sql_tuning_advisor_task_id ⇒ Integer
[Required] The unique identifier of the task.
-
#sql_tuning_advisor_task_object_id ⇒ Integer
[Required] The key of the object to which these recommendations apply.
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 = {}) ⇒ SqlTuningAdvisorTaskRecommendationSummary
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 = {}) ⇒ SqlTuningAdvisorTaskRecommendationSummary
Initializes the object
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 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 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 117 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.recommendation_key = attributes[:'recommendationKey'] if attributes[:'recommendationKey'] raise 'You cannot provide both :recommendationKey and :recommendation_key' if attributes.key?(:'recommendationKey') && attributes.key?(:'recommendation_key') self.recommendation_key = attributes[:'recommendation_key'] if attributes[:'recommendation_key'] self.recommendation_type = attributes[:'recommendationType'] if attributes[:'recommendationType'] raise 'You cannot provide both :recommendationType and :recommendation_type' if attributes.key?(:'recommendationType') && attributes.key?(:'recommendation_type') self.recommendation_type = attributes[:'recommendation_type'] if attributes[:'recommendation_type'] self.finding = attributes[:'finding'] if attributes[:'finding'] self.recommendation = attributes[:'recommendation'] if attributes[:'recommendation'] self.rationale = attributes[:'rationale'] if attributes[:'rationale'] self.benefit = attributes[:'benefit'] if attributes[:'benefit'] self.implement_action_sql = attributes[:'implementActionSql'] if attributes[:'implementActionSql'] raise 'You cannot provide both :implementActionSql and :implement_action_sql' if attributes.key?(:'implementActionSql') && attributes.key?(:'implement_action_sql') self.implement_action_sql = attributes[:'implement_action_sql'] if attributes[:'implement_action_sql'] self.is_parallel_execution = attributes[:'isParallelExecution'] unless attributes[:'isParallelExecution'].nil? raise 'You cannot provide both :isParallelExecution and :is_parallel_execution' if attributes.key?(:'isParallelExecution') && attributes.key?(:'is_parallel_execution') self.is_parallel_execution = attributes[:'is_parallel_execution'] unless attributes[:'is_parallel_execution'].nil? end |
Instance Attribute Details
#benefit ⇒ Float
The percentage benefit of this implementation.
55 56 57 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 55 def benefit @benefit end |
#finding ⇒ String
Summary of the issue found in the SQL statement.
43 44 45 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 43 def finding @finding end |
#implement_action_sql ⇒ String
Action sql to be implemented based on the recommendation result.
59 60 61 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 59 def implement_action_sql @implement_action_sql end |
#is_parallel_execution ⇒ BOOLEAN
Indicates whether a SQL Profile recommendation uses parallel execution.
63 64 65 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 63 def is_parallel_execution @is_parallel_execution end |
#rationale ⇒ String
Describes the reasoning behind the recommendation and how it relates to the finding.
51 52 53 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 51 def rationale @rationale end |
#recommendation ⇒ String
The recommendation for a specific finding.
47 48 49 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 47 def recommendation @recommendation end |
#recommendation_key ⇒ Integer
[Required] The unique identifier of the recommendation in the scope of the task.
35 36 37 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 35 def recommendation_key @recommendation_key end |
#recommendation_type ⇒ String
[Required] Type of recommendation.
39 40 41 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 39 def recommendation_type @recommendation_type end |
#sql_tuning_advisor_task_id ⇒ Integer
[Required] The unique identifier of the task. This is not the OCID.
26 27 28 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 26 def sql_tuning_advisor_task_id @sql_tuning_advisor_task_id end |
#sql_tuning_advisor_task_object_id ⇒ Integer
[Required] The key of the object to which these recommendations apply. This is not the OCID.
31 32 33 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 31 def sql_tuning_advisor_task_object_id @sql_tuning_advisor_task_object_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 66 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'sql_tuning_advisor_task_id': :'sqlTuningAdvisorTaskId', 'sql_tuning_advisor_task_object_id': :'sqlTuningAdvisorTaskObjectId', 'recommendation_key': :'recommendationKey', 'recommendation_type': :'recommendationType', 'finding': :'finding', 'recommendation': :'recommendation', 'rationale': :'rationale', 'benefit': :'benefit', 'implement_action_sql': :'implementActionSql', 'is_parallel_execution': :'isParallelExecution' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 84 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'sql_tuning_advisor_task_id': :'Integer', 'sql_tuning_advisor_task_object_id': :'Integer', 'recommendation_key': :'Integer', 'recommendation_type': :'String', 'finding': :'String', 'recommendation': :'String', 'rationale': :'String', 'benefit': :'Float', 'implement_action_sql': :'String', 'is_parallel_execution': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 188 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 && recommendation_key == other.recommendation_key && recommendation_type == other.recommendation_type && finding == other.finding && recommendation == other.recommendation && rationale == other.rationale && benefit == other.benefit && implement_action_sql == other.implement_action_sql && is_parallel_execution == other.is_parallel_execution end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 227 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
207 208 209 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 207 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
216 217 218 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 216 def hash [sql_tuning_advisor_task_id, sql_tuning_advisor_task_object_id, recommendation_key, recommendation_type, finding, recommendation, rationale, benefit, implement_action_sql, is_parallel_execution].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
260 261 262 263 264 265 266 267 268 269 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 260 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
254 255 256 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 254 def to_s to_hash.to_s end |