Class: MistApi::ServicePolicyAamw

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/mist_api/models/service_policy_aamw.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(aamwprofile_id = SKIP, enabled = false, profile = ServicePolicyAamwProfileEnum::STANDARD) ⇒ ServicePolicyAamw

Returns a new instance of ServicePolicyAamw.



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

def initialize(aamwprofile_id = SKIP, enabled = false,
               profile = ServicePolicyAamwProfileEnum::STANDARD)
  @aamwprofile_id = aamwprofile_id unless aamwprofile_id == SKIP
  @enabled = enabled unless enabled == SKIP
  @profile = profile unless profile == SKIP
end

Instance Attribute Details

#aamwprofile_idUUID | String

org-level Advanced Advance Anti Malware Profile (SkyAtp) Profile can be used, this takes precedence over ‘profile’

Returns:

  • (UUID | String)


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

def aamwprofile_id
  @aamwprofile_id
end

#enabledTrueClass | FalseClass

org-level Advanced Advance Anti Malware Profile (SkyAtp) Profile can be used, this takes precedence over ‘profile’

Returns:

  • (TrueClass | FalseClass)


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

def enabled
  @enabled
end

#profileServicePolicyAamwProfileEnum

enum: ‘docsonly`, `executables`, `standard`



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

def profile
  @profile
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  aamwprofile_id =
    hash.key?('aamwprofile_id') ? hash['aamwprofile_id'] : SKIP
  enabled = hash['enabled'] ||= false
  profile = hash['profile'] ||= ServicePolicyAamwProfileEnum::STANDARD

  # Create object from extracted values.
  ServicePolicyAamw.new(aamwprofile_id,
                        enabled,
                        profile)
end

.namesObject

A mapping from model property names to API property names.



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

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['aamwprofile_id'] = 'aamwprofile_id'
  @_hash['enabled'] = 'enabled'
  @_hash['profile'] = 'profile'
  @_hash
end

.nullablesObject

An array for nullable fields



45
46
47
# File 'lib/mist_api/models/service_policy_aamw.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/service_policy_aamw.rb', line 36

def self.optionals
  %w[
    aamwprofile_id
    enabled
    profile
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



80
81
82
83
84
# File 'lib/mist_api/models/service_policy_aamw.rb', line 80

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

#to_sObject

Provides a human-readable string representation of the object.



73
74
75
76
77
# File 'lib/mist_api/models/service_policy_aamw.rb', line 73

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} aamwprofile_id: #{@aamwprofile_id}, enabled: #{@enabled}, profile:"\
  " #{@profile}>"
end