Class: MistApi::MxclusterNacClientIp

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

Overview

MxclusterNacClientIp 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(require_message_authenticator = false, secret = SKIP, site_id = SKIP, vendor = SKIP) ⇒ MxclusterNacClientIp

Returns a new instance of MxclusterNacClientIp.



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

def initialize(require_message_authenticator = false, secret = SKIP,
               site_id = SKIP, vendor = SKIP)
  unless require_message_authenticator == SKIP
    @require_message_authenticator =
      require_message_authenticator
  end
  @secret = secret unless secret == SKIP
  @site_id = site_id unless site_id == SKIP
  @vendor = vendor unless vendor == SKIP
end

Instance Attribute Details

#require_message_authenticatorTrueClass | FalseClass

Whether to require Message-Authenticator in requests

Returns:

  • (TrueClass | FalseClass)


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

def require_message_authenticator
  @require_message_authenticator
end

#secretString

If different from above

Returns:

  • (String)


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

def secret
  @secret
end

#site_idUUID | String

Present only for 3rd party clients

Returns:

  • (UUID | String)


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

def site_id
  @site_id
end

#vendorMxclusterNacClientVendorEnum

convention to be followed is : “<vendor>-<variant>”, <variant> could be an os/platform/model/company. For ex: for cisco vendor, there could variants wrt os (such as ios, nxos etc), platforms (asa etc), or acquired companies (such as meraki, aironet) etc. enum: ‘aruba`, `cisco-aironet`, `cisco-dnac`, `cisco-ios`, `cisco-meraki`, `brocade`, `generic`, `juniper`, `paloalto`



31
32
33
# File 'lib/mist_api/models/mxcluster_nac_client_ip.rb', line 31

def vendor
  @vendor
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/mist_api/models/mxcluster_nac_client_ip.rb', line 71

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  require_message_authenticator =
    hash['require_message_authenticator'] ||= false
  secret = hash.key?('secret') ? hash['secret'] : SKIP
  site_id = hash.key?('site_id') ? hash['site_id'] : SKIP
  vendor = hash.key?('vendor') ? hash['vendor'] : SKIP

  # Create object from extracted values.
  MxclusterNacClientIp.new(require_message_authenticator,
                           secret,
                           site_id,
                           vendor)
end

.namesObject

A mapping from model property names to API property names.



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

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['require_message_authenticator'] =
    'require_message_authenticator'
  @_hash['secret'] = 'secret'
  @_hash['site_id'] = 'site_id'
  @_hash['vendor'] = 'vendor'
  @_hash
end

.nullablesObject

An array for nullable fields



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

def self.nullables
  []
end

.optionalsObject

An array for optional fields



45
46
47
48
49
50
51
52
# File 'lib/mist_api/models/mxcluster_nac_client_ip.rb', line 45

def self.optionals
  %w[
    require_message_authenticator
    secret
    site_id
    vendor
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



96
97
98
99
100
# File 'lib/mist_api/models/mxcluster_nac_client_ip.rb', line 96

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} require_message_authenticator: #{@require_message_authenticator.inspect},"\
  " secret: #{@secret.inspect}, site_id: #{@site_id.inspect}, vendor: #{@vendor.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



89
90
91
92
93
# File 'lib/mist_api/models/mxcluster_nac_client_ip.rb', line 89

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} require_message_authenticator: #{@require_message_authenticator}, secret:"\
  " #{@secret}, site_id: #{@site_id}, vendor: #{@vendor}>"
end