Class: Rafflesia::DatasetSplitRef

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

Constant Summary collapse

HASH_ATTRS =
{
  config_id: :config_id,
  id: :id,
  name: :name,
  partition: :partition,
  record_count: :record_count,
  shard_ids: :shard_ids
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ DatasetSplitRef

Returns a new instance of DatasetSplitRef.



25
26
27
28
29
30
31
32
33
34
# File 'lib/rafflesia/foundry/dataset_split_ref.rb', line 25

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @config_id = hash[:config_id]
  @id = hash[:id]
  @name = hash[:name]
  @partition = hash[:partition]
  @record_count = hash[:record_count]
  @shard_ids = (hash[:shard_ids] || [])
end

Instance Attribute Details

#config_idObject

Returns the value of attribute config_id.



17
18
19
# File 'lib/rafflesia/foundry/dataset_split_ref.rb', line 17

def config_id
  @config_id
end

#idObject

Returns the value of attribute id.



17
18
19
# File 'lib/rafflesia/foundry/dataset_split_ref.rb', line 17

def id
  @id
end

#nameObject

Returns the value of attribute name.



17
18
19
# File 'lib/rafflesia/foundry/dataset_split_ref.rb', line 17

def name
  @name
end

#partitionObject

Returns the value of attribute partition.



17
18
19
# File 'lib/rafflesia/foundry/dataset_split_ref.rb', line 17

def partition
  @partition
end

#record_countObject

Returns the value of attribute record_count.



17
18
19
# File 'lib/rafflesia/foundry/dataset_split_ref.rb', line 17

def record_count
  @record_count
end

#shard_idsObject

Returns the value of attribute shard_ids.



17
18
19
# File 'lib/rafflesia/foundry/dataset_split_ref.rb', line 17

def shard_ids
  @shard_ids
end