o
    f>h                     @   s   d Z ddlmZ ddlmZmZmZmZmZmZm	Z	 ddl
mZmZ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 )a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Api
    This is the public Twilio REST API.

    NOTE: This class is auto generated by OpenAPI Generator.
    https://openapi-generator.tech
    Do not edit the class manually.
    )datetime)AnyDictListOptionalUnionIteratorAsyncIterator)deserialize	serializevalues)InstanceContext)InstanceResource)ListResource)Version)Pagec                #       s  e Zd ZdZ	d+dedeeef dedee f fddZ	e
d,ddZd	efddZd	efddZd-ddZd-ddZejejejejejejejejejejejejejejejejfdeeef deeef deeef deeef deeef deeef deeef deeef deeef deeef deeef d eeef d!eeef d"eeef d#eeef d$eeef d	d f"d%d&Zejejejejejejejejejejejejejejejejfdeeef deeef deeef deeef deeef deeef deeef deeef deeef deeef deeef d eeef d!eeef d"eeef d#eeef d$eeef d	d f"d'd(Zd	efd)d*Z  ZS ).ApplicationInstancea	  
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Application resource.
    :ivar api_version: The API version used to start a new TwiML session.
    :ivar date_created: The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
    :ivar date_updated: The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
    :ivar friendly_name: The string that you assigned to describe the resource.
    :ivar message_status_callback: The URL we call using a POST method to send message status information to your application.
    :ivar sid: The unique string that that we created to identify the Application resource.
    :ivar sms_fallback_method: The HTTP method we use to call `sms_fallback_url`. Can be: `GET` or `POST`.
    :ivar sms_fallback_url: The URL that we call when an error occurs while retrieving or executing the TwiML from `sms_url`.
    :ivar sms_method: The HTTP method we use to call `sms_url`. Can be: `GET` or `POST`.
    :ivar sms_status_callback: The URL we call using a POST method to send status information to your application about SMS messages that refer to the application.
    :ivar sms_url: The URL we call when the phone number receives an incoming SMS message.
    :ivar status_callback: The URL we call using the `status_callback_method` to send status information to your application.
    :ivar status_callback_method: The HTTP method we use to call `status_callback`. Can be: `GET` or `POST`.
    :ivar uri: The URI of the resource, relative to `https://api.twilio.com`.
    :ivar voice_caller_id_lookup: Whether we look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`.
    :ivar voice_fallback_method: The HTTP method we use to call `voice_fallback_url`. Can be: `GET` or `POST`.
    :ivar voice_fallback_url: The URL that we call when an error occurs retrieving or executing the TwiML requested by `url`.
    :ivar voice_method: The HTTP method we use to call `voice_url`. Can be: `GET` or `POST`.
    :ivar voice_url: The URL we call when the phone number assigned to this application receives a call.
    :ivar public_application_connect_enabled: Whether to allow other Twilio accounts to dial this applicaton using Dial verb. Can be: `true` or `false`.
    Nversionpayloadaccount_sidsidc                    s0  t  | |d| _|d| _t|d| _t|d| _|d| _	|d| _
|d| _|d| _|d	| _|d
| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _||p| jd| _d | _d S )Nr   api_versiondate_createddate_updatedfriendly_namemessage_status_callbackr   sms_fallback_methodsms_fallback_url
sms_methodsms_status_callbacksms_urlstatus_callbackstatus_callback_methodurivoice_caller_id_lookupvoice_fallback_methodvoice_fallback_urlvoice_method	voice_url"public_application_connect_enabledr   r   )super__init__getr   r   r
   rfc2822_datetimer   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   	_solution_context)selfr   r   r   r   	__class__ \/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/api/v2010/account/application.pyr,   2   sL   
zApplicationInstance.__init__returnApplicationContextc                 C   s.   | j du rt| j| jd | jd d| _ | j S )z
        Generate an instance context for the instance, the context is capable of
        performing various actions. All instance actions are proxied to the context

        :returns: ApplicationContext for this ApplicationInstance
        Nr   r   r*   )r0   r7   _versionr/   r1   r4   r4   r5   _proxyc   s   
zApplicationInstance._proxyc                 C   
   | j  S )n
        Deletes the ApplicationInstance


        :returns: True if delete succeeds, False otherwise
        )r:   deleter9   r4   r4   r5   r=   s      
zApplicationInstance.deletec                       | j  I dH S )
        Asynchronous coroutine that deletes the ApplicationInstance


        :returns: True if delete succeeds, False otherwise
        N)r:   delete_asyncr9   r4   r4   r5   rA   |      z ApplicationInstance.delete_asyncc                 C   r;   )c
        Fetch the ApplicationInstance


        :returns: The fetched ApplicationInstance
        )r:   fetchr9   r4   r4   r5   rD      r>   zApplicationInstance.fetchc                    r?   )}
        Asynchronous coroutine to fetch the ApplicationInstance


        :returns: The fetched ApplicationInstance
        N)r:   fetch_asyncr9   r4   r4   r5   rF      rB   zApplicationInstance.fetch_asyncr   r   r(   r'   r&   r%   r!   r"   r$   r    r   r   r   r   r   r)   c                 C   sn   | j jdi d|d|d|d|d|d|d|d|d	|	d
|
d|d|d|d|d|d|S )	  
        Update the ApplicationInstance

        :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long.
        :param api_version: The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. The default value is your account's default API version.
        :param voice_url: The URL we should call when the phone number assigned to this application receives a call.
        :param voice_method: The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`.
        :param voice_fallback_url: The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
        :param voice_fallback_method: The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`.
        :param status_callback: The URL we should call using the `status_callback_method` to send status information to your application.
        :param status_callback_method: The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`.
        :param voice_caller_id_lookup: Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`.
        :param sms_url: The URL we should call when the phone number receives an incoming SMS message.
        :param sms_method: The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`.
        :param sms_fallback_url: The URL that we should call when an error occurs while retrieving or executing the TwiML from `sms_url`.
        :param sms_fallback_method: The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`.
        :param sms_status_callback: Same as message_status_callback: The URL we should call using a POST method to send status information about SMS messages sent by the application. Deprecated, included for backwards compatibility.
        :param message_status_callback: The URL we should call using a POST method to send message status information to your application.
        :param public_application_connect_enabled: Whether to allow other Twilio accounts to dial this applicaton using Dial verb. Can be: `true` or `false`.

        :returns: The updated ApplicationInstance
        r   r   r(   r'   r&   r%   r!   r"   r$   r    r   r   r   r   r   r)   Nr4   )r:   updater1   r   r   r(   r'   r&   r%   r!   r"   r$   r    r   r   r   r   r   r)   r4   r4   r5   rH      sB   )	
zApplicationInstance.updatec                    sv   | j jdi d|d|d|d|d|d|d|d|d	|	d
|
d|d|d|d|d|d|I dH S )	  
        Asynchronous coroutine to update the ApplicationInstance

        :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long.
        :param api_version: The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. The default value is your account's default API version.
        :param voice_url: The URL we should call when the phone number assigned to this application receives a call.
        :param voice_method: The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`.
        :param voice_fallback_url: The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
        :param voice_fallback_method: The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`.
        :param status_callback: The URL we should call using the `status_callback_method` to send status information to your application.
        :param status_callback_method: The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`.
        :param voice_caller_id_lookup: Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`.
        :param sms_url: The URL we should call when the phone number receives an incoming SMS message.
        :param sms_method: The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`.
        :param sms_fallback_url: The URL that we should call when an error occurs while retrieving or executing the TwiML from `sms_url`.
        :param sms_fallback_method: The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`.
        :param sms_status_callback: Same as message_status_callback: The URL we should call using a POST method to send status information about SMS messages sent by the application. Deprecated, included for backwards compatibility.
        :param message_status_callback: The URL we should call using a POST method to send message status information to your application.
        :param public_application_connect_enabled: Whether to allow other Twilio accounts to dial this applicaton using Dial verb. Can be: `true` or `false`.

        :returns: The updated ApplicationInstance
        r   r   r(   r'   r&   r%   r!   r"   r$   r    r   r   r   r   r   r)   Nr4   )r:   update_asyncrI   r4   r4   r5   rK      sD   )	

z ApplicationInstance.update_asyncc                 C   $   d dd | j D }d|S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c                 s        | ]\}}d  ||V  qdS z{}={}Nformat.0kvr4   r4   r5   	<genexpr>      z/ApplicationInstance.__repr__.<locals>.<genexpr>z)<Twilio.Api.V2010.ApplicationInstance {}>joinr/   itemsrR   r1   contextr4   r4   r5   __repr__     
zApplicationInstance.__repr__N)r6   r7   )r6   r   )__name__
__module____qualname____doc__r   r   strr   r   r,   propertyr:   boolr=   rA   rD   rF   r   unsetr   objectrH   rK   r^   __classcell__r4   r4   r2   r5   r      s    
1	
	
	







	









>







	









<r   c                #       s  e Zd Zdededef fddZdefddZdefd	d
Zde	fddZ
de	fddZejejejejejejejejejejejejejejejejfdeeef deeef deeef deeef deeef deeef deeef deeef deeef deeef deeef deeef deeef deeef deeef deeef de	f"dd Zejejejejejejejejejejejejejejejejfdeeef deeef deeef deeef deeef deeef deeef deeef deeef deeef deeef deeef deeef deeef deeef deeef de	f"d!d"Zdefd#d$Z  ZS )%r7   r   r   r   c                    s0   t  | ||d| _djdi | j| _dS )ao  
        Initialize the ApplicationContext

        :param version: Version that contains the resource
        :param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Application resources to update.
        :param sid: The Twilio-provided string that uniquely identifies the Application resource to update.
        r*   z//Accounts/{account_sid}/Applications/{sid}.jsonNr4   r+   r,   r/   rR   _uri)r1   r   r   r   r2   r4   r5   r,     s   zApplicationContext.__init__r6   c                 C   s   t i }| jjd| j|dS )r<   DELETEmethodr#   headers)r   ofr8   r=   rl   r1   rp   r4   r4   r5   r=   .  s   
zApplicationContext.deletec                    s&   t i }| jjd| j|dI dH S )r@   rm   rn   N)r   rq   r8   rA   rl   rr   r4   r4   r5   rA   :  s
   
zApplicationContext.delete_asyncc                 C   sD   t i }d|d< | jjd| j|d}t| j|| jd | jd dS )rC   application/jsonAcceptGETrn   r   r   r*   )r   rq   r8   rD   rl   r   r/   r1   rp   r   r4   r4   r5   rD   H  s   
zApplicationContext.fetchc                    sL   t i }d|d< | jjd| j|dI dH }t| j|| jd | jd dS )	rE   rs   rt   ru   rn   Nr   r   r*   )r   rq   r8   rF   rl   r   r/   rv   r4   r4   r5   rF   ]  s   
zApplicationContext.fetch_asyncr   r   r(   r'   r&   r%   r!   r"   r$   r    r   r   r   r   r   r)   c                 C   s   t i d|d|d|d|d|d|d|d|d	t|	d
|
d|d|d|d|d|dt|}t i }d|d< d|d< | jjd| j||d}t| j|| jd | jd dS )rG   FriendlyName
ApiVersionVoiceUrlVoiceMethodVoiceFallbackUrlVoiceFallbackMethodStatusCallbackStatusCallbackMethodVoiceCallerIdLookupSmsUrl	SmsMethodSmsFallbackUrlSmsFallbackMethodSmsStatusCallbackMessageStatusCallbackPublicApplicationConnectEnabled!application/x-www-form-urlencodedContent-Typers   rt   POSTro   r#   datarp   r   r   r*   )	r   rq   r   boolean_to_stringr8   rH   rl   r   r/   r1   r   r   r(   r'   r&   r%   r!   r"   r$   r    r   r   r   r   r   r)   r   rp   r   r4   r4   r5   rH   t  sf   *	

zApplicationContext.updatec                    s   t i d|d|d|d|d|d|d|d|d	t|	d
|
d|d|d|d|d|dt|}t i }d|d< d|d< | jjd| j||dI dH }t| j|| jd | jd dS )rJ   rw   rx   ry   rz   r{   r|   r}   r~   r   r   r   r   r   r   r   r   r   r   rs   rt   r   r   Nr   r   r*   )	r   rq   r   r   r8   rK   rl   r   r/   r   r4   r4   r5   rK     sh   *	

zApplicationContext.update_asyncc                 C   rL   )rM   rN   c                 s   rO   rP   rQ   rS   r4   r4   r5   rW      rX   z.ApplicationContext.__repr__.<locals>.<genexpr>z(<Twilio.Api.V2010.ApplicationContext {}>rY   r\   r4   r4   r5   r^     r_   zApplicationContext.__repr__)ra   rb   rc   r   re   r,   rg   r=   rA   r   rD   rF   r   rh   r   ri   rH   rK   r^   rj   r4   r4   r2   r5   r7     s    







	









U







	









Sr7   c                   @   s4   e Zd Zdeeef defddZdefddZdS )ApplicationPager   r6   c                 C   s   t | j|| jd dS )zq
        Build an instance of ApplicationInstance

        :param payload: Payload response from the API
        r   r   )r   r8   r/   )r1   r   r4   r4   r5   get_instance&     zApplicationPage.get_instancec                 C      dS )rM   z"<Twilio.Api.V2010.ApplicationPage>r4   r9   r4   r4   r5   r^   0     zApplicationPage.__repr__N)	ra   rb   rc   r   re   r   r   r   r^   r4   r4   r4   r5   r   $  s    
r   c                #       s  e Zd Zdedef fddZejejejejejejejejejejejejejejejejfdeee	f deee	f deee	f deee	f d	eee	f d
eee	f deee	f dee
e	f deee	f deee	f deee	f deee	f deee	f deee	f deee	f dee
e	f def"ddZejejejejejejejejejejejejejejejejfdeee	f deee	f deee	f deee	f d	eee	f d
eee	f deee	f dee
e	f deee	f deee	f deee	f deee	f deee	f deee	f deee	f dee
e	f def"ddZejddfdeee	f dee dee dee fddZejddfdeee	f dee dee dee fdd Zejddfdeee	f dee dee dee fd!d"Zejddfdeee	f dee dee dee fd#d$Zejejejejfdeee	f d%eee	f d&eee	f deee	f def
d'd(Zejejejejfdeee	f d%eee	f d&eee	f deee	f def
d)d*Zd+edefd,d-Zd+edefd.d/Zd0edefd1d2Zd0edefd3d4Zdefd5d6Z  Z S )7ApplicationListr   r   c                    s.   t  | d|i| _djdi | j| _dS )z
        Initialize the ApplicationList

        :param version: Version that contains the resource
        :param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Application resources to read.

        r   z)/Accounts/{account_sid}/Applications.jsonNr4   rk   )r1   r   r   r2   r4   r5   r,   ;  s   zApplicationList.__init__r   r(   r'   r&   r%   r!   r"   r$   r    r   r   r   r   r   r   r)   r6   c                 C   s   t i d|d|d|d|d|d|d|dt|d	|	d
|
d|d|d|d|d|dt|}t ddi}d|d< d|d< | jjd| j||d}t| j|| jd dS )a  
        Create the ApplicationInstance

        :param api_version: The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. The default value is the account's default API version.
        :param voice_url: The URL we should call when the phone number assigned to this application receives a call.
        :param voice_method: The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`.
        :param voice_fallback_url: The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
        :param voice_fallback_method: The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`.
        :param status_callback: The URL we should call using the `status_callback_method` to send status information to your application.
        :param status_callback_method: The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`.
        :param voice_caller_id_lookup: Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`.
        :param sms_url: The URL we should call when the phone number receives an incoming SMS message.
        :param sms_method: The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`.
        :param sms_fallback_url: The URL that we should call when an error occurs while retrieving or executing the TwiML from `sms_url`.
        :param sms_fallback_method: The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`.
        :param sms_status_callback: The URL we should call using a POST method to send status information about SMS messages sent by the application.
        :param message_status_callback: The URL we should call using a POST method to send message status information to your application.
        :param friendly_name: A descriptive string that you create to describe the new application. It can be up to 64 characters long.
        :param public_application_connect_enabled: Whether to allow other Twilio accounts to dial this applicaton using Dial verb. Can be: `true` or `false`.

        :returns: The created ApplicationInstance
        rx   ry   rz   r{   r|   r}   r~   r   r   r   r   r   r   r   rw   r   r   r   rs   rt   r   r   r   r   )	r   rq   r   r   r8   createrl   r   r/   r1   r   r(   r'   r&   r%   r!   r"   r$   r    r   r   r   r   r   r   r)   r   rp   r   r4   r4   r5   r   K  s`   *
zApplicationList.createc                    s   t i d|d|d|d|d|d|d|dt|d	|	d
|
d|d|d|d|d|dt|}t ddi}d|d< d|d< | jjd| j||dI dH }t| j|| jd dS )a  
        Asynchronously create the ApplicationInstance

        :param api_version: The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. The default value is the account's default API version.
        :param voice_url: The URL we should call when the phone number assigned to this application receives a call.
        :param voice_method: The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`.
        :param voice_fallback_url: The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
        :param voice_fallback_method: The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`.
        :param status_callback: The URL we should call using the `status_callback_method` to send status information to your application.
        :param status_callback_method: The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`.
        :param voice_caller_id_lookup: Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`.
        :param sms_url: The URL we should call when the phone number receives an incoming SMS message.
        :param sms_method: The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`.
        :param sms_fallback_url: The URL that we should call when an error occurs while retrieving or executing the TwiML from `sms_url`.
        :param sms_fallback_method: The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`.
        :param sms_status_callback: The URL we should call using a POST method to send status information about SMS messages sent by the application.
        :param message_status_callback: The URL we should call using a POST method to send message status information to your application.
        :param friendly_name: A descriptive string that you create to describe the new application. It can be up to 64 characters long.
        :param public_application_connect_enabled: Whether to allow other Twilio accounts to dial this applicaton using Dial verb. Can be: `true` or `false`.

        :returns: The created ApplicationInstance
        rx   ry   rz   r{   r|   r}   r~   r   r   r   r   r   r   r   rw   r   r   r   rs   rt   r   r   Nr   r   )	r   rq   r   r   r8   create_asyncrl   r   r/   r   r4   r4   r5   r     sb   *
zApplicationList.create_asyncNlimit	page_sizec                 C   s2   | j ||}| j||d d}| j ||d S )a  
        Streams ApplicationInstance 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 str friendly_name: The string that identifies the Application resources to read.
        :param limit: Upper limit for the number of records to return. stream()
                      guarantees to never return more than limit.  Default is no limit
        :param 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
        r   r   r   r   )r8   read_limitspagestreamr1   r   r   r   limitsr   r4   r4   r5   r     s   zApplicationList.streamc                    s:   | j ||}| j||d dI dH }| j ||d S )a  
        Asynchronously streams ApplicationInstance 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 str friendly_name: The string that identifies the Application resources to read.
        :param limit: Upper limit for the number of records to return. stream()
                      guarantees to never return more than limit.  Default is no limit
        :param 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
        r   r   Nr   )r8   r   
page_asyncstream_asyncr   r4   r4   r5   r     s   zApplicationList.stream_asyncc                 C   s   t | j|||dS )a^  
        Lists ApplicationInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str friendly_name: The string that identifies the Application resources to read.
        :param limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param 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: list that will contain up to limit results
        r   r   r   )listr   r1   r   r   r   r4   r4   r5   r   #  s   zApplicationList.listc                    s(   dd | j |||dI dH 2 I dH S )am  
        Asynchronously lists ApplicationInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str friendly_name: The string that identifies the Application resources to read.
        :param limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param 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: list that will contain up to limit results
        c                    s   g | z3 d H W }|q6 S r`   r4   )rT   recordr4   r4   r5   
<listcomp>U  s
    z.ApplicationList.list_async.<locals>.<listcomp>r   N)r   r   r4   r4   r5   
list_async@  s   
zApplicationList.list_async
page_tokenpage_numberc                 C   sP   t ||||d}t ddi}d|d< | jjd| j||d}t| j|| jS )a  
        Retrieve a single page of ApplicationInstance records from the API.
        Request is executed immediately

        :param friendly_name: The string that identifies the Application resources to read.
        :param page_token: PageToken provided by the API
        :param page_number: Page Number, this value is simply for client state
        :param page_size: Number of records to return, defaults to 50

        :returns: Page of ApplicationInstance
        rw   	PageTokenr   PageSizer   r   rs   rt   ru   ro   r#   paramsrp   )r   rq   r8   r   rl   r   r/   r1   r   r   r   r   r   rp   responser4   r4   r5   r   ^  s   	
zApplicationList.pagec                    sX   t ||||d}t ddi}d|d< | jjd| j||dI dH }t| j|| jS )	a  
        Asynchronously retrieve a single page of ApplicationInstance records from the API.
        Request is executed immediately

        :param friendly_name: The string that identifies the Application resources to read.
        :param page_token: PageToken provided by the API
        :param page_number: Page Number, this value is simply for client state
        :param page_size: Number of records to return, defaults to 50

        :returns: Page of ApplicationInstance
        r   r   r   rs   rt   ru   r   N)r   rq   r8   r   rl   r   r/   r   r4   r4   r5   r     s   	
zApplicationList.page_async
target_urlc                 C   s"   | j jjd|}t| j || jS )z
        Retrieve a specific page of ApplicationInstance records from the API.
        Request is executed immediately

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

        :returns: Page of ApplicationInstance
        ru   )r8   domaintwiliorequestr   r/   r1   r   r   r4   r4   r5   get_page  s   	zApplicationList.get_pagec                    s*   | j jjd|I dH }t| j || jS )a
  
        Asynchronously retrieve a specific page of ApplicationInstance records from the API.
        Request is executed immediately

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

        :returns: Page of ApplicationInstance
        ru   N)r8   r   r   request_asyncr   r/   r   r4   r4   r5   get_page_async  s   	zApplicationList.get_page_asyncr   c                 C      t | j| jd |dS z
        Constructs a ApplicationContext

        :param sid: The Twilio-provided string that uniquely identifies the Application resource to update.
        r   r*   r7   r8   r/   r1   r   r4   r4   r5   r-     r   zApplicationList.getc                 C   r   r   r   r   r4   r4   r5   __call__  r   zApplicationList.__call__c                 C   r   )rM   z"<Twilio.Api.V2010.ApplicationList>r4   r9   r4   r4   r5   r^     r   zApplicationList.__repr__)!ra   rb   rc   r   re   r,   r   rh   r   ri   rg   r   r   r   r   intr   r   r	   r   r   r   r   r   r   r   r   r   r7   r-   r   r^   rj   r4   r4   r2   r5   r   9  sv   







	









R







	









R







 




&




$

r   N)rd   r   typingr   r   r   r   r   r   r	   twilio.baser
   r   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r7   r   r   r4   r4   r4   r5   <module>   s"    $    