Class: Cadenya::Types::DenyToolCallRequest

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, objective_id: nil, tool_call_id: nil, memo: nil) ⇒ DenyToolCallRequest

Returns a new instance of DenyToolCallRequest.



2128
2129
2130
2131
2132
2133
# File 'lib/cadenya/types.rb', line 2128

def initialize(workspace_id: nil, objective_id: nil, tool_call_id: nil, memo: nil)
  @workspace_id = workspace_id
  @objective_id = objective_id
  @tool_call_id = tool_call_id
  @memo = memo
end

Instance Attribute Details

#memoObject (readonly)

Returns the value of attribute memo.



2126
2127
2128
# File 'lib/cadenya/types.rb', line 2126

def memo
  @memo
end

#objective_idObject (readonly)

Returns the value of attribute objective_id.



2126
2127
2128
# File 'lib/cadenya/types.rb', line 2126

def objective_id
  @objective_id
end

#tool_call_idObject (readonly)

Returns the value of attribute tool_call_id.



2126
2127
2128
# File 'lib/cadenya/types.rb', line 2126

def tool_call_id
  @tool_call_id
end

#workspace_idObject (readonly)

Returns the value of attribute workspace_id.



2126
2127
2128
# File 'lib/cadenya/types.rb', line 2126

def workspace_id
  @workspace_id
end

Class Method Details

.from_json(data) ⇒ Object



2135
2136
2137
2138
2139
2140
2141
2142
# File 'lib/cadenya/types.rb', line 2135

def self.from_json(data)
  new(
    workspace_id: data["workspaceId"],
    objective_id: data["objectiveId"],
    tool_call_id: data["toolCallId"],
    memo: data["memo"],
  )
end

Instance Method Details

#to_hObject



2144
2145
2146
2147
2148
2149
2150
2151
# File 'lib/cadenya/types.rb', line 2144

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