Class: Retab::DeclarativeApplyResponse
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::DeclarativeApplyResponse
- Defined in:
- lib/retab/workflow_specs/declarative_apply_response.rb
Constant Summary collapse
- HASH_ATTRS =
{ workflow_id: :workflow_id, action: :action, created: :created, block_count: :block_count, edge_count: :edge_count, diagnostics: :diagnostics, format_version: :format_version, summary: :summary, resource_changes: :resource_changes, rendered_plan: :rendered_plan }.freeze
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#block_count ⇒ Object
Returns the value of attribute block_count.
-
#created ⇒ Object
Returns the value of attribute created.
-
#diagnostics ⇒ Object
Returns the value of attribute diagnostics.
-
#edge_count ⇒ Object
Returns the value of attribute edge_count.
-
#format_version ⇒ Object
Returns the value of attribute format_version.
-
#rendered_plan ⇒ Object
Returns the value of attribute rendered_plan.
-
#resource_changes ⇒ Object
Returns the value of attribute resource_changes.
-
#summary ⇒ Object
Returns the value of attribute summary.
-
#workflow_id ⇒ Object
Returns the value of attribute workflow_id.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ DeclarativeApplyResponse
constructor
A new instance of DeclarativeApplyResponse.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ DeclarativeApplyResponse
Returns a new instance of DeclarativeApplyResponse.
33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/retab/workflow_specs/declarative_apply_response.rb', line 33 def initialize(json) hash = self.class.normalize(json) @workflow_id = hash[:workflow_id] @action = hash[:action] @created = hash[:created] @block_count = hash[:block_count] @edge_count = hash[:edge_count] @diagnostics = hash[:diagnostics] || {} @format_version = hash[:format_version] @summary = hash[:summary] ? Retab::DeclarativePlanSummary.new(hash[:summary]) : nil @resource_changes = (hash[:resource_changes] || []).map { |item| item ? Retab::DeclarativePlanResourceChange.new(item) : nil } @rendered_plan = hash[:rendered_plan] end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
21 22 23 |
# File 'lib/retab/workflow_specs/declarative_apply_response.rb', line 21 def action @action end |
#block_count ⇒ Object
Returns the value of attribute block_count.
21 22 23 |
# File 'lib/retab/workflow_specs/declarative_apply_response.rb', line 21 def block_count @block_count end |
#created ⇒ Object
Returns the value of attribute created.
21 22 23 |
# File 'lib/retab/workflow_specs/declarative_apply_response.rb', line 21 def created @created end |
#diagnostics ⇒ Object
Returns the value of attribute diagnostics.
21 22 23 |
# File 'lib/retab/workflow_specs/declarative_apply_response.rb', line 21 def diagnostics @diagnostics end |
#edge_count ⇒ Object
Returns the value of attribute edge_count.
21 22 23 |
# File 'lib/retab/workflow_specs/declarative_apply_response.rb', line 21 def edge_count @edge_count end |
#format_version ⇒ Object
Returns the value of attribute format_version.
21 22 23 |
# File 'lib/retab/workflow_specs/declarative_apply_response.rb', line 21 def format_version @format_version end |
#rendered_plan ⇒ Object
Returns the value of attribute rendered_plan.
21 22 23 |
# File 'lib/retab/workflow_specs/declarative_apply_response.rb', line 21 def rendered_plan @rendered_plan end |
#resource_changes ⇒ Object
Returns the value of attribute resource_changes.
21 22 23 |
# File 'lib/retab/workflow_specs/declarative_apply_response.rb', line 21 def resource_changes @resource_changes end |
#summary ⇒ Object
Returns the value of attribute summary.
21 22 23 |
# File 'lib/retab/workflow_specs/declarative_apply_response.rb', line 21 def summary @summary end |
#workflow_id ⇒ Object
Returns the value of attribute workflow_id.
21 22 23 |
# File 'lib/retab/workflow_specs/declarative_apply_response.rb', line 21 def workflow_id @workflow_id end |