Class: Vellum::ComposioExecuteToolRequest
- Inherits:
-
Object
- Object
- Vellum::ComposioExecuteToolRequest
- Defined in:
- lib/vellum_ai/types/composio_execute_tool_request.rb
Overview
Payload for executing a Composio tool with provider id and tool arguments.
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #arguments ⇒ Hash{String => Object} readonly
- #integration ⇒ String readonly
- #provider ⇒ String readonly
- #tool ⇒ String readonly
- #toolkit_version ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(provider:, arguments:, toolkit_version: OMIT, integration: OMIT, tool: OMIT, additional_properties: nil) ⇒ Vellum::ComposioExecuteToolRequest constructor
- #to_json ⇒ String
Constructor Details
#initialize(provider:, arguments:, toolkit_version: OMIT, integration: OMIT, tool: OMIT, additional_properties: nil) ⇒ Vellum::ComposioExecuteToolRequest
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/vellum_ai/types/composio_execute_tool_request.rb', line 33 def initialize(provider:, arguments:, toolkit_version: OMIT, integration: OMIT, tool: OMIT, additional_properties: nil) @provider = provider @arguments = arguments @toolkit_version = toolkit_version if toolkit_version != OMIT @integration = integration if integration != OMIT @tool = tool if tool != OMIT @additional_properties = additional_properties @_field_set = { "provider": provider, "arguments": arguments, "toolkit_version": toolkit_version, "integration": integration, "tool": tool }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
19 20 21 |
# File 'lib/vellum_ai/types/composio_execute_tool_request.rb', line 19 def additional_properties @additional_properties end |
#arguments ⇒ Hash{String => Object} (readonly)
11 12 13 |
# File 'lib/vellum_ai/types/composio_execute_tool_request.rb', line 11 def arguments @arguments end |
#integration ⇒ String (readonly)
15 16 17 |
# File 'lib/vellum_ai/types/composio_execute_tool_request.rb', line 15 def integration @integration end |
#provider ⇒ String (readonly)
9 10 11 |
# File 'lib/vellum_ai/types/composio_execute_tool_request.rb', line 9 def provider @provider end |
#tool ⇒ String (readonly)
17 18 19 |
# File 'lib/vellum_ai/types/composio_execute_tool_request.rb', line 17 def tool @tool end |
#toolkit_version ⇒ String (readonly)
13 14 15 |
# File 'lib/vellum_ai/types/composio_execute_tool_request.rb', line 13 def toolkit_version @toolkit_version end |
Class Method Details
.from_json(json_object:) ⇒ Vellum::ComposioExecuteToolRequest
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/vellum_ai/types/composio_execute_tool_request.rb', line 48 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) provider = parsed_json["provider"] arguments = parsed_json["arguments"] toolkit_version = parsed_json["toolkit_version"] integration = parsed_json["integration"] tool = parsed_json["tool"] new( provider: provider, arguments: arguments, toolkit_version: toolkit_version, integration: integration, tool: tool, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
77 78 79 80 81 82 83 |
# File 'lib/vellum_ai/types/composio_execute_tool_request.rb', line 77 def self.validate_raw(obj:) obj.provider.is_a?(String) != false || raise("Passed value for field obj.provider is not the expected type, validation failed.") obj.arguments.is_a?(Hash) != false || raise("Passed value for field obj.arguments is not the expected type, validation failed.") obj.toolkit_version&.is_a?(String) != false || raise("Passed value for field obj.toolkit_version is not the expected type, validation failed.") obj.integration&.is_a?(String) != false || raise("Passed value for field obj.integration is not the expected type, validation failed.") obj.tool&.is_a?(String) != false || raise("Passed value for field obj.tool is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
68 69 70 |
# File 'lib/vellum_ai/types/composio_execute_tool_request.rb', line 68 def to_json @_field_set&.to_json end |