Class: Rafflesia::MapModelFitCandidateSearchData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/maps/map_model_fit_candidate_search_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  candidate_count: :candidate_count,
  candidates: :candidates,
  density_geometry: :density_geometry,
  map_id: :map_id,
  map_object: :map_object,
  method: :method,
  ordering: :ordering,
  restart_count: :restart_count,
  search_telemetry: :search_telemetry,
  seed: :seed,
  structure_id: :structure_id,
  structure_object: :structure_object,
  uses_hidden_references: :uses_hidden_references
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ MapModelFitCandidateSearchData

Returns a new instance of MapModelFitCandidateSearchData.



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/rafflesia/maps/map_model_fit_candidate_search_data.rb', line 39

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @candidate_count = hash[:candidate_count]
  @candidates = (hash[:candidates] || []).map { |item| item ? Rafflesia::MapModelFitCandidate.new(item) : nil }
  @density_geometry = hash[:density_geometry] ? Rafflesia::MapModelFitDensityGeometry.new(hash[:density_geometry]) : nil
  @map_id = hash[:map_id]
  @map_object = hash[:map_object] ? Rafflesia::ObjectRef.new(hash[:map_object]) : nil
  @method = hash[:method]
  @ordering = (hash[:ordering] || [])
  @restart_count = hash[:restart_count]
  @search_telemetry = hash[:search_telemetry] ? Rafflesia::MapModelFitSearchTelemetry.new(hash[:search_telemetry]) : nil
  @seed = hash[:seed]
  @structure_id = hash[:structure_id]
  @structure_object = hash[:structure_object] ? Rafflesia::ObjectRef.new(hash[:structure_object]) : nil
  @uses_hidden_references = hash[:uses_hidden_references]
end

Instance Attribute Details

#candidate_countObject

Returns the value of attribute candidate_count.



24
25
26
# File 'lib/rafflesia/maps/map_model_fit_candidate_search_data.rb', line 24

def candidate_count
  @candidate_count
end

#candidatesObject

Returns the value of attribute candidates.



24
25
26
# File 'lib/rafflesia/maps/map_model_fit_candidate_search_data.rb', line 24

def candidates
  @candidates
end

#density_geometryObject

Returns the value of attribute density_geometry.



24
25
26
# File 'lib/rafflesia/maps/map_model_fit_candidate_search_data.rb', line 24

def density_geometry
  @density_geometry
end

#map_idObject

Returns the value of attribute map_id.



24
25
26
# File 'lib/rafflesia/maps/map_model_fit_candidate_search_data.rb', line 24

def map_id
  @map_id
end

#map_objectObject

Returns the value of attribute map_object.



24
25
26
# File 'lib/rafflesia/maps/map_model_fit_candidate_search_data.rb', line 24

def map_object
  @map_object
end

#methodObject

Returns the value of attribute method.



24
25
26
# File 'lib/rafflesia/maps/map_model_fit_candidate_search_data.rb', line 24

def method
  @method
end

#orderingObject

Returns the value of attribute ordering.



24
25
26
# File 'lib/rafflesia/maps/map_model_fit_candidate_search_data.rb', line 24

def ordering
  @ordering
end

#restart_countObject

Returns the value of attribute restart_count.



24
25
26
# File 'lib/rafflesia/maps/map_model_fit_candidate_search_data.rb', line 24

def restart_count
  @restart_count
end

#search_telemetryObject

Returns the value of attribute search_telemetry.



24
25
26
# File 'lib/rafflesia/maps/map_model_fit_candidate_search_data.rb', line 24

def search_telemetry
  @search_telemetry
end

#seedObject

Returns the value of attribute seed.



24
25
26
# File 'lib/rafflesia/maps/map_model_fit_candidate_search_data.rb', line 24

def seed
  @seed
end

#structure_idObject

Returns the value of attribute structure_id.



24
25
26
# File 'lib/rafflesia/maps/map_model_fit_candidate_search_data.rb', line 24

def structure_id
  @structure_id
end

#structure_objectObject

Returns the value of attribute structure_object.



24
25
26
# File 'lib/rafflesia/maps/map_model_fit_candidate_search_data.rb', line 24

def structure_object
  @structure_object
end

#uses_hidden_referencesObject

Returns the value of attribute uses_hidden_references.



24
25
26
# File 'lib/rafflesia/maps/map_model_fit_candidate_search_data.rb', line 24

def uses_hidden_references
  @uses_hidden_references
end