Class: Retab::DeclarativeValidationResponse

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/workflow_specs/declarative_validation_response.rb

Constant Summary collapse

HASH_ATTRS =
{
  workflow_id: :workflow_id,
  block_count: :block_count,
  edge_count: :edge_count,
  is_valid: :is_valid,
  diagnostics: :diagnostics
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

#inspect, normalize, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ DeclarativeValidationResponse

Returns a new instance of DeclarativeValidationResponse.



23
24
25
26
27
28
29
30
# File 'lib/retab/workflow_specs/declarative_validation_response.rb', line 23

def initialize(json)
  hash = self.class.normalize(json)
  @workflow_id = hash[:workflow_id]
  @block_count = hash[:block_count]
  @edge_count = hash[:edge_count]
  @is_valid = hash[:is_valid]
  @diagnostics = hash[:diagnostics] || {}
end

Instance Attribute Details

#block_countObject

Returns the value of attribute block_count.



16
17
18
# File 'lib/retab/workflow_specs/declarative_validation_response.rb', line 16

def block_count
  @block_count
end

#diagnosticsObject

Returns the value of attribute diagnostics.



16
17
18
# File 'lib/retab/workflow_specs/declarative_validation_response.rb', line 16

def diagnostics
  @diagnostics
end

#edge_countObject

Returns the value of attribute edge_count.



16
17
18
# File 'lib/retab/workflow_specs/declarative_validation_response.rb', line 16

def edge_count
  @edge_count
end

#is_validObject

Returns the value of attribute is_valid.



16
17
18
# File 'lib/retab/workflow_specs/declarative_validation_response.rb', line 16

def is_valid
  @is_valid
end

#workflow_idObject

Returns the value of attribute workflow_id.



16
17
18
# File 'lib/retab/workflow_specs/declarative_validation_response.rb', line 16

def workflow_id
  @workflow_id
end