Class: Rafflesia::DatasetManifestScanEntry

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/datasets/dataset_manifest_scan_entry.rb

Constant Summary collapse

HASH_ATTRS =
{
  dataset_name: :dataset_name,
  dataset_version: :dataset_version,
  failure_count: :failure_count,
  failure_free: :failure_free,
  manifest_path: :manifest_path,
  manifest_sha256: :manifest_sha_256,
  modified_at: :modified_at,
  row_count: :row_count,
  schema_hashes: :schema_hashes,
  source: :source,
  structure_count: :structure_count,
  table_artifact_count: :table_artifact_count,
  table_row_counts: :table_row_counts,
  tables: :tables
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ DatasetManifestScanEntry

Returns a new instance of DatasetManifestScanEntry.



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/rafflesia/datasets/dataset_manifest_scan_entry.rb', line 41

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @dataset_name = hash[:dataset_name]
  @dataset_version = hash[:dataset_version]
  @failure_count = hash[:failure_count]
  @failure_free = hash[:failure_free]
  @manifest_path = hash[:manifest_path]
  @manifest_sha_256 = hash[:manifest_sha256]
  @modified_at = hash[:modified_at]
  @row_count = hash[:row_count]
  @schema_hashes = (hash[:schema_hashes] || [])
  @source = hash[:source]
  @structure_count = hash[:structure_count]
  @table_artifact_count = hash[:table_artifact_count]
  @table_row_counts = hash[:table_row_counts] || {}
  @tables = (hash[:tables] || [])
end

Instance Attribute Details

#dataset_nameObject

Returns the value of attribute dataset_name.



25
26
27
# File 'lib/rafflesia/datasets/dataset_manifest_scan_entry.rb', line 25

def dataset_name
  @dataset_name
end

#dataset_versionObject

Returns the value of attribute dataset_version.



25
26
27
# File 'lib/rafflesia/datasets/dataset_manifest_scan_entry.rb', line 25

def dataset_version
  @dataset_version
end

#failure_countObject

Returns the value of attribute failure_count.



25
26
27
# File 'lib/rafflesia/datasets/dataset_manifest_scan_entry.rb', line 25

def failure_count
  @failure_count
end

#failure_freeObject

Returns the value of attribute failure_free.



25
26
27
# File 'lib/rafflesia/datasets/dataset_manifest_scan_entry.rb', line 25

def failure_free
  @failure_free
end

#manifest_pathObject

Returns the value of attribute manifest_path.



25
26
27
# File 'lib/rafflesia/datasets/dataset_manifest_scan_entry.rb', line 25

def manifest_path
  @manifest_path
end

#manifest_sha_256Object

Returns the value of attribute manifest_sha_256.



25
26
27
# File 'lib/rafflesia/datasets/dataset_manifest_scan_entry.rb', line 25

def manifest_sha_256
  @manifest_sha_256
end

#modified_atObject

Returns the value of attribute modified_at.



25
26
27
# File 'lib/rafflesia/datasets/dataset_manifest_scan_entry.rb', line 25

def modified_at
  @modified_at
end

#row_countObject

Returns the value of attribute row_count.



25
26
27
# File 'lib/rafflesia/datasets/dataset_manifest_scan_entry.rb', line 25

def row_count
  @row_count
end

#schema_hashesObject

Returns the value of attribute schema_hashes.



25
26
27
# File 'lib/rafflesia/datasets/dataset_manifest_scan_entry.rb', line 25

def schema_hashes
  @schema_hashes
end

#sourceObject

Returns the value of attribute source.



25
26
27
# File 'lib/rafflesia/datasets/dataset_manifest_scan_entry.rb', line 25

def source
  @source
end

#structure_countObject

Returns the value of attribute structure_count.



25
26
27
# File 'lib/rafflesia/datasets/dataset_manifest_scan_entry.rb', line 25

def structure_count
  @structure_count
end

#table_artifact_countObject

Returns the value of attribute table_artifact_count.



25
26
27
# File 'lib/rafflesia/datasets/dataset_manifest_scan_entry.rb', line 25

def table_artifact_count
  @table_artifact_count
end

#table_row_countsObject

Returns the value of attribute table_row_counts.



25
26
27
# File 'lib/rafflesia/datasets/dataset_manifest_scan_entry.rb', line 25

def table_row_counts
  @table_row_counts
end

#tablesObject

Returns the value of attribute tables.



25
26
27
# File 'lib/rafflesia/datasets/dataset_manifest_scan_entry.rb', line 25

def tables
  @tables
end