Class: Rafflesia::DatasetShardRef

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/foundry/dataset_shard_ref.rb

Constant Summary collapse

HASH_ATTRS =
{
  byte_count: :byte_count,
  config_id: :config_id,
  format: :format,
  id: :id,
  object_id: :object_id,
  partitions: :partitions,
  relation: :relation,
  row_count: :row_count,
  sha256: :sha_256,
  split_id: :split_id
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ DatasetShardRef

Returns a new instance of DatasetShardRef.



33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/rafflesia/foundry/dataset_shard_ref.rb', line 33

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @byte_count = hash[:byte_count]
  @config_id = hash[:config_id]
  @format = hash[:format]
  @id = hash[:id]
  @object_id = hash[:object_id]
  @partitions = hash[:partitions] || {}
  @relation = hash[:relation]
  @row_count = hash[:row_count]
  @sha_256 = hash[:sha256]
  @split_id = hash[:split_id]
end

Instance Attribute Details

#byte_countObject

Returns the value of attribute byte_count.



21
22
23
# File 'lib/rafflesia/foundry/dataset_shard_ref.rb', line 21

def byte_count
  @byte_count
end

#config_idObject

Returns the value of attribute config_id.



21
22
23
# File 'lib/rafflesia/foundry/dataset_shard_ref.rb', line 21

def config_id
  @config_id
end

#formatObject

Returns the value of attribute format.



21
22
23
# File 'lib/rafflesia/foundry/dataset_shard_ref.rb', line 21

def format
  @format
end

#idObject

Returns the value of attribute id.



21
22
23
# File 'lib/rafflesia/foundry/dataset_shard_ref.rb', line 21

def id
  @id
end

#object_idObject

Returns the value of attribute object_id.



21
22
23
# File 'lib/rafflesia/foundry/dataset_shard_ref.rb', line 21

def object_id
  @object_id
end

#partitionsObject

Returns the value of attribute partitions.



21
22
23
# File 'lib/rafflesia/foundry/dataset_shard_ref.rb', line 21

def partitions
  @partitions
end

#relationObject

Returns the value of attribute relation.



21
22
23
# File 'lib/rafflesia/foundry/dataset_shard_ref.rb', line 21

def relation
  @relation
end

#row_countObject

Returns the value of attribute row_count.



21
22
23
# File 'lib/rafflesia/foundry/dataset_shard_ref.rb', line 21

def row_count
  @row_count
end

#sha_256Object

Returns the value of attribute sha_256.



21
22
23
# File 'lib/rafflesia/foundry/dataset_shard_ref.rb', line 21

def sha_256
  @sha_256
end

#split_idObject

Returns the value of attribute split_id.



21
22
23
# File 'lib/rafflesia/foundry/dataset_shard_ref.rb', line 21

def split_id
  @split_id
end