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 for the SQL statement.
-
#implement_action_sql ⇒ String
Action sql to be implemented based on the recommendation result.
-
#rationale ⇒ String
Describes the reasoning behind the recommendation and how it relates to the finding.
-
#recommendation ⇒ String
Particular recommendation for the finding.
-
#recommendation_key ⇒ Integer
[Required] 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] Unique identifier of the task.
-
#sql_tuning_advisor_task_object_id ⇒ Integer
[Required] 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
109 110 111 112 113 114 115 116 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 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 109 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'] end |
Instance Attribute Details
#benefit ⇒ Float
The percentage benefit of this implementation.
54 55 56 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 54 def benefit @benefit end |
#finding ⇒ String
Summary of the issue found for the SQL statement.
42 43 44 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 42 def finding @finding end |
#implement_action_sql ⇒ String
Action sql to be implemented based on the recommendation result.
58 59 60 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 58 def implement_action_sql @implement_action_sql end |
#rationale ⇒ String
Describes the reasoning behind the recommendation and how it relates to the finding.
50 51 52 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 50 def rationale @rationale end |
#recommendation ⇒ String
Particular recommendation for the finding.
46 47 48 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 46 def recommendation @recommendation end |
#recommendation_key ⇒ Integer
[Required] Unique identifier of the recommendation in the scope of the task.
34 35 36 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 34 def recommendation_key @recommendation_key end |
#recommendation_type ⇒ String
[Required] Type of recommendation
38 39 40 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 38 def recommendation_type @recommendation_type end |
#sql_tuning_advisor_task_id ⇒ Integer
[Required] Unique identifier of the task. It is not the [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
25 26 27 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 25 def sql_tuning_advisor_task_id @sql_tuning_advisor_task_id end |
#sql_tuning_advisor_task_object_id ⇒ Integer
[Required] Key of the object to which these recommendations apply. It is not the [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
30 31 32 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 30 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.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 61 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' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 78 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' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 174 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 end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 212 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
192 193 194 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 192 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
201 202 203 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 201 def hash [sql_tuning_advisor_task_id, sql_tuning_advisor_task_object_id, recommendation_key, recommendation_type, finding, recommendation, rationale, benefit, implement_action_sql].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
245 246 247 248 249 250 251 252 253 254 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 245 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
239 240 241 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_recommendation_summary.rb', line 239 def to_s to_hash.to_s end |