Class: Twilio::REST::Assistants::V1::ToolList::AssistantsV1ServiceCreateToolRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/rest/assistants/v1/tool.rb,
lib/twilio-ruby/rest/assistants/v1/tool.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ AssistantsV1ServiceCreateToolRequest

Returns a new instance of AssistantsV1ServiceCreateToolRequest.



56
57
58
59
60
61
62
63
64
# File 'lib/twilio-ruby/rest/assistants/v1/tool.rb', line 56

def initialize(payload)
        @assistant_id = payload["assistant_id"]
        @description = payload["description"]
        @enabled = payload["enabled"]
        @meta = payload["meta"]
        @name = payload["name"]
        @policy = payload["policy"]
        @type = payload["type"]
end

Instance Attribute Details

#assistant_idObject

Parameters:

  • : (assistant_id)
    String

    The Assistant ID.

  • : (description)
    String

    The description of the tool.

  • : (enabled)
    Boolean

    True if the tool is enabled.

  • : (meta)
    Hash

    The metadata related to method, url, input_schema to used with the Tool.

  • : (name)
    String

    The name of the tool.

  • : (policy)
    ToolList.AssistantsV1ServiceCreatePolicyRequest
  • : (type)
    String

    The description of the tool.



55
56
57
# File 'lib/twilio-ruby/rest/assistants/v1/tool.rb', line 55

def assistant_id
  @assistant_id
end

#descriptionObject

Parameters:

  • : (assistant_id)
    String

    The Assistant ID.

  • : (description)
    String

    The description of the tool.

  • : (enabled)
    Boolean

    True if the tool is enabled.

  • : (meta)
    Hash

    The metadata related to method, url, input_schema to used with the Tool.

  • : (name)
    String

    The name of the tool.

  • : (policy)
    ToolList.AssistantsV1ServiceCreatePolicyRequest
  • : (type)
    String

    The description of the tool.



55
56
57
# File 'lib/twilio-ruby/rest/assistants/v1/tool.rb', line 55

def description
  @description
end

#enabledObject

Parameters:

  • : (assistant_id)
    String

    The Assistant ID.

  • : (description)
    String

    The description of the tool.

  • : (enabled)
    Boolean

    True if the tool is enabled.

  • : (meta)
    Hash

    The metadata related to method, url, input_schema to used with the Tool.

  • : (name)
    String

    The name of the tool.

  • : (policy)
    ToolList.AssistantsV1ServiceCreatePolicyRequest
  • : (type)
    String

    The description of the tool.



55
56
57
# File 'lib/twilio-ruby/rest/assistants/v1/tool.rb', line 55

def enabled
  @enabled
end

#metaObject

Parameters:

  • : (assistant_id)
    String

    The Assistant ID.

  • : (description)
    String

    The description of the tool.

  • : (enabled)
    Boolean

    True if the tool is enabled.

  • : (meta)
    Hash

    The metadata related to method, url, input_schema to used with the Tool.

  • : (name)
    String

    The name of the tool.

  • : (policy)
    ToolList.AssistantsV1ServiceCreatePolicyRequest
  • : (type)
    String

    The description of the tool.



55
56
57
# File 'lib/twilio-ruby/rest/assistants/v1/tool.rb', line 55

def meta
  @meta
end

#nameObject

Parameters:

  • : (assistant_id)
    String

    The Assistant ID.

  • : (description)
    String

    The description of the tool.

  • : (enabled)
    Boolean

    True if the tool is enabled.

  • : (meta)
    Hash

    The metadata related to method, url, input_schema to used with the Tool.

  • : (name)
    String

    The name of the tool.

  • : (policy)
    ToolList.AssistantsV1ServiceCreatePolicyRequest
  • : (type)
    String

    The description of the tool.



55
56
57
# File 'lib/twilio-ruby/rest/assistants/v1/tool.rb', line 55

def name
  @name
end

#policyObject

Parameters:

  • : (assistant_id)
    String

    The Assistant ID.

  • : (description)
    String

    The description of the tool.

  • : (enabled)
    Boolean

    True if the tool is enabled.

  • : (meta)
    Hash

    The metadata related to method, url, input_schema to used with the Tool.

  • : (name)
    String

    The name of the tool.

  • : (policy)
    ToolList.AssistantsV1ServiceCreatePolicyRequest
  • : (type)
    String

    The description of the tool.



55
56
57
# File 'lib/twilio-ruby/rest/assistants/v1/tool.rb', line 55

def policy
  @policy
end

#typeObject

Parameters:

  • : (assistant_id)
    String

    The Assistant ID.

  • : (description)
    String

    The description of the tool.

  • : (enabled)
    Boolean

    True if the tool is enabled.

  • : (meta)
    Hash

    The metadata related to method, url, input_schema to used with the Tool.

  • : (name)
    String

    The name of the tool.

  • : (policy)
    ToolList.AssistantsV1ServiceCreatePolicyRequest
  • : (type)
    String

    The description of the tool.



55
56
57
# File 'lib/twilio-ruby/rest/assistants/v1/tool.rb', line 55

def type
  @type
end

Instance Method Details

#to_json(options = {}) ⇒ Object



65
66
67
68
69
70
71
72
73
74
75
# File 'lib/twilio-ruby/rest/assistants/v1/tool.rb', line 65

def to_json(options = {})
{
        "assistant_id": @assistant_id,
        "description": @description,
        "enabled": @enabled,
        "meta": @meta,
        "name": @name,
        "policy": @policy,
        "type": @type,
}.to_json(options)
end