Class: MistApi::SiteOccupancyAnalytics
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::SiteOccupancyAnalytics
- Defined in:
- lib/mist_api/models/site_occupancy_analytics.rb
Overview
Occupancy Analytics settings
Instance Attribute Summary collapse
-
#assets_enabled ⇒ TrueClass | FalseClass
Indicate whether named BLE assets should be included in the zone occupancy calculation.
-
#clients_enabled ⇒ TrueClass | FalseClass
Indicate whether connected Wi-Fi clients should be included in the zone occupancy calculation.
-
#min_duration ⇒ Integer
Minimum duration.
-
#sdkclients_enabled ⇒ TrueClass | FalseClass
Indicate whether SDK clients should be included in the zone occupancy calculation.
-
#unconnected_clients_enabled ⇒ TrueClass | FalseClass
Indicate whether unconnected Wi-Fi clients should be included in the zone occupancy calculation.
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(assets_enabled = false, clients_enabled = true, min_duration = 3000, sdkclients_enabled = false, unconnected_clients_enabled = false) ⇒ SiteOccupancyAnalytics
constructor
A new instance of SiteOccupancyAnalytics.
-
#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(assets_enabled = false, clients_enabled = true, min_duration = 3000, sdkclients_enabled = false, unconnected_clients_enabled = false) ⇒ SiteOccupancyAnalytics
Returns a new instance of SiteOccupancyAnalytics.
63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/mist_api/models/site_occupancy_analytics.rb', line 63 def initialize(assets_enabled = false, clients_enabled = true, min_duration = 3000, sdkclients_enabled = false, unconnected_clients_enabled = false) @assets_enabled = assets_enabled unless assets_enabled == SKIP @clients_enabled = clients_enabled unless clients_enabled == SKIP @min_duration = min_duration unless min_duration == SKIP @sdkclients_enabled = sdkclients_enabled unless sdkclients_enabled == SKIP unless unconnected_clients_enabled == SKIP @unconnected_clients_enabled = unconnected_clients_enabled end end |
Instance Attribute Details
#assets_enabled ⇒ TrueClass | FalseClass
Indicate whether named BLE assets should be included in the zone occupancy calculation
15 16 17 |
# File 'lib/mist_api/models/site_occupancy_analytics.rb', line 15 def assets_enabled @assets_enabled end |
#clients_enabled ⇒ TrueClass | FalseClass
Indicate whether connected Wi-Fi clients should be included in the zone occupancy calculation
20 21 22 |
# File 'lib/mist_api/models/site_occupancy_analytics.rb', line 20 def clients_enabled @clients_enabled end |
#min_duration ⇒ Integer
Minimum duration
24 25 26 |
# File 'lib/mist_api/models/site_occupancy_analytics.rb', line 24 def min_duration @min_duration end |
#sdkclients_enabled ⇒ TrueClass | FalseClass
Indicate whether SDK clients should be included in the zone occupancy calculation
29 30 31 |
# File 'lib/mist_api/models/site_occupancy_analytics.rb', line 29 def sdkclients_enabled @sdkclients_enabled end |
#unconnected_clients_enabled ⇒ TrueClass | FalseClass
Indicate whether unconnected Wi-Fi clients should be included in the zone occupancy calculation
34 35 36 |
# File 'lib/mist_api/models/site_occupancy_analytics.rb', line 34 def unconnected_clients_enabled @unconnected_clients_enabled end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/mist_api/models/site_occupancy_analytics.rb', line 77 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. assets_enabled = hash['assets_enabled'] ||= false clients_enabled = hash['clients_enabled'] ||= true min_duration = hash['min_duration'] ||= 3000 sdkclients_enabled = hash['sdkclients_enabled'] ||= false unconnected_clients_enabled = hash['unconnected_clients_enabled'] ||= false # Create object from extracted values. SiteOccupancyAnalytics.new(assets_enabled, clients_enabled, min_duration, sdkclients_enabled, unconnected_clients_enabled) end |
.names ⇒ Object
A mapping from model property names to API property names.
37 38 39 40 41 42 43 44 45 |
# File 'lib/mist_api/models/site_occupancy_analytics.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['assets_enabled'] = 'assets_enabled' @_hash['clients_enabled'] = 'clients_enabled' @_hash['min_duration'] = 'min_duration' @_hash['sdkclients_enabled'] = 'sdkclients_enabled' @_hash['unconnected_clients_enabled'] = 'unconnected_clients_enabled' @_hash end |
.nullables ⇒ Object
An array for nullable fields
59 60 61 |
# File 'lib/mist_api/models/site_occupancy_analytics.rb', line 59 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
48 49 50 51 52 53 54 55 56 |
# File 'lib/mist_api/models/site_occupancy_analytics.rb', line 48 def self.optionals %w[ assets_enabled clients_enabled min_duration sdkclients_enabled unconnected_clients_enabled ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
105 106 107 108 109 110 111 |
# File 'lib/mist_api/models/site_occupancy_analytics.rb', line 105 def inspect class_name = self.class.name.split('::').last "<#{class_name} assets_enabled: #{@assets_enabled.inspect}, clients_enabled:"\ " #{@clients_enabled.inspect}, min_duration: #{@min_duration.inspect}, sdkclients_enabled:"\ " #{@sdkclients_enabled.inspect}, unconnected_clients_enabled:"\ " #{@unconnected_clients_enabled.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
97 98 99 100 101 102 |
# File 'lib/mist_api/models/site_occupancy_analytics.rb', line 97 def to_s class_name = self.class.name.split('::').last "<#{class_name} assets_enabled: #{@assets_enabled}, clients_enabled: #{@clients_enabled},"\ " min_duration: #{@min_duration}, sdkclients_enabled: #{@sdkclients_enabled},"\ " unconnected_clients_enabled: #{@unconnected_clients_enabled}>" end |