Class: MistApi::MistNacedge
- Defined in:
- lib/mist_api/models/mist_nacedge.rb
Overview
MistNacedge Model.
Instance Attribute Summary collapse
-
#auth_ttl ⇒ Integer
Cache of last auth result; in seconds.
-
#default_dot1x_vlan ⇒ String
Default vlan for all dot1x devices, if different from default_vlan.
-
#default_vlan ⇒ String
Default vlan to assign for devices not in the cache.
-
#enabled ⇒ TrueClass | FalseClass
Default vlan to assign for devices not in the cache.
-
#mxedge_hosts ⇒ Array[String]
List of NAC Edges in this site.
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.
Instance Method Summary collapse
-
#initialize(auth_ttl = 604800, default_dot1x_vlan = SKIP, default_vlan = SKIP, enabled = SKIP, mxedge_hosts = SKIP) ⇒ MistNacedge
constructor
A new instance of MistNacedge.
-
#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(auth_ttl = 604800, default_dot1x_vlan = SKIP, default_vlan = SKIP, enabled = SKIP, mxedge_hosts = SKIP) ⇒ MistNacedge
Returns a new instance of MistNacedge.
59 60 61 62 63 64 65 66 |
# File 'lib/mist_api/models/mist_nacedge.rb', line 59 def initialize(auth_ttl = 604800, default_dot1x_vlan = SKIP, default_vlan = SKIP, enabled = SKIP, mxedge_hosts = SKIP) @auth_ttl = auth_ttl unless auth_ttl == SKIP @default_dot1x_vlan = default_dot1x_vlan unless default_dot1x_vlan == SKIP @default_vlan = default_vlan unless default_vlan == SKIP @enabled = enabled unless enabled == SKIP @mxedge_hosts = mxedge_hosts unless mxedge_hosts == SKIP end |
Instance Attribute Details
#auth_ttl ⇒ Integer
Cache of last auth result; in seconds
14 15 16 |
# File 'lib/mist_api/models/mist_nacedge.rb', line 14 def auth_ttl @auth_ttl end |
#default_dot1x_vlan ⇒ String
Default vlan for all dot1x devices, if different from default_vlan
18 19 20 |
# File 'lib/mist_api/models/mist_nacedge.rb', line 18 def default_dot1x_vlan @default_dot1x_vlan end |
#default_vlan ⇒ String
Default vlan to assign for devices not in the cache
22 23 24 |
# File 'lib/mist_api/models/mist_nacedge.rb', line 22 def default_vlan @default_vlan end |
#enabled ⇒ TrueClass | FalseClass
Default vlan to assign for devices not in the cache
26 27 28 |
# File 'lib/mist_api/models/mist_nacedge.rb', line 26 def enabled @enabled end |
#mxedge_hosts ⇒ Array[String]
List of NAC Edges in this site
30 31 32 |
# File 'lib/mist_api/models/mist_nacedge.rb', line 30 def mxedge_hosts @mxedge_hosts 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 |
# File 'lib/mist_api/models/mist_nacedge.rb', line 69 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. auth_ttl = hash['auth_ttl'] ||= 604800 default_dot1x_vlan = hash.key?('default_dot1x_vlan') ? hash['default_dot1x_vlan'] : SKIP default_vlan = hash.key?('default_vlan') ? hash['default_vlan'] : SKIP enabled = hash.key?('enabled') ? hash['enabled'] : SKIP mxedge_hosts = hash.key?('mxedge_hosts') ? hash['mxedge_hosts'] : SKIP # Create object from extracted values. MistNacedge.new(auth_ttl, default_dot1x_vlan, default_vlan, enabled, mxedge_hosts) 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/mist_nacedge.rb', line 33 def self.names @_hash = {} if @_hash.nil? @_hash['auth_ttl'] = 'auth_ttl' @_hash['default_dot1x_vlan'] = 'default_dot1x_vlan' @_hash['default_vlan'] = 'default_vlan' @_hash['enabled'] = 'enabled' @_hash['mxedge_hosts'] = 'mxedge_hosts' @_hash end |
.nullables ⇒ Object
An array for nullable fields
55 56 57 |
# File 'lib/mist_api/models/mist_nacedge.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/mist_nacedge.rb', line 44 def self.optionals %w[ auth_ttl default_dot1x_vlan default_vlan enabled mxedge_hosts ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
96 97 98 99 100 101 |
# File 'lib/mist_api/models/mist_nacedge.rb', line 96 def inspect class_name = self.class.name.split('::').last "<#{class_name} auth_ttl: #{@auth_ttl.inspect}, default_dot1x_vlan:"\ " #{@default_dot1x_vlan.inspect}, default_vlan: #{@default_vlan.inspect}, enabled:"\ " #{@enabled.inspect}, mxedge_hosts: #{@mxedge_hosts.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
89 90 91 92 93 |
# File 'lib/mist_api/models/mist_nacedge.rb', line 89 def to_s class_name = self.class.name.split('::').last "<#{class_name} auth_ttl: #{@auth_ttl}, default_dot1x_vlan: #{@default_dot1x_vlan},"\ " default_vlan: #{@default_vlan}, enabled: #{@enabled}, mxedge_hosts: #{@mxedge_hosts}>" end |