Class: MistApi::SleImpactedUsersUser

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

Overview

SleImpactedUsersUser 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_mac = SKIP, ap_name = SKIP, degraded = SKIP, device_os = SKIP, device_type = SKIP, duration = SKIP, mac = SKIP, name = SKIP, ssid = SKIP, total = SKIP, wlan_id = SKIP) ⇒ SleImpactedUsersUser

Returns a new instance of SleImpactedUsersUser.



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/mist_api/models/sle_impacted_users_user.rb', line 95

def initialize(ap_mac = SKIP, ap_name = SKIP, degraded = SKIP,
               device_os = SKIP, device_type = SKIP, duration = SKIP,
               mac = SKIP, name = SKIP, ssid = SKIP, total = SKIP,
               wlan_id = SKIP)
  @ap_mac = ap_mac unless ap_mac == SKIP
  @ap_name = ap_name unless ap_name == SKIP
  @degraded = degraded unless degraded == SKIP
  @device_os = device_os unless device_os == SKIP
  @device_type = device_type unless device_type == SKIP
  @duration = duration unless duration == SKIP
  @mac = mac unless mac == SKIP
  @name = name unless name == SKIP
  @ssid = ssid unless ssid == SKIP
  @total = total unless total == SKIP
  @wlan_id = wlan_id unless wlan_id == SKIP
end

Instance Attribute Details

#ap_macString

TODO: Write general description for this method

Returns:

  • (String)


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

def ap_mac
  @ap_mac
end

#ap_nameString

TODO: Write general description for this method

Returns:

  • (String)


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

def ap_name
  @ap_name
end

#degradedFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def degraded
  @degraded
end

#device_osString

TODO: Write general description for this method

Returns:

  • (String)


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

def device_os
  @device_os
end

#device_typeString

TODO: Write general description for this method

Returns:

  • (String)


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

def device_type
  @device_type
end

#durationFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def duration
  @duration
end

#macString

TODO: Write general description for this method

Returns:

  • (String)


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

def mac
  @mac
end

#nameString

TODO: Write general description for this method

Returns:

  • (String)


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

def name
  @name
end

#ssidString

TODO: Write general description for this method

Returns:

  • (String)


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

def ssid
  @ssid
end

#totalFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def total
  @total
end

#wlan_idString

TODO: Write general description for this method

Returns:

  • (String)


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

def wlan_id
  @wlan_id
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
# File 'lib/mist_api/models/sle_impacted_users_user.rb', line 113

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  ap_mac = hash.key?('ap_mac') ? hash['ap_mac'] : SKIP
  ap_name = hash.key?('ap_name') ? hash['ap_name'] : SKIP
  degraded = hash.key?('degraded') ? hash['degraded'] : SKIP
  device_os = hash.key?('device_os') ? hash['device_os'] : SKIP
  device_type = hash.key?('device_type') ? hash['device_type'] : SKIP
  duration = hash.key?('duration') ? hash['duration'] : SKIP
  mac = hash.key?('mac') ? hash['mac'] : SKIP
  name = hash.key?('name') ? hash['name'] : SKIP
  ssid = hash.key?('ssid') ? hash['ssid'] : SKIP
  total = hash.key?('total') ? hash['total'] : SKIP
  wlan_id = hash.key?('wlan_id') ? hash['wlan_id'] : SKIP

  # Create object from extracted values.
  SleImpactedUsersUser.new(ap_mac,
                           ap_name,
                           degraded,
                           device_os,
                           device_type,
                           duration,
                           mac,
                           name,
                           ssid,
                           total,
                           wlan_id)
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/sle_impacted_users_user.rb', line 57

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['ap_mac'] = 'ap_mac'
  @_hash['ap_name'] = 'ap_name'
  @_hash['degraded'] = 'degraded'
  @_hash['device_os'] = 'device_os'
  @_hash['device_type'] = 'device_type'
  @_hash['duration'] = 'duration'
  @_hash['mac'] = 'mac'
  @_hash['name'] = 'name'
  @_hash['ssid'] = 'ssid'
  @_hash['total'] = 'total'
  @_hash['wlan_id'] = 'wlan_id'
  @_hash
end

.nullablesObject

An array for nullable fields



91
92
93
# File 'lib/mist_api/models/sle_impacted_users_user.rb', line 91

def self.nullables
  []
end

.optionalsObject

An array for optional fields



74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/mist_api/models/sle_impacted_users_user.rb', line 74

def self.optionals
  %w[
    ap_mac
    ap_name
    degraded
    device_os
    device_type
    duration
    mac
    name
    ssid
    total
    wlan_id
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



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

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} ap_mac: #{@ap_mac.inspect}, ap_name: #{@ap_name.inspect}, degraded:"\
  " #{@degraded.inspect}, device_os: #{@device_os.inspect}, device_type:"\
  " #{@device_type.inspect}, duration: #{@duration.inspect}, mac: #{@mac.inspect}, name:"\
  " #{@name.inspect}, ssid: #{@ssid.inspect}, total: #{@total.inspect}, wlan_id:"\
  " #{@wlan_id.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



144
145
146
147
148
149
# File 'lib/mist_api/models/sle_impacted_users_user.rb', line 144

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} ap_mac: #{@ap_mac}, ap_name: #{@ap_name}, degraded: #{@degraded},"\
  " device_os: #{@device_os}, device_type: #{@device_type}, duration: #{@duration}, mac:"\
  " #{@mac}, name: #{@name}, ssid: #{@ssid}, total: #{@total}, wlan_id: #{@wlan_id}>"
end