Class: MistApi::AssetOfInterest
- Defined in:
- lib/mist_api/models/asset_of_interest.rb
Overview
AssetOfInterest Model.
Instance Attribute Summary collapse
-
#ap_mac ⇒ String
TODO: Write general description for this method.
-
#beam ⇒ Float
TODO: Write general description for this method.
-
#by ⇒ String
TODO: Write general description for this method.
-
#curr_site ⇒ String
TODO: Write general description for this method.
-
#device_name ⇒ String
TODO: Write general description for this method.
-
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization.
-
#last_seen ⇒ Float
Last seen timestamp.
-
#mac ⇒ String
Last seen timestamp.
-
#manufacture ⇒ String
Last seen timestamp.
-
#map_id ⇒ String
Last seen timestamp.
-
#name ⇒ String
Last seen timestamp.
-
#rssi ⇒ Float
Last seen timestamp.
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(ap_mac = SKIP, beam = SKIP, by = SKIP, curr_site = SKIP, device_name = SKIP, id = SKIP, last_seen = SKIP, mac = SKIP, manufacture = SKIP, map_id = SKIP, name = SKIP, rssi = SKIP) ⇒ AssetOfInterest
constructor
A new instance of AssetOfInterest.
-
#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(ap_mac = SKIP, beam = SKIP, by = SKIP, curr_site = SKIP, device_name = SKIP, id = SKIP, last_seen = SKIP, mac = SKIP, manufacture = SKIP, map_id = SKIP, name = SKIP, rssi = SKIP) ⇒ AssetOfInterest
Returns a new instance of AssetOfInterest.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/mist_api/models/asset_of_interest.rb', line 103 def initialize(ap_mac = SKIP, beam = SKIP, by = SKIP, curr_site = SKIP, device_name = SKIP, id = SKIP, last_seen = SKIP, mac = SKIP, manufacture = SKIP, map_id = SKIP, name = SKIP, rssi = SKIP) @ap_mac = ap_mac unless ap_mac == SKIP @beam = beam unless beam == SKIP @by = by unless by == SKIP @curr_site = curr_site unless curr_site == SKIP @device_name = device_name unless device_name == SKIP @id = id unless id == SKIP @last_seen = last_seen unless last_seen == SKIP @mac = mac unless mac == SKIP @manufacture = manufacture unless manufacture == SKIP @map_id = map_id unless map_id == SKIP @name = name unless name == SKIP @rssi = rssi unless rssi == SKIP end |
Instance Attribute Details
#ap_mac ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/asset_of_interest.rb', line 14 def ap_mac @ap_mac end |
#beam ⇒ Float
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/asset_of_interest.rb', line 18 def beam @beam end |
#by ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/asset_of_interest.rb', line 22 def by @by end |
#curr_site ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/mist_api/models/asset_of_interest.rb', line 26 def curr_site @curr_site end |
#device_name ⇒ String
TODO: Write general description for this method
30 31 32 |
# File 'lib/mist_api/models/asset_of_interest.rb', line 30 def device_name @device_name end |
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization
34 35 36 |
# File 'lib/mist_api/models/asset_of_interest.rb', line 34 def id @id end |
#last_seen ⇒ Float
Last seen timestamp
38 39 40 |
# File 'lib/mist_api/models/asset_of_interest.rb', line 38 def last_seen @last_seen end |
#mac ⇒ String
Last seen timestamp
42 43 44 |
# File 'lib/mist_api/models/asset_of_interest.rb', line 42 def mac @mac end |
#manufacture ⇒ String
Last seen timestamp
46 47 48 |
# File 'lib/mist_api/models/asset_of_interest.rb', line 46 def manufacture @manufacture end |
#map_id ⇒ String
Last seen timestamp
50 51 52 |
# File 'lib/mist_api/models/asset_of_interest.rb', line 50 def map_id @map_id end |
#name ⇒ String
Last seen timestamp
54 55 56 |
# File 'lib/mist_api/models/asset_of_interest.rb', line 54 def name @name end |
#rssi ⇒ Float
Last seen timestamp
58 59 60 |
# File 'lib/mist_api/models/asset_of_interest.rb', line 58 def rssi @rssi end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/mist_api/models/asset_of_interest.rb', line 121 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. ap_mac = hash.key?('ap_mac') ? hash['ap_mac'] : SKIP beam = hash.key?('beam') ? hash['beam'] : SKIP by = hash.key?('by') ? hash['by'] : SKIP curr_site = hash.key?('curr_site') ? hash['curr_site'] : SKIP device_name = hash.key?('device_name') ? hash['device_name'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP last_seen = hash.key?('last_seen') ? hash['last_seen'] : SKIP mac = hash.key?('mac') ? hash['mac'] : SKIP manufacture = hash.key?('manufacture') ? hash['manufacture'] : SKIP map_id = hash.key?('map_id') ? hash['map_id'] : SKIP name = hash.key?('name') ? hash['name'] : SKIP rssi = hash.key?('rssi') ? hash['rssi'] : SKIP # Create object from extracted values. AssetOfInterest.new(ap_mac, beam, by, curr_site, device_name, id, last_seen, mac, manufacture, map_id, name, rssi) end |
.names ⇒ Object
A mapping from model property names to API property names.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/mist_api/models/asset_of_interest.rb', line 61 def self.names @_hash = {} if @_hash.nil? @_hash['ap_mac'] = 'ap_mac' @_hash['beam'] = 'beam' @_hash['by'] = 'by' @_hash['curr_site'] = 'curr_site' @_hash['device_name'] = 'device_name' @_hash['id'] = 'id' @_hash['last_seen'] = 'last_seen' @_hash['mac'] = 'mac' @_hash['manufacture'] = 'manufacture' @_hash['map_id'] = 'map_id' @_hash['name'] = 'name' @_hash['rssi'] = 'rssi' @_hash end |
.nullables ⇒ Object
An array for nullable fields
97 98 99 100 101 |
# File 'lib/mist_api/models/asset_of_interest.rb', line 97 def self.nullables %w[ last_seen ] end |
.optionals ⇒ Object
An array for optional fields
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/mist_api/models/asset_of_interest.rb', line 79 def self.optionals %w[ ap_mac beam by curr_site device_name id last_seen mac manufacture map_id name rssi ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
162 163 164 165 166 167 168 169 |
# File 'lib/mist_api/models/asset_of_interest.rb', line 162 def inspect class_name = self.class.name.split('::').last "<#{class_name} ap_mac: #{@ap_mac.inspect}, beam: #{@beam.inspect}, by: #{@by.inspect},"\ " curr_site: #{@curr_site.inspect}, device_name: #{@device_name.inspect}, id:"\ " #{@id.inspect}, last_seen: #{@last_seen.inspect}, mac: #{@mac.inspect}, manufacture:"\ " #{@manufacture.inspect}, map_id: #{@map_id.inspect}, name: #{@name.inspect}, rssi:"\ " #{@rssi.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
154 155 156 157 158 159 |
# File 'lib/mist_api/models/asset_of_interest.rb', line 154 def to_s class_name = self.class.name.split('::').last "<#{class_name} ap_mac: #{@ap_mac}, beam: #{@beam}, by: #{@by}, curr_site: #{@curr_site},"\ " device_name: #{@device_name}, id: #{@id}, last_seen: #{@last_seen}, mac: #{@mac},"\ " manufacture: #{@manufacture}, map_id: #{@map_id}, name: #{@name}, rssi: #{@rssi}>" end |