Class: Retab::ArtifactFreshness

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/workflow_experiments/artifact_freshness.rb

Constant Summary collapse

HASH_ATTRS =
{
  status: :status,
  reasons: :reasons,
  validity_fingerprint: :validity_fingerprint,
  input_fingerprint: :input_fingerprint,
  baseline_run_id: :baseline_run_id
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

deep_symbolize, #inspect, normalize, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ ArtifactFreshness

Returns a new instance of ArtifactFreshness.



24
25
26
27
28
29
30
31
32
# File 'lib/retab/workflow_experiments/artifact_freshness.rb', line 24

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @status = hash[:status].nil? ? "unknown" : hash[:status]
  @reasons = (hash[:reasons] || [])
  @validity_fingerprint = hash[:validity_fingerprint]
  @input_fingerprint = hash[:input_fingerprint]
  @baseline_run_id = hash[:baseline_run_id]
end

Instance Attribute Details

#baseline_run_idObject

Returns the value of attribute baseline_run_id.



16
17
18
# File 'lib/retab/workflow_experiments/artifact_freshness.rb', line 16

def baseline_run_id
  @baseline_run_id
end

#input_fingerprintObject

Returns the value of attribute input_fingerprint.



16
17
18
# File 'lib/retab/workflow_experiments/artifact_freshness.rb', line 16

def input_fingerprint
  @input_fingerprint
end

#reasonsObject

Returns the value of attribute reasons.



16
17
18
# File 'lib/retab/workflow_experiments/artifact_freshness.rb', line 16

def reasons
  @reasons
end

#statusObject

Returns the value of attribute status.



16
17
18
# File 'lib/retab/workflow_experiments/artifact_freshness.rb', line 16

def status
  @status
end

#validity_fingerprintObject

Returns the value of attribute validity_fingerprint.



16
17
18
# File 'lib/retab/workflow_experiments/artifact_freshness.rb', line 16

def validity_fingerprint
  @validity_fingerprint
end