Class: MistApi::RrmBand

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

Overview

RrmBand 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(bandwidth = SKIP, channel = SKIP, curr_bandwidth = SKIP, curr_channel = SKIP, curr_power = SKIP, curr_usage = SKIP, power = SKIP, usage = SKIP) ⇒ RrmBand

Returns a new instance of RrmBand.



79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/mist_api/models/rrm_band.rb', line 79

def initialize(bandwidth = SKIP, channel = SKIP, curr_bandwidth = SKIP,
               curr_channel = SKIP, curr_power = SKIP, curr_usage = SKIP,
               power = SKIP, usage = SKIP)
  @bandwidth = bandwidth unless bandwidth == SKIP
  @channel = channel unless channel == SKIP
  @curr_bandwidth = curr_bandwidth unless curr_bandwidth == SKIP
  @curr_channel = curr_channel unless curr_channel == SKIP
  @curr_power = curr_power unless curr_power == SKIP
  @curr_usage = curr_usage unless curr_usage == SKIP
  @power = power unless power == SKIP
  @usage = usage unless usage == SKIP
end

Instance Attribute Details

#bandwidthDot11BandwidthEnum

channel width for the band.enum: ‘0`(disabled, response only), `20`, `40`, `80` (only applicable for band_5 and band_6), `160` (only for band_6)

Returns:



15
16
17
# File 'lib/mist_api/models/rrm_band.rb', line 15

def bandwidth
  @bandwidth
end

#channelInteger

proposed channel

Returns:

  • (Integer)


19
20
21
# File 'lib/mist_api/models/rrm_band.rb', line 19

def channel
  @channel
end

#curr_bandwidthDot11BandwidthEnum

channel width for the band.enum: ‘0`(disabled, response only), `20`, `40`, `80` (only applicable for band_5 and band_6), `160` (only for band_6)

Returns:



24
25
26
# File 'lib/mist_api/models/rrm_band.rb', line 24

def curr_bandwidth
  @curr_bandwidth
end

#curr_channelInteger

Current channel

Returns:

  • (Integer)


28
29
30
# File 'lib/mist_api/models/rrm_band.rb', line 28

def curr_channel
  @curr_channel
end

#curr_powerInteger

Current tx power

Returns:

  • (Integer)


32
33
34
# File 'lib/mist_api/models/rrm_band.rb', line 32

def curr_power
  @curr_power
end

#curr_usageString

Current radio band

Returns:

  • (String)


36
37
38
# File 'lib/mist_api/models/rrm_band.rb', line 36

def curr_usage
  @curr_usage
end

#powerInteger

proposed tx power

Returns:

  • (Integer)


40
41
42
# File 'lib/mist_api/models/rrm_band.rb', line 40

def power
  @power
end

#usageString

proposed radio band

Returns:

  • (String)


44
45
46
# File 'lib/mist_api/models/rrm_band.rb', line 44

def usage
  @usage
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/mist_api/models/rrm_band.rb', line 93

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  bandwidth = hash.key?('bandwidth') ? hash['bandwidth'] : SKIP
  channel = hash.key?('channel') ? hash['channel'] : SKIP
  curr_bandwidth =
    hash.key?('curr_bandwidth') ? hash['curr_bandwidth'] : SKIP
  curr_channel = hash.key?('curr_channel') ? hash['curr_channel'] : SKIP
  curr_power = hash.key?('curr_power') ? hash['curr_power'] : SKIP
  curr_usage = hash.key?('curr_usage') ? hash['curr_usage'] : SKIP
  power = hash.key?('power') ? hash['power'] : SKIP
  usage = hash.key?('usage') ? hash['usage'] : SKIP

  # Create object from extracted values.
  RrmBand.new(bandwidth,
              channel,
              curr_bandwidth,
              curr_channel,
              curr_power,
              curr_usage,
              power,
              usage)
end

.namesObject

A mapping from model property names to API property names.



47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/mist_api/models/rrm_band.rb', line 47

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['bandwidth'] = 'bandwidth'
  @_hash['channel'] = 'channel'
  @_hash['curr_bandwidth'] = 'curr_bandwidth'
  @_hash['curr_channel'] = 'curr_channel'
  @_hash['curr_power'] = 'curr_power'
  @_hash['curr_usage'] = 'curr_usage'
  @_hash['power'] = 'power'
  @_hash['usage'] = 'usage'
  @_hash
end

.nullablesObject

An array for nullable fields



75
76
77
# File 'lib/mist_api/models/rrm_band.rb', line 75

def self.nullables
  []
end

.optionalsObject

An array for optional fields



61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/mist_api/models/rrm_band.rb', line 61

def self.optionals
  %w[
    bandwidth
    channel
    curr_bandwidth
    curr_channel
    curr_power
    curr_usage
    power
    usage
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



127
128
129
130
131
132
133
# File 'lib/mist_api/models/rrm_band.rb', line 127

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} bandwidth: #{@bandwidth.inspect}, channel: #{@channel.inspect},"\
  " curr_bandwidth: #{@curr_bandwidth.inspect}, curr_channel: #{@curr_channel.inspect},"\
  " curr_power: #{@curr_power.inspect}, curr_usage: #{@curr_usage.inspect}, power:"\
  " #{@power.inspect}, usage: #{@usage.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



119
120
121
122
123
124
# File 'lib/mist_api/models/rrm_band.rb', line 119

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} bandwidth: #{@bandwidth}, channel: #{@channel}, curr_bandwidth:"\
  " #{@curr_bandwidth}, curr_channel: #{@curr_channel}, curr_power: #{@curr_power},"\
  " curr_usage: #{@curr_usage}, power: #{@power}, usage: #{@usage}>"
end