Class: AnalyticsOps::Plan::Finding
- Inherits:
-
Resources::Value
- Object
- Resources::Value
- AnalyticsOps::Plan::Finding
- Defined in:
- lib/analytics_ops/plan.rb,
sig/analytics_ops.rbs
Overview
Read-only drift, manual, or experimental information attached to a plan.
Instance Attribute Summary collapse
-
#code ⇒ String
readonly
Returns the value of attribute code.
-
#message ⇒ String
readonly
Returns the value of attribute message.
-
#resource_identity ⇒ String
readonly
Returns the value of attribute resource_identity.
-
#severity ⇒ String
readonly
Returns the value of attribute severity.
Class Method Summary collapse
Methods inherited from Resources::Value
#==, fields, #hash, #initialize, #to_h
Constructor Details
This class inherits a constructor from AnalyticsOps::Resources::Value
Instance Attribute Details
#code ⇒ String (readonly)
Returns the value of attribute code.
288 289 290 |
# File 'sig/analytics_ops.rbs', line 288 def code @code end |
#message ⇒ String (readonly)
Returns the value of attribute message.
290 291 292 |
# File 'sig/analytics_ops.rbs', line 290 def @message end |
#resource_identity ⇒ String (readonly)
Returns the value of attribute resource_identity.
289 290 291 |
# File 'sig/analytics_ops.rbs', line 289 def resource_identity @resource_identity end |
#severity ⇒ String (readonly)
Returns the value of attribute severity.
287 288 289 |
# File 'sig/analytics_ops.rbs', line 287 def severity @severity end |
Class Method Details
.from_h(raw) ⇒ Finding
183 184 185 186 187 188 189 |
# File 'lib/analytics_ops/plan.rb', line 183 def self.from_h(raw) hash = Plan.string_keyed_hash(raw, "finding") Plan.exact_keys!(hash, field_names.map(&:to_s), "finding") new(**field_names.to_h { |name| [name, hash.fetch(name.to_s)] }) rescue KeyError => error raise InvalidPlanError, "Missing plan finding field #{error.key}" end |