Class: Vellum::SlimComposioToolDefinition
- Inherits:
-
Object
- Object
- Vellum::SlimComposioToolDefinition
- Defined in:
- lib/vellum_ai/types/slim_composio_tool_definition.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #description ⇒ String readonly
- #integration ⇒ Vellum::Integration readonly
- #label ⇒ String readonly
- #name ⇒ String readonly
- #provider ⇒ String readonly
- #toolkit_version ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(provider:, integration:, name:, label:, description:, toolkit_version:, additional_properties: nil) ⇒ Vellum::SlimComposioToolDefinition constructor
- #to_json ⇒ String
Constructor Details
#initialize(provider:, integration:, name:, label:, description:, toolkit_version:, additional_properties: nil) ⇒ Vellum::SlimComposioToolDefinition
36 37 38 39 40 41 42 43 44 45 |
# File 'lib/vellum_ai/types/slim_composio_tool_definition.rb', line 36 def initialize(provider:, integration:, name:, label:, description:, toolkit_version:, additional_properties: nil) @provider = provider @integration = integration @name = name @label = label @description = description @toolkit_version = toolkit_version @additional_properties = additional_properties @_field_set = { "provider": provider, "integration": integration, "name": name, "label": label, "description": description, "toolkit_version": toolkit_version } end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
21 22 23 |
# File 'lib/vellum_ai/types/slim_composio_tool_definition.rb', line 21 def additional_properties @additional_properties end |
#description ⇒ String (readonly)
17 18 19 |
# File 'lib/vellum_ai/types/slim_composio_tool_definition.rb', line 17 def description @description end |
#integration ⇒ Vellum::Integration (readonly)
11 12 13 |
# File 'lib/vellum_ai/types/slim_composio_tool_definition.rb', line 11 def integration @integration end |
#label ⇒ String (readonly)
15 16 17 |
# File 'lib/vellum_ai/types/slim_composio_tool_definition.rb', line 15 def label @label end |
#name ⇒ String (readonly)
13 14 15 |
# File 'lib/vellum_ai/types/slim_composio_tool_definition.rb', line 13 def name @name end |
#provider ⇒ String (readonly)
9 10 11 |
# File 'lib/vellum_ai/types/slim_composio_tool_definition.rb', line 9 def provider @provider end |
#toolkit_version ⇒ String (readonly)
19 20 21 |
# File 'lib/vellum_ai/types/slim_composio_tool_definition.rb', line 19 def toolkit_version @toolkit_version end |
Class Method Details
.from_json(json_object:) ⇒ Vellum::SlimComposioToolDefinition
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/vellum_ai/types/slim_composio_tool_definition.rb', line 50 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) provider = parsed_json["provider"] unless parsed_json["integration"].nil? integration = parsed_json["integration"].to_json integration = Vellum::Integration.from_json(json_object: integration) else integration = nil end name = parsed_json["name"] label = parsed_json["label"] description = parsed_json["description"] toolkit_version = parsed_json["toolkit_version"] new( provider: provider, integration: integration, name: name, label: label, description: description, toolkit_version: toolkit_version, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
86 87 88 89 90 91 92 93 |
# File 'lib/vellum_ai/types/slim_composio_tool_definition.rb', line 86 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.") Vellum::Integration.validate_raw(obj: obj.integration) obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.") obj.label.is_a?(String) != false || raise("Passed value for field obj.label is not the expected type, validation failed.") obj.description.is_a?(String) != false || raise("Passed value for field obj.description 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.") end |
Instance Method Details
#to_json ⇒ String
77 78 79 |
# File 'lib/vellum_ai/types/slim_composio_tool_definition.rb', line 77 def to_json @_field_set&.to_json end |