Class: MistApi::SnmpUsmUser

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

Overview

SnmpUsmUser 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(authentication_password = SKIP, authentication_type = SKIP, encryption_password = SKIP, encryption_type = SKIP, name = SKIP) ⇒ SnmpUsmUser

Returns a new instance of SnmpUsmUser.



65
66
67
68
69
70
71
72
73
# File 'lib/mist_api/models/snmp_usm_user.rb', line 65

def initialize(authentication_password = SKIP, authentication_type = SKIP,
               encryption_password = SKIP, encryption_type = SKIP,
               name = SKIP)
  @authentication_password = authentication_password unless authentication_password == SKIP
  @authentication_type = authentication_type unless authentication_type == SKIP
  @encryption_password = encryption_password unless encryption_password == SKIP
  @encryption_type = encryption_type unless encryption_type == SKIP
  @name = name unless name == SKIP
end

Instance Attribute Details

#authentication_passwordString

Not required if ‘authentication_type`==`authentication-none`. Include alphabetic, numeric, and special characters, but it cannot include control characters.

Returns:

  • (String)


16
17
18
# File 'lib/mist_api/models/snmp_usm_user.rb', line 16

def authentication_password
  @authentication_password
end

#authentication_typeSnmpUsmUserAuthenticationTypeEnum

sha224, sha256, sha384, sha512 are supported in 21.1 and newer release. enum: ‘authentication-md5`, `authentication-none`, `authentication-sha`, `authentication-sha224`, `authentication-sha256`, `authentication-sha384`, `authentication-sha512`



23
24
25
# File 'lib/mist_api/models/snmp_usm_user.rb', line 23

def authentication_type
  @authentication_type
end

#encryption_passwordString

Not required if ‘encryption_type`==`privacy-none`. Include alphabetic, numeric, and special characters, but it cannot include control characters

Returns:

  • (String)


28
29
30
# File 'lib/mist_api/models/snmp_usm_user.rb', line 28

def encryption_password
  @encryption_password
end

#encryption_typeSnmpUsmUserEncryptionTypeEnum

enum: ‘privacy-3des`, `privacy-aes128`, `privacy-des`, `privacy-none`



32
33
34
# File 'lib/mist_api/models/snmp_usm_user.rb', line 32

def encryption_type
  @encryption_type
end

#nameString

enum: ‘privacy-3des`, `privacy-aes128`, `privacy-des`, `privacy-none`

Returns:

  • (String)


36
37
38
# File 'lib/mist_api/models/snmp_usm_user.rb', line 36

def name
  @name
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/mist_api/models/snmp_usm_user.rb', line 76

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  authentication_password =
    hash.key?('authentication_password') ? hash['authentication_password'] : SKIP
  authentication_type =
    hash.key?('authentication_type') ? hash['authentication_type'] : SKIP
  encryption_password =
    hash.key?('encryption_password') ? hash['encryption_password'] : SKIP
  encryption_type =
    hash.key?('encryption_type') ? hash['encryption_type'] : SKIP
  name = hash.key?('name') ? hash['name'] : SKIP

  # Create object from extracted values.
  SnmpUsmUser.new(authentication_password,
                  authentication_type,
                  encryption_password,
                  encryption_type,
                  name)
end

.namesObject

A mapping from model property names to API property names.



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

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['authentication_password'] = 'authentication_password'
  @_hash['authentication_type'] = 'authentication_type'
  @_hash['encryption_password'] = 'encryption_password'
  @_hash['encryption_type'] = 'encryption_type'
  @_hash['name'] = 'name'
  @_hash
end

.nullablesObject

An array for nullable fields



61
62
63
# File 'lib/mist_api/models/snmp_usm_user.rb', line 61

def self.nullables
  []
end

.optionalsObject

An array for optional fields



50
51
52
53
54
55
56
57
58
# File 'lib/mist_api/models/snmp_usm_user.rb', line 50

def self.optionals
  %w[
    authentication_password
    authentication_type
    encryption_password
    encryption_type
    name
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



107
108
109
110
111
112
113
# File 'lib/mist_api/models/snmp_usm_user.rb', line 107

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} authentication_password: #{@authentication_password.inspect},"\
  " authentication_type: #{@authentication_type.inspect}, encryption_password:"\
  " #{@encryption_password.inspect}, encryption_type: #{@encryption_type.inspect}, name:"\
  " #{@name.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



99
100
101
102
103
104
# File 'lib/mist_api/models/snmp_usm_user.rb', line 99

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} authentication_password: #{@authentication_password}, authentication_type:"\
  " #{@authentication_type}, encryption_password: #{@encryption_password}, encryption_type:"\
  " #{@encryption_type}, name: #{@name}>"
end