Class: MistApi::Rrm

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

Overview

RRM

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 = nil, band_24_metric = nil, band_5 = nil, band_5_metric = nil, rftemplate = nil, rftemplate_id = nil, rftemplate_name = nil, status = nil, timestamp = nil, band_6 = SKIP, band_6_metric = SKIP) ⇒ Rrm

Returns a new instance of Rrm.



86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/mist_api/models/rrm.rb', line 86

def initialize(band_24 = nil, band_24_metric = nil, band_5 = nil,
               band_5_metric = nil, rftemplate = nil, rftemplate_id = nil,
               rftemplate_name = nil, status = nil, timestamp = nil,
               band_6 = SKIP, band_6_metric = SKIP)
  @band_24 = band_24
  @band_24_metric = band_24_metric
  @band_5 = band_5
  @band_5_metric = band_5_metric
  @band_6 = band_6 unless band_6 == SKIP
  @band_6_metric = band_6_metric unless band_6_metric == SKIP
  @rftemplate = rftemplate
  @rftemplate_id = rftemplate_id
  @rftemplate_name = rftemplate_name
  @status = status
  @timestamp = timestamp
end

Instance Attribute Details

#band_24Hash[String, RrmBand]

proposal on band 2.4G, key is ap_id, value is the proposal

Returns:



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

def band_24
  @band_24
end

#band_24_metricRrmBandMetric

proposal on band 2.4G, key is ap_id, value is the proposal

Returns:



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

def band_24_metric
  @band_24_metric
end

#band_5Hash[String, RrmBand]

proposal on band 5G, key is ap_id, value is the proposal

Returns:



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

def band_5
  @band_5
end

#band_5_metricRrmBandMetric

proposal on band 5G, key is ap_id, value is the proposal

Returns:



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

def band_5_metric
  @band_5_metric
end

#band_6Hash[String, RrmBand]

proposal on band 6G, key is ap_id, value is the proposal

Returns:



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

def band_6
  @band_6
end

#band_6_metricRrmBandMetric

proposal on band 6G, key is ap_id, value is the proposal

Returns:



34
35
36
# File 'lib/mist_api/models/rrm.rb', line 34

def band_6_metric
  @band_6_metric
end

#rftemplateRfTemplate

RF Template

Returns:



38
39
40
# File 'lib/mist_api/models/rrm.rb', line 38

def rftemplate
  @rftemplate
end

#rftemplate_idUUID | String

RF Template

Returns:

  • (UUID | String)


42
43
44
# File 'lib/mist_api/models/rrm.rb', line 42

def rftemplate_id
  @rftemplate_id
end

#rftemplate_nameString

RF Template

Returns:

  • (String)


46
47
48
# File 'lib/mist_api/models/rrm.rb', line 46

def rftemplate_name
  @rftemplate_name
end

#statusRrmStatusEnum

enum: ‘ready`, `unknown`, `updating`

Returns:



50
51
52
# File 'lib/mist_api/models/rrm.rb', line 50

def status
  @status
end

#timestampFloat

Epoch (seconds)

Returns:

  • (Float)


54
55
56
# File 'lib/mist_api/models/rrm.rb', line 54

def timestamp
  @timestamp
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'lib/mist_api/models/rrm.rb', line 104

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  band_24 = RrmBand.from_hash(hash['band_24']) if hash['band_24']

  band_24 = nil unless hash.key?('band_24')
  band_24_metric = RrmBandMetric.from_hash(hash['band_24_metric']) if hash['band_24_metric']
  band_5 = RrmBand.from_hash(hash['band_5']) if hash['band_5']

  band_5 = nil unless hash.key?('band_5')
  band_5_metric = RrmBandMetric.from_hash(hash['band_5_metric']) if hash['band_5_metric']
  rftemplate = RfTemplate.from_hash(hash['rftemplate']) if hash['rftemplate']
  rftemplate_id = hash.key?('rftemplate_id') ? hash['rftemplate_id'] : nil
  rftemplate_name =
    hash.key?('rftemplate_name') ? hash['rftemplate_name'] : nil
  status = hash.key?('status') ? hash['status'] : nil
  timestamp = hash.key?('timestamp') ? hash['timestamp'] : nil
  band_6 = RrmBand.from_hash(hash['band_6']) if hash['band_6']

  band_6 = SKIP unless hash.key?('band_6')
  band_6_metric = RrmBandMetric.from_hash(hash['band_6_metric']) if hash['band_6_metric']

  # Create object from extracted values.
  Rrm.new(band_24,
          band_24_metric,
          band_5,
          band_5_metric,
          rftemplate,
          rftemplate_id,
          rftemplate_name,
          status,
          timestamp,
          band_6,
          band_6_metric)
end

.namesObject

A mapping from model property names to API property names.



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/mist_api/models/rrm.rb', line 57

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['band_24'] = 'band_24'
  @_hash['band_24_metric'] = 'band_24_metric'
  @_hash['band_5'] = 'band_5'
  @_hash['band_5_metric'] = 'band_5_metric'
  @_hash['band_6'] = 'band_6'
  @_hash['band_6_metric'] = 'band_6_metric'
  @_hash['rftemplate'] = 'rftemplate'
  @_hash['rftemplate_id'] = 'rftemplate_id'
  @_hash['rftemplate_name'] = 'rftemplate_name'
  @_hash['status'] = 'status'
  @_hash['timestamp'] = 'timestamp'
  @_hash
end

.nullablesObject

An array for nullable fields



82
83
84
# File 'lib/mist_api/models/rrm.rb', line 82

def self.nullables
  []
end

.optionalsObject

An array for optional fields



74
75
76
77
78
79
# File 'lib/mist_api/models/rrm.rb', line 74

def self.optionals
  %w[
    band_6
    band_6_metric
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



151
152
153
154
155
156
157
158
159
# File 'lib/mist_api/models/rrm.rb', line 151

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} band_24: #{@band_24.inspect}, band_24_metric: #{@band_24_metric.inspect},"\
  " band_5: #{@band_5.inspect}, band_5_metric: #{@band_5_metric.inspect}, band_6:"\
  " #{@band_6.inspect}, band_6_metric: #{@band_6_metric.inspect}, rftemplate:"\
  " #{@rftemplate.inspect}, rftemplate_id: #{@rftemplate_id.inspect}, rftemplate_name:"\
  " #{@rftemplate_name.inspect}, status: #{@status.inspect}, timestamp:"\
  " #{@timestamp.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



142
143
144
145
146
147
148
# File 'lib/mist_api/models/rrm.rb', line 142

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} band_24: #{@band_24}, band_24_metric: #{@band_24_metric}, band_5:"\
  " #{@band_5}, band_5_metric: #{@band_5_metric}, band_6: #{@band_6}, band_6_metric:"\
  " #{@band_6_metric}, rftemplate: #{@rftemplate}, rftemplate_id: #{@rftemplate_id},"\
  " rftemplate_name: #{@rftemplate_name}, status: #{@status}, timestamp: #{@timestamp}>"
end