Class: MistApi::SnmpConfigV2cConfig

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

Overview

SnmpConfigV2cConfig 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(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(authorization = SKIP, client_list_name = SKIP,
               community_name = SKIP, view = SKIP)
  @authorization = authorization unless authorization == 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

#authorizationString

TODO: Write general description for this method

Returns:

  • (String)


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

def authorization
  @authorization
end

#client_list_nameString

Client_list_name here should refer to client_list above

Returns:

  • (String)


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

def client_list_name
  @client_list_name
end

#community_nameString

Client_list_name here should refer to client_list above

Returns:

  • (String)


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

def community_name
  @community_name
end

#viewString

View name here should be defined in views above

Returns:

  • (String)


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.
  authorization = 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(authorization,
                          client_list_name,
                          community_name,
                          view)
end

.namesObject

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

.nullablesObject

An array for nullable fields



49
50
51
# File 'lib/mist_api/models/snmp_config_v2c_config.rb', line 49

def self.nullables
  []
end

.optionalsObject

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

#inspectObject

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_sObject

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