Class: MistApi::TunnelConfigAutoProvision
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::TunnelConfigAutoProvision
- Defined in:
- lib/mist_api/models/tunnel_config_auto_provision.rb
Overview
Auto Provisioning configuration for the tunne. This takes precedence over the ‘primary` and `secondary` nodes.
Instance Attribute Summary collapse
-
#enabled ⇒ TrueClass | FalseClass
Enable auto provisioning for the tunnel.
-
#latlng ⇒ TunnelConfigAutoProvisionLatLng
API override for POP selection.
-
#primary ⇒ TunnelConfigAutoProvisionNode
API override for POP selection.
-
#provider ⇒ TunnelConfigAutoProvisionProviderEnum
enum: ‘jse-ipsec`, `zscaler-ipsec`.
-
#region ⇒ String
API override for POP selection in the case user wants to override the auto discovery of remote network location and force the tunnel to use the specified peer location.
-
#secondary ⇒ TunnelConfigAutoProvisionNode
API override for POP selection in the case user wants to override the auto discovery of remote network location and force the tunnel to use the specified peer location.
-
#service_connection ⇒ String
if ‘provider`==`prisma-ipsec`.
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(provider = nil, enabled = SKIP, latlng = SKIP, primary = SKIP, region = SKIP, secondary = SKIP, service_connection = SKIP) ⇒ TunnelConfigAutoProvision
constructor
A new instance of TunnelConfigAutoProvision.
-
#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(provider = nil, enabled = SKIP, latlng = SKIP, primary = SKIP, region = SKIP, secondary = SKIP, service_connection = SKIP) ⇒ TunnelConfigAutoProvision
Returns a new instance of TunnelConfigAutoProvision.
82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/mist_api/models/tunnel_config_auto_provision.rb', line 82 def initialize(provider = nil, enabled = SKIP, latlng = SKIP, primary = SKIP, region = SKIP, secondary = SKIP, service_connection = SKIP) @enabled = enabled unless enabled == SKIP @latlng = latlng unless latlng == SKIP @primary = primary unless primary == SKIP @provider = provider @region = region unless region == SKIP @secondary = secondary unless secondary == SKIP @service_connection = service_connection unless service_connection == SKIP end |
Instance Attribute Details
#enabled ⇒ TrueClass | FalseClass
Enable auto provisioning for the tunnel. If enabled, the ‘primary` and `secondary` nodes will be ignored.
16 17 18 |
# File 'lib/mist_api/models/tunnel_config_auto_provision.rb', line 16 def enabled @enabled end |
#latlng ⇒ TunnelConfigAutoProvisionLatLng
API override for POP selection
20 21 22 |
# File 'lib/mist_api/models/tunnel_config_auto_provision.rb', line 20 def latlng @latlng end |
#primary ⇒ TunnelConfigAutoProvisionNode
API override for POP selection
24 25 26 |
# File 'lib/mist_api/models/tunnel_config_auto_provision.rb', line 24 def primary @primary end |
#provider ⇒ TunnelConfigAutoProvisionProviderEnum
enum: ‘jse-ipsec`, `zscaler-ipsec`
28 29 30 |
# File 'lib/mist_api/models/tunnel_config_auto_provision.rb', line 28 def provider @provider end |
#region ⇒ String
API override for POP selection in the case user wants to override the auto discovery of remote network location and force the tunnel to use the specified peer location.
34 35 36 |
# File 'lib/mist_api/models/tunnel_config_auto_provision.rb', line 34 def region @region end |
#secondary ⇒ TunnelConfigAutoProvisionNode
API override for POP selection in the case user wants to override the auto discovery of remote network location and force the tunnel to use the specified peer location.
40 41 42 |
# File 'lib/mist_api/models/tunnel_config_auto_provision.rb', line 40 def secondary @secondary end |
#service_connection ⇒ String
if ‘provider`==`prisma-ipsec`. By default, we’ll use the location of the site to determine the optimal Remote Network location, optionally, service_connection can be considered, then we’ll also consider this along with the site location. Define service_connection if the traffic is to be routed to a specific service connection. This field takes a service connection name that is configured in the Prisma cloud, Prisma Access Setup -> Service Connections.
50 51 52 |
# File 'lib/mist_api/models/tunnel_config_auto_provision.rb', line 50 def service_connection @service_connection end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/mist_api/models/tunnel_config_auto_provision.rb', line 95 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. provider = hash.key?('provider') ? hash['provider'] : nil enabled = hash.key?('enabled') ? hash['enabled'] : SKIP latlng = TunnelConfigAutoProvisionLatLng.from_hash(hash['latlng']) if hash['latlng'] primary = TunnelConfigAutoProvisionNode.from_hash(hash['primary']) if hash['primary'] region = hash.key?('region') ? hash['region'] : SKIP secondary = TunnelConfigAutoProvisionNode.from_hash(hash['secondary']) if hash['secondary'] service_connection = hash.key?('service_connection') ? hash['service_connection'] : SKIP # Create object from extracted values. TunnelConfigAutoProvision.new(provider, enabled, latlng, primary, region, secondary, service_connection) end |
.names ⇒ Object
A mapping from model property names to API property names.
53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/mist_api/models/tunnel_config_auto_provision.rb', line 53 def self.names @_hash = {} if @_hash.nil? @_hash['enabled'] = 'enabled' @_hash['latlng'] = 'latlng' @_hash['primary'] = 'primary' @_hash['provider'] = 'provider' @_hash['region'] = 'region' @_hash['secondary'] = 'secondary' @_hash['service_connection'] = 'service_connection' @_hash end |
.nullables ⇒ Object
An array for nullable fields
78 79 80 |
# File 'lib/mist_api/models/tunnel_config_auto_provision.rb', line 78 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
66 67 68 69 70 71 72 73 74 75 |
# File 'lib/mist_api/models/tunnel_config_auto_provision.rb', line 66 def self.optionals %w[ enabled latlng primary region secondary service_connection ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
127 128 129 130 131 132 |
# File 'lib/mist_api/models/tunnel_config_auto_provision.rb', line 127 def inspect class_name = self.class.name.split('::').last "<#{class_name} enabled: #{@enabled.inspect}, latlng: #{@latlng.inspect}, primary:"\ " #{@primary.inspect}, provider: #{@provider.inspect}, region: #{@region.inspect},"\ " secondary: #{@secondary.inspect}, service_connection: #{@service_connection.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
119 120 121 122 123 124 |
# File 'lib/mist_api/models/tunnel_config_auto_provision.rb', line 119 def to_s class_name = self.class.name.split('::').last "<#{class_name} enabled: #{@enabled}, latlng: #{@latlng}, primary: #{@primary}, provider:"\ " #{@provider}, region: #{@region}, secondary: #{@secondary}, service_connection:"\ " #{@service_connection}>" end |