Class: Rafflesia::ObjectLineageData

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

Constant Summary collapse

HASH_ATTRS =
{
  is_catalog_backed: :is_catalog_backed,
  metadata: :metadata,
  object: :object,
  object_id: :object_id,
  producing_run_count: :producing_run_count,
  producing_runs: :producing_runs,
  record_refs: :record_refs
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ObjectLineageData

Returns a new instance of ObjectLineageData.



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/rafflesia/objects/object_lineage_data.rb', line 27

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @is_catalog_backed = hash[:is_catalog_backed]
  @metadata = hash[:metadata] ? Rafflesia::ObjectMetadataData.new(hash[:metadata]) : nil
  @object = hash[:object] ? Rafflesia::ObjectRef.new(hash[:object]) : nil
  @object_id = hash[:object_id]
  @producing_run_count = hash[:producing_run_count]
  @producing_runs = (hash[:producing_runs] || []).map { |item| item ? Rafflesia::ObjectLineageToolRun.new(item) : nil }
  @record_refs = (hash[:record_refs] || []).map { |item| item ? Rafflesia::ObjectRecordRef.new(item) : nil }
end

Instance Attribute Details

#is_catalog_backedObject

Returns the value of attribute is_catalog_backed.



18
19
20
# File 'lib/rafflesia/objects/object_lineage_data.rb', line 18

def is_catalog_backed
  @is_catalog_backed
end

#metadataObject

Returns the value of attribute metadata.



18
19
20
# File 'lib/rafflesia/objects/object_lineage_data.rb', line 18

def 
  @metadata
end

#objectObject

Returns the value of attribute object.



18
19
20
# File 'lib/rafflesia/objects/object_lineage_data.rb', line 18

def object
  @object
end

#object_idObject

Returns the value of attribute object_id.



18
19
20
# File 'lib/rafflesia/objects/object_lineage_data.rb', line 18

def object_id
  @object_id
end

#producing_run_countObject

Returns the value of attribute producing_run_count.



18
19
20
# File 'lib/rafflesia/objects/object_lineage_data.rb', line 18

def producing_run_count
  @producing_run_count
end

#producing_runsObject

Returns the value of attribute producing_runs.



18
19
20
# File 'lib/rafflesia/objects/object_lineage_data.rb', line 18

def producing_runs
  @producing_runs
end

#record_refsObject

Returns the value of attribute record_refs.



18
19
20
# File 'lib/rafflesia/objects/object_lineage_data.rb', line 18

def record_refs
  @record_refs
end