Class: MistApi::ResponseConfigHistorySearchItem

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

Overview

ResponseConfigHistorySearchItem 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(channel_24 = nil, channel_5 = nil, secpolicy_violated = nil, timestamp = nil, version = nil, radio_macs = SKIP, radios = SKIP, ssids = SKIP, ssids_24 = SKIP, ssids_5 = SKIP, wlans = SKIP) ⇒ ResponseConfigHistorySearchItem

Returns a new instance of ResponseConfigHistorySearchItem.



90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/mist_api/models/response_config_history_search_item.rb', line 90

def initialize(channel_24 = nil, channel_5 = nil, secpolicy_violated = nil,
               timestamp = nil, version = nil, radio_macs = SKIP,
               radios = SKIP, ssids = SKIP, ssids_24 = SKIP, ssids_5 = SKIP,
               wlans = SKIP)
  @channel_24 = channel_24
  @channel_5 = channel_5
  @radio_macs = radio_macs unless radio_macs == SKIP
  @radios = radios unless radios == SKIP
  @secpolicy_violated = secpolicy_violated
  @ssids = ssids unless ssids == SKIP
  @ssids_24 = ssids_24 unless ssids_24 == SKIP
  @ssids_5 = ssids_5 unless ssids_5 == SKIP
  @timestamp = timestamp
  @version = version
  @wlans = wlans unless wlans == SKIP
end

Instance Attribute Details

#channel_24Integer

TODO: Write general description for this method

Returns:

  • (Integer)


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

def channel_24
  @channel_24
end

#channel_5Integer

TODO: Write general description for this method

Returns:

  • (Integer)


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

def channel_5
  @channel_5
end

#radio_macsArray[String]

TODO: Write general description for this method

Returns:

  • (Array[String])


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

def radio_macs
  @radio_macs
end

#radiosArray[ResponseConfigHistorySearchItemRadio]

TODO: Write general description for this method



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

def radios
  @radios
end

#secpolicy_violatedTrueClass | FalseClass

TODO: Write general description for this method

Returns:

  • (TrueClass | FalseClass)


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

def secpolicy_violated
  @secpolicy_violated
end

#ssidsArray[String]

TODO: Write general description for this method

Returns:

  • (Array[String])


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

def ssids
  @ssids
end

#ssids_24Array[String]

TODO: Write general description for this method

Returns:

  • (Array[String])


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

def ssids_24
  @ssids_24
end

#ssids_5Array[String]

TODO: Write general description for this method

Returns:

  • (Array[String])


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

def ssids_5
  @ssids_5
end

#timestampFloat

Epoch (seconds)

Returns:

  • (Float)


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

def timestamp
  @timestamp
end

#versionString

Epoch (seconds)

Returns:

  • (String)


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

def version
  @version
end

#wlansArray[ResponseConfigHistorySearchItemWlan]

Epoch (seconds)



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

def wlans
  @wlans
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  channel_24 = hash.key?('channel_24') ? hash['channel_24'] : nil
  channel_5 = hash.key?('channel_5') ? hash['channel_5'] : nil
  secpolicy_violated =
    hash.key?('secpolicy_violated') ? hash['secpolicy_violated'] : nil
  timestamp = hash.key?('timestamp') ? hash['timestamp'] : nil
  version = hash.key?('version') ? hash['version'] : nil
  radio_macs = hash.key?('radio_macs') ? hash['radio_macs'] : SKIP
  # Parameter is an array, so we need to iterate through it
  radios = nil
  unless hash['radios'].nil?
    radios = []
    hash['radios'].each do |structure|
      radios << (ResponseConfigHistorySearchItemRadio.from_hash(structure) if structure)
    end
  end

  radios = SKIP unless hash.key?('radios')
  ssids = hash.key?('ssids') ? hash['ssids'] : SKIP
  ssids_24 = hash.key?('ssids_24') ? hash['ssids_24'] : SKIP
  ssids_5 = hash.key?('ssids_5') ? hash['ssids_5'] : SKIP
  # Parameter is an array, so we need to iterate through it
  wlans = nil
  unless hash['wlans'].nil?
    wlans = []
    hash['wlans'].each do |structure|
      wlans << (ResponseConfigHistorySearchItemWlan.from_hash(structure) if structure)
    end
  end

  wlans = SKIP unless hash.key?('wlans')

  # Create object from extracted values.
  ResponseConfigHistorySearchItem.new(channel_24,
                                      channel_5,
                                      secpolicy_violated,
                                      timestamp,
                                      version,
                                      radio_macs,
                                      radios,
                                      ssids,
                                      ssids_24,
                                      ssids_5,
                                      wlans)
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/response_config_history_search_item.rb', line 57

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['channel_24'] = 'channel_24'
  @_hash['channel_5'] = 'channel_5'
  @_hash['radio_macs'] = 'radio_macs'
  @_hash['radios'] = 'radios'
  @_hash['secpolicy_violated'] = 'secpolicy_violated'
  @_hash['ssids'] = 'ssids'
  @_hash['ssids_24'] = 'ssids_24'
  @_hash['ssids_5'] = 'ssids_5'
  @_hash['timestamp'] = 'timestamp'
  @_hash['version'] = 'version'
  @_hash['wlans'] = 'wlans'
  @_hash
end

.nullablesObject

An array for nullable fields



86
87
88
# File 'lib/mist_api/models/response_config_history_search_item.rb', line 86

def self.nullables
  []
end

.optionalsObject

An array for optional fields



74
75
76
77
78
79
80
81
82
83
# File 'lib/mist_api/models/response_config_history_search_item.rb', line 74

def self.optionals
  %w[
    radio_macs
    radios
    ssids
    ssids_24
    ssids_5
    wlans
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



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

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} channel_24: #{@channel_24.inspect}, channel_5: #{@channel_5.inspect},"\
  " radio_macs: #{@radio_macs.inspect}, radios: #{@radios.inspect}, secpolicy_violated:"\
  " #{@secpolicy_violated.inspect}, ssids: #{@ssids.inspect}, ssids_24: #{@ssids_24.inspect},"\
  " ssids_5: #{@ssids_5.inspect}, timestamp: #{@timestamp.inspect}, version:"\
  " #{@version.inspect}, wlans: #{@wlans.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



158
159
160
161
162
163
164
# File 'lib/mist_api/models/response_config_history_search_item.rb', line 158

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} channel_24: #{@channel_24}, channel_5: #{@channel_5}, radio_macs:"\
  " #{@radio_macs}, radios: #{@radios}, secpolicy_violated: #{@secpolicy_violated}, ssids:"\
  " #{@ssids}, ssids_24: #{@ssids_24}, ssids_5: #{@ssids_5}, timestamp: #{@timestamp},"\
  " version: #{@version}, wlans: #{@wlans}>"
end