Class: Retab::DeclarativePlanResourceChange
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::DeclarativePlanResourceChange
- Defined in:
- lib/retab/workflow_specs/declarative_plan_resource_change.rb
Constant Summary collapse
- HASH_ATTRS =
{ address: :address, target: :target, target_id: :target_id, name: :name, type: :type, actions: :actions, summary: :summary, change: :change, path: :path }.freeze
Instance Attribute Summary collapse
-
#actions ⇒ Object
Returns the value of attribute actions.
-
#address ⇒ Object
Returns the value of attribute address.
-
#change ⇒ Object
Returns the value of attribute change.
-
#name ⇒ Object
Returns the value of attribute name.
-
#path ⇒ Object
Returns the value of attribute path.
-
#summary ⇒ Object
Returns the value of attribute summary.
-
#target ⇒ Object
Returns the value of attribute target.
-
#target_id ⇒ Object
Returns the value of attribute target_id.
-
#type ⇒ Object
Returns the value of attribute type.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ DeclarativePlanResourceChange
constructor
A new instance of DeclarativePlanResourceChange.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ DeclarativePlanResourceChange
Returns a new instance of DeclarativePlanResourceChange.
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/retab/workflow_specs/declarative_plan_resource_change.rb', line 31 def initialize(json) hash = self.class.normalize(json) @address = hash[:address] @target = hash[:target] @target_id = hash[:target_id] @name = hash[:name] @type = hash[:type] @actions = (hash[:actions] || []) @summary = hash[:summary] @change = hash[:change] ? Retab::DeclarativePlanChange.new(hash[:change]) : nil @path = hash[:path] end |
Instance Attribute Details
#actions ⇒ Object
Returns the value of attribute actions.
20 21 22 |
# File 'lib/retab/workflow_specs/declarative_plan_resource_change.rb', line 20 def actions @actions end |
#address ⇒ Object
Returns the value of attribute address.
20 21 22 |
# File 'lib/retab/workflow_specs/declarative_plan_resource_change.rb', line 20 def address @address end |
#change ⇒ Object
Returns the value of attribute change.
20 21 22 |
# File 'lib/retab/workflow_specs/declarative_plan_resource_change.rb', line 20 def change @change end |
#name ⇒ Object
Returns the value of attribute name.
20 21 22 |
# File 'lib/retab/workflow_specs/declarative_plan_resource_change.rb', line 20 def name @name end |
#path ⇒ Object
Returns the value of attribute path.
20 21 22 |
# File 'lib/retab/workflow_specs/declarative_plan_resource_change.rb', line 20 def path @path end |
#summary ⇒ Object
Returns the value of attribute summary.
20 21 22 |
# File 'lib/retab/workflow_specs/declarative_plan_resource_change.rb', line 20 def summary @summary end |
#target ⇒ Object
Returns the value of attribute target.
20 21 22 |
# File 'lib/retab/workflow_specs/declarative_plan_resource_change.rb', line 20 def target @target end |
#target_id ⇒ Object
Returns the value of attribute target_id.
20 21 22 |
# File 'lib/retab/workflow_specs/declarative_plan_resource_change.rb', line 20 def target_id @target_id end |
#type ⇒ Object
Returns the value of attribute type.
20 21 22 |
# File 'lib/retab/workflow_specs/declarative_plan_resource_change.rb', line 20 def type @type end |