Class: MistApi::TunnelProviderOptions

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/mist_api/models/tunnel_provider_options.rb

Overview

TunnelProviderOptions Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(jse = SKIP, prisma = SKIP, zscaler = SKIP) ⇒ TunnelProviderOptions

Returns a new instance of TunnelProviderOptions.



49
50
51
52
53
# File 'lib/mist_api/models/tunnel_provider_options.rb', line 49

def initialize(jse = SKIP, prisma = SKIP, zscaler = SKIP)
  @jse = jse unless jse == SKIP
  @prisma = prisma unless prisma == SKIP
  @zscaler = zscaler unless zscaler == SKIP
end

Instance Attribute Details

#jseTunnelProviderOptionsJse

For jse-ipsec, this allows provisioning of adequate resource on JSE. Make sure adequate licenses are added



15
16
17
# File 'lib/mist_api/models/tunnel_provider_options.rb', line 15

def jse
  @jse
end

#prismaTunnelProviderOptionsPrisma

For jse-ipsec, this allows provisioning of adequate resource on JSE. Make sure adequate licenses are added



20
21
22
# File 'lib/mist_api/models/tunnel_provider_options.rb', line 20

def prisma
  @prisma
end

#zscalerTunnelProviderOptionsZscaler

For zscaler-ipsec and zscaler-gre



24
25
26
# File 'lib/mist_api/models/tunnel_provider_options.rb', line 24

def zscaler
  @zscaler
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/mist_api/models/tunnel_provider_options.rb', line 56

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  jse = TunnelProviderOptionsJse.from_hash(hash['jse']) if hash['jse']
  prisma = TunnelProviderOptionsPrisma.from_hash(hash['prisma']) if hash['prisma']
  zscaler = TunnelProviderOptionsZscaler.from_hash(hash['zscaler']) if hash['zscaler']

  # Create object from extracted values.
  TunnelProviderOptions.new(jse,
                            prisma,
                            zscaler)
end

.namesObject

A mapping from model property names to API property names.



27
28
29
30
31
32
33
# File 'lib/mist_api/models/tunnel_provider_options.rb', line 27

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['jse'] = 'jse'
  @_hash['prisma'] = 'prisma'
  @_hash['zscaler'] = 'zscaler'
  @_hash
end

.nullablesObject

An array for nullable fields



45
46
47
# File 'lib/mist_api/models/tunnel_provider_options.rb', line 45

def self.nullables
  []
end

.optionalsObject

An array for optional fields



36
37
38
39
40
41
42
# File 'lib/mist_api/models/tunnel_provider_options.rb', line 36

def self.optionals
  %w[
    jse
    prisma
    zscaler
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



77
78
79
80
81
# File 'lib/mist_api/models/tunnel_provider_options.rb', line 77

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} jse: #{@jse.inspect}, prisma: #{@prisma.inspect}, zscaler:"\
  " #{@zscaler.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



71
72
73
74
# File 'lib/mist_api/models/tunnel_provider_options.rb', line 71

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} jse: #{@jse}, prisma: #{@prisma}, zscaler: #{@zscaler}>"
end