Class: MistApi::RfTemplateModelSpecificProperty

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

Overview

RfTemplateModelSpecificProperty 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(ant_gain_24 = 0, ant_gain_5 = 0, ant_gain_6 = 0, band_24 = SKIP, band_24_usage = SKIP, band_5 = SKIP, band_5_on_24_radio = SKIP, band_6 = SKIP) ⇒ RfTemplateModelSpecificProperty

Returns a new instance of RfTemplateModelSpecificProperty.



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

def initialize(ant_gain_24 = 0, ant_gain_5 = 0, ant_gain_6 = 0,
               band_24 = SKIP, band_24_usage = SKIP, band_5 = SKIP,
               band_5_on_24_radio = SKIP, band_6 = SKIP)
  @ant_gain_24 = ant_gain_24 unless ant_gain_24 == SKIP
  @ant_gain_5 = ant_gain_5 unless ant_gain_5 == SKIP
  @ant_gain_6 = ant_gain_6 unless ant_gain_6 == SKIP
  @band_24 = band_24 unless band_24 == SKIP
  @band_24_usage = band_24_usage unless band_24_usage == SKIP
  @band_5 = band_5 unless band_5 == SKIP
  @band_5_on_24_radio = band_5_on_24_radio unless band_5_on_24_radio == SKIP
  @band_6 = band_6 unless band_6 == SKIP
end

Instance Attribute Details

#ant_gain_24Integer

TODO: Write general description for this method

Returns:

  • (Integer)


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

def ant_gain_24
  @ant_gain_24
end

#ant_gain_5Integer

TODO: Write general description for this method

Returns:

  • (Integer)


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

def ant_gain_5
  @ant_gain_5
end

#ant_gain_6Integer

TODO: Write general description for this method

Returns:

  • (Integer)


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

def ant_gain_6
  @ant_gain_6
end

#band_24RftemplateRadioBand24

Radio Band AP settings

Returns:

  • (RftemplateRadioBand24)


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

def band_24
  @band_24
end

#band_24_usageRadioBand24UsageEnum

enum: ‘24`, `5`, `6`, `auto`



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

def band_24_usage
  @band_24_usage
end

#band_5RftemplateRadioBand5

Radio Band AP settings

Returns:

  • (RftemplateRadioBand5)


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

def band_5
  @band_5
end

#band_5_on_24_radioRftemplateRadioBand5

Radio Band AP settings

Returns:

  • (RftemplateRadioBand5)


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

def band_5_on_24_radio
  @band_5_on_24_radio
end

#band_6RftemplateRadioBand6

Radio Band AP settings

Returns:

  • (RftemplateRadioBand6)


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

def band_6
  @band_6
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/mist_api/models/rf_template_model_specific_property.rb', line 91

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  ant_gain_24 = hash['ant_gain_24'] ||= 0
  ant_gain_5 = hash['ant_gain_5'] ||= 0
  ant_gain_6 = hash['ant_gain_6'] ||= 0
  band_24 = RftemplateRadioBand24.from_hash(hash['band_24']) if hash['band_24']
  band_24_usage = hash.key?('band_24_usage') ? hash['band_24_usage'] : SKIP
  band_5 = RftemplateRadioBand5.from_hash(hash['band_5']) if hash['band_5']
  band_5_on_24_radio = RftemplateRadioBand5.from_hash(hash['band_5_on_24_radio']) if
    hash['band_5_on_24_radio']
  band_6 = RftemplateRadioBand6.from_hash(hash['band_6']) if hash['band_6']

  # Create object from extracted values.
  RfTemplateModelSpecificProperty.new(ant_gain_24,
                                      ant_gain_5,
                                      ant_gain_6,
                                      band_24,
                                      band_24_usage,
                                      band_5,
                                      band_5_on_24_radio,
                                      band_6)
end

.namesObject

A mapping from model property names to API property names.



45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/mist_api/models/rf_template_model_specific_property.rb', line 45

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['ant_gain_24'] = 'ant_gain_24'
  @_hash['ant_gain_5'] = 'ant_gain_5'
  @_hash['ant_gain_6'] = 'ant_gain_6'
  @_hash['band_24'] = 'band_24'
  @_hash['band_24_usage'] = 'band_24_usage'
  @_hash['band_5'] = 'band_5'
  @_hash['band_5_on_24_radio'] = 'band_5_on_24_radio'
  @_hash['band_6'] = 'band_6'
  @_hash
end

.nullablesObject

An array for nullable fields



73
74
75
# File 'lib/mist_api/models/rf_template_model_specific_property.rb', line 73

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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

def self.optionals
  %w[
    ant_gain_24
    ant_gain_5
    ant_gain_6
    band_24
    band_24_usage
    band_5
    band_5_on_24_radio
    band_6
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



125
126
127
128
129
130
131
# File 'lib/mist_api/models/rf_template_model_specific_property.rb', line 125

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} ant_gain_24: #{@ant_gain_24.inspect}, ant_gain_5: #{@ant_gain_5.inspect},"\
  " ant_gain_6: #{@ant_gain_6.inspect}, band_24: #{@band_24.inspect}, band_24_usage:"\
  " #{@band_24_usage.inspect}, band_5: #{@band_5.inspect}, band_5_on_24_radio:"\
  " #{@band_5_on_24_radio.inspect}, band_6: #{@band_6.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



117
118
119
120
121
122
# File 'lib/mist_api/models/rf_template_model_specific_property.rb', line 117

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} ant_gain_24: #{@ant_gain_24}, ant_gain_5: #{@ant_gain_5}, ant_gain_6:"\
  " #{@ant_gain_6}, band_24: #{@band_24}, band_24_usage: #{@band_24_usage}, band_5:"\
  " #{@band_5}, band_5_on_24_radio: #{@band_5_on_24_radio}, band_6: #{@band_6}>"
end