Class: MistApi::WlanAppQosOthersItem
- Defined in:
- lib/mist_api/models/wlan_app_qos_others_item.rb
Overview
WlanAppQosOthersItem Model.
Instance Attribute Summary collapse
-
#dscp ⇒ Object
DSCP value range between 0 and 63.
-
#dst_subnet ⇒ String
DSCP value range between 0 and 63.
-
#port_ranges ⇒ String
DSCP value range between 0 and 63.
-
#protocol ⇒ String
DSCP value range between 0 and 63.
-
#src_subnet ⇒ String
DSCP value range between 0 and 63.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(dscp = SKIP, dst_subnet = SKIP, port_ranges = SKIP, protocol = SKIP, src_subnet = SKIP) ⇒ WlanAppQosOthersItem
constructor
A new instance of WlanAppQosOthersItem.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
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
#dscp ⇒ Object
DSCP value range between 0 and 63
14 15 16 |
# File 'lib/mist_api/models/wlan_app_qos_others_item.rb', line 14 def dscp @dscp end |
#dst_subnet ⇒ String
DSCP value range between 0 and 63
18 19 20 |
# File 'lib/mist_api/models/wlan_app_qos_others_item.rb', line 18 def dst_subnet @dst_subnet end |
#port_ranges ⇒ String
DSCP value range between 0 and 63
22 23 24 |
# File 'lib/mist_api/models/wlan_app_qos_others_item.rb', line 22 def port_ranges @port_ranges end |
#protocol ⇒ String
DSCP value range between 0 and 63
26 27 28 |
# File 'lib/mist_api/models/wlan_app_qos_others_item.rb', line 26 def protocol @protocol end |
#src_subnet ⇒ String
DSCP value range between 0 and 63
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 |
.names ⇒ Object
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 |
.nullables ⇒ Object
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 |
.optionals ⇒ Object
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.
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
#inspect ⇒ Object
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_s ⇒ Object
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 |