o
    �¨Êh1C  ã                   @   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
 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)Ú	serialize)Úvalues)ÚInstanceContext)ÚInstanceResource)ÚListResource)ÚPagec                       s¢   e Zd ZdZ‡ fdd„Zejejejejddfdd„Zejejejejddfdd„Zejej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 )ÚNotificationListú  c                    s4   t t| ƒ |¡ ||dœ| _djdi | j¤Ž| _dS )al  
        Initialize the NotificationList

        :param Version version: Version that contains the resource
        :param account_sid: The account_sid
        :param call_sid: The call_sid

        :returns: twilio.rest.api.v2010.account.call.notification.NotificationList
        :rtype: twilio.rest.api.v2010.account.call.notification.NotificationList
        ©Úaccount_sidÚcall_sidz;/Accounts/{account_sid}/Calls/{call_sid}/Notifications.jsonN© )Úsuperr	   Ú__init__Ú	_solutionÚformatÚ_uri)ÚselfÚversionr   r   ©Ú	__class__r   úa/var/www/html/env/lib/python3.10/site-packages/twilio/rest/api/v2010/account/call/notification.pyr      s   zNotificationList.__init__Nc           	      C   s>   | j  ||¡}| j|||||d d�}| j  ||d |d ¡S )aŸ  
        Streams NotificationInstance 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 log: The log
        :param date message_date_before: The message_date
        :param date message_date: The message_date
        :param date message_date_after: The message_date
        :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.api.v2010.account.call.notification.NotificationInstance]
        Ú	page_size)ÚlogÚmessage_date_beforeÚmessage_dateÚmessage_date_afterr   ÚlimitÚ
page_limit)Ú_versionÚread_limitsÚpageÚstream)	r   r   r   r   r   r   r   Úlimitsr"   r   r   r   r#   &   s   ûzNotificationList.streamc              	   C   s   t | j||||||d�ƒS )a?  
        Lists NotificationInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param unicode log: The log
        :param date message_date_before: The message_date
        :param date message_date: The message_date
        :param date message_date_after: The message_date
        :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.api.v2010.account.call.notification.NotificationInstance]
        )r   r   r   r   r   r   )Úlistr#   )r   r   r   r   r   r   r   r   r   r   r%   I   s   úzNotificationList.listc           
   
   C   sP   t  |t |¡t |¡t |¡|||dœ¡}| jjd| j|d�}	t| j|	| jƒS )a¤  
        Retrieve a single page of NotificationInstance records from the API.
        Request is executed immediately

        :param unicode log: The log
        :param date message_date_before: The message_date
        :param date message_date: The message_date
        :param date message_date_after: The message_date
        :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 NotificationInstance
        :rtype: twilio.rest.api.v2010.account.call.notification.NotificationPage
        )ÚLogzMessageDate<ÚMessageDatezMessageDate>Ú	PageTokenr   ÚPageSizeÚGET©Úparams)	r   Úofr   Úiso8601_dater    r"   r   ÚNotificationPager   )
r   r   r   r   r   Ú
page_tokenÚpage_numberr   r,   Úresponser   r   r   r"   h   s   ù
ýzNotificationList.pagec                 C   s"   | j jj d|¡}t| j || jƒS )aR  
        Retrieve a specific page of NotificationInstance records from the API.
        Request is executed immediately

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

        :returns: Page of NotificationInstance
        :rtype: twilio.rest.api.v2010.account.call.notification.NotificationPage
        r*   )r    ÚdomainÚtwilioÚrequestr/   r   )r   Ú
target_urlr2   r   r   r   Úget_page�   s
   

þzNotificationList.get_pagec                 C   ó   t | j| jd | jd |d�S ©zú
        Constructs a NotificationContext

        :param sid: The sid

        :returns: twilio.rest.api.v2010.account.call.notification.NotificationContext
        :rtype: twilio.rest.api.v2010.account.call.notification.NotificationContext
        r   r   ©r   r   Úsid©ÚNotificationContextr    r   ©r   r;   r   r   r   Úgetž   ó   	üzNotificationList.getc                 C   r8   r9   r<   r>   r   r   r   Ú__call__®   r@   zNotificationList.__call__c                 C   ó   dS )úz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z#<Twilio.Api.V2010.NotificationList>r   ©r   r   r   r   Ú__repr__¾   ó   zNotificationList.__repr__)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Úunsetr#   r%   r"   r7   r?   rA   rE   Ú__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 NotificationPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API
        :param account_sid: The account_sid
        :param call_sid: The call_sid

        :returns: twilio.rest.api.v2010.account.call.notification.NotificationPage
        :rtype: twilio.rest.api.v2010.account.call.notification.NotificationPage
        N)r   r/   r   r   )r   r   r2   Úsolutionr   r   r   r   Ë   s   
zNotificationPage.__init__c                 C   s   t | j|| jd | jd d�S )a$  
        Build an instance of NotificationInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.api.v2010.account.call.notification.NotificationInstance
        :rtype: twilio.rest.api.v2010.account.call.notification.NotificationInstance
        r   r   r   )ÚNotificationInstancer    r   )r   Úpayloadr   r   r   Úget_instanceÜ   s   	üzNotificationPage.get_instancec                 C   rB   )rC   z#<Twilio.Api.V2010.NotificationPage>r   rD   r   r   r   rE   ì   rF   zNotificationPage.__repr__)rG   rH   rI   rJ   r   rP   rE   rL   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 )
r=   r
   c                    s6   t t| ƒ |¡ |||dœ| _djdi | j¤Ž| _dS )a‘  
        Initialize the NotificationContext

        :param Version version: Version that contains the resource
        :param account_sid: The account_sid
        :param call_sid: The call_sid
        :param sid: The sid

        :returns: twilio.rest.api.v2010.account.call.notification.NotificationContext
        :rtype: twilio.rest.api.v2010.account.call.notification.NotificationContext
        r:   zA/Accounts/{account_sid}/Calls/{call_sid}/Notifications/{sid}.jsonNr   )r   r=   r   r   r   r   )r   r   r   r   r;   r   r   r   r   ù   s   zNotificationContext.__init__c                 C   sD   t  i ¡}| jjd| j|d�}t| j|| jd | jd | jd d�S )ú³
        Fetch a NotificationInstance

        :returns: Fetched NotificationInstance
        :rtype: twilio.rest.api.v2010.account.call.notification.NotificationInstance
        r*   r+   r   r   r;   r:   )r   r-   r    Úfetchr   rN   r   )r   r,   rO   r   r   r   rR     s   
ýûzNotificationContext.fetchc                 C   s   | j  d| j¡S )úƒ
        Deletes the NotificationInstance

        :returns: True if delete succeeds, False otherwise
        :rtype: bool
        Údelete)r    rT   r   rD   r   r   r   rT   "  s   zNotificationContext.deletec                 C   ó$   d  dd„ | j ¡ D ƒ¡}d |¡S )rC   ú c                 s   ó    � | ]\}}d   ||¡V  qdS ©z{}={}N©r   ©Ú.0ÚkÚvr   r   r   Ú	<genexpr>2  ó   € z/NotificationContext.__repr__.<locals>.<genexpr>z)<Twilio.Api.V2010.NotificationContext {}>©Újoinr   Úitemsr   ©r   Úcontextr   r   r   rE   +  ó   
zNotificationContext.__repr__)	rG   rH   rI   rJ   r   rR   rT   rE   rL   r   r   r   r   r=   ö   s    	r=   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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d+d,„ Zd-d.„ Z‡  ZS )0rN   r
   Nc                    sú   t t| ƒ |¡ i d|d “d|d “d|d “dt |d ¡“dt |d ¡“d|d “d|d “dt |d ¡“d	|d	 “d
|d
 “d|d “d|d “d|d “d|d “d| d¡“d| d¡“d| d¡“| _d| _|||pw| jd dœ| _dS )zâ
        Initialize the NotificationInstance

        :returns: twilio.rest.api.v2010.account.call.notification.NotificationInstance
        :rtype: twilio.rest.api.v2010.account.call.notification.NotificationInstance
        r   Úapi_versionr   Údate_createdÚdate_updatedÚ
error_coder   r   Úmessage_textÚ	more_infoÚrequest_methodÚrequest_urlr;   ÚuriÚrequest_variablesÚresponse_bodyÚresponse_headersNr:   )	r   rN   r   r   Úrfc2822_datetimer?   Ú_propertiesÚ_contextr   )r   r   rO   r   r   r;   r   r   r   r   9  sR   ÿþýüûúùø	÷
öõôóò
ñ
ð
ïýzNotificationInstance.__init__c                 C   s6   | j du rt| j| jd | jd | jd d�| _ | j S )aH  
        Generate an instance context for the instance, the context is capable of
        performing various actions.  All instance actions are proxied to the context

        :returns: NotificationContext for this NotificationInstance
        :rtype: twilio.rest.api.v2010.account.call.notification.NotificationContext
        Nr   r   r;   r:   )rt   r=   r    r   rD   r   r   r   Ú_proxy_  s   
	üzNotificationInstance._proxyc                 C   ó
   | j d S )zC
        :returns: The account_sid
        :rtype: unicode
        r   ©rs   rD   r   r   r   r   q  ó   
z NotificationInstance.account_sidc                 C   rv   )zC
        :returns: The api_version
        :rtype: unicode
        rf   rw   rD   r   r   r   rf   y  rx   z NotificationInstance.api_versionc                 C   rv   )z@
        :returns: The call_sid
        :rtype: unicode
        r   rw   rD   r   r   r   r   �  rx   zNotificationInstance.call_sidc                 C   rv   )zE
        :returns: The date_created
        :rtype: datetime
        rg   rw   rD   r   r   r   rg   ‰  rx   z!NotificationInstance.date_createdc                 C   rv   )zE
        :returns: The date_updated
        :rtype: datetime
        rh   rw   rD   r   r   r   rh   ‘  rx   z!NotificationInstance.date_updatedc                 C   rv   )zB
        :returns: The error_code
        :rtype: unicode
        ri   rw   rD   r   r   r   ri   ™  rx   zNotificationInstance.error_codec                 C   rv   )z;
        :returns: The log
        :rtype: unicode
        r   rw   rD   r   r   r   r   ¡  rx   zNotificationInstance.logc                 C   rv   )zE
        :returns: The message_date
        :rtype: datetime
        r   rw   rD   r   r   r   r   ©  rx   z!NotificationInstance.message_datec                 C   rv   )zD
        :returns: The message_text
        :rtype: unicode
        rj   rw   rD   r   r   r   rj   ±  rx   z!NotificationInstance.message_textc                 C   rv   )zA
        :returns: The more_info
        :rtype: unicode
        rk   rw   rD   r   r   r   rk   ¹  rx   zNotificationInstance.more_infoc                 C   rv   )zF
        :returns: The request_method
        :rtype: unicode
        rl   rw   rD   r   r   r   rl   Á  rx   z#NotificationInstance.request_methodc                 C   rv   )zC
        :returns: The request_url
        :rtype: unicode
        rm   rw   rD   r   r   r   rm   É  rx   z NotificationInstance.request_urlc                 C   rv   )zI
        :returns: The request_variables
        :rtype: unicode
        ro   rw   rD   r   r   r   ro   Ñ  rx   z&NotificationInstance.request_variablesc                 C   rv   )zE
        :returns: The response_body
        :rtype: unicode
        rp   rw   rD   r   r   r   rp   Ù  rx   z"NotificationInstance.response_bodyc                 C   rv   )zH
        :returns: The response_headers
        :rtype: unicode
        rq   rw   rD   r   r   r   rq   á  rx   z%NotificationInstance.response_headersc                 C   rv   )z;
        :returns: The sid
        :rtype: unicode
        r;   rw   rD   r   r   r   r;   é  rx   zNotificationInstance.sidc                 C   rv   )z;
        :returns: The uri
        :rtype: unicode
        rn   rw   rD   r   r   r   rn   ñ  rx   zNotificationInstance.uric                 C   ó
   | j  ¡ S )rQ   )ru   rR   rD   r   r   r   rR   ù  ó   
zNotificationInstance.fetchc                 C   ry   )rS   )ru   rT   rD   r   r   r   rT     rz   zNotificationInstance.deletec                 C   rU   )rC   rV   c                 s   rW   rX   rY   rZ   r   r   r   r^     r_   z0NotificationInstance.__repr__.<locals>.<genexpr>z*<Twilio.Api.V2010.NotificationInstance {}>r`   rc   r   r   r   rE     re   zNotificationInstance.__repr__)N)rG   rH   rI   rJ   r   Úpropertyru   r   rf   r   rg   rh   ri   r   r   rj   rk   rl   rm   ro   rp   rq   r;   rn   rR   rT   rE   rL   r   r   r   r   rN   6  sT    &

















		rN   N)rJ   Útwilio.baser   r   r   Útwilio.base.instance_contextr   Útwilio.base.instance_resourcer   Útwilio.base.list_resourcer   Útwilio.base.pager   r	   r/   r=   rN   r   r   r   r   Ú<module>   s    7.@