Class: MistApi::NacRuleMatching

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

Overview

NacRuleMatching 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(auth_type = SKIP, family = SKIP, mfg = SKIP, model = SKIP, nactags = SKIP, os_type = SKIP, port_types = SKIP, site_ids = SKIP, sitegroup_ids = SKIP, vendor = SKIP) ⇒ NacRuleMatching

Returns a new instance of NacRuleMatching.



102
103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/mist_api/models/nac_rule_matching.rb', line 102

def initialize(auth_type = SKIP, family = SKIP, mfg = SKIP, model = SKIP,
               nactags = SKIP, os_type = SKIP, port_types = SKIP,
               site_ids = SKIP, sitegroup_ids = SKIP, vendor = SKIP)
  @auth_type = auth_type unless auth_type == SKIP
  @family = family unless family == SKIP
  @mfg = mfg unless mfg == SKIP
  @model = model unless model == SKIP
  @nactags = nactags unless nactags == SKIP
  @os_type = os_type unless os_type == SKIP
  @port_types = port_types unless port_types == SKIP
  @site_ids = site_ids unless site_ids == SKIP
  @sitegroup_ids = sitegroup_ids unless sitegroup_ids == SKIP
  @vendor = vendor unless vendor == SKIP
end

Instance Attribute Details

#auth_typeNacAuthTypeEnum

enum: ‘cert`, `device-auth`, `eap-teap`, `eap-tls`, `eap-ttls`, `idp`, `mab`, `eap-peap`

Returns:



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

def auth_type
  @auth_type
end

#familyArray[String]

List of client device families to match. Refer to [List Fingerprint Types]]($e/Constants%20Definitions/listFingerprintTypes) for allowed family values

Returns:

  • (Array[String])


21
22
23
# File 'lib/mist_api/models/nac_rule_matching.rb', line 21

def family
  @family
end

#mfgArray[String]

List of client device models to match. Refer to [List Fingerprint Types]]($e/Constants%20Definitions/listFingerprintTypes) for allowed model values

Returns:

  • (Array[String])


27
28
29
# File 'lib/mist_api/models/nac_rule_matching.rb', line 27

def mfg
  @mfg
end

#modelArray[String]

List of client device manufacturers to match. Refer to [List Fingerprint Types]]($e/Constants%20Definitions/listFingerprintTypes) for allowed mfg values

Returns:

  • (Array[String])


33
34
35
# File 'lib/mist_api/models/nac_rule_matching.rb', line 33

def model
  @model
end

#nactagsArray[String]

List of client device manufacturers to match. Refer to [List Fingerprint Types]]($e/Constants%20Definitions/listFingerprintTypes) for allowed mfg values

Returns:

  • (Array[String])


39
40
41
# File 'lib/mist_api/models/nac_rule_matching.rb', line 39

def nactags
  @nactags
end

#os_typeArray[String]

List of client device os types to match. Refer to [List Fingerprint Types]]($e/Constants%20Definitions/listFingerprintTypes) for allowed os_type values

Returns:

  • (Array[String])


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

def os_type
  @os_type
end

#port_typesArray[NacRuleMatchingPortTypeEnum]

List of client device os types to match. Refer to [List Fingerprint Types]]($e/Constants%20Definitions/listFingerprintTypes) for allowed os_type values

Returns:



51
52
53
# File 'lib/mist_api/models/nac_rule_matching.rb', line 51

def port_types
  @port_types
end

#site_idsArray[UUID | String]

List of site ids to match

Returns:

  • (Array[UUID | String])


55
56
57
# File 'lib/mist_api/models/nac_rule_matching.rb', line 55

def site_ids
  @site_ids
end

#sitegroup_idsArray[UUID | String]

List of sitegroup ids to match

Returns:

  • (Array[UUID | String])


59
60
61
# File 'lib/mist_api/models/nac_rule_matching.rb', line 59

def sitegroup_ids
  @sitegroup_ids
end

#vendorArray[String]

List of vendors to match

Returns:

  • (Array[String])


63
64
65
# File 'lib/mist_api/models/nac_rule_matching.rb', line 63

def vendor
  @vendor
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# File 'lib/mist_api/models/nac_rule_matching.rb', line 118

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  auth_type = hash.key?('auth_type') ? hash['auth_type'] : SKIP
  family = hash.key?('family') ? hash['family'] : SKIP
  mfg = hash.key?('mfg') ? hash['mfg'] : SKIP
  model = hash.key?('model') ? hash['model'] : SKIP
  nactags = hash.key?('nactags') ? hash['nactags'] : SKIP
  os_type = hash.key?('os_type') ? hash['os_type'] : SKIP
  port_types = hash.key?('port_types') ? hash['port_types'] : SKIP
  site_ids = hash.key?('site_ids') ? hash['site_ids'] : SKIP
  sitegroup_ids = hash.key?('sitegroup_ids') ? hash['sitegroup_ids'] : SKIP
  vendor = hash.key?('vendor') ? hash['vendor'] : SKIP

  # Create object from extracted values.
  NacRuleMatching.new(auth_type,
                      family,
                      mfg,
                      model,
                      nactags,
                      os_type,
                      port_types,
                      site_ids,
                      sitegroup_ids,
                      vendor)
end

.namesObject

A mapping from model property names to API property names.



66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/mist_api/models/nac_rule_matching.rb', line 66

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['auth_type'] = 'auth_type'
  @_hash['family'] = 'family'
  @_hash['mfg'] = 'mfg'
  @_hash['model'] = 'model'
  @_hash['nactags'] = 'nactags'
  @_hash['os_type'] = 'os_type'
  @_hash['port_types'] = 'port_types'
  @_hash['site_ids'] = 'site_ids'
  @_hash['sitegroup_ids'] = 'sitegroup_ids'
  @_hash['vendor'] = 'vendor'
  @_hash
end

.nullablesObject

An array for nullable fields



98
99
100
# File 'lib/mist_api/models/nac_rule_matching.rb', line 98

def self.nullables
  []
end

.optionalsObject

An array for optional fields



82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/mist_api/models/nac_rule_matching.rb', line 82

def self.optionals
  %w[
    auth_type
    family
    mfg
    model
    nactags
    os_type
    port_types
    site_ids
    sitegroup_ids
    vendor
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



155
156
157
158
159
160
161
# File 'lib/mist_api/models/nac_rule_matching.rb', line 155

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} auth_type: #{@auth_type.inspect}, family: #{@family.inspect}, mfg:"\
  " #{@mfg.inspect}, model: #{@model.inspect}, nactags: #{@nactags.inspect}, os_type:"\
  " #{@os_type.inspect}, port_types: #{@port_types.inspect}, site_ids: #{@site_ids.inspect},"\
  " sitegroup_ids: #{@sitegroup_ids.inspect}, vendor: #{@vendor.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



147
148
149
150
151
152
# File 'lib/mist_api/models/nac_rule_matching.rb', line 147

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} auth_type: #{@auth_type}, family: #{@family}, mfg: #{@mfg}, model:"\
  " #{@model}, nactags: #{@nactags}, os_type: #{@os_type}, port_types: #{@port_types},"\
  " site_ids: #{@site_ids}, sitegroup_ids: #{@sitegroup_ids}, vendor: #{@vendor}>"
end