Class: MistApi::StatsApAutoPlacement
- Defined in:
- lib/mist_api/models/stats_ap_auto_placement.rb
Overview
StatsApAutoPlacement Model.
Instance Attribute Summary collapse
-
#info ⇒ StatsApAutoPlacementInfo
Additional information about auto placements AP data.
-
#recommended_anchor ⇒ TrueClass | FalseClass
Flag to represent if AP is recommended as an anchor by auto placement service.
-
#status ⇒ String
Basic Placement Status.
-
#status_detail ⇒ String
Additional info about placement status.
-
#x ⇒ Float
X Autoplaced Position in pixels.
-
#x_m ⇒ Float
X Autoplaced Position in meters.
-
#y ⇒ Float
Y Autoplaced Position in pixels.
-
#y_m ⇒ Float
X Autoplaced Position in meters.
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(info = SKIP, recommended_anchor = SKIP, status = SKIP, status_detail = SKIP, x = SKIP, x_m = SKIP, y = SKIP, y_m = SKIP) ⇒ StatsApAutoPlacement
constructor
A new instance of StatsApAutoPlacement.
-
#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(info = SKIP, recommended_anchor = SKIP, status = SKIP, status_detail = SKIP, x = SKIP, x_m = SKIP, y = SKIP, y_m = SKIP) ⇒ StatsApAutoPlacement
Returns a new instance of StatsApAutoPlacement.
78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/mist_api/models/stats_ap_auto_placement.rb', line 78 def initialize(info = SKIP, recommended_anchor = SKIP, status = SKIP, status_detail = SKIP, x = SKIP, x_m = SKIP, y = SKIP, y_m = SKIP) @info = info unless info == SKIP @recommended_anchor = recommended_anchor unless recommended_anchor == SKIP @status = status unless status == SKIP @status_detail = status_detail unless status_detail == SKIP @x = x unless x == SKIP @x_m = x_m unless x_m == SKIP @y = y unless y == SKIP @y_m = y_m unless y_m == SKIP end |
Instance Attribute Details
#info ⇒ StatsApAutoPlacementInfo
Additional information about auto placements AP data
14 15 16 |
# File 'lib/mist_api/models/stats_ap_auto_placement.rb', line 14 def info @info end |
#recommended_anchor ⇒ TrueClass | FalseClass
Flag to represent if AP is recommended as an anchor by auto placement service
19 20 21 |
# File 'lib/mist_api/models/stats_ap_auto_placement.rb', line 19 def recommended_anchor @recommended_anchor end |
#status ⇒ String
Basic Placement Status
23 24 25 |
# File 'lib/mist_api/models/stats_ap_auto_placement.rb', line 23 def status @status end |
#status_detail ⇒ String
Additional info about placement status
27 28 29 |
# File 'lib/mist_api/models/stats_ap_auto_placement.rb', line 27 def status_detail @status_detail end |
#x ⇒ Float
X Autoplaced Position in pixels
31 32 33 |
# File 'lib/mist_api/models/stats_ap_auto_placement.rb', line 31 def x @x end |
#x_m ⇒ Float
X Autoplaced Position in meters
35 36 37 |
# File 'lib/mist_api/models/stats_ap_auto_placement.rb', line 35 def x_m @x_m end |
#y ⇒ Float
Y Autoplaced Position in pixels
39 40 41 |
# File 'lib/mist_api/models/stats_ap_auto_placement.rb', line 39 def y @y end |
#y_m ⇒ Float
X Autoplaced Position in meters
43 44 45 |
# File 'lib/mist_api/models/stats_ap_auto_placement.rb', line 43 def y_m @y_m end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/mist_api/models/stats_ap_auto_placement.rb', line 92 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. info = StatsApAutoPlacementInfo.from_hash(hash['info']) if hash['info'] recommended_anchor = hash.key?('recommended_anchor') ? hash['recommended_anchor'] : SKIP status = hash.key?('status') ? hash['status'] : SKIP status_detail = hash.key?('status_detail') ? hash['status_detail'] : SKIP x = hash.key?('x') ? hash['x'] : SKIP x_m = hash.key?('x_m') ? hash['x_m'] : SKIP y = hash.key?('y') ? hash['y'] : SKIP y_m = hash.key?('y_m') ? hash['y_m'] : SKIP # Create object from extracted values. StatsApAutoPlacement.new(info, recommended_anchor, status, status_detail, x, x_m, y, y_m) end |
.names ⇒ Object
A mapping from model property names to API property names.
46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/mist_api/models/stats_ap_auto_placement.rb', line 46 def self.names @_hash = {} if @_hash.nil? @_hash['info'] = 'info' @_hash['recommended_anchor'] = 'recommended_anchor' @_hash['status'] = 'status' @_hash['status_detail'] = 'status_detail' @_hash['x'] = 'x' @_hash['x_m'] = 'x_m' @_hash['y'] = 'y' @_hash['y_m'] = 'y_m' @_hash end |
.nullables ⇒ Object
An array for nullable fields
74 75 76 |
# File 'lib/mist_api/models/stats_ap_auto_placement.rb', line 74 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/mist_api/models/stats_ap_auto_placement.rb', line 60 def self.optionals %w[ info recommended_anchor status status_detail x x_m y y_m ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
126 127 128 129 130 131 |
# File 'lib/mist_api/models/stats_ap_auto_placement.rb', line 126 def inspect class_name = self.class.name.split('::').last "<#{class_name} info: #{@info.inspect}, recommended_anchor: #{@recommended_anchor.inspect},"\ " status: #{@status.inspect}, status_detail: #{@status_detail.inspect}, x: #{@x.inspect},"\ " x_m: #{@x_m.inspect}, y: #{@y.inspect}, y_m: #{@y_m.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
118 119 120 121 122 123 |
# File 'lib/mist_api/models/stats_ap_auto_placement.rb', line 118 def to_s class_name = self.class.name.split('::').last "<#{class_name} info: #{@info}, recommended_anchor: #{@recommended_anchor}, status:"\ " #{@status}, status_detail: #{@status_detail}, x: #{@x}, x_m: #{@x_m}, y: #{@y}, y_m:"\ " #{@y_m}>" end |