Class: MistApi::WebhookWifiUnconnRawEvent
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::WebhookWifiUnconnRawEvent
- Defined in:
- lib/mist_api/models/webhook_wifi_unconn_raw_event.rb
Overview
WebhookWifiUnconnRawEvent Model.
Instance Attribute Summary collapse
-
#ap_id ⇒ String
TODO: Write general description for this method.
-
#ap_loc ⇒ Array[Float]
optional, coordinates (if any) of reporting AP (updated once in 60s per client).
-
#client_id ⇒ String
optional, coordinates (if any) of reporting AP (updated once in 60s per client).
-
#connected_site ⇒ TrueClass | FalseClass
optional, coordinates (if any) of reporting AP (updated once in 60s per client).
-
#map_id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization.
-
#org_id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization.
-
#packets ⇒ Array[WebhookWifiUnconnRawEventPacket]
Unique ID of the object instance in the Mist Organization.
-
#site_id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(ap_id = SKIP, ap_loc = SKIP, client_id = SKIP, connected_site = SKIP, map_id = SKIP, org_id = SKIP, packets = SKIP, site_id = SKIP) ⇒ WebhookWifiUnconnRawEvent
constructor
A new instance of WebhookWifiUnconnRawEvent.
-
#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_id = SKIP, ap_loc = SKIP, client_id = SKIP, connected_site = SKIP, map_id = SKIP, org_id = SKIP, packets = SKIP, site_id = SKIP) ⇒ WebhookWifiUnconnRawEvent
Returns a new instance of WebhookWifiUnconnRawEvent.
80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/mist_api/models/webhook_wifi_unconn_raw_event.rb', line 80 def initialize(ap_id = SKIP, ap_loc = SKIP, client_id = SKIP, connected_site = SKIP, map_id = SKIP, org_id = SKIP, packets = SKIP, site_id = SKIP) @ap_id = ap_id unless ap_id == SKIP @ap_loc = ap_loc unless ap_loc == SKIP @client_id = client_id unless client_id == SKIP @connected_site = connected_site unless connected_site == SKIP @map_id = map_id unless map_id == SKIP @org_id = org_id unless org_id == SKIP @packets = packets unless packets == SKIP @site_id = site_id unless site_id == SKIP end |
Instance Attribute Details
#ap_id ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/webhook_wifi_unconn_raw_event.rb', line 14 def ap_id @ap_id end |
#ap_loc ⇒ Array[Float]
optional, coordinates (if any) of reporting AP (updated once in 60s per client)
19 20 21 |
# File 'lib/mist_api/models/webhook_wifi_unconn_raw_event.rb', line 19 def ap_loc @ap_loc end |
#client_id ⇒ String
optional, coordinates (if any) of reporting AP (updated once in 60s per client)
24 25 26 |
# File 'lib/mist_api/models/webhook_wifi_unconn_raw_event.rb', line 24 def client_id @client_id end |
#connected_site ⇒ TrueClass | FalseClass
optional, coordinates (if any) of reporting AP (updated once in 60s per client)
29 30 31 |
# File 'lib/mist_api/models/webhook_wifi_unconn_raw_event.rb', line 29 def connected_site @connected_site end |
#map_id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization
33 34 35 |
# File 'lib/mist_api/models/webhook_wifi_unconn_raw_event.rb', line 33 def map_id @map_id end |
#org_id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization
37 38 39 |
# File 'lib/mist_api/models/webhook_wifi_unconn_raw_event.rb', line 37 def org_id @org_id end |
#packets ⇒ Array[WebhookWifiUnconnRawEventPacket]
Unique ID of the object instance in the Mist Organization
41 42 43 |
# File 'lib/mist_api/models/webhook_wifi_unconn_raw_event.rb', line 41 def packets @packets end |
#site_id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization
45 46 47 |
# File 'lib/mist_api/models/webhook_wifi_unconn_raw_event.rb', line 45 def site_id @site_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/mist_api/models/webhook_wifi_unconn_raw_event.rb', line 94 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. ap_id = hash.key?('ap_id') ? hash['ap_id'] : SKIP ap_loc = hash.key?('ap_loc') ? hash['ap_loc'] : SKIP client_id = hash.key?('client_id') ? hash['client_id'] : SKIP connected_site = hash.key?('connected_site') ? hash['connected_site'] : SKIP map_id = hash.key?('map_id') ? hash['map_id'] : SKIP org_id = hash.key?('org_id') ? hash['org_id'] : SKIP # Parameter is an array, so we need to iterate through it packets = nil unless hash['packets'].nil? packets = [] hash['packets'].each do |structure| packets << (WebhookWifiUnconnRawEventPacket.from_hash(structure) if structure) end end packets = SKIP unless hash.key?('packets') site_id = hash.key?('site_id') ? hash['site_id'] : SKIP # Create object from extracted values. WebhookWifiUnconnRawEvent.new(ap_id, ap_loc, client_id, connected_site, map_id, org_id, packets, site_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/mist_api/models/webhook_wifi_unconn_raw_event.rb', line 48 def self.names @_hash = {} if @_hash.nil? @_hash['ap_id'] = 'ap_id' @_hash['ap_loc'] = 'ap_loc' @_hash['client_id'] = 'client_id' @_hash['connected_site'] = 'connected_site' @_hash['map_id'] = 'map_id' @_hash['org_id'] = 'org_id' @_hash['packets'] = 'packets' @_hash['site_id'] = 'site_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
76 77 78 |
# File 'lib/mist_api/models/webhook_wifi_unconn_raw_event.rb', line 76 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/mist_api/models/webhook_wifi_unconn_raw_event.rb', line 62 def self.optionals %w[ ap_id ap_loc client_id connected_site map_id org_id packets site_id ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
130 131 132 133 134 135 136 |
# File 'lib/mist_api/models/webhook_wifi_unconn_raw_event.rb', line 130 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
147 148 149 150 151 152 153 |
# File 'lib/mist_api/models/webhook_wifi_unconn_raw_event.rb', line 147 def inspect class_name = self.class.name.split('::').last "<#{class_name} ap_id: #{@ap_id.inspect}, ap_loc: #{@ap_loc.inspect}, client_id:"\ " #{@client_id.inspect}, connected_site: #{@connected_site.inspect}, map_id:"\ " #{@map_id.inspect}, org_id: #{@org_id.inspect}, packets: #{@packets.inspect}, site_id:"\ " #{@site_id.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
139 140 141 142 143 144 |
# File 'lib/mist_api/models/webhook_wifi_unconn_raw_event.rb', line 139 def to_s class_name = self.class.name.split('::').last "<#{class_name} ap_id: #{@ap_id}, ap_loc: #{@ap_loc}, client_id: #{@client_id},"\ " connected_site: #{@connected_site}, map_id: #{@map_id}, org_id: #{@org_id}, packets:"\ " #{@packets}, site_id: #{@site_id}>" end |