o
    �¨ÊhHI  ã                   @   s�   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 ddl
mZ G dd	„ d	e	ƒZG d
d„ deƒZG dd„ deƒZG dd„ deƒZdS )za
This code was generated by
\ / _    _  _|   _  _
 | (_)\/(_)(_|\/| |(/_  v1.0.0
      /       /
é    )Údeserialize)Úvalues)ÚInstanceContext)ÚInstanceResource)ÚListResource)ÚPagec                       sŒ   e Zd ZdZ‡ fdd„Zejddfdd„Zejddfdd„Zejejejejfd	d
„Z	dd„ Z
ejfdd„Zdd„ Zdd„ Zdd„ Z‡  ZS )Ú
SampleListúÉ 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. c                    s4   t t| ƒ |¡ ||dœ| _djdi | j¤Ž| _dS )a   
        Initialize the SampleList

        :param Version version: Version that contains the resource
        :param assistant_sid: The unique ID of the Assistant.
        :param task_sid: The unique ID of the Task associated with this Sample.

        :returns: twilio.rest.preview.understand.assistant.task.sample.SampleList
        :rtype: twilio.rest.preview.understand.assistant.task.sample.SampleList
        ©Úassistant_sidÚtask_sidz4/Assistants/{assistant_sid}/Tasks/{task_sid}/SamplesN© )Úsuperr   Ú__init__Ú	_solutionÚformatÚ_uri)ÚselfÚversionr   r   ©Ú	__class__r   úf/var/www/html/env/lib/python3.10/site-packages/twilio/rest/preview/understand/assistant/task/sample.pyr      s   zSampleList.__init__Nc                 C   s8   | j  ||¡}| j||d d�}| j  ||d |d ¡S )a  
        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.

        :param unicode language: An ISO language-country string of the sample.
        :param int limit: Upper limit for the number of records to return. stream()
                          guarantees to never return more than limit.  Default is no limit
        :param int page_size: 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
        :rtype: list[twilio.rest.preview.understand.assistant.task.sample.SampleInstance]
        Ú	page_size)Úlanguager   ÚlimitÚ
page_limit)Ú_versionÚread_limitsÚpageÚstream)r   r   r   r   Úlimitsr   r   r   r   r   '   s   zSampleList.streamc                 C   s   t | j|||d�ƒS )a½  
        Lists SampleInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param unicode language: An ISO language-country string of the sample.
        :param int limit: Upper limit for the number of records to return. list() guarantees
                          never to return more than limit.  Default is no limit
        :param int page_size: 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
        :rtype: list[twilio.rest.preview.understand.assistant.task.sample.SampleInstance]
        )r   r   r   )Úlistr   )r   r   r   r   r   r   r   r!   ?   s   zSampleList.listc                 C   s8   t  ||||dœ¡}| jjd| j|d�}t| j|| jƒS )a  
        Retrieve a single page of SampleInstance records from the API.
        Request is executed immediately

        :param unicode language: An ISO language-country string of the sample.
        :param str page_token: PageToken provided by the API
        :param int page_number: Page Number, this value is simply for client state
        :param int page_size: Number of records to return, defaults to 50

        :returns: Page of SampleInstance
        :rtype: twilio.rest.preview.understand.assistant.task.sample.SamplePage
        )ÚLanguageÚ	PageTokenr   ÚPageSizeÚGET©Úparams)r   Úofr   r   r   Ú
SamplePager   )r   r   Ú
page_tokenÚpage_numberr   r'   Úresponser   r   r   r   R   s   üýzSampleList.pagec                 C   s"   | j jj d|¡}t| j || jƒS )aE  
        Retrieve a specific page of SampleInstance records from the API.
        Request is executed immediately

        :param str target_url: API-generated URL for the requested results page

        :returns: Page of SampleInstance
        :rtype: twilio.rest.preview.understand.assistant.task.sample.SamplePage
        r%   )r   ÚdomainÚtwilioÚrequestr)   r   )r   Ú
target_urlr,   r   r   r   Úget_pageo   s
   

þzSampleList.get_pagec                 C   sD   t  |||dœ¡}| jjd| j|d�}t| j|| jd | jd d�S )aH  
        Create a new SampleInstance

        :param unicode language: An ISO language-country string of the sample.
        :param unicode tagged_text: The text example of how end-users may express this task. The sample may contain Field tag blocks.
        :param unicode source_channel: 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: Newly created SampleInstance
        :rtype: twilio.rest.preview.understand.assistant.task.sample.SampleInstance
        ©r"   Ú
TaggedTextÚSourceChannelÚPOST©Údatar   r   r
   )r   r(   r   Úcreater   ÚSampleInstancer   ©r   r   Útagged_textÚsource_channelr7   Úpayloadr   r   r   r8   €   s   ýüzSampleList.createc                 C   ó   t | j| jd | jd |d�S ©a(  
        Constructs a SampleContext

        :param sid: A 34 character string that uniquely identifies this resource.

        :returns: twilio.rest.preview.understand.assistant.task.sample.SampleContext
        :rtype: twilio.rest.preview.understand.assistant.task.sample.SampleContext
        r   r   ©r   r   Úsid©ÚSampleContextr   r   ©r   rA   r   r   r   Úgetš   ó   	üzSampleList.getc                 C   r>   r?   rB   rD   r   r   r   Ú__call__ª   rF   zSampleList.__call__c                 C   ó   dS )úz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z&<Twilio.Preview.Understand.SampleList>r   ©r   r   r   r   Ú__repr__º   ó   zSampleList.__repr__)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Úunsetr   r!   r   r1   r8   rE   rG   rK   Ú__classcell__r   r   r   r   r      s    
ÿr   c                       s0   e Zd ZdZ‡ fdd„Zdd„ Zdd„ Z‡  ZS )r)   r	   c                    s   t t| ƒ ||¡ || _dS )aØ  
        Initialize the SamplePage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API
        :param assistant_sid: The unique ID of the Assistant.
        :param task_sid: The unique ID of the Task associated with this Sample.

        :returns: twilio.rest.preview.understand.assistant.task.sample.SamplePage
        :rtype: twilio.rest.preview.understand.assistant.task.sample.SamplePage
        N)r   r)   r   r   )r   r   r,   Úsolutionr   r   r   r   É   s   
zSamplePage.__init__c                 C   s   t | j|| jd | jd d�S )a  
        Build an instance of SampleInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.preview.understand.assistant.task.sample.SampleInstance
        :rtype: twilio.rest.preview.understand.assistant.task.sample.SampleInstance
        r   r   r
   )r9   r   r   )r   r=   r   r   r   Úget_instanceÚ   s   	üzSamplePage.get_instancec                 C   rH   )rI   z&<Twilio.Preview.Understand.SamplePage>r   rJ   r   r   r   rK   ê   rL   zSamplePage.__repr__)rM   rN   rO   rP   r   rT   rK   rR   r   r   r   r   r)   Ä   s
    r)   c                       sN   e Zd ZdZ‡ fdd„Zdd„ Zejejejfdd„Zdd	„ Z	d
d„ Z
‡  ZS )rC   r	   c                    s6   t t| ƒ |¡ |||dœ| _djdi | j¤Ž| _dS )aû  
        Initialize the SampleContext

        :param Version version: Version that contains the resource
        :param assistant_sid: The unique ID of the Assistant.
        :param task_sid: The unique ID of the Task associated with this Sample.
        :param sid: A 34 character string that uniquely identifies this resource.

        :returns: twilio.rest.preview.understand.assistant.task.sample.SampleContext
        :rtype: twilio.rest.preview.understand.assistant.task.sample.SampleContext
        r@   z:/Assistants/{assistant_sid}/Tasks/{task_sid}/Samples/{sid}Nr   )r   rC   r   r   r   r   )r   r   r   r   rA   r   r   r   r   ù   s   zSampleContext.__init__c                 C   sD   t  i ¡}| jjd| j|d�}t| j|| jd | jd | jd d�S )ú¦
        Fetch a SampleInstance

        :returns: Fetched SampleInstance
        :rtype: twilio.rest.preview.understand.assistant.task.sample.SampleInstance
        r%   r&   r   r   rA   r@   )r   r(   r   Úfetchr   r9   r   )r   r'   r=   r   r   r   rV     s   
ýûzSampleContext.fetchc                 C   sL   t  |||dœ¡}| jjd| j|d�}t| j|| jd | jd | jd d�S )á@  
        Update the SampleInstance

        :param unicode language: An ISO language-country string of the sample.
        :param unicode tagged_text: The text example of how end-users may express this task. The sample may contain Field tag blocks.
        :param unicode source_channel: 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: Updated SampleInstance
        :rtype: twilio.rest.preview.understand.assistant.task.sample.SampleInstance
        r2   r5   r6   r   r   rA   r@   )r   r(   r   Úupdater   r9   r   r:   r   r   r   rX   "  s   ýûzSampleContext.updatec                 C   s   | j  d| j¡S )ú}
        Deletes the SampleInstance

        :returns: True if delete succeeds, False otherwise
        :rtype: bool
        Údelete)r   rZ   r   rJ   r   r   r   rZ   >  s   zSampleContext.deletec                 C   ó$   d  dd„ | j ¡ D ƒ¡}d |¡S )rI   ú c                 s   ó    � | ]\}}d   ||¡V  qdS ©z{}={}N©r   ©Ú.0ÚkÚvr   r   r   Ú	<genexpr>N  ó   € z)SampleContext.__repr__.<locals>.<genexpr>z,<Twilio.Preview.Understand.SampleContext {}>©Újoinr   Úitemsr   ©r   Úcontextr   r   r   rK   G  ó   
zSampleContext.__repr__)rM   rN   rO   rP   r   rV   r   rQ   rX   rZ   rK   rR   r   r   r   r   rC   ô   s    
ÿ	rC   c                       sÔ   e Zd ZdZd#‡ fdd„	Zedd„ ƒZedd„ ƒZed	d
„ ƒZedd„ ƒZ	edd„ ƒZ
edd„ ƒZedd„ ƒZedd„ ƒZedd„ ƒZedd„ ƒZedd„ ƒZdd„ Zejejejfdd„Zdd „ Zd!d"„ Z‡  ZS )$r9   r	   Nc                    s‚   t t| ƒ |¡ |d t |d ¡t |d ¡|d |d |d |d |d |d	 |d
 dœ
| _d| _|||p;| jd dœ| _dS )zÚ
        Initialize the SampleInstance

        :returns: twilio.rest.preview.understand.assistant.task.sample.SampleInstance
        :rtype: twilio.rest.preview.understand.assistant.task.sample.SampleInstance
        Úaccount_sidÚdate_createdÚdate_updatedr   r   r   rA   r;   Úurlr<   )
rl   rm   rn   r   r   r   rA   r;   ro   r<   Nr@   )r   r9   r   r   Úiso8601_datetimeÚ_propertiesÚ_contextr   )r   r   r=   r   r   rA   r   r   r   r   W  s"   öýzSampleInstance.__init__c                 C   s6   | j du rt| j| jd | jd | jd d�| _ | j S )a;  
        Generate an instance context for the instance, the context is capable of
        performing various actions.  All instance actions are proxied to the context

        :returns: SampleContext for this SampleInstance
        :rtype: twilio.rest.preview.understand.assistant.task.sample.SampleContext
        Nr   r   rA   r@   )rr   rC   r   r   rJ   r   r   r   Ú_proxyv  s   
	üzSampleInstance._proxyc                 C   ó
   | j d S )zj
        :returns: The unique ID of the Account that created this Sample.
        :rtype: unicode
        rl   ©rq   rJ   r   r   r   rl   ˆ  ó   
zSampleInstance.account_sidc                 C   rt   )z\
        :returns: The date that this resource was created
        :rtype: datetime
        rm   ru   rJ   r   r   r   rm   �  rv   zSampleInstance.date_createdc                 C   rt   )za
        :returns: The date that this resource was last updated
        :rtype: datetime
        rn   ru   rJ   r   r   r   rn   ˜  rv   zSampleInstance.date_updatedc                 C   rt   )zj
        :returns: The unique ID of the Task associated with this Sample.
        :rtype: unicode
        r   ru   rJ   r   r   r   r      rv   zSampleInstance.task_sidc                 C   rt   )za
        :returns: An ISO language-country string of the sample.
        :rtype: unicode
        r   ru   rJ   r   r   r   r   ¨  rv   zSampleInstance.languagec                 C   rt   )zS
        :returns: The unique ID of the Assistant.
        :rtype: unicode
        r   ru   rJ   r   r   r   r   °  rv   zSampleInstance.assistant_sidc                 C   rt   )zq
        :returns: A 34 character string that uniquely identifies this resource.
        :rtype: unicode
        rA   ru   rJ   r   r   r   rA   ¸  rv   zSampleInstance.sidc                 C   rt   )z•
        :returns: The text example of how end-users may express this task. The sample may contain Field tag blocks.
        :rtype: unicode
        r;   ru   rJ   r   r   r   r;   À  rv   zSampleInstance.tagged_textc                 C   rt   )z;
        :returns: The url
        :rtype: unicode
        ro   ru   rJ   r   r   r   ro   È  rv   zSampleInstance.urlc                 C   rt   )zÍ
        :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
        :rtype: unicode
        r<   ru   rJ   r   r   r   r<   Ð  rv   zSampleInstance.source_channelc                 C   ó
   | j  ¡ S )rU   )rs   rV   rJ   r   r   r   rV   Ø  ó   
zSampleInstance.fetchc                 C   s   | j j|||d�S )rW   )r   r;   r<   )rs   rX   )r   r   r;   r<   r   r   r   rX   á  s   zSampleInstance.updatec                 C   rw   )rY   )rs   rZ   rJ   r   r   r   rZ   ï  rx   zSampleInstance.deletec                 C   r[   )rI   r\   c                 s   r]   r^   r_   r`   r   r   r   rd   ÿ  re   z*SampleInstance.__repr__.<locals>.<genexpr>z-<Twilio.Preview.Understand.SampleInstance {}>rf   ri   r   r   r   rK   ø  rk   zSampleInstance.__repr__)N)rM   rN   rO   rP   r   Úpropertyrs   rl   rm   rn   r   r   r   rA   r;   ro   r<   rV   r   rQ   rX   rZ   rK   rR   r   r   r   r   r9   R  s>    










	
ÿ	r9   N)rP   Útwilio.baser   r   Útwilio.base.instance_contextr   Útwilio.base.instance_resourcer   Útwilio.base.list_resourcer   Útwilio.base.pager   r   r)   rC   r9   r   r   r   r   Ú<module>   s    40^