Class: MistApi::ResponseRunningSpectrumAnalysis

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

Overview

ResponseRunningSpectrumAnalysis 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(band = SKIP, device_id = SKIP, duration = SKIP, format = SKIP, started_time = SKIP) ⇒ ResponseRunningSpectrumAnalysis

Returns a new instance of ResponseRunningSpectrumAnalysis.



59
60
61
62
63
64
65
66
# File 'lib/mist_api/models/response_running_spectrum_analysis.rb', line 59

def initialize(band = SKIP, device_id = SKIP, duration = SKIP,
               format = SKIP, started_time = SKIP)
  @band = band unless band == SKIP
  @device_id = device_id unless device_id == SKIP
  @duration = duration unless duration == SKIP
  @format = format unless format == SKIP
  @started_time = started_time unless started_time == SKIP
end

Instance Attribute Details

#bandString

Band on which the spectrum analysis is running (e.g., 24, 5, 6)

Returns:

  • (String)


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

def band
  @band
end

#device_idUUID | String

Device ID of the AP that is running spectrum analysis

Returns:

  • (UUID | String)


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

def device_id
  @device_id
end

#durationInteger

Duration of the spectrum analysis in seconds

Returns:

  • (Integer)


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

def duration
  @duration
end

#formatString

Format of the spectrum analysis data (e.g., json, stream)

Returns:

  • (String)


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

def format
  @format
end

#started_timeInteger

Time when the spectrum analysis was started

Returns:

  • (Integer)


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

def started_time
  @started_time
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/mist_api/models/response_running_spectrum_analysis.rb', line 69

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  band = hash.key?('band') ? hash['band'] : SKIP
  device_id = hash.key?('device_id') ? hash['device_id'] : SKIP
  duration = hash.key?('duration') ? hash['duration'] : SKIP
  format = hash.key?('format') ? hash['format'] : SKIP
  started_time = hash.key?('started_time') ? hash['started_time'] : SKIP

  # Create object from extracted values.
  ResponseRunningSpectrumAnalysis.new(band,
                                      device_id,
                                      duration,
                                      format,
                                      started_time)
end

.namesObject

A mapping from model property names to API property names.



33
34
35
36
37
38
39
40
41
# File 'lib/mist_api/models/response_running_spectrum_analysis.rb', line 33

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['band'] = 'band'
  @_hash['device_id'] = 'device_id'
  @_hash['duration'] = 'duration'
  @_hash['format'] = 'format'
  @_hash['started_time'] = 'started_time'
  @_hash
end

.nullablesObject

An array for nullable fields



55
56
57
# File 'lib/mist_api/models/response_running_spectrum_analysis.rb', line 55

def self.nullables
  []
end

.optionalsObject

An array for optional fields



44
45
46
47
48
49
50
51
52
# File 'lib/mist_api/models/response_running_spectrum_analysis.rb', line 44

def self.optionals
  %w[
    band
    device_id
    duration
    format
    started_time
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



95
96
97
98
99
# File 'lib/mist_api/models/response_running_spectrum_analysis.rb', line 95

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} band: #{@band.inspect}, device_id: #{@device_id.inspect}, duration:"\
  " #{@duration.inspect}, format: #{@format.inspect}, started_time: #{@started_time.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



88
89
90
91
92
# File 'lib/mist_api/models/response_running_spectrum_analysis.rb', line 88

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} band: #{@band}, device_id: #{@device_id}, duration: #{@duration}, format:"\
  " #{@format}, started_time: #{@started_time}>"
end