Class: Vellum::IntegrationRead
- Inherits:
-
Object
- Object
- Vellum::IntegrationRead
- Defined in:
- lib/vellum_ai/types/integration_read.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#exec_config ⇒ Vellum::COMPONENTS_SCHEMAS_COMPOSIO_INTEGRATION_EXEC_CONFIG
readonly
Integration provider specific information needed for filtering tools.
- #icon_url ⇒ String readonly
- #id ⇒ String readonly
- #label ⇒ String readonly
- #name ⇒ Vellum::IntegrationName readonly
- #provider ⇒ Vellum::INTEGRATION_PROVIDER readonly
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(id:, label: OMIT, icon_url:, name:, provider:, exec_config:, additional_properties: nil) ⇒ Vellum::IntegrationRead constructor
- #to_json ⇒ String
Constructor Details
#initialize(id:, label: OMIT, icon_url:, name:, provider:, exec_config:, additional_properties: nil) ⇒ Vellum::IntegrationRead
39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/vellum_ai/types/integration_read.rb', line 39 def initialize(id:, label: OMIT, icon_url:, name:, provider:, exec_config:, additional_properties: nil) @id = id @label = label if label != OMIT @icon_url = icon_url @name = name @provider = provider @exec_config = exec_config @additional_properties = additional_properties @_field_set = { "id": id, "label": label, "icon_url": icon_url, "name": name, "provider": provider, "exec_config": exec_config }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
24 25 26 |
# File 'lib/vellum_ai/types/integration_read.rb', line 24 def additional_properties @additional_properties end |
#exec_config ⇒ Vellum::COMPONENTS_SCHEMAS_COMPOSIO_INTEGRATION_EXEC_CONFIG (readonly)
Returns Integration provider specific information needed for filtering tools.
22 23 24 |
# File 'lib/vellum_ai/types/integration_read.rb', line 22 def exec_config @exec_config end |
#icon_url ⇒ String (readonly)
16 17 18 |
# File 'lib/vellum_ai/types/integration_read.rb', line 16 def icon_url @icon_url end |
#id ⇒ String (readonly)
12 13 14 |
# File 'lib/vellum_ai/types/integration_read.rb', line 12 def id @id end |
#label ⇒ String (readonly)
14 15 16 |
# File 'lib/vellum_ai/types/integration_read.rb', line 14 def label @label end |
#name ⇒ Vellum::IntegrationName (readonly)
18 19 20 |
# File 'lib/vellum_ai/types/integration_read.rb', line 18 def name @name end |
#provider ⇒ Vellum::INTEGRATION_PROVIDER (readonly)
20 21 22 |
# File 'lib/vellum_ai/types/integration_read.rb', line 20 def provider @provider end |
Class Method Details
.from_json(json_object:) ⇒ Vellum::IntegrationRead
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/vellum_ai/types/integration_read.rb', line 55 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) id = parsed_json["id"] label = parsed_json["label"] icon_url = parsed_json["icon_url"] name = parsed_json["name"] provider = parsed_json["provider"] unless parsed_json["exec_config"].nil? exec_config = parsed_json["exec_config"].to_json exec_config = Vellum::ComposioIntegrationExecConfig.from_json(json_object: exec_config) else exec_config = nil end new( id: id, label: label, icon_url: icon_url, name: name, provider: provider, exec_config: exec_config, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
91 92 93 94 95 96 97 98 |
# File 'lib/vellum_ai/types/integration_read.rb', line 91 def self.validate_raw(obj:) obj.id.is_a?(String) != false || raise("Passed value for field obj.id 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.icon_url.is_a?(String) != false || raise("Passed value for field obj.icon_url is not the expected type, validation failed.") obj.name.is_a?(Vellum::IntegrationName) != false || raise("Passed value for field obj.name is not the expected type, validation failed.") obj.provider.is_a?(String) != false || raise("Passed value for field obj.provider is not the expected type, validation failed.") Vellum::ComposioIntegrationExecConfig.validate_raw(obj: obj.exec_config) end |
Instance Method Details
#to_json ⇒ String
82 83 84 |
# File 'lib/vellum_ai/types/integration_read.rb', line 82 def to_json @_field_set&.to_json end |