o
    �¨Êh&K  ã                   @   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ejddfdd„Zejejddfdd„Zejejejejejfd	d
„Z	dd„ Z
dd„ Zdd„ Zdd„ Z‡  ZS )ÚInteractionListúÉ 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 )au  
        Initialize the InteractionList

        :param Version version: Version that contains the resource
        :param service_sid: Service Sid.
        :param session_sid: Session Sid.

        :returns: twilio.rest.preview.proxy.service.session.interaction.InteractionList
        :rtype: twilio.rest.preview.proxy.service.session.interaction.InteractionList
        ©Úservice_sidÚsession_sidz;/Services/{service_sid}/Sessions/{session_sid}/InteractionsN© )Úsuperr   Ú__init__Ú	_solutionÚformatÚ_uri)ÚselfÚversionr   r   ©Ú	__class__r   úg/var/www/html/env/lib/python3.10/site-packages/twilio/rest/preview/proxy/service/session/interaction.pyr      s   zInteractionList.__init__Nc                 C   s:   | j  ||¡}| j|||d d�}| j  ||d |d ¡S )aÝ  
        Streams InteractionInstance 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 InteractionInstance.ResourceStatus inbound_participant_status: The Inbound Participant Status of this Interaction
        :param InteractionInstance.ResourceStatus outbound_participant_status: The Outbound Participant Status of this Interaction
        :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.proxy.service.session.interaction.InteractionInstance]
        Ú	page_size)Úinbound_participant_statusÚoutbound_participant_statusr   ÚlimitÚ
page_limit)Ú_versionÚread_limitsÚpageÚstream)r   r   r   r   r   Úlimitsr   r   r   r   r    '   s   ýzInteractionList.streamc                 C   s   t | j||||d�ƒS )a}  
        Lists InteractionInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param InteractionInstance.ResourceStatus inbound_participant_status: The Inbound Participant Status of this Interaction
        :param InteractionInstance.ResourceStatus outbound_participant_status: The Outbound Participant Status of this Interaction
        :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.proxy.service.session.interaction.InteractionInstance]
        )r   r   r   r   )Úlistr    )r   r   r   r   r   r   r   r   r"   F   s   üzInteractionList.listc                 C   s:   t  |||||dœ¡}| jjd| j|d�}t| j|| jƒS )aá  
        Retrieve a single page of InteractionInstance records from the API.
        Request is executed immediately

        :param InteractionInstance.ResourceStatus inbound_participant_status: The Inbound Participant Status of this Interaction
        :param InteractionInstance.ResourceStatus outbound_participant_status: The Outbound Participant Status of this Interaction
        :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 InteractionInstance
        :rtype: twilio.rest.preview.proxy.service.session.interaction.InteractionPage
        )ÚInboundParticipantStatusÚOutboundParticipantStatusÚ	PageTokenr   ÚPageSizeÚGET©Úparams)r   Úofr   r   r   ÚInteractionPager   )r   r   r   Ú
page_tokenÚpage_numberr   r)   Úresponser   r   r   r   `   s   ûýzInteractionList.pagec                 C   s"   | j jj d|¡}t| j || jƒS )aU  
        Retrieve a specific page of InteractionInstance records from the API.
        Request is executed immediately

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

        :returns: Page of InteractionInstance
        :rtype: twilio.rest.preview.proxy.service.session.interaction.InteractionPage
        r'   )r   ÚdomainÚtwilioÚrequestr+   r   )r   Ú
target_urlr.   r   r   r   Úget_page€   s
   

þzInteractionList.get_pagec                 C   ó   t | j| jd | jd |d�S ©a/  
        Constructs a InteractionContext

        :param sid: A string that uniquely identifies this Interaction.

        :returns: twilio.rest.preview.proxy.service.session.interaction.InteractionContext
        :rtype: twilio.rest.preview.proxy.service.session.interaction.InteractionContext
        r   r   ©r   r   Úsid©ÚInteractionContextr   r   ©r   r7   r   r   r   Úget‘   ó   	üzInteractionList.getc                 C   r4   r5   r8   r:   r   r   r   Ú__call__¡   r<   zInteractionList.__call__c                 C   ó   dS )úz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z&<Twilio.Preview.Proxy.InteractionList>r   ©r   r   r   r   Ú__repr__±   ó   zInteractionList.__repr__)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Úunsetr    r"   r   r3   r;   r=   rA   Ú__classcell__r   r   r   r   r      s$    
þ
ÿ
þ r   c                       ó0   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 InteractionPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API
        :param service_sid: Service Sid.
        :param session_sid: Session Sid.

        :returns: twilio.rest.preview.proxy.service.session.interaction.InteractionPage
        :rtype: twilio.rest.preview.proxy.service.session.interaction.InteractionPage
        N)r   r+   r   r   )r   r   r.   Úsolutionr   r   r   r   À   s   
zInteractionPage.__init__c                 C   s   t | j|| jd | jd d�S )a-  
        Build an instance of InteractionInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.preview.proxy.service.session.interaction.InteractionInstance
        :rtype: twilio.rest.preview.proxy.service.session.interaction.InteractionInstance
        r   r   r
   )ÚInteractionInstancer   r   )r   Úpayloadr   r   r   Úget_instanceÑ   s   	üzInteractionPage.get_instancec                 C   r>   )r?   z&<Twilio.Preview.Proxy.InteractionPage>r   r@   r   r   r   rA   á   rB   zInteractionPage.__repr__)rC   rD   rE   rF   r   rM   rA   rH   r   r   r   r   r+   »   s
    r+   c                       rI   )r9   r	   c                    s6   t t| ƒ |¡ |||dœ| _djdi | j¤Ž| _dS )aÆ  
        Initialize the InteractionContext

        :param Version version: Version that contains the resource
        :param service_sid: Service Sid.
        :param session_sid: Session Sid.
        :param sid: A string that uniquely identifies this Interaction.

        :returns: twilio.rest.preview.proxy.service.session.interaction.InteractionContext
        :rtype: twilio.rest.preview.proxy.service.session.interaction.InteractionContext
        r6   zA/Services/{service_sid}/Sessions/{session_sid}/Interactions/{sid}Nr   )r   r9   r   r   r   r   )r   r   r   r   r7   r   r   r   r   ð   s   zInteractionContext.__init__c                 C   sD   t  i ¡}| jjd| j|d�}t| j|| jd | jd | jd d�S )ú¶
        Fetch a InteractionInstance

        :returns: Fetched InteractionInstance
        :rtype: twilio.rest.preview.proxy.service.session.interaction.InteractionInstance
        r'   r(   r   r   r7   r6   )r   r*   r   Úfetchr   rK   r   )r   r)   rL   r   r   r   rO     s   
ýûzInteractionContext.fetchc                 C   ó$   d  dd„ | j ¡ D ƒ¡}d |¡S )r?   ú c                 s   ó    � | ]\}}d   ||¡V  qdS ©z{}={}N©r   ©Ú.0ÚkÚvr   r   r   Ú	<genexpr>   ó   € z.InteractionContext.__repr__.<locals>.<genexpr>z,<Twilio.Preview.Proxy.InteractionContext {}>©Újoinr   Úitemsr   ©r   Úcontextr   r   r   rA     ó   
zInteractionContext.__repr__)rC   rD   rE   rF   r   rO   rA   rH   r   r   r   r   r9   ë   s
    r9   c                       sB  e Zd ZdZG dd„ deƒZG dd„ deƒZd5‡ 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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/d0„ ƒZd1d2„ Zd3d4„ Z‡  ZS )6rK   r	   c                   @   s   e Zd ZdZdZdZdS )zInteractionInstance.StatusÚ	completedzin-progressÚfailedN)rC   rD   rE   Ú	COMPLETEDÚIN_PROGRESSÚFAILEDr   r   r   r   ÚStatus)  s    rf   c                   @   s$   e Zd ZdZdZdZdZdZdZdS )z"InteractionInstance.ResourceStatusÚqueuedÚsendingÚsentrb   Ú	deliveredÚundeliveredN)	rC   rD   rE   ÚQUEUEDÚSENDINGÚSENTre   Ú	DELIVEREDÚUNDELIVEREDr   r   r   r   ÚResourceStatus.  s    rq   Nc                    s   t t| ƒ |¡ i d|d “d|d “d|d “d|d “d|d “d|d “d|d “d|d “d	|d	 “d
|d
 “d|d “d|d “d|d “d|d “d|d “d|d “dt |d ¡“t |d ¡|d dœ¥| _d| _|||pz| jd dœ| _dS )zë
        Initialize the InteractionInstance

        :returns: twilio.rest.preview.proxy.service.session.interaction.InteractionInstance
        :rtype: twilio.rest.preview.proxy.service.session.interaction.InteractionInstance
        r7   r   r   Úaccount_sidÚdataÚstatusÚinbound_participant_sidÚinbound_resource_sidÚinbound_resource_statusÚinbound_resource_typeÚinbound_resource_urlÚoutbound_participant_sidÚoutbound_resource_sidÚoutbound_resource_statusÚoutbound_resource_typeÚoutbound_resource_urlÚdate_createdÚdate_updatedÚurl)r€   r�   Nr6   )r   rK   r   r   Úiso8601_datetimeÚ_propertiesÚ_contextr   )r   r   rL   r   r   r7   r   r   r   r   6  sX   ÿþýüûúùø	÷
öõôóòñðï
íýzInteractionInstance.__init__c                 C   s6   | j du rt| j| jd | jd | jd d�| _ | j S )aK  
        Generate an instance context for the instance, the context is capable of
        performing various actions.  All instance actions are proxied to the context

        :returns: InteractionContext for this InteractionInstance
        :rtype: twilio.rest.preview.proxy.service.session.interaction.InteractionContext
        Nr   r   r7   r6   )r„   r9   r   r   r@   r   r   r   Ú_proxy^  s   
	üzInteractionInstance._proxyc                 C   ó
   | j d S )zg
        :returns: A string that uniquely identifies this Interaction.
        :rtype: unicode
        r7   ©rƒ   r@   r   r   r   r7   p  ó   
zInteractionInstance.sidc                 C   r†   )z@
        :returns: Session Sid.
        :rtype: unicode
        r   r‡   r@   r   r   r   r   x  rˆ   zInteractionInstance.session_sidc                 C   r†   )z@
        :returns: Service Sid.
        :rtype: unicode
        r   r‡   r@   r   r   r   r   €  rˆ   zInteractionInstance.service_sidc                 C   r†   )z@
        :returns: Account Sid.
        :rtype: unicode
        rr   r‡   r@   r   r   r   rr   ˆ  rˆ   zInteractionInstance.account_sidc                 C   r†   )zV
        :returns: What happened in this Interaction.
        :rtype: unicode
        rs   r‡   r@   r   r   r   rs   �  rˆ   zInteractionInstance.datac                 C   r†   )ze
        :returns: The Status of this Interaction
        :rtype: InteractionInstance.Status
        rt   r‡   r@   r   r   r   rt   ˜  rˆ   zInteractionInstance.statusc                 C   r†   )zO
        :returns: The inbound_participant_sid
        :rtype: unicode
        ru   r‡   r@   r   r   r   ru      rˆ   z+InteractionInstance.inbound_participant_sidc                 C   r†   )zT
        :returns: The SID of the inbound resource.
        :rtype: unicode
        rv   r‡   r@   r   r   r   rv   ¨  rˆ   z(InteractionInstance.inbound_resource_sidc                 C   r†   )z~
        :returns: The Inbound Resource Status of this Interaction
        :rtype: InteractionInstance.ResourceStatus
        rw   r‡   r@   r   r   r   rw   °  rˆ   z+InteractionInstance.inbound_resource_statusc                 C   r†   )zc
        :returns: The Twilio object type of the inbound resource.
        :rtype: unicode
        rx   r‡   r@   r   r   r   rx   ¸  rˆ   z)InteractionInstance.inbound_resource_typec                 C   r†   )zT
        :returns: The URL of the inbound resource.
        :rtype: unicode
        ry   r‡   r@   r   r   r   ry   À  rˆ   z(InteractionInstance.inbound_resource_urlc                 C   r†   )zP
        :returns: The outbound_participant_sid
        :rtype: unicode
        rz   r‡   r@   r   r   r   rz   È  rˆ   z,InteractionInstance.outbound_participant_sidc                 C   r†   )zU
        :returns: The SID of the outbound resource.
        :rtype: unicode
        r{   r‡   r@   r   r   r   r{   Ð  rˆ   z)InteractionInstance.outbound_resource_sidc                 C   r†   )z
        :returns: The Outbound Resource Status of this Interaction
        :rtype: InteractionInstance.ResourceStatus
        r|   r‡   r@   r   r   r   r|   Ø  rˆ   z,InteractionInstance.outbound_resource_statusc                 C   r†   )zd
        :returns: The Twilio object type of the outbound resource.
        :rtype: unicode
        r}   r‡   r@   r   r   r   r}   à  rˆ   z*InteractionInstance.outbound_resource_typec                 C   r†   )zU
        :returns: The URL of the outbound resource.
        :rtype: unicode
        r~   r‡   r@   r   r   r   r~   è  rˆ   z)InteractionInstance.outbound_resource_urlc                 C   r†   )zZ
        :returns: The date this Interaction was created
        :rtype: datetime
        r   r‡   r@   r   r   r   r   ð  rˆ   z InteractionInstance.date_createdc                 C   r†   )zZ
        :returns: The date this Interaction was updated
        :rtype: datetime
        r€   r‡   r@   r   r   r   r€   ø  rˆ   z InteractionInstance.date_updatedc                 C   r†   )zP
        :returns: The URL of this Interaction.
        :rtype: unicode
        r�   r‡   r@   r   r   r   r�      rˆ   zInteractionInstance.urlc                 C   s
   | j  ¡ S )rN   )r…   rO   r@   r   r   r   rO     s   
zInteractionInstance.fetchc                 C   rP   )r?   rQ   c                 s   rR   rS   rT   rU   r   r   r   rY     rZ   z/InteractionInstance.__repr__.<locals>.<genexpr>z-<Twilio.Preview.Proxy.InteractionInstance {}>r[   r^   r   r   r   rA     r`   zInteractionInstance.__repr__)N) rC   rD   rE   rF   Úobjectrf   rq   r   Úpropertyr…   r7   r   r   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   r€   r�   rO   rA   rH   r   r   r   r   rK   $  s^    (



















	rK   N)rF   Útwilio.baser   r   Útwilio.base.instance_contextr   Útwilio.base.instance_resourcer   Útwilio.base.list_resourcer   Útwilio.base.pager   r   r+   r9   rK   r   r   r   r   Ú<module>   s    +09