Class: Rafflesia::DatasetSourceSnapshotImportData

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

Constant Summary collapse

HASH_ATTRS =
{
  batch_rows: :batch_rows,
  checkpoint_path: :checkpoint_path,
  completed_batch_count: :completed_batch_count,
  database: :database,
  duplicate_primary_id_count: :duplicate_primary_id_count,
  format: :format,
  import_mode: :import_mode,
  is_resumed: :is_resumed,
  parser: :parser,
  peak_buffered_records: :peak_buffered_records,
  record_count: :record_count,
  ref: :ref,
  relation: :relation,
  release: :release,
  sequence_catalog_id: :sequence_catalog_id,
  sequence_catalog_manifest_object: :sequence_catalog_manifest_object,
  source: :source,
  source_object: :source_object,
  source_sha256: :source_sha_256,
  source_size_bytes: :source_size_bytes,
  version: :version
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ DatasetSourceSnapshotImportData

Returns a new instance of DatasetSourceSnapshotImportData.



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/rafflesia/datasets/dataset_source_snapshot_import_data.rb', line 55

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @batch_rows = hash[:batch_rows]
  @checkpoint_path = hash[:checkpoint_path]
  @completed_batch_count = hash[:completed_batch_count]
  @database = hash[:database]
  @duplicate_primary_id_count = hash[:duplicate_primary_id_count]
  @format = hash[:format]
  @import_mode = hash[:import_mode]
  @is_resumed = hash[:is_resumed]
  @parser = hash[:parser]
  @peak_buffered_records = hash[:peak_buffered_records]
  @record_count = hash[:record_count]
  @ref = hash[:ref]
  @relation = hash[:relation] ? Rafflesia::RelationArtifactData.new(hash[:relation]) : nil
  @release = hash[:release]
  @sequence_catalog_id = hash[:sequence_catalog_id]
  @sequence_catalog_manifest_object = hash[:sequence_catalog_manifest_object] ? Rafflesia::ObjectRef.new(hash[:sequence_catalog_manifest_object]) : nil
  @source = hash[:source]
  @source_object = hash[:source_object] ? Rafflesia::ObjectRef.new(hash[:source_object]) : nil
  @source_sha_256 = hash[:source_sha256]
  @source_size_bytes = hash[:source_size_bytes]
  @version = hash[:version]
end

Instance Attribute Details

#batch_rowsObject

Returns the value of attribute batch_rows.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_import_data.rb', line 32

def batch_rows
  @batch_rows
end

#checkpoint_pathObject

Returns the value of attribute checkpoint_path.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_import_data.rb', line 32

def checkpoint_path
  @checkpoint_path
end

#completed_batch_countObject

Returns the value of attribute completed_batch_count.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_import_data.rb', line 32

def completed_batch_count
  @completed_batch_count
end

#databaseObject

Returns the value of attribute database.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_import_data.rb', line 32

def database
  @database
end

#duplicate_primary_id_countObject

Returns the value of attribute duplicate_primary_id_count.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_import_data.rb', line 32

def duplicate_primary_id_count
  @duplicate_primary_id_count
end

#formatObject

Returns the value of attribute format.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_import_data.rb', line 32

def format
  @format
end

#import_modeObject

Returns the value of attribute import_mode.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_import_data.rb', line 32

def import_mode
  @import_mode
end

#is_resumedObject

Returns the value of attribute is_resumed.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_import_data.rb', line 32

def is_resumed
  @is_resumed
end

#parserObject

Returns the value of attribute parser.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_import_data.rb', line 32

def parser
  @parser
end

#peak_buffered_recordsObject

Returns the value of attribute peak_buffered_records.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_import_data.rb', line 32

def peak_buffered_records
  @peak_buffered_records
end

#record_countObject

Returns the value of attribute record_count.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_import_data.rb', line 32

def record_count
  @record_count
end

#refObject

Returns the value of attribute ref.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_import_data.rb', line 32

def ref
  @ref
end

#relationObject

Returns the value of attribute relation.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_import_data.rb', line 32

def relation
  @relation
end

#releaseObject

Returns the value of attribute release.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_import_data.rb', line 32

def release
  @release
end

#sequence_catalog_idObject

Returns the value of attribute sequence_catalog_id.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_import_data.rb', line 32

def sequence_catalog_id
  @sequence_catalog_id
end

#sequence_catalog_manifest_objectObject

Returns the value of attribute sequence_catalog_manifest_object.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_import_data.rb', line 32

def sequence_catalog_manifest_object
  @sequence_catalog_manifest_object
end

#sourceObject

Returns the value of attribute source.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_import_data.rb', line 32

def source
  @source
end

#source_objectObject

Returns the value of attribute source_object.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_import_data.rb', line 32

def source_object
  @source_object
end

#source_sha_256Object

Returns the value of attribute source_sha_256.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_import_data.rb', line 32

def source_sha_256
  @source_sha_256
end

#source_size_bytesObject

Returns the value of attribute source_size_bytes.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_import_data.rb', line 32

def source_size_bytes
  @source_size_bytes
end

#versionObject

Returns the value of attribute version.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_import_data.rb', line 32

def version
  @version
end