Class: Cloudscale::Monitor::AgentInstance

Inherits:
Object
  • Object
show all
Includes:
Hashable
Defined in:
lib/cloudscale/monitor/model/agent/agent_instance.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(agent, agentInstanceId, token, server, settings, started) ⇒ AgentInstance

Returns a new instance of AgentInstance.



16
17
18
19
20
21
22
23
# File 'lib/cloudscale/monitor/model/agent/agent_instance.rb', line 16

def initialize(agent, agentInstanceId, token, server, settings, started)
  @agent = agent
  @agentInstanceId = agentInstanceId
  @token = token
  @server = server
  @settings = settings
  @started = started
end

Instance Attribute Details

#agentObject

Returns the value of attribute agent.



13
14
15
# File 'lib/cloudscale/monitor/model/agent/agent_instance.rb', line 13

def agent
  @agent
end

#agentInstanceIdObject

Returns the value of attribute agentInstanceId.



13
14
15
# File 'lib/cloudscale/monitor/model/agent/agent_instance.rb', line 13

def agentInstanceId
  @agentInstanceId
end

#serverObject

Returns the value of attribute server.



13
14
15
# File 'lib/cloudscale/monitor/model/agent/agent_instance.rb', line 13

def server
  @server
end

#settingsObject

Returns the value of attribute settings.



13
14
15
# File 'lib/cloudscale/monitor/model/agent/agent_instance.rb', line 13

def settings
  @settings
end

#startedObject

Returns the value of attribute started.



13
14
15
# File 'lib/cloudscale/monitor/model/agent/agent_instance.rb', line 13

def started
  @started
end

#tokenObject

Returns the value of attribute token.



13
14
15
# File 'lib/cloudscale/monitor/model/agent/agent_instance.rb', line 13

def token
  @token
end

Instance Method Details

#to_hObject



25
26
27
28
29
# File 'lib/cloudscale/monitor/model/agent/agent_instance.rb', line 25

def to_h
  hash = {}
  instance_variables.each {|var| hash[var.to_s.delete("@")] = instance_variable_get(var) }
  return hash
end