Class: MistApi::SiteMxtunnelRadsec
- Defined in:
- lib/mist_api/models/site_mxtunnel_radsec.rb
Overview
SiteMxtunnelRadsec Model.
Instance Attribute Summary collapse
-
#acct_servers ⇒ Array[RadiusAcctServer]
TODO: Write general description for this method.
-
#auth_servers ⇒ Array[RadiusAuthServer]
TODO: Write general description for this method.
-
#enabled ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#use_mxedge ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
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(acct_servers = SKIP, auth_servers = SKIP, enabled = false, use_mxedge = SKIP) ⇒ SiteMxtunnelRadsec
constructor
A new instance of SiteMxtunnelRadsec.
-
#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(acct_servers = SKIP, auth_servers = SKIP, enabled = false, use_mxedge = SKIP) ⇒ SiteMxtunnelRadsec
Returns a new instance of SiteMxtunnelRadsec.
53 54 55 56 57 58 59 |
# File 'lib/mist_api/models/site_mxtunnel_radsec.rb', line 53 def initialize(acct_servers = SKIP, auth_servers = SKIP, enabled = false, use_mxedge = SKIP) @acct_servers = acct_servers unless acct_servers == SKIP @auth_servers = auth_servers unless auth_servers == SKIP @enabled = enabled unless enabled == SKIP @use_mxedge = use_mxedge unless use_mxedge == SKIP end |
Instance Attribute Details
#acct_servers ⇒ Array[RadiusAcctServer]
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/site_mxtunnel_radsec.rb', line 14 def acct_servers @acct_servers end |
#auth_servers ⇒ Array[RadiusAuthServer]
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/site_mxtunnel_radsec.rb', line 18 def auth_servers @auth_servers end |
#enabled ⇒ TrueClass | FalseClass
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/site_mxtunnel_radsec.rb', line 22 def enabled @enabled end |
#use_mxedge ⇒ TrueClass | FalseClass
TODO: Write general description for this method
26 27 28 |
# File 'lib/mist_api/models/site_mxtunnel_radsec.rb', line 26 def use_mxedge @use_mxedge end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/mist_api/models/site_mxtunnel_radsec.rb', line 62 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. # Parameter is an array, so we need to iterate through it acct_servers = nil unless hash['acct_servers'].nil? acct_servers = [] hash['acct_servers'].each do |structure| acct_servers << (RadiusAcctServer.from_hash(structure) if structure) end end acct_servers = SKIP unless hash.key?('acct_servers') # Parameter is an array, so we need to iterate through it auth_servers = nil unless hash['auth_servers'].nil? auth_servers = [] hash['auth_servers'].each do |structure| auth_servers << (RadiusAuthServer.from_hash(structure) if structure) end end auth_servers = SKIP unless hash.key?('auth_servers') enabled = hash['enabled'] ||= false use_mxedge = hash.key?('use_mxedge') ? hash['use_mxedge'] : SKIP # Create object from extracted values. SiteMxtunnelRadsec.new(acct_servers, auth_servers, enabled, use_mxedge) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 |
# File 'lib/mist_api/models/site_mxtunnel_radsec.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['acct_servers'] = 'acct_servers' @_hash['auth_servers'] = 'auth_servers' @_hash['enabled'] = 'enabled' @_hash['use_mxedge'] = 'use_mxedge' @_hash end |
.nullables ⇒ Object
An array for nullable fields
49 50 51 |
# File 'lib/mist_api/models/site_mxtunnel_radsec.rb', line 49 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 42 43 44 45 46 |
# File 'lib/mist_api/models/site_mxtunnel_radsec.rb', line 39 def self.optionals %w[ acct_servers auth_servers enabled use_mxedge ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
104 105 106 107 108 109 |
# File 'lib/mist_api/models/site_mxtunnel_radsec.rb', line 104 def inspect class_name = self.class.name.split('::').last "<#{class_name} acct_servers: #{@acct_servers.inspect}, auth_servers:"\ " #{@auth_servers.inspect}, enabled: #{@enabled.inspect}, use_mxedge:"\ " #{@use_mxedge.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
97 98 99 100 101 |
# File 'lib/mist_api/models/site_mxtunnel_radsec.rb', line 97 def to_s class_name = self.class.name.split('::').last "<#{class_name} acct_servers: #{@acct_servers}, auth_servers: #{@auth_servers}, enabled:"\ " #{@enabled}, use_mxedge: #{@use_mxedge}>" end |