Class: MistApi::OrgSettingVpnOptions
- Defined in:
- lib/mist_api/models/org_setting_vpn_options.rb
Overview
OrgSettingVpnOptions Model.
Instance Attribute Summary collapse
-
#as_base ⇒ Integer
TODO: Write general description for this method.
-
#enable_ipv6 ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#st_subnet ⇒ String
requiring /12 or bigger to support 16 private IPs for 65535 gateways.
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(as_base = SKIP, enable_ipv6 = false, st_subnet = '10.224.0.0/12') ⇒ OrgSettingVpnOptions
constructor
A new instance of OrgSettingVpnOptions.
-
#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(as_base = SKIP, enable_ipv6 = false, st_subnet = '10.224.0.0/12') ⇒ OrgSettingVpnOptions
Returns a new instance of OrgSettingVpnOptions.
47 48 49 50 51 52 |
# File 'lib/mist_api/models/org_setting_vpn_options.rb', line 47 def initialize(as_base = SKIP, enable_ipv6 = false, st_subnet = '10.224.0.0/12') @as_base = as_base unless as_base == SKIP @enable_ipv6 = enable_ipv6 unless enable_ipv6 == SKIP @st_subnet = st_subnet unless st_subnet == SKIP end |
Instance Attribute Details
#as_base ⇒ Integer
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/org_setting_vpn_options.rb', line 14 def as_base @as_base end |
#enable_ipv6 ⇒ TrueClass | FalseClass
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/org_setting_vpn_options.rb', line 18 def enable_ipv6 @enable_ipv6 end |
#st_subnet ⇒ String
requiring /12 or bigger to support 16 private IPs for 65535 gateways
22 23 24 |
# File 'lib/mist_api/models/org_setting_vpn_options.rb', line 22 def st_subnet @st_subnet end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/mist_api/models/org_setting_vpn_options.rb', line 55 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. as_base = hash.key?('as_base') ? hash['as_base'] : SKIP enable_ipv6 = hash['enable_ipv6'] ||= false st_subnet = hash['st_subnet'] ||= '10.224.0.0/12' # Create object from extracted values. OrgSettingVpnOptions.new(as_base, enable_ipv6, st_subnet) end |
.names ⇒ Object
A mapping from model property names to API property names.
25 26 27 28 29 30 31 |
# File 'lib/mist_api/models/org_setting_vpn_options.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['as_base'] = 'as_base' @_hash['enable_ipv6'] = 'enable_ipv6' @_hash['st_subnet'] = 'st_subnet' @_hash end |
.nullables ⇒ Object
An array for nullable fields
43 44 45 |
# File 'lib/mist_api/models/org_setting_vpn_options.rb', line 43 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
34 35 36 37 38 39 40 |
# File 'lib/mist_api/models/org_setting_vpn_options.rb', line 34 def self.optionals %w[ as_base enable_ipv6 st_subnet ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
77 78 79 80 81 |
# File 'lib/mist_api/models/org_setting_vpn_options.rb', line 77 def inspect class_name = self.class.name.split('::').last "<#{class_name} as_base: #{@as_base.inspect}, enable_ipv6: #{@enable_ipv6.inspect},"\ " st_subnet: #{@st_subnet.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
70 71 72 73 74 |
# File 'lib/mist_api/models/org_setting_vpn_options.rb', line 70 def to_s class_name = self.class.name.split('::').last "<#{class_name} as_base: #{@as_base}, enable_ipv6: #{@enable_ipv6}, st_subnet:"\ " #{@st_subnet}>" end |