Class: MistApi::SleImpactSummary

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

Overview

SleImpactSummary 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(ap = nil, band = nil, classifier = nil, device_os = nil, device_type = nil, mend = nil, failure = nil, metric = nil, start = nil, wlan = nil) ⇒ SleImpactSummary

Returns a new instance of SleImpactSummary.



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

def initialize(ap = nil, band = nil, classifier = nil, device_os = nil,
               device_type = nil, mend = nil, failure = nil, metric = nil,
               start = nil, wlan = nil)
  @ap = ap
  @band = band
  @classifier = classifier
  @device_os = device_os
  @device_type = device_type
  @mend = mend
  @failure = failure
  @metric = metric
  @start = start
  @wlan = wlan
end

Instance Attribute Details

#apArray[SleImpactSummaryApItem]

TODO: Write general description for this method

Returns:



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

def ap
  @ap
end

#bandArray[SleImpactSummaryBandItem]

TODO: Write general description for this method

Returns:



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

def band
  @band
end

#classifierString

TODO: Write general description for this method

Returns:

  • (String)


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

def classifier
  @classifier
end

#device_osArray[SleImpactSummaryDeviceOsItem]

TODO: Write general description for this method

Returns:



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

def device_os
  @device_os
end

#device_typeArray[SleImpactSummaryDeviceTypeItem]

TODO: Write general description for this method

Returns:



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

def device_type
  @device_type
end

#failureString

TODO: Write general description for this method

Returns:

  • (String)


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

def failure
  @failure
end

#mendFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def mend
  @mend
end

#metricString

TODO: Write general description for this method

Returns:

  • (String)


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

def metric
  @metric
end

#startFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def start
  @start
end

#wlanArray[SleImpactSummaryWlanItem]

TODO: Write general description for this method

Returns:



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

def wlan
  @wlan
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'lib/mist_api/models/sle_impact_summary.rb', line 94

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  # Parameter is an array, so we need to iterate through it
  ap = nil
  unless hash['ap'].nil?
    ap = []
    hash['ap'].each do |structure|
      ap << (SleImpactSummaryApItem.from_hash(structure) if structure)
    end
  end

  ap = nil unless hash.key?('ap')
  # Parameter is an array, so we need to iterate through it
  band = nil
  unless hash['band'].nil?
    band = []
    hash['band'].each do |structure|
      band << (SleImpactSummaryBandItem.from_hash(structure) if structure)
    end
  end

  band = nil unless hash.key?('band')
  classifier = hash.key?('classifier') ? hash['classifier'] : nil
  # Parameter is an array, so we need to iterate through it
  device_os = nil
  unless hash['device_os'].nil?
    device_os = []
    hash['device_os'].each do |structure|
      device_os << (SleImpactSummaryDeviceOsItem.from_hash(structure) if structure)
    end
  end

  device_os = nil unless hash.key?('device_os')
  # Parameter is an array, so we need to iterate through it
  device_type = nil
  unless hash['device_type'].nil?
    device_type = []
    hash['device_type'].each do |structure|
      device_type << (SleImpactSummaryDeviceTypeItem.from_hash(structure) if structure)
    end
  end

  device_type = nil unless hash.key?('device_type')
  mend = hash.key?('end') ? hash['end'] : nil
  failure = hash.key?('failure') ? hash['failure'] : nil
  metric = hash.key?('metric') ? hash['metric'] : nil
  start = hash.key?('start') ? hash['start'] : nil
  # Parameter is an array, so we need to iterate through it
  wlan = nil
  unless hash['wlan'].nil?
    wlan = []
    hash['wlan'].each do |structure|
      wlan << (SleImpactSummaryWlanItem.from_hash(structure) if structure)
    end
  end

  wlan = nil unless hash.key?('wlan')

  # Create object from extracted values.
  SleImpactSummary.new(ap,
                       band,
                       classifier,
                       device_os,
                       device_type,
                       mend,
                       failure,
                       metric,
                       start,
                       wlan)
end

.namesObject

A mapping from model property names to API property names.



53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/mist_api/models/sle_impact_summary.rb', line 53

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['ap'] = 'ap'
  @_hash['band'] = 'band'
  @_hash['classifier'] = 'classifier'
  @_hash['device_os'] = 'device_os'
  @_hash['device_type'] = 'device_type'
  @_hash['mend'] = 'end'
  @_hash['failure'] = 'failure'
  @_hash['metric'] = 'metric'
  @_hash['start'] = 'start'
  @_hash['wlan'] = 'wlan'
  @_hash
end

.nullablesObject

An array for nullable fields



74
75
76
# File 'lib/mist_api/models/sle_impact_summary.rb', line 74

def self.nullables
  []
end

.optionalsObject

An array for optional fields



69
70
71
# File 'lib/mist_api/models/sle_impact_summary.rb', line 69

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



176
177
178
179
180
181
182
# File 'lib/mist_api/models/sle_impact_summary.rb', line 176

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} ap: #{@ap.inspect}, band: #{@band.inspect}, classifier:"\
  " #{@classifier.inspect}, device_os: #{@device_os.inspect}, device_type:"\
  " #{@device_type.inspect}, mend: #{@mend.inspect}, failure: #{@failure.inspect}, metric:"\
  " #{@metric.inspect}, start: #{@start.inspect}, wlan: #{@wlan.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



168
169
170
171
172
173
# File 'lib/mist_api/models/sle_impact_summary.rb', line 168

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} ap: #{@ap}, band: #{@band}, classifier: #{@classifier}, device_os:"\
  " #{@device_os}, device_type: #{@device_type}, mend: #{@mend}, failure: #{@failure}, metric:"\
  " #{@metric}, start: #{@start}, wlan: #{@wlan}>"
end