U
    ^g%i                     @   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                       sr  e Zd ZdZdeeeef eee d fddZ	e
dddd	Zedd
dZedddZd dddZd 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eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef d 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eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef d dddZed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                    s2  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
   Z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__ h/var/www/html/api-medvista/venv/lib/python3.8/site-packages/twilio/rest/api/v2010/account/application.pyr,   2   sL    
zApplicationInstance.__init__ApplicationContextreturnc                 C   s.   | j dk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*   )r/   r5   _versionr.   r0   r3   r3   r4   _proxyc   s    
zApplicationInstance._proxyc                 C   s
   | j  S )n
        Deletes the ApplicationInstance


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


        :returns: True if delete succeeds, False otherwise
        N)r:   delete_asyncr9   r3   r3   r4   r>   |   s    z ApplicationInstance.delete_asyncc                 C   s
   | j  S )c
        Fetch the ApplicationInstance


        :returns: The fetched ApplicationInstance
        )r:   fetchr9   r3   r3   r4   r@      s    zApplicationInstance.fetchc                    s   | j  I dH S )}
        Asynchronous coroutine to fetch the ApplicationInstance


        :returns: The fetched ApplicationInstance
        N)r:   fetch_asyncr9   r3   r3   r4   rB      s    zApplicationInstance.fetch_asyncr   r   r(   r'   r&   r%   r!   r"   r$   r    r   r   r   r   r   r)   r7   c                 C   s,   | j j|||||||||	|
||||||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)   )r:   updater0   r   r   r(   r'   r&   r%   r!   r"   r$   r    r   r   r   r   r   r)   r3   r3   r4   rF      s$    )zApplicationInstance.updatec                    s2   | j j|||||||||	|
||||||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
        rE   N)r:   update_asyncrG   r3   r3   r4   rI      s$    )z ApplicationInstance.update_asyncc                 C   s$   d dd | j D }d|S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c                 s   s   | ]\}}d  ||V  qdS z{}={}Nformat.0kvr3   r3   r4   	<genexpr>  s     z/ApplicationInstance.__repr__.<locals>.<genexpr>z)<Twilio.Api.V2010.ApplicationInstance {}>joinr.   itemsrN   r0   contextr3   r3   r4   __repr__  s    zApplicationInstance.__repr__)N)__name__
__module____qualname____doc__r   r   strr   r   r,   propertyr:   boolr<   r>   r@   rB   r   unsetr   objectrF   rI   rY   __classcell__r3   r3   r1   r4   r      s    
1			















>















<r   c                       sL  e Zd Zeeed fddZedddZedddZe	dd	d
Z
e	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eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef e	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eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef e	dddZedddZ  ZS )r5   )r   r   r   c                    s,   t  | ||d| _djf | 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}.jsonNr+   r,   r.   rN   _uri)r0   r   r   r   r1   r3   r4   r,     s    zApplicationContext.__init__r6   c                 C   s   t i }| jjd| j|dS )r;   DELETEmethodr#   headers)r   ofr8   r<   re   r0   ri   r3   r3   r4   r<   .  s    
zApplicationContext.deletec                    s$   t i }| jjd| j|dI dH S )r=   rf   rg   N)r   rj   r8   r>   re   rk   r3   r3   r4   r>   :  s    
  zApplicationContext.delete_asyncc                 C   sD   t i }d|d< | jjd| j|d}t| j|| jd | jd dS )r?   application/jsonAcceptGETrg   r   r   r*   )r   rj   r8   r@   re   r   r.   r0   ri   r   r3   r3   r4   r@   H  s    
zApplicationContext.fetchc                    sJ   t i }d|d< | jjd| j|dI dH }t| j|| jd | jd dS )	rA   rl   rm   rn   rg   Nr   r   r*   )r   rj   r8   rB   re   r   r.   ro   r3   r3   r4   rB   ]  s    
  zApplicationContext.fetch_asyncrC   c                 C   s   t ||||||||t|	|
|||||t|d}t i }d|d< d|d< | jjd| j||d}t| j|| jd | jd	 d
S )rD   FriendlyName
ApiVersionVoiceUrlVoiceMethodVoiceFallbackUrlVoiceFallbackMethodStatusCallbackStatusCallbackMethodVoiceCallerIdLookupSmsUrl	SmsMethodSmsFallbackUrlSmsFallbackMethodSmsStatusCallbackMessageStatusCallbackPublicApplicationConnectEnabled!application/x-www-form-urlencodedContent-Typerl   rm   POSTrh   r#   datari   r   r   r*   )	r   rj   r   boolean_to_stringr8   rF   re   r   r.   r0   r   r   r(   r'   r&   r%   r!   r"   r$   r    r   r   r   r   r   r)   r   ri   r   r3   r3   r4   rF   t  sL    *
   zApplicationContext.updatec                    s   t ||||||||t|	|
|||||t|d}t i }d|d< d|d< | jjd| j||dI dH }t| j|| jd	 | jd
 dS )rH   rp   r   r   rl   rm   r   r   Nr   r   r*   )	r   rj   r   r   r8   rI   re   r   r.   r   r3   r3   r4   rI     sL    *
   zApplicationContext.update_asyncc                 C   s$   d dd | j D }d|S )rJ   rK   c                 s   s   | ]\}}d  ||V  qdS rL   rM   rO   r3   r3   r4   rS      s     z.ApplicationContext.__repr__.<locals>.<genexpr>z(<Twilio.Api.V2010.ApplicationContext {}>rT   rW   r3   r3   r4   rY     s    zApplicationContext.__repr__)rZ   r[   r\   r   r^   r,   r`   r<   r>   r   r@   rB   r   ra   r   rb   rF   rI   rY   rc   r3   r3   r1   r4   r5     s   















U















Sr5   c                   @   s2   e Zd Zeeef edddZedddZdS )ApplicationPage)r   r7   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.   )r0   r   r3   r3   r4   get_instance&  s
      zApplicationPage.get_instancer6   c                 C   s   dS )rJ   z"<Twilio.Api.V2010.ApplicationPage>r3   r9   r3   r3   r4   rY   0  s    zApplicationPage.__repr__N)	rZ   r[   r\   r   r^   r   r   r   rY   r3   r3   r3   r4   r   $  s   
r   c                       s  e Zd Zee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eee	f eee	f eee	f eee	f eee	f eee	f eee	f ee
e	f eee	f eee	f eee	f eee	f eee	f eee	f eee	f ee
e	f e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eee	f eee	f eee	f eee	f eee	f eee	f eee	f ee
e	f eee	f eee	f eee	f eee	f eee	f eee	f eee	f ee
e	f edddZejd	d	feee	f ee ee ee d
ddZejd	d	feee	f ee ee ee d
ddZejd	d	feee	f ee ee ee d
ddZejd	d	feee	f ee ee ee d
ddZejejejejfeee	f eee	f eee	f eee	f edddZejejejejfeee	f eee	f eee	f eee	f edddZeedddZeedddZeedddZeedd d!Zed"d#d$Z  Z S )%ApplicationList)r   r   c                    s*   t  | d|i| _djf | 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.jsonNrd   )r0   r   r   r1   r3   r4   r,   ;  s
     zApplicationList.__init__)r   r(   r'   r&   r%   r!   r"   r$   r    r   r   r   r   r   r   r)   r7   c                 C   s   t |||||||t||	|
|||||t|d}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
        rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   rq   r   r   r   rl   rm   r   r   r   r   )	r   rj   r   r   r8   createre   r   r.   r0   r   r(   r'   r&   r%   r!   r"   r$   r    r   r   r   r   r   r   r)   r   ri   r   r3   r3   r4   r   K  sJ    *     zApplicationList.createc                    s   t |||||||t||	|
|||||t|d}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
        r   r   r   rl   rm   r   r   Nr   r   )	r   rj   r   r   r8   create_asyncre   r   r.   r   r3   r3   r4   r     sJ    *     zApplicationList.create_asyncN)r   limit	page_sizer7   c                 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r0   r   r   r   Zlimitsr   r3   r3   r4   r     s    zApplicationList.streamc                    s8   | 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   r3   r3   r4   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   r0   r   r   r   r3   r3   r4   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 )Nr3   )rP   recordr3   r3   r4   
<listcomp>U  s   z.ApplicationList.list_async.<locals>.<listcomp>r   N)r   r   r3   r3   r4   
list_async@  s    
zApplicationList.list_async)r   
page_tokenpage_numberr   r7   c                 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
        rq   Z	PageTokenr   ZPageSizer   r   rl   rm   rn   rh   r#   paramsri   )r   rj   r8   r   re   r   r.   r0   r   r   r   r   r   ri   responser3   r3   r4   r   ^  s     	   zApplicationList.pagec                    sV   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   rl   rm   rn   r   N)r   rj   r8   r   re   r   r.   r   r3   r3   r4   r     s     	   zApplicationList.page_async)
target_urlr7   c                 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
        rn   )r8   domaintwiliorequestr   r.   r0   r   r   r3   r3   r4   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
        rn   N)r8   r   r   Zrequest_asyncr   r.   r   r3   r3   r4   get_page_async  s    	zApplicationList.get_page_async)r   r7   c                 C   s   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*   r5   r8   r.   r0   r   r3   r3   r4   r-     s
      zApplicationList.getc                 C   s   t | j| jd |dS r   r   r   r3   r3   r4   __call__  s
      zApplicationList.__call__r6   c                 C   s   dS )rJ   z"<Twilio.Api.V2010.ApplicationList>r3   r9   r3   r3   r4   rY     s    zApplicationList.__repr__)!rZ   r[   r\   r   r^   r,   r   ra   r   rb   r`   r   r   r   r   intr   r   r	   r   r   r   r   r   r   r   r   r   r5   r-   r   rY   rc   r3   r3   r1   r4   r   9  s  















R















R



 



&



$

r   N)r]   r   typingr   r   r   r   r   r   r	   Ztwilio.baser
   r   r   Ztwilio.base.instance_contextr   Ztwilio.base.instance_resourcer   Ztwilio.base.list_resourcer   Ztwilio.base.versionr   Ztwilio.base.pager   r   r5   r   r   r3   r3   r3   r4   <module>   s    $    