twilio.rest.preview.understand.assistant.task package¶
Submodules¶
twilio.rest.preview.understand.assistant.task.field module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.preview.understand.assistant.task.field.
FieldContext
(version, assistant_sid, task_sid, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
-
delete
()[source]¶ Deletes the FieldInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the FieldInstance
Returns: The fetched FieldInstance Return type: twilio.rest.preview.understand.assistant.task.field.FieldInstance
-
-
class
twilio.rest.preview.understand.assistant.task.field.
FieldInstance
(version, payload, assistant_sid, task_sid, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
-
account_sid
¶ Returns: The unique ID of the Account that created this Field. Return type: unicode
-
assistant_sid
¶ Returns: The unique ID of the parent Assistant. Return type: unicode
-
date_created
¶ Returns: The date that this resource was created Return type: datetime
-
date_updated
¶ Returns: The date that this resource was last updated Return type: datetime
-
delete
()[source]¶ Deletes the FieldInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the FieldInstance
Returns: The fetched FieldInstance Return type: twilio.rest.preview.understand.assistant.task.field.FieldInstance
-
field_type
¶ Returns: The Field Type of this field. It can be any Built-in Field Type or unique_name or the Field Type sid of a custom Field Type. Return type: unicode
-
sid
¶ Returns: A 34 character string that uniquely identifies this resource. Return type: unicode
-
task_sid
¶ Returns: The unique ID of the Task associated with this Field. Return type: unicode
-
unique_name
¶ Returns: A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. Return type: unicode
-
url
¶ Returns: The url Return type: unicode
-
-
class
twilio.rest.preview.understand.assistant.task.field.
FieldList
(version, assistant_sid, task_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
-
create
(field_type, unique_name)[source]¶ Create the FieldInstance
Parameters: - field_type (unicode) – The unique name or sid of the FieldType. It can be any Built-in Field Type or the unique_name or sid of a custom Field Type.
- unique_name (unicode) – A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
Returns: The created FieldInstance
Return type: twilio.rest.preview.understand.assistant.task.field.FieldInstance
-
get
(sid)[source]¶ Constructs a FieldContext
Parameters: sid – A 34 character string that uniquely identifies this resource. Returns: twilio.rest.preview.understand.assistant.task.field.FieldContext Return type: twilio.rest.preview.understand.assistant.task.field.FieldContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of FieldInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of FieldInstance Return type: twilio.rest.preview.understand.assistant.task.field.FieldPage
-
list
(limit=None, page_size=None)[source]¶ Lists FieldInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.
Parameters: - limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type: list[twilio.rest.preview.understand.assistant.task.field.FieldInstance]
-
page
(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of FieldInstance records from the API. Request is executed immediately
Parameters: Returns: Page of FieldInstance
Return type: twilio.rest.preview.understand.assistant.task.field.FieldPage
-
stream
(limit=None, page_size=None)[source]¶ Streams FieldInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.
Parameters: - limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type: list[twilio.rest.preview.understand.assistant.task.field.FieldInstance]
-
-
class
twilio.rest.preview.understand.assistant.task.field.
FieldPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
-
get_instance
(payload)[source]¶ Build an instance of FieldInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.preview.understand.assistant.task.field.FieldInstance Return type: twilio.rest.preview.understand.assistant.task.field.FieldInstance
-
twilio.rest.preview.understand.assistant.task.sample module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.preview.understand.assistant.task.sample.
SampleContext
(version, assistant_sid, task_sid, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
-
delete
()[source]¶ Deletes the SampleInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the SampleInstance
Returns: The fetched SampleInstance Return type: twilio.rest.preview.understand.assistant.task.sample.SampleInstance
-
update
(language=<object object>, tagged_text=<object object>, source_channel=<object object>)[source]¶ Update the SampleInstance
Parameters: - language (unicode) – An ISO language-country string of the sample.
- tagged_text (unicode) – The text example of how end-users may express this task. The sample may contain Field tag blocks.
- source_channel (unicode) – The communication channel the sample was captured. It can be: voice, sms, chat, alexa, google-assistant, or slack. If not included the value will be null
Returns: The updated SampleInstance
Return type: twilio.rest.preview.understand.assistant.task.sample.SampleInstance
-
-
class
twilio.rest.preview.understand.assistant.task.sample.
SampleInstance
(version, payload, assistant_sid, task_sid, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
-
account_sid
¶ Returns: The unique ID of the Account that created this Sample. Return type: unicode
-
assistant_sid
¶ Returns: The unique ID of the Assistant. Return type: unicode
-
date_created
¶ Returns: The date that this resource was created Return type: datetime
-
date_updated
¶ Returns: The date that this resource was last updated Return type: datetime
-
delete
()[source]¶ Deletes the SampleInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the SampleInstance
Returns: The fetched SampleInstance Return type: twilio.rest.preview.understand.assistant.task.sample.SampleInstance
-
language
¶ Returns: An ISO language-country string of the sample. Return type: unicode
-
sid
¶ Returns: A 34 character string that uniquely identifies this resource. Return type: unicode
-
source_channel
¶ Returns: The communication channel the sample was captured. It can be: voice, sms, chat, alexa, google-assistant, or slack. If not included the value will be null Return type: unicode
-
tagged_text
¶ Returns: The text example of how end-users may express this task. The sample may contain Field tag blocks. Return type: unicode
-
task_sid
¶ Returns: The unique ID of the Task associated with this Sample. Return type: unicode
-
update
(language=<object object>, tagged_text=<object object>, source_channel=<object object>)[source]¶ Update the SampleInstance
Parameters: - language (unicode) – An ISO language-country string of the sample.
- tagged_text (unicode) – The text example of how end-users may express this task. The sample may contain Field tag blocks.
- source_channel (unicode) – The communication channel the sample was captured. It can be: voice, sms, chat, alexa, google-assistant, or slack. If not included the value will be null
Returns: The updated SampleInstance
Return type: twilio.rest.preview.understand.assistant.task.sample.SampleInstance
-
url
¶ Returns: The url Return type: unicode
-
-
class
twilio.rest.preview.understand.assistant.task.sample.
SampleList
(version, assistant_sid, task_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
-
create
(language, tagged_text, source_channel=<object object>)[source]¶ Create the SampleInstance
Parameters: - language (unicode) – An ISO language-country string of the sample.
- tagged_text (unicode) – The text example of how end-users may express this task. The sample may contain Field tag blocks.
- source_channel (unicode) – The communication channel the sample was captured. It can be: voice, sms, chat, alexa, google-assistant, or slack. If not included the value will be null
Returns: The created SampleInstance
Return type: twilio.rest.preview.understand.assistant.task.sample.SampleInstance
-
get
(sid)[source]¶ Constructs a SampleContext
Parameters: sid – A 34 character string that uniquely identifies this resource. Returns: twilio.rest.preview.understand.assistant.task.sample.SampleContext Return type: twilio.rest.preview.understand.assistant.task.sample.SampleContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of SampleInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of SampleInstance Return type: twilio.rest.preview.understand.assistant.task.sample.SamplePage
-
list
(language=<object object>, limit=None, page_size=None)[source]¶ Lists SampleInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.
Parameters: - language (unicode) – An ISO language-country string of the sample.
- limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type: list[twilio.rest.preview.understand.assistant.task.sample.SampleInstance]
-
page
(language=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of SampleInstance records from the API. Request is executed immediately
Parameters: Returns: Page of SampleInstance
Return type: twilio.rest.preview.understand.assistant.task.sample.SamplePage
-
stream
(language=<object object>, limit=None, page_size=None)[source]¶ Streams SampleInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.
Parameters: - language (unicode) – An ISO language-country string of the sample.
- limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type: list[twilio.rest.preview.understand.assistant.task.sample.SampleInstance]
-
-
class
twilio.rest.preview.understand.assistant.task.sample.
SamplePage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
-
get_instance
(payload)[source]¶ Build an instance of SampleInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.preview.understand.assistant.task.sample.SampleInstance Return type: twilio.rest.preview.understand.assistant.task.sample.SampleInstance
-
twilio.rest.preview.understand.assistant.task.task_actions module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.preview.understand.assistant.task.task_actions.
TaskActionsContext
(version, assistant_sid, task_sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
-
fetch
()[source]¶ Fetch the TaskActionsInstance
Returns: The fetched TaskActionsInstance Return type: twilio.rest.preview.understand.assistant.task.task_actions.TaskActionsInstance
-
update
(actions=<object object>)[source]¶ Update the TaskActionsInstance
Parameters: actions (dict) – The JSON actions that instruct the Assistant how to perform this task. Returns: The updated TaskActionsInstance Return type: twilio.rest.preview.understand.assistant.task.task_actions.TaskActionsInstance
-
-
class
twilio.rest.preview.understand.assistant.task.task_actions.
TaskActionsInstance
(version, payload, assistant_sid, task_sid)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
-
account_sid
¶ Returns: The unique ID of the Account that created this Field. Return type: unicode
-
assistant_sid
¶ Returns: The unique ID of the parent Assistant. Return type: unicode
-
fetch
()[source]¶ Fetch the TaskActionsInstance
Returns: The fetched TaskActionsInstance Return type: twilio.rest.preview.understand.assistant.task.task_actions.TaskActionsInstance
-
task_sid
¶ Returns: The unique ID of the Task. Return type: unicode
-
update
(actions=<object object>)[source]¶ Update the TaskActionsInstance
Parameters: actions (dict) – The JSON actions that instruct the Assistant how to perform this task. Returns: The updated TaskActionsInstance Return type: twilio.rest.preview.understand.assistant.task.task_actions.TaskActionsInstance
-
url
¶ Returns: The url Return type: unicode
-
-
class
twilio.rest.preview.understand.assistant.task.task_actions.
TaskActionsList
(version, assistant_sid, task_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
-
get
()[source]¶ Constructs a TaskActionsContext
Returns: twilio.rest.preview.understand.assistant.task.task_actions.TaskActionsContext Return type: twilio.rest.preview.understand.assistant.task.task_actions.TaskActionsContext
-
-
class
twilio.rest.preview.understand.assistant.task.task_actions.
TaskActionsPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
-
get_instance
(payload)[source]¶ Build an instance of TaskActionsInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.preview.understand.assistant.task.task_actions.TaskActionsInstance Return type: twilio.rest.preview.understand.assistant.task.task_actions.TaskActionsInstance
-
twilio.rest.preview.understand.assistant.task.task_statistics module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.preview.understand.assistant.task.task_statistics.
TaskStatisticsContext
(version, assistant_sid, task_sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
-
fetch
()[source]¶ Fetch the TaskStatisticsInstance
Returns: The fetched TaskStatisticsInstance Return type: twilio.rest.preview.understand.assistant.task.task_statistics.TaskStatisticsInstance
-
-
class
twilio.rest.preview.understand.assistant.task.task_statistics.
TaskStatisticsInstance
(version, payload, assistant_sid, task_sid)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
-
account_sid
¶ Returns: The unique ID of the Account that created this Field. Return type: unicode
-
assistant_sid
¶ Returns: The unique ID of the parent Assistant. Return type: unicode
-
fetch
()[source]¶ Fetch the TaskStatisticsInstance
Returns: The fetched TaskStatisticsInstance Return type: twilio.rest.preview.understand.assistant.task.task_statistics.TaskStatisticsInstance
-
fields_count
¶ Returns: The total number of Fields associated with this Task. Return type: unicode
-
samples_count
¶ Returns: The total number of Samples associated with this Task. Return type: unicode
-
task_sid
¶ Returns: The unique ID of the Task associated with this Field. Return type: unicode
-
url
¶ Returns: The url Return type: unicode
-
-
class
twilio.rest.preview.understand.assistant.task.task_statistics.
TaskStatisticsList
(version, assistant_sid, task_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
-
get
()[source]¶ Constructs a TaskStatisticsContext
Returns: twilio.rest.preview.understand.assistant.task.task_statistics.TaskStatisticsContext Return type: twilio.rest.preview.understand.assistant.task.task_statistics.TaskStatisticsContext
-
-
class
twilio.rest.preview.understand.assistant.task.task_statistics.
TaskStatisticsPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
-
get_instance
(payload)[source]¶ Build an instance of TaskStatisticsInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.preview.understand.assistant.task.task_statistics.TaskStatisticsInstance Return type: twilio.rest.preview.understand.assistant.task.task_statistics.TaskStatisticsInstance
-
Module contents¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.preview.understand.assistant.task.
TaskContext
(version, assistant_sid, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
-
delete
()[source]¶ Deletes the TaskInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the TaskInstance
Returns: The fetched TaskInstance Return type: twilio.rest.preview.understand.assistant.task.TaskInstance
-
fields
¶ Access the fields
Returns: twilio.rest.preview.understand.assistant.task.field.FieldList Return type: twilio.rest.preview.understand.assistant.task.field.FieldList
-
samples
¶ Access the samples
Returns: twilio.rest.preview.understand.assistant.task.sample.SampleList Return type: twilio.rest.preview.understand.assistant.task.sample.SampleList
-
statistics
¶ Access the statistics
Returns: twilio.rest.preview.understand.assistant.task.task_statistics.TaskStatisticsList Return type: twilio.rest.preview.understand.assistant.task.task_statistics.TaskStatisticsList
-
task_actions
¶ Access the task_actions
Returns: twilio.rest.preview.understand.assistant.task.task_actions.TaskActionsList Return type: twilio.rest.preview.understand.assistant.task.task_actions.TaskActionsList
-
update
(friendly_name=<object object>, unique_name=<object object>, actions=<object object>, actions_url=<object object>)[source]¶ Update the TaskInstance
Parameters: - friendly_name (unicode) – A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long.
- unique_name (unicode) – A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
- actions (dict) – A user-provided JSON object encoded as a string to specify the actions for this task. It is optional and non-unique.
- actions_url (unicode) – User-provided HTTP endpoint where from the assistant fetches actions
Returns: The updated TaskInstance
Return type:
-
-
class
twilio.rest.preview.understand.assistant.task.
TaskInstance
(version, payload, assistant_sid, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
-
account_sid
¶ Returns: The unique ID of the Account that created this Task. Return type: unicode
-
actions_url
¶ Returns: User-provided HTTP endpoint where from the assistant fetches actions Return type: unicode
-
assistant_sid
¶ Returns: The unique ID of the Assistant. Return type: unicode
-
date_created
¶ Returns: The date that this resource was created Return type: datetime
-
date_updated
¶ Returns: The date that this resource was last updated Return type: datetime
-
delete
()[source]¶ Deletes the TaskInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the TaskInstance
Returns: The fetched TaskInstance Return type: twilio.rest.preview.understand.assistant.task.TaskInstance
-
fields
¶ Access the fields
Returns: twilio.rest.preview.understand.assistant.task.field.FieldList Return type: twilio.rest.preview.understand.assistant.task.field.FieldList
-
friendly_name
¶ Returns: A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long. Return type: unicode
-
links
¶ Returns: The links Return type: unicode
-
samples
¶ Access the samples
Returns: twilio.rest.preview.understand.assistant.task.sample.SampleList Return type: twilio.rest.preview.understand.assistant.task.sample.SampleList
-
sid
¶ Returns: A 34 character string that uniquely identifies this resource. Return type: unicode
-
statistics
¶ Access the statistics
Returns: twilio.rest.preview.understand.assistant.task.task_statistics.TaskStatisticsList Return type: twilio.rest.preview.understand.assistant.task.task_statistics.TaskStatisticsList
-
task_actions
¶ Access the task_actions
Returns: twilio.rest.preview.understand.assistant.task.task_actions.TaskActionsList Return type: twilio.rest.preview.understand.assistant.task.task_actions.TaskActionsList
-
unique_name
¶ Returns: A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. Return type: unicode
-
update
(friendly_name=<object object>, unique_name=<object object>, actions=<object object>, actions_url=<object object>)[source]¶ Update the TaskInstance
Parameters: - friendly_name (unicode) – A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long.
- unique_name (unicode) – A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
- actions (dict) – A user-provided JSON object encoded as a string to specify the actions for this task. It is optional and non-unique.
- actions_url (unicode) – User-provided HTTP endpoint where from the assistant fetches actions
Returns: The updated TaskInstance
Return type:
-
url
¶ Returns: The url Return type: unicode
-
-
class
twilio.rest.preview.understand.assistant.task.
TaskList
(version, assistant_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
-
create
(unique_name, friendly_name=<object object>, actions=<object object>, actions_url=<object object>)[source]¶ Create the TaskInstance
Parameters: - unique_name (unicode) – A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
- friendly_name (unicode) – A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long.
- actions (dict) – A user-provided JSON object encoded as a string to specify the actions for this task. It is optional and non-unique.
- actions_url (unicode) – User-provided HTTP endpoint where from the assistant fetches actions
Returns: The created TaskInstance
Return type:
-
get
(sid)[source]¶ Constructs a TaskContext
Parameters: sid – A 34 character string that uniquely identifies this resource. Returns: twilio.rest.preview.understand.assistant.task.TaskContext Return type: twilio.rest.preview.understand.assistant.task.TaskContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of TaskInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of TaskInstance Return type: twilio.rest.preview.understand.assistant.task.TaskPage
-
list
(limit=None, page_size=None)[source]¶ Lists TaskInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.
Parameters: - limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type: list[twilio.rest.preview.understand.assistant.task.TaskInstance]
-
page
(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of TaskInstance records from the API. Request is executed immediately
Parameters: Returns: Page of TaskInstance
Return type:
-
stream
(limit=None, page_size=None)[source]¶ Streams TaskInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.
Parameters: - limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type: list[twilio.rest.preview.understand.assistant.task.TaskInstance]
-
-
class
twilio.rest.preview.understand.assistant.task.
TaskPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
-
get_instance
(payload)[source]¶ Build an instance of TaskInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.preview.understand.assistant.task.TaskInstance Return type: twilio.rest.preview.understand.assistant.task.TaskInstance
-