Class: Twilio::REST::Assistants::V1::KnowledgeList::AssistantsV1ServiceCreateKnowledgeRequest

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ AssistantsV1ServiceCreateKnowledgeRequest

Returns a new instance of AssistantsV1ServiceCreateKnowledgeRequest.



30
31
32
33
34
35
36
37
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge.rb', line 30

def initialize(payload)
        @assistant_id = payload["assistant_id"]
        @description = payload["description"]
        @knowledge_source_details = payload["knowledge_source_details"]
        @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 knowledge source.

  • : (knowledge_source_details)
    Hash

    The details of the knowledge source based on the type.

  • : (name)
    String

    The name of the tool.

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

    The type of the knowledge source.



29
30
31
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge.rb', line 29

def assistant_id
  @assistant_id
end

#descriptionObject

Parameters:

  • : (assistant_id)
    String

    The Assistant ID.

  • : (description)
    String

    The description of the knowledge source.

  • : (knowledge_source_details)
    Hash

    The details of the knowledge source based on the type.

  • : (name)
    String

    The name of the tool.

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

    The type of the knowledge source.



29
30
31
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge.rb', line 29

def description
  @description
end

#knowledge_source_detailsObject

Parameters:

  • : (assistant_id)
    String

    The Assistant ID.

  • : (description)
    String

    The description of the knowledge source.

  • : (knowledge_source_details)
    Hash

    The details of the knowledge source based on the type.

  • : (name)
    String

    The name of the tool.

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

    The type of the knowledge source.



29
30
31
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge.rb', line 29

def knowledge_source_details
  @knowledge_source_details
end

#nameObject

Parameters:

  • : (assistant_id)
    String

    The Assistant ID.

  • : (description)
    String

    The description of the knowledge source.

  • : (knowledge_source_details)
    Hash

    The details of the knowledge source based on the type.

  • : (name)
    String

    The name of the tool.

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

    The type of the knowledge source.



29
30
31
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge.rb', line 29

def name
  @name
end

#policyObject

Parameters:

  • : (assistant_id)
    String

    The Assistant ID.

  • : (description)
    String

    The description of the knowledge source.

  • : (knowledge_source_details)
    Hash

    The details of the knowledge source based on the type.

  • : (name)
    String

    The name of the tool.

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

    The type of the knowledge source.



29
30
31
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge.rb', line 29

def policy
  @policy
end

#typeObject

Parameters:

  • : (assistant_id)
    String

    The Assistant ID.

  • : (description)
    String

    The description of the knowledge source.

  • : (knowledge_source_details)
    Hash

    The details of the knowledge source based on the type.

  • : (name)
    String

    The name of the tool.

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

    The type of the knowledge source.



29
30
31
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge.rb', line 29

def type
  @type
end

Instance Method Details

#to_json(options = {}) ⇒ Object



38
39
40
41
42
43
44
45
46
47
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge.rb', line 38

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