o
    �¨ÊhlB  ã                   @   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                    s2   t t| ƒ |¡ d|i| _djdi | j¤Ž| _dS )aX  
        Initialize the NotificationList

        :param Version version: Version that contains the resource
        :param account_sid: The unique sid that identifies this account

        :returns: twilio.rest.api.v2010.account.notification.NotificationList
        :rtype: twilio.rest.api.v2010.account.notification.NotificationList
        Úaccount_sidz*/Accounts/{account_sid}/Notifications.jsonN© )Úsuperr	   Ú__init__Ú	_solutionÚformatÚ_uri)ÚselfÚversionr   ©Ú	__class__r   ú\/var/www/html/env/lib/python3.10/site-packages/twilio/rest/api/v2010/account/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: Filter by log level
        :param date message_date_before: Filter by date
        :param date message_date: Filter by date
        :param date message_date_after: Filter by 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.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: Filter by log level
        :param date message_date_before: Filter by date
        :param date message_date: Filter by date
        :param date message_date_after: Filter by 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.notification.NotificationInstance]
        )r   r   r   r   r   r   )Úlistr!   )r   r   r   r   r   r   r   r   r   r   r#   H   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: Filter by log level
        :param date message_date_before: Filter by date
        :param date message_date: Filter by date
        :param date message_date_after: Filter by 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.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    g   s   ù
ýzNotificationList.pagec                 C   s"   | j jj d|¡}t| j || jƒS )aM  
        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.notification.NotificationPage
        r(   )r   ÚdomainÚtwilioÚrequestr-   r   )r   Ú
target_urlr0   r   r   r   Úget_pageŒ   s
   

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

        :param sid: Fetch by unique notification Sid

        :returns: twilio.rest.api.v2010.account.notification.NotificationContext
        :rtype: twilio.rest.api.v2010.account.notification.NotificationContext
        r   ©r   Úsid©ÚNotificationContextr   r   ©r   r9   r   r   r   Úget�   ó   	zNotificationList.getc                 C   r6   r7   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    r5   r=   r?   rC   Ú__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 unique sid that identifies this account

        :returns: twilio.rest.api.v2010.account.notification.NotificationPage
        :rtype: twilio.rest.api.v2010.account.notification.NotificationPage
        N)r   r-   r   r   )r   r   r0   Úsolutionr   r   r   r   À   s   
zNotificationPage.__init__c                 C   s   t | j|| jd d�S )a  
        Build an instance of NotificationInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.api.v2010.account.notification.NotificationInstance
        :rtype: twilio.rest.api.v2010.account.notification.NotificationInstance
        r   )r   )ÚNotificationInstancer   r   )r   Úpayloadr   r   r   Úget_instanceÐ   r>   zNotificationPage.get_instancec                 C   r@   )rA   z#<Twilio.Api.V2010.NotificationPage>r   rB   r   r   r   rC   Û   rD   zNotificationPage.__repr__)rE   rF   rG   rH   r   rN   rC   rJ   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                    s4   t t| ƒ |¡ ||dœ| _djdi | j¤Ž| _dS )az  
        Initialize the NotificationContext

        :param Version version: Version that contains the resource
        :param account_sid: The account_sid
        :param sid: Fetch by unique notification Sid

        :returns: twilio.rest.api.v2010.account.notification.NotificationContext
        :rtype: twilio.rest.api.v2010.account.notification.NotificationContext
        r8   z0/Accounts/{account_sid}/Notifications/{sid}.jsonNr   )r   r;   r   r   r   r   )r   r   r   r9   r   r   r   r   è   s   zNotificationContext.__init__c                 C   s<   t  i ¡}| jjd| j|d�}t| j|| jd | jd d�S )ú®
        Fetch a NotificationInstance

        :returns: Fetched NotificationInstance
        :rtype: twilio.rest.api.v2010.account.notification.NotificationInstance
        r(   r)   r   r9   r8   )r   r+   r   Úfetchr   rL   r   )r   r*   rM   r   r   r   rP   ù   s   
ýüzNotificationContext.fetchc                 C   s   | j  d| j¡S )úƒ
        Deletes the NotificationInstance

        :returns: True if delete succeeds, False otherwise
        :rtype: bool
        Údelete)r   rR   r   rB   r   r   r   rR     s   zNotificationContext.deletec                 C   ó$   d  dd„ | j ¡ D ƒ¡}d |¡S )rA   ú c                 s   ó    � | ]\}}d   ||¡V  qdS ©z{}={}N©r   ©Ú.0ÚkÚvr   r   r   Ú	<genexpr>  ó   € z/NotificationContext.__repr__.<locals>.<genexpr>z)<Twilio.Api.V2010.NotificationContext {}>©Újoinr   Úitemsr   ©r   Úcontextr   r   r   rC     ó   
zNotificationContext.__repr__)	rE   rF   rG   rH   r   rP   rR   rC   rJ   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 )0rL   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| _||pv| jd dœ| _dS )zØ
        Initialize the NotificationInstance

        :returns: twilio.rest.api.v2010.account.notification.NotificationInstance
        :rtype: twilio.rest.api.v2010.account.notification.NotificationInstance
        r   Úapi_versionÚcall_sidÚdate_createdÚdate_updatedÚ
error_coder   r   Úmessage_textÚ	more_infoÚrequest_methodÚrequest_urlr9   ÚuriÚrequest_variablesÚresponse_bodyÚresponse_headersNr8   )	r   rL   r   r   Úrfc2822_datetimer=   Ú_propertiesÚ_contextr   )r   r   rM   r   r9   r   r   r   r   &  sL   ÿþýüûúùø	÷
öõôóò
ñ
ð
ïzNotificationInstance.__init__c                 C   s.   | j du rt| j| jd | jd d�| _ | j S )aC  
        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.notification.NotificationContext
        Nr   r9   r8   )rs   r;   r   r   rB   r   r   r   Ú_proxyH  s   
	ýzNotificationInstance._proxyc                 C   ó
   | j d S )z_
        :returns: The unique sid that identifies this account
        :rtype: unicode
        r   ©rr   rB   r   r   r   r   Y  ó   
z NotificationInstance.account_sidc                 C   ru   )zX
        :returns: The version of the Twilio API in use
        :rtype: unicode
        rd   rv   rB   r   r   r   rd   a  rw   z NotificationInstance.api_versionc                 C   ru   )z`
        :returns: The string that uniquely identifies the call
        :rtype: unicode
        re   rv   rB   r   r   r   re   i  rw   zNotificationInstance.call_sidc                 C   ru   )zW
        :returns: The date this resource was created
        :rtype: datetime
        rf   rv   rB   r   r   r   rf   q  rw   z!NotificationInstance.date_createdc                 C   ru   )z\
        :returns: The date this resource was last updated
        :rtype: datetime
        rg   rv   rB   r   r   r   rg   y  rw   z!NotificationInstance.date_updatedc                 C   ru   )zi
        :returns: A unique error code corresponding to the notification
        :rtype: unicode
        rh   rv   rB   r   r   r   rh   �  rw   zNotificationInstance.error_codec                 C   ru   )zH
        :returns: An integer log level
        :rtype: unicode
        r   rv   rB   r   r   r   r   ‰  rw   zNotificationInstance.logc                 C   ru   )z\
        :returns: The date the notification was generated
        :rtype: datetime
        r   rv   rB   r   r   r   r   ‘  rw   z!NotificationInstance.message_datec                 C   ru   )zQ
        :returns: The text of the notification.
        :rtype: unicode
        ri   rv   rB   r   r   r   ri   ™  rw   z!NotificationInstance.message_textc                 C   ru   )zc
        :returns: A URL for more information about the error code
        :rtype: unicode
        rj   rv   rB   r   r   r   rj   ¡  rw   zNotificationInstance.more_infoc                 C   ru   )zY
        :returns: HTTP method used with the request url
        :rtype: unicode
        rk   rv   rB   r   r   r   rk   ©  rw   z#NotificationInstance.request_methodc                 C   ru   )zg
        :returns: URL of the resource that generated the notification
        :rtype: unicode
        rl   rv   rB   r   r   r   rl   ±  rw   z NotificationInstance.request_urlc                 C   ru   )zf
        :returns: Twilio-generated HTTP variables sent to the server
        :rtype: unicode
        rn   rv   rB   r   r   r   rn   ¹  rw   z&NotificationInstance.request_variablesc                 C   ru   )zZ
        :returns: The HTTP body returned by your server.
        :rtype: unicode
        ro   rv   rB   r   r   r   ro   Á  rw   z"NotificationInstance.response_bodyc                 C   ru   )z]
        :returns: The HTTP headers returned by your server.
        :rtype: unicode
        rp   rv   rB   r   r   r   rp   É  rw   z%NotificationInstance.response_headersc                 C   ru   )zg
        :returns: A string that uniquely identifies this notification
        :rtype: unicode
        r9   rv   rB   r   r   r   r9   Ñ  rw   zNotificationInstance.sidc                 C   ru   )zM
        :returns: The URI for this resource
        :rtype: unicode
        rm   rv   rB   r   r   r   rm   Ù  rw   zNotificationInstance.uric                 C   ó
   | j  ¡ S )rO   )rt   rP   rB   r   r   r   rP   á  ó   
zNotificationInstance.fetchc                 C   rx   )rQ   )rt   rR   rB   r   r   r   rR   ê  ry   zNotificationInstance.deletec                 C   rS   )rA   rT   c                 s   rU   rV   rW   rX   r   r   r   r\   ú  r]   z0NotificationInstance.__repr__.<locals>.<genexpr>z*<Twilio.Api.V2010.NotificationInstance {}>r^   ra   r   r   r   rC   ó  rc   zNotificationInstance.__repr__)N)rE   rF   rG   rH   r   Úpropertyrt   r   rd   re   rf   rg   rh   r   r   ri   rj   rk   rl   rn   ro   rp   r9   rm   rP   rR   rC   rJ   r   r   r   r   rL   #  sT    "

















		rL   N)rH   Útwilio.baser   r   r   Útwilio.base.instance_contextr   Útwilio.base.instance_resourcer   Útwilio.base.list_resourcer   Útwilio.base.pager   r	   r-   r;   rL   r   r   r   r   Ú<module>   s    ,(>