Class: MistApi::ResponseLocationCoverage
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::ResponseLocationCoverage
- Defined in:
- lib/mist_api/models/response_location_coverage.rb
Overview
ResponseLocationCoverage Model.
Instance Attribute Summary collapse
-
#beams_means ⇒ Array[Float]
List of [x, y, mean]s, x/y are in meters (UI would need to use map.ppm to calculate the pixel location from top-left).
-
#gridsize ⇒ Float
Size of grid, in meter.
-
#mend ⇒ Integer
List of [x, y, mean]s, x/y are in meters (UI would need to use map.ppm to calculate the pixel location from top-left).
-
#result_def ⇒ Array[String]
List of names annotating the fields in results.
-
#results ⇒ Array[Float]
List of results, see result_def.
-
#start ⇒ Integer
List of results, see result_def.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(beams_means = nil, mend = nil, gridsize = nil, result_def = nil, results = nil, start = nil) ⇒ ResponseLocationCoverage
constructor
A new instance of ResponseLocationCoverage.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(beams_means = nil, mend = nil, gridsize = nil, result_def = nil, results = nil, start = nil) ⇒ ResponseLocationCoverage
Returns a new instance of ResponseLocationCoverage.
60 61 62 63 64 65 66 67 68 |
# File 'lib/mist_api/models/response_location_coverage.rb', line 60 def initialize(beams_means = nil, mend = nil, gridsize = nil, result_def = nil, results = nil, start = nil) @beams_means = beams_means @mend = mend @gridsize = gridsize @result_def = result_def @results = results @start = start end |
Instance Attribute Details
#beams_means ⇒ Array[Float]
List of [x, y, mean]s, x/y are in meters (UI would need to use map.ppm to calculate the pixel location from top-left).
15 16 17 |
# File 'lib/mist_api/models/response_location_coverage.rb', line 15 def beams_means @beams_means end |
#gridsize ⇒ Float
Size of grid, in meter
24 25 26 |
# File 'lib/mist_api/models/response_location_coverage.rb', line 24 def gridsize @gridsize end |
#mend ⇒ Integer
List of [x, y, mean]s, x/y are in meters (UI would need to use map.ppm to calculate the pixel location from top-left).
20 21 22 |
# File 'lib/mist_api/models/response_location_coverage.rb', line 20 def mend @mend end |
#result_def ⇒ Array[String]
List of names annotating the fields in results
28 29 30 |
# File 'lib/mist_api/models/response_location_coverage.rb', line 28 def result_def @result_def end |
#results ⇒ Array[Float]
List of results, see result_def.
32 33 34 |
# File 'lib/mist_api/models/response_location_coverage.rb', line 32 def results @results end |
#start ⇒ Integer
List of results, see result_def.
36 37 38 |
# File 'lib/mist_api/models/response_location_coverage.rb', line 36 def start @start end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/mist_api/models/response_location_coverage.rb', line 71 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. beams_means = hash.key?('beams_means') ? hash['beams_means'] : nil mend = hash.key?('end') ? hash['end'] : nil gridsize = hash.key?('gridsize') ? hash['gridsize'] : nil result_def = hash.key?('result_def') ? hash['result_def'] : nil results = hash.key?('results') ? hash['results'] : nil start = hash.key?('start') ? hash['start'] : nil # Create object from extracted values. ResponseLocationCoverage.new(beams_means, mend, gridsize, result_def, results, start) end |
.names ⇒ Object
A mapping from model property names to API property names.
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/mist_api/models/response_location_coverage.rb', line 39 def self.names @_hash = {} if @_hash.nil? @_hash['beams_means'] = 'beams_means' @_hash['mend'] = 'end' @_hash['gridsize'] = 'gridsize' @_hash['result_def'] = 'result_def' @_hash['results'] = 'results' @_hash['start'] = 'start' @_hash end |
.nullables ⇒ Object
An array for nullable fields
56 57 58 |
# File 'lib/mist_api/models/response_location_coverage.rb', line 56 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
51 52 53 |
# File 'lib/mist_api/models/response_location_coverage.rb', line 51 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
99 100 101 102 103 104 |
# File 'lib/mist_api/models/response_location_coverage.rb', line 99 def inspect class_name = self.class.name.split('::').last "<#{class_name} beams_means: #{@beams_means.inspect}, mend: #{@mend.inspect}, gridsize:"\ " #{@gridsize.inspect}, result_def: #{@result_def.inspect}, results: #{@results.inspect},"\ " start: #{@start.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
92 93 94 95 96 |
# File 'lib/mist_api/models/response_location_coverage.rb', line 92 def to_s class_name = self.class.name.split('::').last "<#{class_name} beams_means: #{@beams_means}, mend: #{@mend}, gridsize: #{@gridsize},"\ " result_def: #{@result_def}, results: #{@results}, start: #{@start}>" end |