Class: MistApi::Snmpv3ConfigTargetAddressItem
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::Snmpv3ConfigTargetAddressItem
- Defined in:
- lib/mist_api/models/snmpv3_config_target_address_item.rb
Overview
Snmpv3ConfigTargetAddressItem Model.
Instance Attribute Summary collapse
-
#address ⇒ String
TODO: Write general description for this method.
-
#address_mask ⇒ String
TODO: Write general description for this method.
-
#port ⇒ String
TODO: Write general description for this method.
-
#tag_list ⇒ String
Refer to notify tag, can be multiple with blank.
-
#target_address_name ⇒ String
Refer to notify tag, can be multiple with blank.
-
#target_parameters ⇒ String
Refer to notify target parameters name.
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(address = SKIP, address_mask = SKIP, port = '161', tag_list = SKIP, target_address_name = SKIP, target_parameters = SKIP) ⇒ Snmpv3ConfigTargetAddressItem
constructor
A new instance of Snmpv3ConfigTargetAddressItem.
-
#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(address = SKIP, address_mask = SKIP, port = '161', tag_list = SKIP, target_address_name = SKIP, target_parameters = SKIP) ⇒ Snmpv3ConfigTargetAddressItem
Returns a new instance of Snmpv3ConfigTargetAddressItem.
67 68 69 70 71 72 73 74 75 76 |
# File 'lib/mist_api/models/snmpv3_config_target_address_item.rb', line 67 def initialize(address = SKIP, address_mask = SKIP, port = '161', tag_list = SKIP, target_address_name = SKIP, target_parameters = SKIP) @address = address unless address == SKIP @address_mask = address_mask unless address_mask == SKIP @port = port unless port == SKIP @tag_list = tag_list unless tag_list == SKIP @target_address_name = target_address_name unless target_address_name == SKIP @target_parameters = target_parameters unless target_parameters == SKIP end |
Instance Attribute Details
#address ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/snmpv3_config_target_address_item.rb', line 14 def address @address end |
#address_mask ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/snmpv3_config_target_address_item.rb', line 18 def address_mask @address_mask end |
#port ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/snmpv3_config_target_address_item.rb', line 22 def port @port end |
#tag_list ⇒ String
Refer to notify tag, can be multiple with blank
26 27 28 |
# File 'lib/mist_api/models/snmpv3_config_target_address_item.rb', line 26 def tag_list @tag_list end |
#target_address_name ⇒ String
Refer to notify tag, can be multiple with blank
30 31 32 |
# File 'lib/mist_api/models/snmpv3_config_target_address_item.rb', line 30 def target_address_name @target_address_name end |
#target_parameters ⇒ String
Refer to notify target parameters name
34 35 36 |
# File 'lib/mist_api/models/snmpv3_config_target_address_item.rb', line 34 def target_parameters @target_parameters end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/mist_api/models/snmpv3_config_target_address_item.rb', line 79 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. address = hash.key?('address') ? hash['address'] : SKIP address_mask = hash.key?('address_mask') ? hash['address_mask'] : SKIP port = hash['port'] ||= '161' tag_list = hash.key?('tag_list') ? hash['tag_list'] : SKIP target_address_name = hash.key?('target_address_name') ? hash['target_address_name'] : SKIP target_parameters = hash.key?('target_parameters') ? hash['target_parameters'] : SKIP # Create object from extracted values. Snmpv3ConfigTargetAddressItem.new(address, address_mask, port, tag_list, target_address_name, target_parameters) 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_target_address_item.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['address'] = 'address' @_hash['address_mask'] = 'address_mask' @_hash['port'] = 'port' @_hash['tag_list'] = 'tag_list' @_hash['target_address_name'] = 'target_address_name' @_hash['target_parameters'] = 'target_parameters' @_hash end |
.nullables ⇒ Object
An array for nullable fields
61 62 63 64 65 |
# File 'lib/mist_api/models/snmpv3_config_target_address_item.rb', line 61 def self.nullables %w[ port ] 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_target_address_item.rb', line 49 def self.optionals %w[ address address_mask port tag_list target_address_name target_parameters ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
110 111 112 113 114 115 |
# File 'lib/mist_api/models/snmpv3_config_target_address_item.rb', line 110 def inspect class_name = self.class.name.split('::').last "<#{class_name} address: #{@address.inspect}, address_mask: #{@address_mask.inspect}, port:"\ " #{@port.inspect}, tag_list: #{@tag_list.inspect}, target_address_name:"\ " #{@target_address_name.inspect}, target_parameters: #{@target_parameters.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
102 103 104 105 106 107 |
# File 'lib/mist_api/models/snmpv3_config_target_address_item.rb', line 102 def to_s class_name = self.class.name.split('::').last "<#{class_name} address: #{@address}, address_mask: #{@address_mask}, port: #{@port},"\ " tag_list: #{@tag_list}, target_address_name: #{@target_address_name}, target_parameters:"\ " #{@target_parameters}>" end |