Class: Cadenya::Types::ArchiveAgentScheduleRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/cadenya/types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(workspace_id: nil, agent_id: nil, id: nil) ⇒ ArchiveAgentScheduleRequest

Returns a new instance of ArchiveAgentScheduleRequest.



890
891
892
893
894
# File 'lib/cadenya/types.rb', line 890

def initialize(workspace_id: nil, agent_id: nil, id: nil)
  @workspace_id = workspace_id
  @agent_id = agent_id
  @id = id
end

Instance Attribute Details

#agent_idObject (readonly)

Returns the value of attribute agent_id.



888
889
890
# File 'lib/cadenya/types.rb', line 888

def agent_id
  @agent_id
end

#idObject (readonly)

Returns the value of attribute id.



888
889
890
# File 'lib/cadenya/types.rb', line 888

def id
  @id
end

#workspace_idObject (readonly)

Returns the value of attribute workspace_id.



888
889
890
# File 'lib/cadenya/types.rb', line 888

def workspace_id
  @workspace_id
end

Class Method Details

.from_json(data) ⇒ Object



896
897
898
899
900
901
902
# File 'lib/cadenya/types.rb', line 896

def self.from_json(data)
  new(
    workspace_id: data["workspaceId"],
    agent_id: data["agentId"],
    id: data["id"],
  )
end

Instance Method Details

#to_hObject



904
905
906
907
908
909
910
# File 'lib/cadenya/types.rb', line 904

def to_h
  {
    workspace_id: Util.plain(@workspace_id),
    agent_id: Util.plain(@agent_id),
    id: Util.plain(@id),
  }.reject { |_k, v| v.nil? }
end