Class: Rafflesia::DiamondCatalogBuildData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/sequences/diamond_catalog_build_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  build_commands: :build_commands,
  catalog: :catalog,
  catalog_manifest: :catalog_manifest,
  catalog_path: :catalog_path,
  dataset_version: :dataset_version,
  dry_run: :dry_run,
  engine: :engine,
  engine_version: :engine_version,
  name: :name,
  parameters: :parameters,
  record_count: :record_count,
  requested_shards: :requested_shards,
  shard_count: :shard_count,
  shards: :shards,
  source_object: :source_object,
  source_path: :source_path,
  store_root: :store_root,
  total_size_bytes: :total_size_bytes,
  version: :version
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ DiamondCatalogBuildData

Returns a new instance of DiamondCatalogBuildData.



51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/rafflesia/sequences/diamond_catalog_build_data.rb', line 51

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @build_commands = (hash[:build_commands] || []).map { |item| (item || []) }
  @catalog = hash[:catalog]
  @catalog_manifest = hash[:catalog_manifest] || {}
  @catalog_path = hash[:catalog_path]
  @dataset_version = hash[:dataset_version]
  @dry_run = hash[:dry_run]
  @engine = hash[:engine]
  @engine_version = hash[:engine_version]
  @name = hash[:name]
  @parameters = hash[:parameters] || {}
  @record_count = hash[:record_count]
  @requested_shards = hash[:requested_shards]
  @shard_count = hash[:shard_count]
  @shards = (hash[:shards] || []).map { |item| item ? Rafflesia::DiamondCatalogShardData.new(item) : nil }
  @source_object = hash[:source_object] ? Rafflesia::ObjectRef.new(hash[:source_object]) : nil
  @source_path = hash[:source_path]
  @store_root = hash[:store_root]
  @total_size_bytes = hash[:total_size_bytes]
  @version = hash[:version]
end

Instance Attribute Details

#build_commandsObject

Returns the value of attribute build_commands.



30
31
32
# File 'lib/rafflesia/sequences/diamond_catalog_build_data.rb', line 30

def build_commands
  @build_commands
end

#catalogObject

Returns the value of attribute catalog.



30
31
32
# File 'lib/rafflesia/sequences/diamond_catalog_build_data.rb', line 30

def catalog
  @catalog
end

#catalog_manifestObject

Returns the value of attribute catalog_manifest.



30
31
32
# File 'lib/rafflesia/sequences/diamond_catalog_build_data.rb', line 30

def catalog_manifest
  @catalog_manifest
end

#catalog_pathObject

Returns the value of attribute catalog_path.



30
31
32
# File 'lib/rafflesia/sequences/diamond_catalog_build_data.rb', line 30

def catalog_path
  @catalog_path
end

#dataset_versionObject

Returns the value of attribute dataset_version.



30
31
32
# File 'lib/rafflesia/sequences/diamond_catalog_build_data.rb', line 30

def dataset_version
  @dataset_version
end

#dry_runObject

Returns the value of attribute dry_run.



30
31
32
# File 'lib/rafflesia/sequences/diamond_catalog_build_data.rb', line 30

def dry_run
  @dry_run
end

#engineObject

Returns the value of attribute engine.



30
31
32
# File 'lib/rafflesia/sequences/diamond_catalog_build_data.rb', line 30

def engine
  @engine
end

#engine_versionObject

Returns the value of attribute engine_version.



30
31
32
# File 'lib/rafflesia/sequences/diamond_catalog_build_data.rb', line 30

def engine_version
  @engine_version
end

#nameObject

Returns the value of attribute name.



30
31
32
# File 'lib/rafflesia/sequences/diamond_catalog_build_data.rb', line 30

def name
  @name
end

#parametersObject

Returns the value of attribute parameters.



30
31
32
# File 'lib/rafflesia/sequences/diamond_catalog_build_data.rb', line 30

def parameters
  @parameters
end

#record_countObject

Returns the value of attribute record_count.



30
31
32
# File 'lib/rafflesia/sequences/diamond_catalog_build_data.rb', line 30

def record_count
  @record_count
end

#requested_shardsObject

Returns the value of attribute requested_shards.



30
31
32
# File 'lib/rafflesia/sequences/diamond_catalog_build_data.rb', line 30

def requested_shards
  @requested_shards
end

#shard_countObject

Returns the value of attribute shard_count.



30
31
32
# File 'lib/rafflesia/sequences/diamond_catalog_build_data.rb', line 30

def shard_count
  @shard_count
end

#shardsObject

Returns the value of attribute shards.



30
31
32
# File 'lib/rafflesia/sequences/diamond_catalog_build_data.rb', line 30

def shards
  @shards
end

#source_objectObject

Returns the value of attribute source_object.



30
31
32
# File 'lib/rafflesia/sequences/diamond_catalog_build_data.rb', line 30

def source_object
  @source_object
end

#source_pathObject

Returns the value of attribute source_path.



30
31
32
# File 'lib/rafflesia/sequences/diamond_catalog_build_data.rb', line 30

def source_path
  @source_path
end

#store_rootObject

Returns the value of attribute store_root.



30
31
32
# File 'lib/rafflesia/sequences/diamond_catalog_build_data.rb', line 30

def store_root
  @store_root
end

#total_size_bytesObject

Returns the value of attribute total_size_bytes.



30
31
32
# File 'lib/rafflesia/sequences/diamond_catalog_build_data.rb', line 30

def total_size_bytes
  @total_size_bytes
end

#versionObject

Returns the value of attribute version.



30
31
32
# File 'lib/rafflesia/sequences/diamond_catalog_build_data.rb', line 30

def version
  @version
end