Class: MistApi::SnmpConfigTrapGroup
- Defined in:
- lib/mist_api/models/snmp_config_trap_group.rb
Overview
SnmpConfigTrapGroup Model.
Instance Attribute Summary collapse
-
#categories ⇒ Array[String]
TODO: Write general description for this method.
-
#group_name ⇒ String
Categories list can refer to www.juniper.net/documentation/software/topics/task/configuration/s nmp_trap-groups-configuring-junos-nm.html.
-
#targets ⇒ Array[String]
Categories list can refer to www.juniper.net/documentation/software/topics/task/configuration/s nmp_trap-groups-configuring-junos-nm.html.
-
#version ⇒ SnmpConfigTrapVersionEnum
enum: ‘all`, `v1`, `v2`.
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(categories = SKIP, group_name = SKIP, targets = SKIP, version = SnmpConfigTrapVersionEnum::V2) ⇒ SnmpConfigTrapGroup
constructor
A new instance of SnmpConfigTrapGroup.
-
#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(categories = SKIP, group_name = SKIP, targets = SKIP, version = SnmpConfigTrapVersionEnum::V2) ⇒ SnmpConfigTrapGroup
Returns a new instance of SnmpConfigTrapGroup.
57 58 59 60 61 62 63 |
# File 'lib/mist_api/models/snmp_config_trap_group.rb', line 57 def initialize(categories = SKIP, group_name = SKIP, targets = SKIP, version = SnmpConfigTrapVersionEnum::V2) @categories = categories unless categories == SKIP @group_name = group_name unless group_name == SKIP @targets = targets unless targets == SKIP @version = version unless version == SKIP end |
Instance Attribute Details
#categories ⇒ Array[String]
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/snmp_config_trap_group.rb', line 14 def categories @categories end |
#group_name ⇒ String
Categories list can refer to www.juniper.net/documentation/software/topics/task/configuration/s nmp_trap-groups-configuring-junos-nm.html
20 21 22 |
# File 'lib/mist_api/models/snmp_config_trap_group.rb', line 20 def group_name @group_name end |
#targets ⇒ Array[String]
Categories list can refer to www.juniper.net/documentation/software/topics/task/configuration/s nmp_trap-groups-configuring-junos-nm.html
26 27 28 |
# File 'lib/mist_api/models/snmp_config_trap_group.rb', line 26 def targets @targets end |
#version ⇒ SnmpConfigTrapVersionEnum
enum: ‘all`, `v1`, `v2`
30 31 32 |
# File 'lib/mist_api/models/snmp_config_trap_group.rb', line 30 def version @version end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/mist_api/models/snmp_config_trap_group.rb', line 66 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. categories = hash.key?('categories') ? hash['categories'] : SKIP group_name = hash.key?('group_name') ? hash['group_name'] : SKIP targets = hash.key?('targets') ? hash['targets'] : SKIP version = hash['version'] ||= SnmpConfigTrapVersionEnum::V2 # Create object from extracted values. SnmpConfigTrapGroup.new(categories, group_name, targets, version) end |
.names ⇒ Object
A mapping from model property names to API property names.
33 34 35 36 37 38 39 40 |
# File 'lib/mist_api/models/snmp_config_trap_group.rb', line 33 def self.names @_hash = {} if @_hash.nil? @_hash['categories'] = 'categories' @_hash['group_name'] = 'group_name' @_hash['targets'] = 'targets' @_hash['version'] = 'version' @_hash end |
.nullables ⇒ Object
An array for nullable fields
53 54 55 |
# File 'lib/mist_api/models/snmp_config_trap_group.rb', line 53 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
43 44 45 46 47 48 49 50 |
# File 'lib/mist_api/models/snmp_config_trap_group.rb', line 43 def self.optionals %w[ categories group_name targets version ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
90 91 92 93 94 |
# File 'lib/mist_api/models/snmp_config_trap_group.rb', line 90 def inspect class_name = self.class.name.split('::').last "<#{class_name} categories: #{@categories.inspect}, group_name: #{@group_name.inspect},"\ " targets: #{@targets.inspect}, version: #{@version.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
83 84 85 86 87 |
# File 'lib/mist_api/models/snmp_config_trap_group.rb', line 83 def to_s class_name = self.class.name.split('::').last "<#{class_name} categories: #{@categories}, group_name: #{@group_name}, targets:"\ " #{@targets}, version: #{@version}>" end |