Class: MistApi::ResponseLocationCoverage

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/mist_api/models/response_location_coverage.rb

Overview

ResponseLocationCoverage Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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_meansArray[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).

Returns:

  • (Array[Float])


15
16
17
# File 'lib/mist_api/models/response_location_coverage.rb', line 15

def beams_means
  @beams_means
end

#gridsizeFloat

Size of grid, in meter

Returns:

  • (Float)


24
25
26
# File 'lib/mist_api/models/response_location_coverage.rb', line 24

def gridsize
  @gridsize
end

#mendInteger

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).

Returns:

  • (Integer)


20
21
22
# File 'lib/mist_api/models/response_location_coverage.rb', line 20

def mend
  @mend
end

#result_defArray[String]

List of names annotating the fields in results

Returns:

  • (Array[String])


28
29
30
# File 'lib/mist_api/models/response_location_coverage.rb', line 28

def result_def
  @result_def
end

#resultsArray[Float]

List of results, see result_def.

Returns:

  • (Array[Float])


32
33
34
# File 'lib/mist_api/models/response_location_coverage.rb', line 32

def results
  @results
end

#startInteger

List of results, see result_def.

Returns:

  • (Integer)


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

.namesObject

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

.nullablesObject

An array for nullable fields



56
57
58
# File 'lib/mist_api/models/response_location_coverage.rb', line 56

def self.nullables
  []
end

.optionalsObject

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

#inspectObject

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_sObject

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