Class: MistApi::SnmpConfigV2cConfig
- Defined in:
- lib/mist_api/models/snmp_config_v2c_config.rb
Overview
SnmpConfigV2cConfig Model.
Instance Attribute Summary collapse
-
#authorization ⇒ String
TODO: Write general description for this method.
-
#client_list_name ⇒ String
Client_list_name here should refer to client_list above.
-
#community_name ⇒ String
Client_list_name here should refer to client_list above.
-
#view ⇒ String
View name here should be defined in views above.
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(authorization = SKIP, client_list_name = SKIP, community_name = SKIP, view = SKIP) ⇒ SnmpConfigV2cConfig
constructor
A new instance of SnmpConfigV2cConfig.
-
#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(authorization = SKIP, client_list_name = SKIP, community_name = SKIP, view = SKIP) ⇒ SnmpConfigV2cConfig
Returns a new instance of SnmpConfigV2cConfig.
53 54 55 56 57 58 59 |
# File 'lib/mist_api/models/snmp_config_v2c_config.rb', line 53 def initialize( = SKIP, client_list_name = SKIP, community_name = SKIP, view = SKIP) @authorization = unless == SKIP @client_list_name = client_list_name unless client_list_name == SKIP @community_name = community_name unless community_name == SKIP @view = view unless view == SKIP end |
Instance Attribute Details
#authorization ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/snmp_config_v2c_config.rb', line 14 def @authorization end |
#client_list_name ⇒ String
Client_list_name here should refer to client_list above
18 19 20 |
# File 'lib/mist_api/models/snmp_config_v2c_config.rb', line 18 def client_list_name @client_list_name end |
#community_name ⇒ String
Client_list_name here should refer to client_list above
22 23 24 |
# File 'lib/mist_api/models/snmp_config_v2c_config.rb', line 22 def community_name @community_name end |
#view ⇒ String
View name here should be defined in views above
26 27 28 |
# File 'lib/mist_api/models/snmp_config_v2c_config.rb', line 26 def view @view end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/mist_api/models/snmp_config_v2c_config.rb', line 62 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. = hash.key?('authorization') ? hash['authorization'] : SKIP client_list_name = hash.key?('client_list_name') ? hash['client_list_name'] : SKIP community_name = hash.key?('community_name') ? hash['community_name'] : SKIP view = hash.key?('view') ? hash['view'] : SKIP # Create object from extracted values. SnmpConfigV2cConfig.new(, client_list_name, community_name, view) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 |
# File 'lib/mist_api/models/snmp_config_v2c_config.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['authorization'] = 'authorization' @_hash['client_list_name'] = 'client_list_name' @_hash['community_name'] = 'community_name' @_hash['view'] = 'view' @_hash end |
.nullables ⇒ Object
An array for nullable fields
49 50 51 |
# File 'lib/mist_api/models/snmp_config_v2c_config.rb', line 49 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 42 43 44 45 46 |
# File 'lib/mist_api/models/snmp_config_v2c_config.rb', line 39 def self.optionals %w[ authorization client_list_name community_name view ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
88 89 90 91 92 93 |
# File 'lib/mist_api/models/snmp_config_v2c_config.rb', line 88 def inspect class_name = self.class.name.split('::').last "<#{class_name} authorization: #{@authorization.inspect}, client_list_name:"\ " #{@client_list_name.inspect}, community_name: #{@community_name.inspect}, view:"\ " #{@view.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
81 82 83 84 85 |
# File 'lib/mist_api/models/snmp_config_v2c_config.rb', line 81 def to_s class_name = self.class.name.split('::').last "<#{class_name} authorization: #{@authorization}, client_list_name: #{@client_list_name},"\ " community_name: #{@community_name}, view: #{@view}>" end |