Class: Rafflesia::HomologySearch

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/homology_searches/homology_search.rb

Constant Summary collapse

HASH_ATTRS =
{
  cost: :cost,
  coverage: :coverage,
  created_at: :created_at,
  database_id: :database_id,
  database_release_id: :database_release_id,
  expires_at: :expires_at,
  id: :id,
  is_background: :is_background,
  livemode: :livemode,
  metadata: :metadata,
  mode: :mode,
  object: :object,
  provenance: :provenance,
  query: :query,
  query_context: :query_context,
  requested_database_release_alias: :requested_database_release_alias,
  resolved_parameters: :resolved_parameters,
  results: :results,
  results_sha256: :results_sha_256,
  status: :status,
  warnings: :warnings
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ HomologySearch

Returns a new instance of HomologySearch.



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/rafflesia/homology_searches/homology_search.rb', line 55

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @cost = hash[:cost]
  @coverage = hash[:coverage]
  @created_at = hash[:created_at]
  @database_id = hash[:database_id]
  @database_release_id = hash[:database_release_id]
  @expires_at = hash[:expires_at]
  @id = hash[:id]
  @is_background = hash[:is_background]
  @livemode = hash[:livemode]
  @metadata = hash[:metadata] || {}
  @mode = hash[:mode]
  @object = hash[:object]
  @provenance = hash[:provenance]
  @query = hash[:query]
  @query_context = hash[:query_context]
  @requested_database_release_alias = hash[:requested_database_release_alias]
  @resolved_parameters = hash[:resolved_parameters]
  @results = hash[:results]
  @results_sha_256 = hash[:results_sha256]
  @status = hash[:status]
  @warnings = (hash[:warnings] || []).map { |item| item ? Rafflesia::SearchWarning.new(item) : nil }
end

Instance Attribute Details

#costObject

Returns the value of attribute cost.



32
33
34
# File 'lib/rafflesia/homology_searches/homology_search.rb', line 32

def cost
  @cost
end

#coverageObject

Returns the value of attribute coverage.



32
33
34
# File 'lib/rafflesia/homology_searches/homology_search.rb', line 32

def coverage
  @coverage
end

#created_atObject

Returns the value of attribute created_at.



32
33
34
# File 'lib/rafflesia/homology_searches/homology_search.rb', line 32

def created_at
  @created_at
end

#database_idObject

Returns the value of attribute database_id.



32
33
34
# File 'lib/rafflesia/homology_searches/homology_search.rb', line 32

def database_id
  @database_id
end

#database_release_idObject

Returns the value of attribute database_release_id.



32
33
34
# File 'lib/rafflesia/homology_searches/homology_search.rb', line 32

def database_release_id
  @database_release_id
end

#expires_atObject

Returns the value of attribute expires_at.



32
33
34
# File 'lib/rafflesia/homology_searches/homology_search.rb', line 32

def expires_at
  @expires_at
end

#idObject

Returns the value of attribute id.



32
33
34
# File 'lib/rafflesia/homology_searches/homology_search.rb', line 32

def id
  @id
end

#is_backgroundObject

Returns the value of attribute is_background.



32
33
34
# File 'lib/rafflesia/homology_searches/homology_search.rb', line 32

def is_background
  @is_background
end

#livemodeObject

Returns the value of attribute livemode.



32
33
34
# File 'lib/rafflesia/homology_searches/homology_search.rb', line 32

def livemode
  @livemode
end

#metadataObject

Returns the value of attribute metadata.



32
33
34
# File 'lib/rafflesia/homology_searches/homology_search.rb', line 32

def 
  @metadata
end

#modeObject

Returns the value of attribute mode.



32
33
34
# File 'lib/rafflesia/homology_searches/homology_search.rb', line 32

def mode
  @mode
end

#objectObject

Returns the value of attribute object.



32
33
34
# File 'lib/rafflesia/homology_searches/homology_search.rb', line 32

def object
  @object
end

#provenanceObject

Returns the value of attribute provenance.



32
33
34
# File 'lib/rafflesia/homology_searches/homology_search.rb', line 32

def provenance
  @provenance
end

#queryObject

Returns the value of attribute query.



32
33
34
# File 'lib/rafflesia/homology_searches/homology_search.rb', line 32

def query
  @query
end

#query_contextObject

Returns the value of attribute query_context.



32
33
34
# File 'lib/rafflesia/homology_searches/homology_search.rb', line 32

def query_context
  @query_context
end

#requested_database_release_aliasObject

Returns the value of attribute requested_database_release_alias.



32
33
34
# File 'lib/rafflesia/homology_searches/homology_search.rb', line 32

def requested_database_release_alias
  @requested_database_release_alias
end

#resolved_parametersObject

Returns the value of attribute resolved_parameters.



32
33
34
# File 'lib/rafflesia/homology_searches/homology_search.rb', line 32

def resolved_parameters
  @resolved_parameters
end

#resultsObject

Returns the value of attribute results.



32
33
34
# File 'lib/rafflesia/homology_searches/homology_search.rb', line 32

def results
  @results
end

#results_sha_256Object

Returns the value of attribute results_sha_256.



32
33
34
# File 'lib/rafflesia/homology_searches/homology_search.rb', line 32

def results_sha_256
  @results_sha_256
end

#statusObject

Returns the value of attribute status.



32
33
34
# File 'lib/rafflesia/homology_searches/homology_search.rb', line 32

def status
  @status
end

#warningsObject

Returns the value of attribute warnings.



32
33
34
# File 'lib/rafflesia/homology_searches/homology_search.rb', line 32

def warnings
  @warnings
end