Class: MistApi::MxedgeDasCoaServer

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

Overview

MxedgeDasCoaServer 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(disable_event_timestamp_check = false, enabled = SKIP, host = SKIP, port = 3799, require_message_authenticator = false, secret = SKIP) ⇒ MxedgeDasCoaServer

Returns a new instance of MxedgeDasCoaServer.



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/mist_api/models/mxedge_das_coa_server.rb', line 67

def initialize(disable_event_timestamp_check = false, enabled = SKIP,
               host = SKIP, port = 3799,
               require_message_authenticator = false, secret = SKIP)
  unless disable_event_timestamp_check == SKIP
    @disable_event_timestamp_check =
      disable_event_timestamp_check
  end
  @enabled = enabled unless enabled == SKIP
  @host = host unless host == SKIP
  @port = port unless port == SKIP
  unless require_message_authenticator == SKIP
    @require_message_authenticator =
      require_message_authenticator
  end
  @secret = secret unless secret == SKIP
end

Instance Attribute Details

#disable_event_timestamp_checkTrueClass | FalseClass

Whether to disable Event-Timestamp Check

Returns:

  • (TrueClass | FalseClass)


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

def disable_event_timestamp_check
  @disable_event_timestamp_check
end

#enabledTrueClass | FalseClass

Whether to disable Event-Timestamp Check

Returns:

  • (TrueClass | FalseClass)


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

def enabled
  @enabled
end

#hostString

This server configured to send CoA|DM to mist edges

Returns:

  • (String)


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

def host
  @host
end

#portInteger

Mist edges will allow this host on this port

Returns:

  • (Integer)


26
27
28
# File 'lib/mist_api/models/mxedge_das_coa_server.rb', line 26

def port
  @port
end

#require_message_authenticatorTrueClass | FalseClass

Whether to require Message-Authenticator in requests

Returns:

  • (TrueClass | FalseClass)


30
31
32
# File 'lib/mist_api/models/mxedge_das_coa_server.rb', line 30

def require_message_authenticator
  @require_message_authenticator
end

#secretString

Whether to require Message-Authenticator in requests

Returns:

  • (String)


34
35
36
# File 'lib/mist_api/models/mxedge_das_coa_server.rb', line 34

def secret
  @secret
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/mist_api/models/mxedge_das_coa_server.rb', line 85

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  disable_event_timestamp_check =
    hash['disable_event_timestamp_check'] ||= false
  enabled = hash.key?('enabled') ? hash['enabled'] : SKIP
  host = hash.key?('host') ? hash['host'] : SKIP
  port = hash['port'] ||= 3799
  require_message_authenticator =
    hash['require_message_authenticator'] ||= false
  secret = hash.key?('secret') ? hash['secret'] : SKIP

  # Create object from extracted values.
  MxedgeDasCoaServer.new(disable_event_timestamp_check,
                         enabled,
                         host,
                         port,
                         require_message_authenticator,
                         secret)
end

.namesObject

A mapping from model property names to API property names.



37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/mist_api/models/mxedge_das_coa_server.rb', line 37

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['disable_event_timestamp_check'] =
    'disable_event_timestamp_check'
  @_hash['enabled'] = 'enabled'
  @_hash['host'] = 'host'
  @_hash['port'] = 'port'
  @_hash['require_message_authenticator'] =
    'require_message_authenticator'
  @_hash['secret'] = 'secret'
  @_hash
end

.nullablesObject

An array for nullable fields



63
64
65
# File 'lib/mist_api/models/mxedge_das_coa_server.rb', line 63

def self.nullables
  []
end

.optionalsObject

An array for optional fields



51
52
53
54
55
56
57
58
59
60
# File 'lib/mist_api/models/mxedge_das_coa_server.rb', line 51

def self.optionals
  %w[
    disable_event_timestamp_check
    enabled
    host
    port
    require_message_authenticator
    secret
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



116
117
118
119
120
121
122
# File 'lib/mist_api/models/mxedge_das_coa_server.rb', line 116

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} disable_event_timestamp_check: #{@disable_event_timestamp_check.inspect},"\
  " enabled: #{@enabled.inspect}, host: #{@host.inspect}, port: #{@port.inspect},"\
  " require_message_authenticator: #{@require_message_authenticator.inspect}, secret:"\
  " #{@secret.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



108
109
110
111
112
113
# File 'lib/mist_api/models/mxedge_das_coa_server.rb', line 108

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} disable_event_timestamp_check: #{@disable_event_timestamp_check}, enabled:"\
  " #{@enabled}, host: #{@host}, port: #{@port}, require_message_authenticator:"\
  " #{@require_message_authenticator}, secret: #{@secret}>"
end