Class: MistApi::WlanAppQosAppsProperties

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

Overview

WlanAppQosAppsProperties 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, src_subnet = SKIP) ⇒ WlanAppQosAppsProperties

Returns a new instance of WlanAppQosAppsProperties.



49
50
51
52
53
# File 'lib/mist_api/models/wlan_app_qos_apps_properties.rb', line 49

def initialize(dscp = SKIP, dst_subnet = SKIP, src_subnet = SKIP)
  @dscp = dscp unless dscp == SKIP
  @dst_subnet = dst_subnet unless dst_subnet == 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_apps_properties.rb', line 14

def dscp
  @dscp
end

#dst_subnetString

Subnet filter is not required but helps AP to only inspect certain traffic (thus reducing AP load)

Returns:

  • (String)


19
20
21
# File 'lib/mist_api/models/wlan_app_qos_apps_properties.rb', line 19

def dst_subnet
  @dst_subnet
end

#src_subnetString

Subnet filter is not required but helps AP to only inspect certain traffic (thus reducing AP load)

Returns:

  • (String)


24
25
26
# File 'lib/mist_api/models/wlan_app_qos_apps_properties.rb', line 24

def src_subnet
  @src_subnet
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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

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
  src_subnet = hash.key?('src_subnet') ? hash['src_subnet'] : SKIP

  # Create object from extracted values.
  WlanAppQosAppsProperties.new(dscp,
                               dst_subnet,
                               src_subnet)
end

.namesObject

A mapping from model property names to API property names.



27
28
29
30
31
32
33
# File 'lib/mist_api/models/wlan_app_qos_apps_properties.rb', line 27

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

.nullablesObject

An array for nullable fields



45
46
47
# File 'lib/mist_api/models/wlan_app_qos_apps_properties.rb', line 45

def self.nullables
  []
end

.optionalsObject

An array for optional fields



36
37
38
39
40
41
42
# File 'lib/mist_api/models/wlan_app_qos_apps_properties.rb', line 36

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

.validate(value) ⇒ Object

Validates an instance of the object from a given value.

Parameters:



74
75
76
77
78
79
80
# File 'lib/mist_api/models/wlan_app_qos_apps_properties.rb', line 74

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.



89
90
91
92
93
# File 'lib/mist_api/models/wlan_app_qos_apps_properties.rb', line 89

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

#to_sObject

Provides a human-readable string representation of the object.



83
84
85
86
# File 'lib/mist_api/models/wlan_app_qos_apps_properties.rb', line 83

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