Class: MistApi::WlanAppQosOthersItem

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

Overview

WlanAppQosOthersItem 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(dscp = SKIP, dst_subnet = SKIP, port_ranges = SKIP, protocol = SKIP, src_subnet = SKIP) ⇒ WlanAppQosOthersItem

Returns a new instance of WlanAppQosOthersItem.



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

def initialize(dscp = SKIP, dst_subnet = SKIP, port_ranges = SKIP,
               protocol = SKIP, src_subnet = SKIP)
  @dscp = dscp unless dscp == SKIP
  @dst_subnet = dst_subnet unless dst_subnet == SKIP
  @port_ranges = port_ranges unless port_ranges == SKIP
  @protocol = protocol unless protocol == SKIP
  @src_subnet = src_subnet unless src_subnet == SKIP
end

Instance Attribute Details

#dscpObject

DSCP value range between 0 and 63

Returns:

  • (Object)


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

def dscp
  @dscp
end

#dst_subnetString

DSCP value range between 0 and 63

Returns:

  • (String)


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

def dst_subnet
  @dst_subnet
end

#port_rangesString

DSCP value range between 0 and 63

Returns:

  • (String)


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

def port_ranges
  @port_ranges
end

#protocolString

DSCP value range between 0 and 63

Returns:

  • (String)


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

def protocol
  @protocol
end

#src_subnetString

DSCP value range between 0 and 63

Returns:

  • (String)


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

def src_subnet
  @src_subnet
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
86
87
# File 'lib/mist_api/models/wlan_app_qos_others_item.rb', line 69

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  dscp = hash.key?('dscp') ? APIHelper.deserialize_union_type(
    UnionTypeLookUp.get(:Dscp), hash['dscp']
  ) : SKIP
  dst_subnet = hash.key?('dst_subnet') ? hash['dst_subnet'] : SKIP
  port_ranges = hash.key?('port_ranges') ? hash['port_ranges'] : SKIP
  protocol = hash.key?('protocol') ? hash['protocol'] : SKIP
  src_subnet = hash.key?('src_subnet') ? hash['src_subnet'] : SKIP

  # Create object from extracted values.
  WlanAppQosOthersItem.new(dscp,
                           dst_subnet,
                           port_ranges,
                           protocol,
                           src_subnet)
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/wlan_app_qos_others_item.rb', line 33

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['dscp'] = 'dscp'
  @_hash['dst_subnet'] = 'dst_subnet'
  @_hash['port_ranges'] = 'port_ranges'
  @_hash['protocol'] = 'protocol'
  @_hash['src_subnet'] = 'src_subnet'
  @_hash
end

.nullablesObject

An array for nullable fields



55
56
57
# File 'lib/mist_api/models/wlan_app_qos_others_item.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/wlan_app_qos_others_item.rb', line 44

def self.optionals
  %w[
    dscp
    dst_subnet
    port_ranges
    protocol
    src_subnet
  ]
end

.validate(value) ⇒ Object

Validates an instance of the object from a given value.

Parameters:



91
92
93
94
95
96
97
# File 'lib/mist_api/models/wlan_app_qos_others_item.rb', line 91

def self.validate(value)
  return true if value.instance_of? self

  return false unless value.instance_of? Hash

  true
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



107
108
109
110
111
112
# File 'lib/mist_api/models/wlan_app_qos_others_item.rb', line 107

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} dscp: #{@dscp.inspect}, dst_subnet: #{@dst_subnet.inspect}, port_ranges:"\
  " #{@port_ranges.inspect}, protocol: #{@protocol.inspect}, src_subnet:"\
  " #{@src_subnet.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



100
101
102
103
104
# File 'lib/mist_api/models/wlan_app_qos_others_item.rb', line 100

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} dscp: #{@dscp}, dst_subnet: #{@dst_subnet}, port_ranges: #{@port_ranges},"\
  " protocol: #{@protocol}, src_subnet: #{@src_subnet}>"
end