Class: MistApi::GatewayMgmtHostOutPolicySyslogServer

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

Overview

Allows to define the host_out_policy per Syslog Server. The Property key is the Syslog name

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(host = SKIP, path_preference = SKIP, server_name = SKIP) ⇒ GatewayMgmtHostOutPolicySyslogServer

Returns a new instance of GatewayMgmtHostOutPolicySyslogServer.



48
49
50
51
52
# File 'lib/mist_api/models/gateway_mgmt_host_out_policy_syslog_server.rb', line 48

def initialize(host = SKIP, path_preference = SKIP, server_name = SKIP)
  @host = host unless host == SKIP
  @path_preference = path_preference unless path_preference == SKIP
  @server_name = server_name unless server_name == SKIP
end

Instance Attribute Details

#hostString

TODO: Write general description for this method

Returns:

  • (String)


15
16
17
# File 'lib/mist_api/models/gateway_mgmt_host_out_policy_syslog_server.rb', line 15

def host
  @host
end

#path_preferenceString

TODO: Write general description for this method

Returns:

  • (String)


19
20
21
# File 'lib/mist_api/models/gateway_mgmt_host_out_policy_syslog_server.rb', line 19

def path_preference
  @path_preference
end

#server_nameString

TODO: Write general description for this method

Returns:

  • (String)


23
24
25
# File 'lib/mist_api/models/gateway_mgmt_host_out_policy_syslog_server.rb', line 23

def server_name
  @server_name
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/mist_api/models/gateway_mgmt_host_out_policy_syslog_server.rb', line 55

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  host = hash.key?('host') ? hash['host'] : SKIP
  path_preference =
    hash.key?('path_preference') ? hash['path_preference'] : SKIP
  server_name = hash.key?('server_name') ? hash['server_name'] : SKIP

  # Create object from extracted values.
  GatewayMgmtHostOutPolicySyslogServer.new(host,
                                           path_preference,
                                           server_name)
end

.namesObject

A mapping from model property names to API property names.



26
27
28
29
30
31
32
# File 'lib/mist_api/models/gateway_mgmt_host_out_policy_syslog_server.rb', line 26

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['host'] = 'host'
  @_hash['path_preference'] = 'path_preference'
  @_hash['server_name'] = 'server_name'
  @_hash
end

.nullablesObject

An array for nullable fields



44
45
46
# File 'lib/mist_api/models/gateway_mgmt_host_out_policy_syslog_server.rb', line 44

def self.nullables
  []
end

.optionalsObject

An array for optional fields



35
36
37
38
39
40
41
# File 'lib/mist_api/models/gateway_mgmt_host_out_policy_syslog_server.rb', line 35

def self.optionals
  %w[
    host
    path_preference
    server_name
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



78
79
80
81
82
# File 'lib/mist_api/models/gateway_mgmt_host_out_policy_syslog_server.rb', line 78

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} host: #{@host.inspect}, path_preference: #{@path_preference.inspect},"\
  " server_name: #{@server_name.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



71
72
73
74
75
# File 'lib/mist_api/models/gateway_mgmt_host_out_policy_syslog_server.rb', line 71

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} host: #{@host}, path_preference: #{@path_preference}, server_name:"\
  " #{@server_name}>"
end