Class: MistApi::ServicePolicySkyatp

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

Overview

SRX only

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(dns_dga_detection = SKIP, dns_tunnel_detection = SKIP, http_inspection = SKIP, iot_device_policy = SKIP) ⇒ ServicePolicySkyatp

Returns a new instance of ServicePolicySkyatp.



53
54
55
56
57
58
59
# File 'lib/mist_api/models/service_policy_skyatp.rb', line 53

def initialize(dns_dga_detection = SKIP, dns_tunnel_detection = SKIP,
               http_inspection = SKIP, iot_device_policy = SKIP)
  @dns_dga_detection = dns_dga_detection unless dns_dga_detection == SKIP
  @dns_tunnel_detection = dns_tunnel_detection unless dns_tunnel_detection == SKIP
  @http_inspection = http_inspection unless http_inspection == SKIP
  @iot_device_policy = iot_device_policy unless iot_device_policy == SKIP
end

Instance Attribute Details

#dns_dga_detectionServicePolicySkyatpDnsDgaDetection

TODO: Write general description for this method



14
15
16
# File 'lib/mist_api/models/service_policy_skyatp.rb', line 14

def dns_dga_detection
  @dns_dga_detection
end

#dns_tunnel_detectionServicePolicySkyatpDnsTunnelDetection

TODO: Write general description for this method



18
19
20
# File 'lib/mist_api/models/service_policy_skyatp.rb', line 18

def dns_tunnel_detection
  @dns_tunnel_detection
end

#http_inspectionServicePolicySkyatpHttpInspection

TODO: Write general description for this method



22
23
24
# File 'lib/mist_api/models/service_policy_skyatp.rb', line 22

def http_inspection
  @http_inspection
end

#iot_device_policyServicePolicySkyatpIotDevicePolicy

TODO: Write general description for this method



26
27
28
# File 'lib/mist_api/models/service_policy_skyatp.rb', line 26

def iot_device_policy
  @iot_device_policy
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
# File 'lib/mist_api/models/service_policy_skyatp.rb', line 62

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  dns_dga_detection = ServicePolicySkyatpDnsDgaDetection.from_hash(hash['dns_dga_detection']) if
    hash['dns_dga_detection']
  if hash['dns_tunnel_detection']
    dns_tunnel_detection = ServicePolicySkyatpDnsTunnelDetection.from_hash(hash['dns_tunnel_detection'])
  end
  http_inspection = ServicePolicySkyatpHttpInspection.from_hash(hash['http_inspection']) if
    hash['http_inspection']
  iot_device_policy = ServicePolicySkyatpIotDevicePolicy.from_hash(hash['iot_device_policy']) if
    hash['iot_device_policy']

  # Create object from extracted values.
  ServicePolicySkyatp.new(dns_dga_detection,
                          dns_tunnel_detection,
                          http_inspection,
                          iot_device_policy)
end

.namesObject

A mapping from model property names to API property names.



29
30
31
32
33
34
35
36
# File 'lib/mist_api/models/service_policy_skyatp.rb', line 29

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['dns_dga_detection'] = 'dns_dga_detection'
  @_hash['dns_tunnel_detection'] = 'dns_tunnel_detection'
  @_hash['http_inspection'] = 'http_inspection'
  @_hash['iot_device_policy'] = 'iot_device_policy'
  @_hash
end

.nullablesObject

An array for nullable fields



49
50
51
# File 'lib/mist_api/models/service_policy_skyatp.rb', line 49

def self.nullables
  []
end

.optionalsObject

An array for optional fields



39
40
41
42
43
44
45
46
# File 'lib/mist_api/models/service_policy_skyatp.rb', line 39

def self.optionals
  %w[
    dns_dga_detection
    dns_tunnel_detection
    http_inspection
    iot_device_policy
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



92
93
94
95
96
97
# File 'lib/mist_api/models/service_policy_skyatp.rb', line 92

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} dns_dga_detection: #{@dns_dga_detection.inspect}, dns_tunnel_detection:"\
  " #{@dns_tunnel_detection.inspect}, http_inspection: #{@http_inspection.inspect},"\
  " iot_device_policy: #{@iot_device_policy.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



84
85
86
87
88
89
# File 'lib/mist_api/models/service_policy_skyatp.rb', line 84

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} dns_dga_detection: #{@dns_dga_detection}, dns_tunnel_detection:"\
  " #{@dns_tunnel_detection}, http_inspection: #{@http_inspection}, iot_device_policy:"\
  " #{@iot_device_policy}>"
end