Class: Rafflesia::ObjectLineageToolRun

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/objects/object_lineage_tool_run.rb

Constant Summary collapse

HASH_ATTRS =
{
  cache_hit: :cache_hit,
  created_at: :created_at,
  database_snapshots: :database_snapshots,
  input_hash: :input_hash,
  operation_id: :operation_id,
  parameters_hash: :parameters_hash,
  status: :status,
  tool_run_id: :tool_run_id,
  tool_versions: :tool_versions
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ObjectLineageToolRun

Returns a new instance of ObjectLineageToolRun.



31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/rafflesia/objects/object_lineage_tool_run.rb', line 31

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @cache_hit = hash[:cache_hit]
  @created_at = hash[:created_at]
  @database_snapshots = (hash[:database_snapshots] || []).map { |item| item ? Rafflesia::DatabaseSnapshot.new(item) : nil }
  @input_hash = hash[:input_hash]
  @operation_id = hash[:operation_id]
  @parameters_hash = hash[:parameters_hash]
  @status = hash[:status]
  @tool_run_id = hash[:tool_run_id]
  @tool_versions = (hash[:tool_versions] || []).map { |item| item ? Rafflesia::ToolVersion.new(item) : nil }
end

Instance Attribute Details

#cache_hitObject

Returns the value of attribute cache_hit.



20
21
22
# File 'lib/rafflesia/objects/object_lineage_tool_run.rb', line 20

def cache_hit
  @cache_hit
end

#created_atObject

Returns the value of attribute created_at.



20
21
22
# File 'lib/rafflesia/objects/object_lineage_tool_run.rb', line 20

def created_at
  @created_at
end

#database_snapshotsObject

Returns the value of attribute database_snapshots.



20
21
22
# File 'lib/rafflesia/objects/object_lineage_tool_run.rb', line 20

def database_snapshots
  @database_snapshots
end

#input_hashObject

Returns the value of attribute input_hash.



20
21
22
# File 'lib/rafflesia/objects/object_lineage_tool_run.rb', line 20

def input_hash
  @input_hash
end

#operation_idObject

Returns the value of attribute operation_id.



20
21
22
# File 'lib/rafflesia/objects/object_lineage_tool_run.rb', line 20

def operation_id
  @operation_id
end

#parameters_hashObject

Returns the value of attribute parameters_hash.



20
21
22
# File 'lib/rafflesia/objects/object_lineage_tool_run.rb', line 20

def parameters_hash
  @parameters_hash
end

#statusObject

Returns the value of attribute status.



20
21
22
# File 'lib/rafflesia/objects/object_lineage_tool_run.rb', line 20

def status
  @status
end

#tool_run_idObject

Returns the value of attribute tool_run_id.



20
21
22
# File 'lib/rafflesia/objects/object_lineage_tool_run.rb', line 20

def tool_run_id
  @tool_run_id
end

#tool_versionsObject

Returns the value of attribute tool_versions.



20
21
22
# File 'lib/rafflesia/objects/object_lineage_tool_run.rb', line 20

def tool_versions
  @tool_versions
end