Class: MistApi::Snmpv3Config
- Defined in:
- lib/mist_api/models/snmpv3_config.rb
Overview
Snmpv3Config Model.
Instance Attribute Summary collapse
-
#notify ⇒ Array[Snmpv3ConfigNotifyItems]
TODO: Write general description for this method.
-
#notify_filter ⇒ Array[Snmpv3ConfigNotifyFilterItem]
TODO: Write general description for this method.
-
#target_address ⇒ Array[Snmpv3ConfigTargetAddressItem]
TODO: Write general description for this method.
-
#target_parameters ⇒ Array[Snmpv3ConfigTargetParam]
TODO: Write general description for this method.
-
#usm ⇒ Array[SnmpUsm]
TODO: Write general description for this method.
-
#vacm ⇒ SnmpVacm
TODO: Write general description for this method.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(notify = SKIP, notify_filter = SKIP, target_address = SKIP, target_parameters = SKIP, usm = SKIP, vacm = SKIP) ⇒ Snmpv3Config
constructor
A new instance of Snmpv3Config.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(notify = SKIP, notify_filter = SKIP, target_address = SKIP, target_parameters = SKIP, usm = SKIP, vacm = SKIP) ⇒ Snmpv3Config
Returns a new instance of Snmpv3Config.
65 66 67 68 69 70 71 72 73 |
# File 'lib/mist_api/models/snmpv3_config.rb', line 65 def initialize(notify = SKIP, notify_filter = SKIP, target_address = SKIP, target_parameters = SKIP, usm = SKIP, vacm = SKIP) @notify = notify unless notify == SKIP @notify_filter = notify_filter unless notify_filter == SKIP @target_address = target_address unless target_address == SKIP @target_parameters = target_parameters unless target_parameters == SKIP @usm = usm unless usm == SKIP @vacm = vacm unless vacm == SKIP end |
Instance Attribute Details
#notify ⇒ Array[Snmpv3ConfigNotifyItems]
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/snmpv3_config.rb', line 14 def notify @notify end |
#notify_filter ⇒ Array[Snmpv3ConfigNotifyFilterItem]
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/snmpv3_config.rb', line 18 def notify_filter @notify_filter end |
#target_address ⇒ Array[Snmpv3ConfigTargetAddressItem]
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/snmpv3_config.rb', line 22 def target_address @target_address end |
#target_parameters ⇒ Array[Snmpv3ConfigTargetParam]
TODO: Write general description for this method
26 27 28 |
# File 'lib/mist_api/models/snmpv3_config.rb', line 26 def target_parameters @target_parameters end |
#usm ⇒ Array[SnmpUsm]
TODO: Write general description for this method
30 31 32 |
# File 'lib/mist_api/models/snmpv3_config.rb', line 30 def usm @usm end |
#vacm ⇒ SnmpVacm
TODO: Write general description for this method
34 35 36 |
# File 'lib/mist_api/models/snmpv3_config.rb', line 34 def vacm @vacm 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 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/mist_api/models/snmpv3_config.rb', line 76 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. # Parameter is an array, so we need to iterate through it notify = nil unless hash['notify'].nil? notify = [] hash['notify'].each do |structure| notify << (Snmpv3ConfigNotifyItems.from_hash(structure) if structure) end end notify = SKIP unless hash.key?('notify') # Parameter is an array, so we need to iterate through it notify_filter = nil unless hash['notify_filter'].nil? notify_filter = [] hash['notify_filter'].each do |structure| notify_filter << (Snmpv3ConfigNotifyFilterItem.from_hash(structure) if structure) end end notify_filter = SKIP unless hash.key?('notify_filter') # Parameter is an array, so we need to iterate through it target_address = nil unless hash['target_address'].nil? target_address = [] hash['target_address'].each do |structure| target_address << (Snmpv3ConfigTargetAddressItem.from_hash(structure) if structure) end end target_address = SKIP unless hash.key?('target_address') # Parameter is an array, so we need to iterate through it target_parameters = nil unless hash['target_parameters'].nil? target_parameters = [] hash['target_parameters'].each do |structure| target_parameters << (Snmpv3ConfigTargetParam.from_hash(structure) if structure) end end target_parameters = SKIP unless hash.key?('target_parameters') # Parameter is an array, so we need to iterate through it usm = nil unless hash['usm'].nil? usm = [] hash['usm'].each do |structure| usm << (SnmpUsm.from_hash(structure) if structure) end end usm = SKIP unless hash.key?('usm') vacm = SnmpVacm.from_hash(hash['vacm']) if hash['vacm'] # Create object from extracted values. Snmpv3Config.new(notify, notify_filter, target_address, target_parameters, usm, vacm) end |
.names ⇒ Object
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.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['notify'] = 'notify' @_hash['notify_filter'] = 'notify_filter' @_hash['target_address'] = 'target_address' @_hash['target_parameters'] = 'target_parameters' @_hash['usm'] = 'usm' @_hash['vacm'] = 'vacm' @_hash end |
.nullables ⇒ Object
An array for nullable fields
61 62 63 |
# File 'lib/mist_api/models/snmpv3_config.rb', line 61 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/mist_api/models/snmpv3_config.rb', line 49 def self.optionals %w[ notify notify_filter target_address target_parameters usm vacm ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
150 151 152 153 154 155 |
# File 'lib/mist_api/models/snmpv3_config.rb', line 150 def inspect class_name = self.class.name.split('::').last "<#{class_name} notify: #{@notify.inspect}, notify_filter: #{@notify_filter.inspect},"\ " target_address: #{@target_address.inspect}, target_parameters:"\ " #{@target_parameters.inspect}, usm: #{@usm.inspect}, vacm: #{@vacm.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
142 143 144 145 146 147 |
# File 'lib/mist_api/models/snmpv3_config.rb', line 142 def to_s class_name = self.class.name.split('::').last "<#{class_name} notify: #{@notify}, notify_filter: #{@notify_filter}, target_address:"\ " #{@target_address}, target_parameters: #{@target_parameters}, usm: #{@usm}, vacm:"\ " #{@vacm}>" end |