Class: Rafflesia::DatasetConfigRef

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

Constant Summary collapse

HASH_ATTRS =
{
  description: :description,
  id: :id,
  name: :name,
  shard_ids: :shard_ids
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ DatasetConfigRef

Returns a new instance of DatasetConfigRef.



21
22
23
24
25
26
27
28
# File 'lib/rafflesia/foundry/dataset_config_ref.rb', line 21

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

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



15
16
17
# File 'lib/rafflesia/foundry/dataset_config_ref.rb', line 15

def description
  @description
end

#idObject

Returns the value of attribute id.



15
16
17
# File 'lib/rafflesia/foundry/dataset_config_ref.rb', line 15

def id
  @id
end

#nameObject

Returns the value of attribute name.



15
16
17
# File 'lib/rafflesia/foundry/dataset_config_ref.rb', line 15

def name
  @name
end

#shard_idsObject

Returns the value of attribute shard_ids.



15
16
17
# File 'lib/rafflesia/foundry/dataset_config_ref.rb', line 15

def shard_ids
  @shard_ids
end