Class: MistApi::Snmpv3ConfigTargetParam

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

Overview

Snmpv3ConfigTargetParam 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(message_processing_model = SKIP, name = SKIP, notify_filter = SKIP, security_level = SKIP, security_model = SKIP, security_name = SKIP) ⇒ Snmpv3ConfigTargetParam

Returns a new instance of Snmpv3ConfigTargetParam.



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

def initialize(message_processing_model = SKIP, name = SKIP,
               notify_filter = SKIP, security_level = SKIP,
               security_model = SKIP, security_name = SKIP)
  @message_processing_model = message_processing_model unless message_processing_model == SKIP
  @name = name unless name == SKIP
  @notify_filter = notify_filter unless notify_filter == SKIP
  @security_level = security_level unless security_level == SKIP
  @security_model = security_model unless security_model == SKIP
  @security_name = security_name unless security_name == SKIP
end

Instance Attribute Details

#message_processing_modelSnmpv3ConfigTargetParamMessProcessModelEnum

enum: ‘v1`, `v2c`, `v3`



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

def message_processing_model
  @message_processing_model
end

#nameString

enum: ‘v1`, `v2c`, `v3`

Returns:

  • (String)


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

def name
  @name
end

#notify_filterString

Refer to profile-name in notify_filter

Returns:

  • (String)


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

def notify_filter
  @notify_filter
end

#security_levelSnmpv3ConfigTargetParamSecurityLevelEnum

enum: ‘authentication`, `none`, `privacy`



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

def security_level
  @security_level
end

#security_modelSnmpv3ConfigTargetParamSecurityModelEnum

enum: ‘usm`, `v1`, `v2c`



30
31
32
# File 'lib/mist_api/models/snmpv3_config_target_param.rb', line 30

def security_model
  @security_model
end

#security_nameString

Refer to security_name in usm

Returns:

  • (String)


34
35
36
# File 'lib/mist_api/models/snmpv3_config_target_param.rb', line 34

def security_name
  @security_name
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  message_processing_model =
    hash.key?('message_processing_model') ? hash['message_processing_model'] : SKIP
  name = hash.key?('name') ? hash['name'] : SKIP
  notify_filter = hash.key?('notify_filter') ? hash['notify_filter'] : SKIP
  security_level =
    hash.key?('security_level') ? hash['security_level'] : SKIP
  security_model =
    hash.key?('security_model') ? hash['security_model'] : SKIP
  security_name = hash.key?('security_name') ? hash['security_name'] : SKIP

  # Create object from extracted values.
  Snmpv3ConfigTargetParam.new(message_processing_model,
                              name,
                              notify_filter,
                              security_level,
                              security_model,
                              security_name)
end

.namesObject

A mapping from model property names to API property names.



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

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['message_processing_model'] = 'message_processing_model'
  @_hash['name'] = 'name'
  @_hash['notify_filter'] = 'notify_filter'
  @_hash['security_level'] = 'security_level'
  @_hash['security_model'] = 'security_model'
  @_hash['security_name'] = 'security_name'
  @_hash
end

.nullablesObject

An array for nullable fields



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

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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

def self.optionals
  %w[
    message_processing_model
    name
    notify_filter
    security_level
    security_model
    security_name
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



109
110
111
112
113
114
115
# File 'lib/mist_api/models/snmpv3_config_target_param.rb', line 109

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} message_processing_model: #{@message_processing_model.inspect}, name:"\
  " #{@name.inspect}, notify_filter: #{@notify_filter.inspect}, security_level:"\
  " #{@security_level.inspect}, security_model: #{@security_model.inspect}, security_name:"\
  " #{@security_name.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



101
102
103
104
105
106
# File 'lib/mist_api/models/snmpv3_config_target_param.rb', line 101

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} message_processing_model: #{@message_processing_model}, name: #{@name},"\
  " notify_filter: #{@notify_filter}, security_level: #{@security_level}, security_model:"\
  " #{@security_model}, security_name: #{@security_name}>"
end