Class: MistApi::StatsApRadioConfig

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

Overview

StatsApRadioConfig 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(band_24 = SKIP, band_24_usage = SKIP, band_5 = SKIP, band_6 = SKIP, scanning_enabled = SKIP) ⇒ StatsApRadioConfig

Returns a new instance of StatsApRadioConfig.



61
62
63
64
65
66
67
68
# File 'lib/mist_api/models/stats_ap_radio_config.rb', line 61

def initialize(band_24 = SKIP, band_24_usage = SKIP, band_5 = SKIP,
               band_6 = SKIP, scanning_enabled = SKIP)
  @band_24 = band_24 unless band_24 == SKIP
  @band_24_usage = band_24_usage unless band_24_usage == SKIP
  @band_5 = band_5 unless band_5 == SKIP
  @band_6 = band_6 unless band_6 == SKIP
  @scanning_enabled = scanning_enabled unless scanning_enabled == SKIP
end

Instance Attribute Details

#band_24StatsApRadioConfigBand

TODO: Write general description for this method



14
15
16
# File 'lib/mist_api/models/stats_ap_radio_config.rb', line 14

def band_24
  @band_24
end

#band_24_usageString

TODO: Write general description for this method

Returns:

  • (String)


18
19
20
# File 'lib/mist_api/models/stats_ap_radio_config.rb', line 18

def band_24_usage
  @band_24_usage
end

#band_5StatsApRadioConfigBand

TODO: Write general description for this method



22
23
24
# File 'lib/mist_api/models/stats_ap_radio_config.rb', line 22

def band_5
  @band_5
end

#band_6StatsApRadioConfigBand

TODO: Write general description for this method



26
27
28
# File 'lib/mist_api/models/stats_ap_radio_config.rb', line 26

def band_6
  @band_6
end

#scanning_enabledTrueClass | FalseClass

TODO: Write general description for this method

Returns:

  • (TrueClass | FalseClass)


30
31
32
# File 'lib/mist_api/models/stats_ap_radio_config.rb', line 30

def scanning_enabled
  @scanning_enabled
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
# File 'lib/mist_api/models/stats_ap_radio_config.rb', line 71

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  band_24 = StatsApRadioConfigBand.from_hash(hash['band_24']) if hash['band_24']
  band_24_usage = hash.key?('band_24_usage') ? hash['band_24_usage'] : SKIP
  band_5 = StatsApRadioConfigBand.from_hash(hash['band_5']) if hash['band_5']
  band_6 = StatsApRadioConfigBand.from_hash(hash['band_6']) if hash['band_6']
  scanning_enabled =
    hash.key?('scanning_enabled') ? hash['scanning_enabled'] : SKIP

  # Create object from extracted values.
  StatsApRadioConfig.new(band_24,
                         band_24_usage,
                         band_5,
                         band_6,
                         scanning_enabled)
end

.namesObject

A mapping from model property names to API property names.



33
34
35
36
37
38
39
40
41
# File 'lib/mist_api/models/stats_ap_radio_config.rb', line 33

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['band_24'] = 'band_24'
  @_hash['band_24_usage'] = 'band_24_usage'
  @_hash['band_5'] = 'band_5'
  @_hash['band_6'] = 'band_6'
  @_hash['scanning_enabled'] = 'scanning_enabled'
  @_hash
end

.nullablesObject

An array for nullable fields



55
56
57
58
59
# File 'lib/mist_api/models/stats_ap_radio_config.rb', line 55

def self.nullables
  %w[
    band_24_usage
  ]
end

.optionalsObject

An array for optional fields



44
45
46
47
48
49
50
51
52
# File 'lib/mist_api/models/stats_ap_radio_config.rb', line 44

def self.optionals
  %w[
    band_24
    band_24_usage
    band_5
    band_6
    scanning_enabled
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



98
99
100
101
102
103
# File 'lib/mist_api/models/stats_ap_radio_config.rb', line 98

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} band_24: #{@band_24.inspect}, band_24_usage: #{@band_24_usage.inspect},"\
  " band_5: #{@band_5.inspect}, band_6: #{@band_6.inspect}, scanning_enabled:"\
  " #{@scanning_enabled.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



91
92
93
94
95
# File 'lib/mist_api/models/stats_ap_radio_config.rb', line 91

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} band_24: #{@band_24}, band_24_usage: #{@band_24_usage}, band_5: #{@band_5},"\
  " band_6: #{@band_6}, scanning_enabled: #{@scanning_enabled}>"
end