o
    ä›e G  ã                   @   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                       sj   e Zd ZdZ‡ fdd„Zddd„Zddd„Z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 )a£  
        Initialize the InteractionList

        :param Version version: Version that contains the resource
        :param service_sid: The SID of the resource's parent Service
        :param session_sid: The SID of the resource's parent Session

        :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   úc/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/proxy/v1/service/session/interaction.pyr      s   zInteractionList.__init__Nc                 C   s0   | j  ||¡}| j|d d}| j  ||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 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)r   Úlimit)Ú_versionÚread_limitsÚpageÚstream)r   r   r   Úlimitsr   r   r   r   r   &   s   zInteractionList.streamc                 C   s   t | j||dƒS )at  
        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 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   )Úlistr   )r   r   r   r   r   r   r   =   s   zInteractionList.listc                 C   s6   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 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
        )Ú	PageTokenr   ÚPageSizeÚGET)ÚmethodÚuriÚparams)r   Úofr   r   r   ÚInteractionPager   )r   Ú
page_tokenÚpage_numberr   ÚdataÚresponser   r   r   r   O   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_pageb   s
   

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

        :param sid: The unique string that identifies the resource

        :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   r4   r   r   r   Úgets   ó   	üzInteractionList.getc                 C   r1   r2   r5   r7   r   r   r   Ú__call__ƒ   r9   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__)NN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   Úunsetr   r0   r8   r:   r>   Ú__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: The SID of the resource's parent Service
        :param session_sid: The SID of the resource's parent Session

        :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   r>   Â   r?   zInteractionPage.__repr__)r@   rA   rB   rC   r   rJ   r>   rE   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 )
r6   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: The SID of the parent Service of the resource to fetch
        :param session_sid: he SID of the parent Session of the resource to fetch
        :param sid: The unique string that identifies the resource

        :returns: twilio.rest.proxy.v1.service.session.interaction.InteractionContext
        :rtype: twilio.rest.proxy.v1.service.session.interaction.InteractionContext
        r3   zA/Services/{service_sid}/Sessions/{session_sid}/Interactions/{sid}Nr   )r   r6   r   r   r   r   )r   r   r   r   r4   r   r   r   r   Ð   s   zInteractionContext.__init__c                 C   s8   | j jd| jd}t| j || jd | jd | jd dS )ú·
        Fetch the InteractionInstance

        :returns: The fetched InteractionInstance
        :rtype: twilio.rest.proxy.v1.service.session.interaction.InteractionInstance
        r"   ©r#   r$   r   r   r4   r3   )r   Úfetchr   rG   r   rH   r   r   r   rM   â   s   ûzInteractionContext.fetchc                 C   s   | j jd| jdS )ú‚
        Deletes the InteractionInstance

        :returns: True if delete succeeds, False otherwise
        :rtype: bool
        ÚDELETErL   )r   Údeleter   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   r>   ü   ó   
zInteractionContext.__repr__)	r@   rA   rB   rC   r   rM   rP   r>   rE   r   r   r   r   r6   Ì   s    	r6   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 )8rG   r	   c                   @   s   e Zd ZdZdZdZdS )zInteractionInstance.TypeÚmessageÚvoiceÚunknownN)r@   rA   rB   Ú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)r@   rA   rB   Ú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   ÚResourceStatus  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| _|||p| 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
        r4   r   r   Úaccount_sidr*   Ú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   Nr3   )	r   rG   r   r8   r   Úiso8601_datetimeÚ_propertiesÚ_contextr   )r   r   rI   r   r   r4   r   r   r   r   '  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   r4   r3   )r    r6   r   r   r=   r   r   r   Ú_proxyO  s   
	üzInteractionInstance._proxyc                 C   ó
   | j d S )zb
        :returns: The unique string that identifies the resource
        :rtype: unicode
        r4   ©rŸ   r=   r   r   r   r4   a  ó   
zInteractionInstance.sidc                 C   r¢   )z\
        :returns: The SID of the resource's parent Session
        :rtype: unicode
        r   r£   r=   r   r   r   r   i  r¤   zInteractionInstance.session_sidc                 C   r¢   )z\
        :returns: The SID of the resource's parent Service
        :rtype: unicode
        r   r£   r=   r   r   r   r   q  r¤   zInteractionInstance.service_sidc                 C   r¢   )zd
        :returns: The SID of the Account that created the resource
        :rtype: unicode
        r   r£   r=   r   r   r   r   y  r¤   zInteractionInstance.account_sidc                 C   r¢   )zx
        :returns: A JSON string that includes the message body of message interactions
        :rtype: unicode
        r*   r£   r=   r   r   r   r*     r¤   zInteractionInstance.datac                 C   r¢   )z`
        :returns: The Type of the Interaction
        :rtype: InteractionInstance.Type
        r   r£   r=   r   r   r   r   ‰  r¤   zInteractionInstance.typec                 C   r¢   )z_
        :returns: The SID of the inbound Participant resource
        :rtype: unicode
        r‘   r£   r=   r   r   r   r‘   ‘  r¤   z+InteractionInstance.inbound_participant_sidc                 C   r¢   )zS
        :returns: The SID of the inbound resource
        :rtype: unicode
        r’   r£   r=   r   r   r   r’   ™  r¤   z(InteractionInstance.inbound_resource_sidc                 C   r¢   )z}
        :returns: The inbound resource status of the Interaction
        :rtype: InteractionInstance.ResourceStatus
        r“   r£   r=   r   r   r   r“   ¡  r¤   z+InteractionInstance.inbound_resource_statusc                 C   r¢   )zM
        :returns: The inbound resource type
        :rtype: unicode
        r”   r£   r=   r   r   r   r”   ©  r¤   z)InteractionInstance.inbound_resource_typec                 C   r¢   )zZ
        :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¢   )zW
        :returns: The SID of the outbound Participant
        :rtype: unicode
        r–   r£   r=   r   r   r   r–   ¹  r¤   z,InteractionInstance.outbound_participant_sidc                 C   r¢   )zT
        :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 the Interaction
        :rtype: InteractionInstance.ResourceStatus
        r˜   r£   r=   r   r   r   r˜   É  r¤   z,InteractionInstance.outbound_resource_statusc                 C   r¢   )zN
        :returns: The outbound resource type
        :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¢   )zw
        :returns: The ISO 8601 date and time in GMT when the Interaction was created
        :rtype: datetime
        r›   r£   r=   r   r   r   r›   á  r¤   z InteractionInstance.date_createdc                 C   r¢   )zy
        :returns: The ISO 8601 date and time in GMT when the resource was last updated
        :rtype: datetime
        rœ   r£   r=   r   r   r   rœ   é  r¤   z InteractionInstance.date_updatedc                 C   r¢   )z`
        :returns: The absolute URL of the Interaction resource
        :rtype: unicode
        r   r£   r=   r   r   r   r   ñ  r¤   zInteractionInstance.urlc                 C   ó
   | j  ¡ S )rK   )r¡   rM   r=   r   r   r   rM   ù  ó   
zInteractionInstance.fetchc                 C   r¥   )rN   )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     r[   z/InteractionInstance.__repr__.<locals>.<genexpr>z(<Twilio.Proxy.V1.InteractionInstance {}>r\   r_   r   r   r   r>     ra   zInteractionInstance.__repr__)N)!r@   rA   rB   rC   Úobjectrh   rŽ   r   Úpropertyr¡   r4   r   r   r   r*   r   r‘   r’   r“   r”   r•   r–   r—   r˜   r™   rš   r›   rœ   r   rM   rP   r>   rE   r   r   r   r   rG     s`    (



















		rG   N)rC   Útwilio.baser   r   Útwilio.base.instance_contextr   Útwilio.base.instance_resourcer   Útwilio.base.list_resourcer   Útwilio.base.pager   r   r'   r6   rG   r   r   r   r   Ú<module>   s    /;