o
    �¨ÊhL  ã                   @   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úk PLEASE NOTE that this class contains beta products that are subject to
    change. Use them with caution. c                    s4   t t| ƒ |¡ ||dœ| _djdi | j¤Ž| _dS )ak  
        Initialize the InteractionList

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

        :returns: twilio.rest.proxy.v1.service.session.interaction.InteractionList
        :rtype: twilio.rest.proxy.v1.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   úb/var/www/html/env/lib/python3.10/site-packages/twilio/rest/proxy/v1/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
        :param InteractionInstance.ResourceStatus outbound_participant_status: The outbound_participant_status
        :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.proxy.v1.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 )aP  
        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
        :param InteractionInstance.ResourceStatus outbound_participant_status: The outbound_participant_status
        :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.proxy.v1.service.session.interaction.InteractionInstance]
        )r   r   r   r   )Úlistr    )r   r   r   r   r   r   r   r   r"   E   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
        :param InteractionInstance.ResourceStatus outbound_participant_status: The outbound_participant_status
        :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.proxy.v1.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 )aP  
        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.proxy.v1.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.proxy.v1.service.session.interaction.InteractionContext
        :rtype: twilio.rest.proxy.v1.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.Proxy.V1.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                       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 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.proxy.v1.service.session.interaction.InteractionPage
        :rtype: twilio.rest.proxy.v1.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.proxy.v1.service.session.interaction.InteractionInstance
        :rtype: twilio.rest.proxy.v1.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.Proxy.V1.InteractionPage>r   r@   r   r   r   rA   ß   rB   zInteractionPage.__repr__)rC   rD   rE   rF   r   rL   rA   rH   r   r   r   r   r+   º   s
    r+   c                       s8   e Zd ZdZ‡ fdd„Zdd„ Zdd„ Zdd	„ Z‡  ZS )
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.proxy.v1.service.session.interaction.InteractionContext
        :rtype: twilio.rest.proxy.v1.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.proxy.v1.service.session.interaction.InteractionInstance
        r'   r(   r   r   r7   r6   )r   r*   r   Úfetchr   rJ   r   )r   r)   rK   r   r   r   rN   ÿ   s   
ýûzInteractionContext.fetchc                 C   s   | j  d| j¡S )ú‚
        Deletes the InteractionInstance

        :returns: True if delete succeeds, False otherwise
        :rtype: bool
        Údelete)r   rP   r   r@   r   r   r   rP     s   zInteractionContext.deletec                 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.Proxy.V1.InteractionContext {}>©Újoinr   Úitemsr   ©r   Úcontextr   r   r   rA     ó   
zInteractionContext.__repr__)	rC   rD   rE   rF   r   rN   rP   rA   rH   r   r   r   r   r9   é   s    	r9   c                       sJ  e Zd ZdZG dd„ deƒZG dd„ deƒZd7‡ 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d5d6„ Z‡  Z S )8rJ   r	   c                   @   s   e Zd ZdZdZdZdS )zInteractionInstance.TypeÚmessageÚvoiceÚunknownN)rC   rD   rE   ÚMESSAGEÚVOICEÚUNKNOWNr   r   r   r   ÚType.  s    rh   c                   @   s`   e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdZdZdZdZdZdZdZdZdS )z"InteractionInstance.ResourceStatusÚacceptedÚansweredÚbusyÚcanceledÚ	completedÚdeletedÚ	deliveredzdelivery-unknownÚfailedzin-progressÚ	initiatedz	no-answerÚqueuedÚreceivedÚ	receivingÚringingÚ	scheduledÚsendingÚsentÚundeliveredrd   N)rC   rD   rE   ÚACCEPTEDÚANSWEREDÚBUSYÚCANCELEDÚ	COMPLETEDÚDELETEDÚ	DELIVEREDÚDELIVERY_UNKNOWNÚFAILEDÚIN_PROGRESSÚ	INITIATEDÚ	NO_ANSWERÚQUEUEDÚRECEIVEDÚ	RECEIVINGÚRINGINGÚ	SCHEDULEDÚSENDINGÚSENTÚUNDELIVEREDrg   r   r   r   r   ÚResourceStatus3  s,    rŽ   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.proxy.v1.service.session.interaction.InteractionInstance
        :rtype: twilio.rest.proxy.v1.service.session.interaction.InteractionInstance
        r7   r   r   Úaccount_sidÚdataÚtypeÚ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   rJ   r   r   Úiso8601_datetimeÚ_propertiesÚ_contextr   )r   r   rK   r   r   r7   r   r   r   r   J  sX   ÿþýüûúùø	÷
öõôóòñðï
íýzInteractionInstance.__init__c                 C   s6   | j du rt| j| jd | jd | jd d�| _ | j S )aF  
        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.proxy.v1.service.session.interaction.InteractionContext
        Nr   r   r7   r6   )r¡   r9   r   r   r@   r   r   r   Ú_proxyr  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   „  ó   
zInteractionInstance.sidc                 C   r£   )z@
        :returns: Session Sid.
        :rtype: unicode
        r   r¤   r@   r   r   r   r   Œ  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
        r�   r¤   r@   r   r   r   r�   œ  r¥   zInteractionInstance.account_sidc                 C   r£   )zY
        :returns: Further details about an interaction.
        :rtype: unicode
        r�   r¤   r@   r   r   r   r�   ¤  r¥   zInteractionInstance.datac                 C   r£   )za
        :returns: The Type of this Interaction
        :rtype: InteractionInstance.Type
        r‘   r¤   r@   r   r   r   r‘   ¬  r¥   zInteractionInstance.typec                 C   r£   )zL
        :returns: Inbound Participant Sid.
        :rtype: unicode
        r’   r¤   r@   r   r   r   r’   ´  r¥   z+InteractionInstance.inbound_participant_sidc                 C   r£   )zI
        :returns: Inbound Resource Sid.
        :rtype: unicode
        r“   r¤   r@   r   r   r   r“   ¼  r¥   z(InteractionInstance.inbound_resource_sidc                 C   r£   )z~
        :returns: The Inbound Resource Status of this Interaction
        :rtype: InteractionInstance.ResourceStatus
        r”   r¤   r@   r   r   r   r”   Ä  r¥   z+InteractionInstance.inbound_resource_statusc                 C   r£   )zf
        :returns: The type of the Inbound Resource, Call or Message.
        :rtype: unicode
        r•   r¤   r@   r   r   r   r•   Ì  r¥   z)InteractionInstance.inbound_resource_typec                 C   r£   )z[
        :returns: The URL of the Twilio inbound resource.
        :rtype: unicode
        r–   r¤   r@   r   r   r   r–   Ô  r¥   z(InteractionInstance.inbound_resource_urlc                 C   r£   )zM
        :returns: Outbound Participant Sid.
        :rtype: unicode
        r—   r¤   r@   r   r   r   r—   Ü  r¥   z,InteractionInstance.outbound_participant_sidc                 C   r£   )zJ
        :returns: Outbound Resource Sid.
        :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£   )zg
        :returns: The type of the Outbound Resource, Call or Message.
        :rtype: unicode
        rš   r¤   r@   r   r   r   rš   ô  r¥   z*InteractionInstance.outbound_resource_typec                 C   r£   )z\
        :returns: The URL of the Twilio 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£   )z_
        :returns: The date this Interaction was last updated
        :rtype: datetime
        r�   r¤   r@   r   r   r   r�     r¥   z InteractionInstance.date_updatedc                 C   r£   )zM
        :returns: The URL of this resource.
        :rtype: unicode
        rž   r¤   r@   r   r   r   rž     r¥   zInteractionInstance.urlc                 C   ó
   | j  ¡ S )rM   )r¢   rN   r@   r   r   r   rN     ó   
zInteractionInstance.fetchc                 C   r¦   )rO   )r¢   rP   r@   r   r   r   rP   %  r§   zInteractionInstance.deletec                 C   rQ   )r?   rR   c                 s   rS   rT   rU   rV   r   r   r   rZ   5  r[   z/InteractionInstance.__repr__.<locals>.<genexpr>z(<Twilio.Proxy.V1.InteractionInstance {}>r\   r_   r   r   r   rA   .  ra   zInteractionInstance.__repr__)N)!rC   rD   rE   rF   Úobjectrh   rŽ   r   Úpropertyr¢   r7   r   r   r�   r�   r‘   r’   r“   r”   r•   r–   r—   r˜   r™   rš   r›   rœ   r�   rž   rN   rP   rA   rH   r   r   r   r   rJ   *  s`    (



















		rJ   N)rF   Útwilio.baser   r   Útwilio.base.instance_contextr   Útwilio.base.instance_resourcer   Útwilio.base.list_resourcer   Útwilio.base.pager   r   r+   r9   rJ   r   r   r   r   Ú<module>   s    */A