Class: OCI::Opsi::Models::AddmDbFindingAggregation
- Inherits:
-
Object
- Object
- OCI::Opsi::Models::AddmDbFindingAggregation
- Defined in:
- lib/oci/opsi/models/addm_db_finding_aggregation.rb
Overview
Summarizes a specific ADDM finding
Instance Attribute Summary collapse
-
#category_display_name ⇒ String
[Required] Category display name.
-
#category_name ⇒ String
[Required] Category name.
-
#finding_id ⇒ String
[Required] Unique finding id.
-
#frequency_count ⇒ Integer
[Required] Number of occurrences for this finding.
-
#id ⇒ String
[Required] The OCID of the Database insight.
-
#impact_avg_active_sessions ⇒ Float
Impact in terms of average active sessions.
-
#impact_max_percent ⇒ Float
[Required] Maximum impact in terms of percentage of total activity.
-
#impact_overall_percent ⇒ Float
[Required] Overall impact in terms of percentage of total activity.
-
#message ⇒ String
[Required] Finding message.
-
#name ⇒ String
[Required] Finding name.
-
#recommendation_count ⇒ Integer
[Required] Number of recommendations for this finding.
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 = {}) ⇒ AddmDbFindingAggregation
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 = {}) ⇒ AddmDbFindingAggregation
Initializes the object
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 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/oci/opsi/models/addm_db_finding_aggregation.rb', line 110 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.finding_id = attributes[:'findingId'] if attributes[:'findingId'] raise 'You cannot provide both :findingId and :finding_id' if attributes.key?(:'findingId') && attributes.key?(:'finding_id') self.finding_id = attributes[:'finding_id'] if attributes[:'finding_id'] self.category_name = attributes[:'categoryName'] if attributes[:'categoryName'] raise 'You cannot provide both :categoryName and :category_name' if attributes.key?(:'categoryName') && attributes.key?(:'category_name') self.category_name = attributes[:'category_name'] if attributes[:'category_name'] self.category_display_name = attributes[:'categoryDisplayName'] if attributes[:'categoryDisplayName'] raise 'You cannot provide both :categoryDisplayName and :category_display_name' if attributes.key?(:'categoryDisplayName') && attributes.key?(:'category_display_name') self.category_display_name = attributes[:'category_display_name'] if attributes[:'category_display_name'] self.name = attributes[:'name'] if attributes[:'name'] self. = attributes[:'message'] if attributes[:'message'] self.impact_overall_percent = attributes[:'impactOverallPercent'] if attributes[:'impactOverallPercent'] raise 'You cannot provide both :impactOverallPercent and :impact_overall_percent' if attributes.key?(:'impactOverallPercent') && attributes.key?(:'impact_overall_percent') self.impact_overall_percent = attributes[:'impact_overall_percent'] if attributes[:'impact_overall_percent'] self.impact_max_percent = attributes[:'impactMaxPercent'] if attributes[:'impactMaxPercent'] raise 'You cannot provide both :impactMaxPercent and :impact_max_percent' if attributes.key?(:'impactMaxPercent') && attributes.key?(:'impact_max_percent') self.impact_max_percent = attributes[:'impact_max_percent'] if attributes[:'impact_max_percent'] self.impact_avg_active_sessions = attributes[:'impactAvgActiveSessions'] if attributes[:'impactAvgActiveSessions'] raise 'You cannot provide both :impactAvgActiveSessions and :impact_avg_active_sessions' if attributes.key?(:'impactAvgActiveSessions') && attributes.key?(:'impact_avg_active_sessions') self.impact_avg_active_sessions = attributes[:'impact_avg_active_sessions'] if attributes[:'impact_avg_active_sessions'] self.frequency_count = attributes[:'frequencyCount'] if attributes[:'frequencyCount'] raise 'You cannot provide both :frequencyCount and :frequency_count' if attributes.key?(:'frequencyCount') && attributes.key?(:'frequency_count') self.frequency_count = attributes[:'frequency_count'] if attributes[:'frequency_count'] self.recommendation_count = attributes[:'recommendationCount'] if attributes[:'recommendationCount'] raise 'You cannot provide both :recommendationCount and :recommendation_count' if attributes.key?(:'recommendationCount') && attributes.key?(:'recommendation_count') self.recommendation_count = attributes[:'recommendation_count'] if attributes[:'recommendation_count'] end |
Instance Attribute Details
#category_display_name ⇒ String
[Required] Category display name
25 26 27 |
# File 'lib/oci/opsi/models/addm_db_finding_aggregation.rb', line 25 def category_display_name @category_display_name end |
#category_name ⇒ String
[Required] Category name
21 22 23 |
# File 'lib/oci/opsi/models/addm_db_finding_aggregation.rb', line 21 def category_name @category_name end |
#finding_id ⇒ String
[Required] Unique finding id
17 18 19 |
# File 'lib/oci/opsi/models/addm_db_finding_aggregation.rb', line 17 def finding_id @finding_id end |
#frequency_count ⇒ Integer
[Required] Number of occurrences for this finding
49 50 51 |
# File 'lib/oci/opsi/models/addm_db_finding_aggregation.rb', line 49 def frequency_count @frequency_count end |
#id ⇒ String
[Required] The OCID of the Database insight.
13 14 15 |
# File 'lib/oci/opsi/models/addm_db_finding_aggregation.rb', line 13 def id @id end |
#impact_avg_active_sessions ⇒ Float
Impact in terms of average active sessions
45 46 47 |
# File 'lib/oci/opsi/models/addm_db_finding_aggregation.rb', line 45 def impact_avg_active_sessions @impact_avg_active_sessions end |
#impact_max_percent ⇒ Float
[Required] Maximum impact in terms of percentage of total activity
41 42 43 |
# File 'lib/oci/opsi/models/addm_db_finding_aggregation.rb', line 41 def impact_max_percent @impact_max_percent end |
#impact_overall_percent ⇒ Float
[Required] Overall impact in terms of percentage of total activity
37 38 39 |
# File 'lib/oci/opsi/models/addm_db_finding_aggregation.rb', line 37 def impact_overall_percent @impact_overall_percent end |
#message ⇒ String
[Required] Finding message
33 34 35 |
# File 'lib/oci/opsi/models/addm_db_finding_aggregation.rb', line 33 def @message end |
#name ⇒ String
[Required] Finding name
29 30 31 |
# File 'lib/oci/opsi/models/addm_db_finding_aggregation.rb', line 29 def name @name end |
#recommendation_count ⇒ Integer
[Required] Number of recommendations for this finding
53 54 55 |
# File 'lib/oci/opsi/models/addm_db_finding_aggregation.rb', line 53 def recommendation_count @recommendation_count end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/oci/opsi/models/addm_db_finding_aggregation.rb', line 56 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'finding_id': :'findingId', 'category_name': :'categoryName', 'category_display_name': :'categoryDisplayName', 'name': :'name', 'message': :'message', 'impact_overall_percent': :'impactOverallPercent', 'impact_max_percent': :'impactMaxPercent', 'impact_avg_active_sessions': :'impactAvgActiveSessions', 'frequency_count': :'frequencyCount', 'recommendation_count': :'recommendationCount' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/oci/opsi/models/addm_db_finding_aggregation.rb', line 75 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'finding_id': :'String', 'category_name': :'String', 'category_display_name': :'String', 'name': :'String', 'message': :'String', 'impact_overall_percent': :'Float', 'impact_max_percent': :'Float', 'impact_avg_active_sessions': :'Float', 'frequency_count': :'Integer', 'recommendation_count': :'Integer' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/oci/opsi/models/addm_db_finding_aggregation.rb', line 178 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && finding_id == other.finding_id && category_name == other.category_name && category_display_name == other.category_display_name && name == other.name && == other. && impact_overall_percent == other.impact_overall_percent && impact_max_percent == other.impact_max_percent && impact_avg_active_sessions == other.impact_avg_active_sessions && frequency_count == other.frequency_count && recommendation_count == other.recommendation_count end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 |
# File 'lib/oci/opsi/models/addm_db_finding_aggregation.rb', line 218 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
198 199 200 |
# File 'lib/oci/opsi/models/addm_db_finding_aggregation.rb', line 198 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
207 208 209 |
# File 'lib/oci/opsi/models/addm_db_finding_aggregation.rb', line 207 def hash [id, finding_id, category_name, category_display_name, name, , impact_overall_percent, impact_max_percent, impact_avg_active_sessions, frequency_count, recommendation_count].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
251 252 253 254 255 256 257 258 259 260 |
# File 'lib/oci/opsi/models/addm_db_finding_aggregation.rb', line 251 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
245 246 247 |
# File 'lib/oci/opsi/models/addm_db_finding_aggregation.rb', line 245 def to_s to_hash.to_s end |