Class: Rafflesia::DatasetBuildData

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

Constant Summary collapse

HASH_ATTRS =
{
  catalog_warnings: :catalog_warnings,
  compaction: :compaction,
  dataset_name: :dataset_name,
  dataset_version: :dataset_version,
  dry_run: :dry_run,
  failure_count: :failure_count,
  failure_summary: :failure_summary,
  from_manifest_path: :from_manifest_path,
  input_dir: :input_dir,
  is_failure_limit_reached: :is_failure_limit_reached,
  is_manifest_omitted: :is_manifest_omitted,
  manifest: :manifest,
  manifest_path: :manifest_path,
  object: :object,
  planned_structure_count: :planned_structure_count,
  planned_table_artifact_count: :planned_table_artifact_count,
  profile: :profile,
  profile_summary: :profile_summary,
  resume: :resume,
  row_count: :row_count,
  skipped_structure_count: :skipped_structure_count,
  structure_count: :structure_count,
  table_artifact_count: :table_artifact_count,
  table_summaries: :table_summaries
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ DatasetBuildData

Returns a new instance of DatasetBuildData.



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/rafflesia/datasets/dataset_build_data.rb', line 61

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @catalog_warnings = (hash[:catalog_warnings] || []).map { |item| item ? Rafflesia::SearchWarning.new(item) : nil }
  @compaction = hash[:compaction] ? Rafflesia::DatasetCompaction.new(hash[:compaction]) : nil
  @dataset_name = hash[:dataset_name]
  @dataset_version = hash[:dataset_version]
  @dry_run = hash[:dry_run]
  @failure_count = hash[:failure_count]
  @failure_summary = hash[:failure_summary] || {}
  @from_manifest_path = hash[:from_manifest_path]
  @input_dir = hash[:input_dir]
  @is_failure_limit_reached = hash[:is_failure_limit_reached]
  @is_manifest_omitted = hash[:is_manifest_omitted]
  @manifest = hash[:manifest] ? Rafflesia::DatasetManifest.new(hash[:manifest]) : nil
  @manifest_path = hash[:manifest_path]
  @object = hash[:object] ? Rafflesia::ObjectRef.new(hash[:object]) : nil
  @planned_structure_count = hash[:planned_structure_count]
  @planned_table_artifact_count = hash[:planned_table_artifact_count]
  @profile = hash[:profile] ? Rafflesia::DatasetBuildProfile.new(hash[:profile]) : nil
  @profile_summary = hash[:profile_summary] ? Rafflesia::DatasetBuildProfileSummary.new(hash[:profile_summary]) : nil
  @resume = hash[:resume]
  @row_count = hash[:row_count]
  @skipped_structure_count = hash[:skipped_structure_count]
  @structure_count = hash[:structure_count]
  @table_artifact_count = hash[:table_artifact_count]
  @table_summaries = (hash[:table_summaries] || []).map { |item| item ? Rafflesia::DatasetBuildTableSummary.new(item) : nil }
end

Instance Attribute Details

#catalog_warningsObject

Returns the value of attribute catalog_warnings.



35
36
37
# File 'lib/rafflesia/datasets/dataset_build_data.rb', line 35

def catalog_warnings
  @catalog_warnings
end

#compactionObject

Returns the value of attribute compaction.



35
36
37
# File 'lib/rafflesia/datasets/dataset_build_data.rb', line 35

def compaction
  @compaction
end

#dataset_nameObject

Returns the value of attribute dataset_name.



35
36
37
# File 'lib/rafflesia/datasets/dataset_build_data.rb', line 35

def dataset_name
  @dataset_name
end

#dataset_versionObject

Returns the value of attribute dataset_version.



35
36
37
# File 'lib/rafflesia/datasets/dataset_build_data.rb', line 35

def dataset_version
  @dataset_version
end

#dry_runObject

Returns the value of attribute dry_run.



35
36
37
# File 'lib/rafflesia/datasets/dataset_build_data.rb', line 35

def dry_run
  @dry_run
end

#failure_countObject

Returns the value of attribute failure_count.



35
36
37
# File 'lib/rafflesia/datasets/dataset_build_data.rb', line 35

def failure_count
  @failure_count
end

#failure_summaryObject

Returns the value of attribute failure_summary.



35
36
37
# File 'lib/rafflesia/datasets/dataset_build_data.rb', line 35

def failure_summary
  @failure_summary
end

#from_manifest_pathObject

Returns the value of attribute from_manifest_path.



35
36
37
# File 'lib/rafflesia/datasets/dataset_build_data.rb', line 35

def from_manifest_path
  @from_manifest_path
end

#input_dirObject

Returns the value of attribute input_dir.



35
36
37
# File 'lib/rafflesia/datasets/dataset_build_data.rb', line 35

def input_dir
  @input_dir
end

#is_failure_limit_reachedObject

Returns the value of attribute is_failure_limit_reached.



35
36
37
# File 'lib/rafflesia/datasets/dataset_build_data.rb', line 35

def is_failure_limit_reached
  @is_failure_limit_reached
end

#is_manifest_omittedObject

Returns the value of attribute is_manifest_omitted.



35
36
37
# File 'lib/rafflesia/datasets/dataset_build_data.rb', line 35

def is_manifest_omitted
  @is_manifest_omitted
end

#manifestObject

Returns the value of attribute manifest.



35
36
37
# File 'lib/rafflesia/datasets/dataset_build_data.rb', line 35

def manifest
  @manifest
end

#manifest_pathObject

Returns the value of attribute manifest_path.



35
36
37
# File 'lib/rafflesia/datasets/dataset_build_data.rb', line 35

def manifest_path
  @manifest_path
end

#objectObject

Returns the value of attribute object.



35
36
37
# File 'lib/rafflesia/datasets/dataset_build_data.rb', line 35

def object
  @object
end

#planned_structure_countObject

Returns the value of attribute planned_structure_count.



35
36
37
# File 'lib/rafflesia/datasets/dataset_build_data.rb', line 35

def planned_structure_count
  @planned_structure_count
end

#planned_table_artifact_countObject

Returns the value of attribute planned_table_artifact_count.



35
36
37
# File 'lib/rafflesia/datasets/dataset_build_data.rb', line 35

def planned_table_artifact_count
  @planned_table_artifact_count
end

#profileObject

Returns the value of attribute profile.



35
36
37
# File 'lib/rafflesia/datasets/dataset_build_data.rb', line 35

def profile
  @profile
end

#profile_summaryObject

Returns the value of attribute profile_summary.



35
36
37
# File 'lib/rafflesia/datasets/dataset_build_data.rb', line 35

def profile_summary
  @profile_summary
end

#resumeObject

Returns the value of attribute resume.



35
36
37
# File 'lib/rafflesia/datasets/dataset_build_data.rb', line 35

def resume
  @resume
end

#row_countObject

Returns the value of attribute row_count.



35
36
37
# File 'lib/rafflesia/datasets/dataset_build_data.rb', line 35

def row_count
  @row_count
end

#skipped_structure_countObject

Returns the value of attribute skipped_structure_count.



35
36
37
# File 'lib/rafflesia/datasets/dataset_build_data.rb', line 35

def skipped_structure_count
  @skipped_structure_count
end

#structure_countObject

Returns the value of attribute structure_count.



35
36
37
# File 'lib/rafflesia/datasets/dataset_build_data.rb', line 35

def structure_count
  @structure_count
end

#table_artifact_countObject

Returns the value of attribute table_artifact_count.



35
36
37
# File 'lib/rafflesia/datasets/dataset_build_data.rb', line 35

def table_artifact_count
  @table_artifact_count
end

#table_summariesObject

Returns the value of attribute table_summaries.



35
36
37
# File 'lib/rafflesia/datasets/dataset_build_data.rb', line 35

def table_summaries
  @table_summaries
end