Class: Rafflesia::FoundryProteinDesignData

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

Constant Summary collapse

HASH_ATTRS =
{
  data: :data,
  model_id: :model_id,
  model_release: :model_release,
  object: :object,
  provider_request_id: :provider_request_id,
  seed: :seed,
  structure_object_id: :structure_object_id,
  temperature: :temperature,
  usage: :usage
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ FoundryProteinDesignData

Returns a new instance of FoundryProteinDesignData.



31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/rafflesia/foundry/foundry_protein_design_data.rb', line 31

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @data = (hash[:data] || []).map { |item| item ? Rafflesia::FoundryProteinDesign.new(item) : nil }
  @model_id = hash[:model_id]
  @model_release = hash[:model_release]
  @object = hash[:object]
  @provider_request_id = hash[:provider_request_id]
  @seed = hash[:seed]
  @structure_object_id = hash[:structure_object_id]
  @temperature = hash[:temperature]
  @usage = hash[:usage] ? Rafflesia::FoundryProteinDesignUsage.new(hash[:usage]) : nil
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



20
21
22
# File 'lib/rafflesia/foundry/foundry_protein_design_data.rb', line 20

def data
  @data
end

#model_idObject

Returns the value of attribute model_id.



20
21
22
# File 'lib/rafflesia/foundry/foundry_protein_design_data.rb', line 20

def model_id
  @model_id
end

#model_releaseObject

Returns the value of attribute model_release.



20
21
22
# File 'lib/rafflesia/foundry/foundry_protein_design_data.rb', line 20

def model_release
  @model_release
end

#objectObject

Returns the value of attribute object.



20
21
22
# File 'lib/rafflesia/foundry/foundry_protein_design_data.rb', line 20

def object
  @object
end

#provider_request_idObject

Returns the value of attribute provider_request_id.



20
21
22
# File 'lib/rafflesia/foundry/foundry_protein_design_data.rb', line 20

def provider_request_id
  @provider_request_id
end

#seedObject

Returns the value of attribute seed.



20
21
22
# File 'lib/rafflesia/foundry/foundry_protein_design_data.rb', line 20

def seed
  @seed
end

#structure_object_idObject

Returns the value of attribute structure_object_id.



20
21
22
# File 'lib/rafflesia/foundry/foundry_protein_design_data.rb', line 20

def structure_object_id
  @structure_object_id
end

#temperatureObject

Returns the value of attribute temperature.



20
21
22
# File 'lib/rafflesia/foundry/foundry_protein_design_data.rb', line 20

def temperature
  @temperature
end

#usageObject

Returns the value of attribute usage.



20
21
22
# File 'lib/rafflesia/foundry/foundry_protein_design_data.rb', line 20

def usage
  @usage
end