Class: OCI::Opsi::Models::AddmDbRecommendationsTimeSeriesSummary
- Inherits:
-
Object
- Object
- OCI::Opsi::Models::AddmDbRecommendationsTimeSeriesSummary
- Defined in:
- lib/oci/opsi/models/addm_db_recommendations_time_series_summary.rb
Overview
ADDM recommendation
Instance Attribute Summary collapse
-
#analysis_avg_active_sessions ⇒ Float
DB avg active sessions for the snapshot.
-
#analysis_db_time_in_secs ⇒ Float
DB time in seconds for the snapshot.
-
#id ⇒ String
[Required] The OCID of the Database insight.
-
#max_benefit_avg_active_sessions ⇒ Float
Maximum estimated benefit in terms of average active sessions.
-
#max_benefit_db_time_in_secs ⇒ Float
Maximum estimated benefit in terms of seconds.
-
#max_benefit_percent ⇒ Float
Maximum estimated benefit in terms of percentage of total activity.
- #related_object ⇒ OCI::Opsi::Models::RelatedObjectTypeDetails
-
#task_id ⇒ Integer
[Required] Unique ADDM task id.
-
#task_name ⇒ String
[Required] ADDM task name.
-
#time_analysis_ended ⇒ DateTime
End Timestamp of snapshot.
-
#time_analysis_started ⇒ DateTime
Start Timestamp of snapshot.
-
#timestamp ⇒ DateTime
[Required] Timestamp when recommendation was generated.
-
#type ⇒ String
Type of recommendation.
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 = {}) ⇒ AddmDbRecommendationsTimeSeriesSummary
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 = {}) ⇒ AddmDbRecommendationsTimeSeriesSummary
Initializes the object
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 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 |
# File 'lib/oci/opsi/models/addm_db_recommendations_time_series_summary.rb', line 123 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.task_id = attributes[:'taskId'] if attributes[:'taskId'] raise 'You cannot provide both :taskId and :task_id' if attributes.key?(:'taskId') && attributes.key?(:'task_id') self.task_id = attributes[:'task_id'] if attributes[:'task_id'] self.task_name = attributes[:'taskName'] if attributes[:'taskName'] raise 'You cannot provide both :taskName and :task_name' if attributes.key?(:'taskName') && attributes.key?(:'task_name') self.task_name = attributes[:'task_name'] if attributes[:'task_name'] self. = attributes[:'timestamp'] if attributes[:'timestamp'] self.time_analysis_started = attributes[:'timeAnalysisStarted'] if attributes[:'timeAnalysisStarted'] raise 'You cannot provide both :timeAnalysisStarted and :time_analysis_started' if attributes.key?(:'timeAnalysisStarted') && attributes.key?(:'time_analysis_started') self.time_analysis_started = attributes[:'time_analysis_started'] if attributes[:'time_analysis_started'] self.time_analysis_ended = attributes[:'timeAnalysisEnded'] if attributes[:'timeAnalysisEnded'] raise 'You cannot provide both :timeAnalysisEnded and :time_analysis_ended' if attributes.key?(:'timeAnalysisEnded') && attributes.key?(:'time_analysis_ended') self.time_analysis_ended = attributes[:'time_analysis_ended'] if attributes[:'time_analysis_ended'] self.type = attributes[:'type'] if attributes[:'type'] self.analysis_db_time_in_secs = attributes[:'analysisDbTimeInSecs'] if attributes[:'analysisDbTimeInSecs'] raise 'You cannot provide both :analysisDbTimeInSecs and :analysis_db_time_in_secs' if attributes.key?(:'analysisDbTimeInSecs') && attributes.key?(:'analysis_db_time_in_secs') self.analysis_db_time_in_secs = attributes[:'analysis_db_time_in_secs'] if attributes[:'analysis_db_time_in_secs'] self.analysis_avg_active_sessions = attributes[:'analysisAvgActiveSessions'] if attributes[:'analysisAvgActiveSessions'] raise 'You cannot provide both :analysisAvgActiveSessions and :analysis_avg_active_sessions' if attributes.key?(:'analysisAvgActiveSessions') && attributes.key?(:'analysis_avg_active_sessions') self.analysis_avg_active_sessions = attributes[:'analysis_avg_active_sessions'] if attributes[:'analysis_avg_active_sessions'] self.max_benefit_percent = attributes[:'maxBenefitPercent'] if attributes[:'maxBenefitPercent'] raise 'You cannot provide both :maxBenefitPercent and :max_benefit_percent' if attributes.key?(:'maxBenefitPercent') && attributes.key?(:'max_benefit_percent') self.max_benefit_percent = attributes[:'max_benefit_percent'] if attributes[:'max_benefit_percent'] self.max_benefit_db_time_in_secs = attributes[:'maxBenefitDbTimeInSecs'] if attributes[:'maxBenefitDbTimeInSecs'] raise 'You cannot provide both :maxBenefitDbTimeInSecs and :max_benefit_db_time_in_secs' if attributes.key?(:'maxBenefitDbTimeInSecs') && attributes.key?(:'max_benefit_db_time_in_secs') self.max_benefit_db_time_in_secs = attributes[:'max_benefit_db_time_in_secs'] if attributes[:'max_benefit_db_time_in_secs'] self.max_benefit_avg_active_sessions = attributes[:'maxBenefitAvgActiveSessions'] if attributes[:'maxBenefitAvgActiveSessions'] raise 'You cannot provide both :maxBenefitAvgActiveSessions and :max_benefit_avg_active_sessions' if attributes.key?(:'maxBenefitAvgActiveSessions') && attributes.key?(:'max_benefit_avg_active_sessions') self.max_benefit_avg_active_sessions = attributes[:'max_benefit_avg_active_sessions'] if attributes[:'max_benefit_avg_active_sessions'] self. = attributes[:'relatedObject'] if attributes[:'relatedObject'] raise 'You cannot provide both :relatedObject and :related_object' if attributes.key?(:'relatedObject') && attributes.key?(:'related_object') self. = attributes[:'related_object'] if attributes[:'related_object'] end |
Instance Attribute Details
#analysis_avg_active_sessions ⇒ Float
DB avg active sessions for the snapshot
45 46 47 |
# File 'lib/oci/opsi/models/addm_db_recommendations_time_series_summary.rb', line 45 def analysis_avg_active_sessions @analysis_avg_active_sessions end |
#analysis_db_time_in_secs ⇒ Float
DB time in seconds for the snapshot
41 42 43 |
# File 'lib/oci/opsi/models/addm_db_recommendations_time_series_summary.rb', line 41 def analysis_db_time_in_secs @analysis_db_time_in_secs end |
#id ⇒ String
[Required] The OCID of the Database insight.
13 14 15 |
# File 'lib/oci/opsi/models/addm_db_recommendations_time_series_summary.rb', line 13 def id @id end |
#max_benefit_avg_active_sessions ⇒ Float
Maximum estimated benefit in terms of average active sessions
57 58 59 |
# File 'lib/oci/opsi/models/addm_db_recommendations_time_series_summary.rb', line 57 def max_benefit_avg_active_sessions @max_benefit_avg_active_sessions end |
#max_benefit_db_time_in_secs ⇒ Float
Maximum estimated benefit in terms of seconds
53 54 55 |
# File 'lib/oci/opsi/models/addm_db_recommendations_time_series_summary.rb', line 53 def max_benefit_db_time_in_secs @max_benefit_db_time_in_secs end |
#max_benefit_percent ⇒ Float
Maximum estimated benefit in terms of percentage of total activity
49 50 51 |
# File 'lib/oci/opsi/models/addm_db_recommendations_time_series_summary.rb', line 49 def max_benefit_percent @max_benefit_percent end |
#related_object ⇒ OCI::Opsi::Models::RelatedObjectTypeDetails
60 61 62 |
# File 'lib/oci/opsi/models/addm_db_recommendations_time_series_summary.rb', line 60 def @related_object end |
#task_id ⇒ Integer
[Required] Unique ADDM task id
17 18 19 |
# File 'lib/oci/opsi/models/addm_db_recommendations_time_series_summary.rb', line 17 def task_id @task_id end |
#task_name ⇒ String
[Required] ADDM task name
21 22 23 |
# File 'lib/oci/opsi/models/addm_db_recommendations_time_series_summary.rb', line 21 def task_name @task_name end |
#time_analysis_ended ⇒ DateTime
End Timestamp of snapshot
33 34 35 |
# File 'lib/oci/opsi/models/addm_db_recommendations_time_series_summary.rb', line 33 def time_analysis_ended @time_analysis_ended end |
#time_analysis_started ⇒ DateTime
Start Timestamp of snapshot
29 30 31 |
# File 'lib/oci/opsi/models/addm_db_recommendations_time_series_summary.rb', line 29 def time_analysis_started @time_analysis_started end |
#timestamp ⇒ DateTime
[Required] Timestamp when recommendation was generated
25 26 27 |
# File 'lib/oci/opsi/models/addm_db_recommendations_time_series_summary.rb', line 25 def @timestamp end |
#type ⇒ String
Type of recommendation
37 38 39 |
# File 'lib/oci/opsi/models/addm_db_recommendations_time_series_summary.rb', line 37 def type @type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/oci/opsi/models/addm_db_recommendations_time_series_summary.rb', line 63 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'task_id': :'taskId', 'task_name': :'taskName', 'timestamp': :'timestamp', 'time_analysis_started': :'timeAnalysisStarted', 'time_analysis_ended': :'timeAnalysisEnded', 'type': :'type', 'analysis_db_time_in_secs': :'analysisDbTimeInSecs', 'analysis_avg_active_sessions': :'analysisAvgActiveSessions', 'max_benefit_percent': :'maxBenefitPercent', 'max_benefit_db_time_in_secs': :'maxBenefitDbTimeInSecs', 'max_benefit_avg_active_sessions': :'maxBenefitAvgActiveSessions', 'related_object': :'relatedObject' # 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 100 101 102 |
# File 'lib/oci/opsi/models/addm_db_recommendations_time_series_summary.rb', line 84 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'task_id': :'Integer', 'task_name': :'String', 'timestamp': :'DateTime', 'time_analysis_started': :'DateTime', 'time_analysis_ended': :'DateTime', 'type': :'String', 'analysis_db_time_in_secs': :'Float', 'analysis_avg_active_sessions': :'Float', 'max_benefit_percent': :'Float', 'max_benefit_db_time_in_secs': :'Float', 'max_benefit_avg_active_sessions': :'Float', 'related_object': :'OCI::Opsi::Models::RelatedObjectTypeDetails' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/oci/opsi/models/addm_db_recommendations_time_series_summary.rb', line 203 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && task_id == other.task_id && task_name == other.task_name && == other. && time_analysis_started == other.time_analysis_started && time_analysis_ended == other.time_analysis_ended && type == other.type && analysis_db_time_in_secs == other.analysis_db_time_in_secs && analysis_avg_active_sessions == other.analysis_avg_active_sessions && max_benefit_percent == other.max_benefit_percent && max_benefit_db_time_in_secs == other.max_benefit_db_time_in_secs && max_benefit_avg_active_sessions == other.max_benefit_avg_active_sessions && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 |
# File 'lib/oci/opsi/models/addm_db_recommendations_time_series_summary.rb', line 245 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
225 226 227 |
# File 'lib/oci/opsi/models/addm_db_recommendations_time_series_summary.rb', line 225 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
234 235 236 |
# File 'lib/oci/opsi/models/addm_db_recommendations_time_series_summary.rb', line 234 def hash [id, task_id, task_name, , time_analysis_started, time_analysis_ended, type, analysis_db_time_in_secs, analysis_avg_active_sessions, max_benefit_percent, max_benefit_db_time_in_secs, max_benefit_avg_active_sessions, ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
278 279 280 281 282 283 284 285 286 287 |
# File 'lib/oci/opsi/models/addm_db_recommendations_time_series_summary.rb', line 278 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
272 273 274 |
# File 'lib/oci/opsi/models/addm_db_recommendations_time_series_summary.rb', line 272 def to_s to_hash.to_s end |