Class: Cadenya::Types::ToolDenied

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(tool_call_id: nil, memo: nil) ⇒ ToolDenied

Returns a new instance of ToolDenied.



5708
5709
5710
5711
# File 'lib/cadenya/types.rb', line 5708

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

Instance Attribute Details

#memoObject (readonly)

Returns the value of attribute memo.



5706
5707
5708
# File 'lib/cadenya/types.rb', line 5706

def memo
  @memo
end

#tool_call_idObject (readonly)

Returns the value of attribute tool_call_id.



5706
5707
5708
# File 'lib/cadenya/types.rb', line 5706

def tool_call_id
  @tool_call_id
end

Class Method Details

.from_json(data) ⇒ Object



5713
5714
5715
5716
5717
5718
# File 'lib/cadenya/types.rb', line 5713

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

Instance Method Details

#to_hObject



5720
5721
5722
5723
5724
5725
# File 'lib/cadenya/types.rb', line 5720

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