
    d{iy                        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 dd
lmZ  G d de      Z G d de      Z G d de      Z G d de      Zy)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)ApiResponse)InstanceContext)InstanceResource)ListResource)Version)Pagec            #       	    e Zd ZdZ	 d&dedeeef   dedee   f fdZ	e
d'd       Zdefd	Zdefd
ZdefdZdefdZd(dZd(dZdefdZdef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!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"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#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$Zdefd%Z x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`.
    versionpayloadaccount_sidsidc                 J   t         |   |       |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _        t        j                  |j                  d            | _        |j                  d      | _	        |j                  d      | _
        |j                  d      | _        |j                  d      | _        |j                  d	      | _        |j                  d
      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        ||xs | j                  d| _        d | _        y )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__s        g/home/sas/my/fyp/ringai/.venv/lib/python3.12/site-packages/twilio/rest/api/v2010/account/application.pyr0   zApplicationInstance.__init__3   s    	!*1++m*D*1++m*D0;0L0LKK'1
 1<0L0LKK'1
 -4KK,H6=kk%7
$ #*++e"429++>S2T /6{{;M/N)0\)B29++>S2T &-kk)&<.5kk:K.L5<[[$6
# #*++e"46=kk$7
# 5<KK@W4X"18=Q1R+2;;~+F(/K(@BI++0C
/
 '?$((
 7;    returnc                     | j                   7t        | j                  | j                  d   | j                  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
        r   r   r.   )r4   ApplicationContext_versionr3   r5   s    r7   _proxyzApplicationInstance._proxyd   sE     == . NN=9NN5)DM
 }}r8   c                 6    | j                   j                         S zn
        Deletes the ApplicationInstance


        :returns: True if delete succeeds, False otherwise
        )r>   deleter=   s    r7   rA   zApplicationInstance.deletet   s     {{!!##r8   c                 R   K   | j                   j                          d{   S 7 wz
        Asynchronous coroutine that deletes the ApplicationInstance


        :returns: True if delete succeeds, False otherwise
        N)r>   delete_asyncr=   s    r7   rD   z ApplicationInstance.delete_async}   s!      [[--////   '%'c                 6    | j                   j                         S )z
        Deletes the ApplicationInstance with HTTP info


        :returns: ApiResponse with success boolean, status code, and headers
        )r>   delete_with_http_infor=   s    r7   rG   z)ApplicationInstance.delete_with_http_info   s     {{0022r8   c                 R   K   | j                   j                          d{   S 7 w)z
        Asynchronous coroutine that deletes the ApplicationInstance with HTTP info


        :returns: ApiResponse with success boolean, status code, and headers
        N)r>   delete_with_http_info_asyncr=   s    r7   rI   z/ApplicationInstance.delete_with_http_info_async   s!      [[<<>>>>rE   c                 6    | j                   j                         S )c
        Fetch the ApplicationInstance


        :returns: The fetched ApplicationInstance
        )r>   fetchr=   s    r7   rL   zApplicationInstance.fetch   s     {{  ""r8   c                 R   K   | j                   j                          d{   S 7 w)}
        Asynchronous coroutine to fetch the ApplicationInstance


        :returns: The fetched ApplicationInstance
        N)r>   fetch_asyncr=   s    r7   rO   zApplicationInstance.fetch_async   s!      [[,,....rE   c                 6    | j                   j                         S )z
        Fetch the ApplicationInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        )r>   fetch_with_http_infor=   s    r7   rQ   z(ApplicationInstance.fetch_with_http_info   s     {{//11r8   c                 R   K   | j                   j                          d{   S 7 w)z
        Asynchronous coroutine to fetch the ApplicationInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        N)r>   fetch_with_http_info_asyncr=   s    r7   rS   z.ApplicationInstance.fetch_with_http_info_async   s!      [[;;====rE   r   r   r,   r+   r*   r)   r%   r&   r(   r$   r"   r!   r    r#   r   r-   c                 X    | j                   j                  |||||||||	|
||||||      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r5   r   r   r,   r+   r*   r)   r%   r&   r(   r$   r"   r!   r    r#   r   r-   s                    r7   rW   zApplicationInstance.update   sQ    R {{!!'#%1"7+#9#9!- 3 3$;/Q! " 
 	
r8   c                 t   K   | j                   j                  |||||||||	|
||||||       d{   S 7 w)	  
        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
        rV   N)r>   update_asyncrX   s                    r7   r[   z ApplicationInstance.update_async   s_     R [[--'#%1"7+#9#9!- 3 3$;/Q! . 
 
 	
 
   /868c                 X    | j                   j                  |||||||||	|
||||||      S )a(	  
        Update the ApplicationInstance with HTTP info

        :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: ApiResponse with instance, status code, and headers
        rV   )r>   update_with_http_inforX   s                    r7   r^   z)ApplicationInstance.update_with_http_info4  sQ    R {{00'#%1"7+#9#9!- 3 3$;/Q! 1 
 	
r8   c                 t   K   | j                   j                  |||||||||	|
||||||       d{   S 7 w)aB	  
        Asynchronous coroutine to update the ApplicationInstance with HTTP info

        :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: ApiResponse with instance, status code, and headers
        rV   N)r>   update_with_http_info_asyncrX   s                    r7   r`   z/ApplicationInstance.update_with_http_info_asyncp  s_     R [[<<'#%1"7+#9#9!- 3 3$;/Q! = 
 
 	
 
r\   c                     dj                  d | j                  j                         D              }dj                  |      S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c              3   F   K   | ]  \  }}d j                  ||        ywz{}={}Nformat.0kvs      r7   	<genexpr>z/ApplicationInstance.__repr__.<locals>.<genexpr>       SDAq7>>!Q/S   !z)<Twilio.Api.V2010.ApplicationInstance {}>joinr3   itemsrg   r5   contexts     r7   __repr__zApplicationInstance.__repr__  s6     ((SDNN<P<P<RSS:AA'JJr8   )N)r9   r;   )r9   r   ) __name__
__module____qualname____doc__r   r   strr   r   r0   propertyr>   boolrA   rD   r   rG   rI   rL   rO   rQ   rS   r   unsetr   objectrW   r[   r^   r`   rt   __classcell__r6   s   @r7   r   r      sy   : "/;/; c3h/; 	/;
 c]/;b  $ $0D 03{ 3?; ?#/2k 2>+ > -3LL*0,,(.+1<<174:LL.4ll5;\\6<ll&,ll)//5||28,,28,,6<llBH,,#:
S&[):
 3;':
 f%	:

 CK(:
 "#v+.:
  %S&[1:
 sF{+:
 !&c6k 2:
 !&dFl 3:
 sF{#:
 #v+&:
  V,:
 #3;/:
 #3;/:
  "'sF{!3!:
" -2$,,?#:
$ 
%:
| -3LL*0,,(.+1<<174:LL.4ll5;\\6<ll&,ll)//5||28,,28,,6<llBH,,#:
S&[):
 3;':
 f%	:

 CK(:
 "#v+.:
  %S&[1:
 sF{+:
 !&c6k 2:
 !&dFl 3:
 sF{#:
 #v+&:
  V,:
 #3;/:
 #3;/:
  "'sF{!3!:
" -2$,,?#:
$ 
%:
| -3LL*0,,(.+1<<174:LL.4ll5;\\6<ll&,ll)//5||28,,28,,6<llBH,,#:
S&[):
 3;':
 f%	:

 CK(:
 "#v+.:
  %S&[1:
 sF{+:
 !&c6k 2:
 !&dFl 3:
 sF{#:
 #v+&:
  V,:
 #3;/:
 #3;/:
  "'sF{!3!:
" -2$,,?#:
$ 
%:
| -3LL*0,,(.+1<<174:LL.4ll5;\\6<ll&,ll)//5||28,,28,,6<llBH,,#:
S&[):
 3;':
 f%	:

 CK(:
 "#v+.:
  %S&[1:
 sF{+:
 !&c6k 2:
 !&dFl 3:
 sF{#:
 #v+&:
  V,:
 #3;/:
 #3;/:
  "'sF{!3!:
" -2$,,?#:
$ 
%:
xK# Kr8   r   c            #           e Zd Zdededef fdZdefdZdefdZ	de
fdZdefd	Zdefd
Zde
fdZdefdZdefdZde
fdZdefdZdefdZde
f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"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#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$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%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&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'Zdefd(Z  xZ!S ))r;   r   r   r   c                 z    t         |   |       ||d| _         dj                  di | j                  | _        y)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/   r0   r3   rg   _uri)r5   r   r   r   r6   s       r7   r0   zApplicationContext.__init__  sG     	! '
 MELL 
nn
	r8   r9   c                 |    t        j                  i       }| j                  j                  d| j                  |      S )z
        Internal helper for delete operation

        Returns:
            tuple: (success_boolean, status_code, headers)
        DELETEmethodr'   headers)r   ofr<   delete_with_response_infor   r5   r   s     r7   _deletezApplicationContext._delete  s8     ))B-}}66G 7 
 	
r8   c                 .    | j                         \  }}}|S r@   )r   r5   success_s      r7   rA   zApplicationContext.delete  s     Ar8   c                 F    | j                         \  }}}t        |||      S )z
        Deletes the ApplicationInstance and return response metadata


        :returns: ApiResponse with success boolean, status code, and headers
        datastatus_coder   )r   r   r5   r   r   r   s       r7   rG   z(ApplicationContext.delete_with_http_info  s%     )-%g['RRr8   c                    K   t        j                  i       }| j                  j                  d| j                  |       d{   S 7 w)z
        Internal async helper for delete operation

        Returns:
            tuple: (success_boolean, status_code, headers)
        r   r   N)r   r   r<   delete_with_response_info_asyncr   r   s     r7   _delete_asyncz ApplicationContext._delete_async  sG      ))B-]]BBG C 
 
 	
 
s   AA
AA
c                 J   K   | j                          d{   \  }}}|S 7 
wrC   )r   r   s      r7   rD   zApplicationContext.delete_async  s)      #0022A 3s   #!#c                 b   K   | j                          d{   \  }}}t        |||      S 7 w)z
        Asynchronous coroutine that deletes the ApplicationInstance and return response metadata


        :returns: ApiResponse with success boolean, status code, and headers
        Nr   )r   r   r   s       r7   rI   z.ApplicationContext.delete_with_http_info_async  s5      /3.@.@.B(B%g['RR )Cs   /-/c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      S )zz
        Internal helper for fetch operation

        Returns:
            tuple: (payload, status_code, headers)
        application/jsonAcceptGETr   )r   r   r<   fetch_with_response_infor   r   s     r7   _fetchzApplicationContext._fetch  sB     ))B-.}}55dii 6 
 	
r8   c                     | j                         \  }}}t        | j                  || j                  d   | j                  d         S )rK   r   r   r.   )r   r   r<   r3   r5   r   r   s      r7   rL   zApplicationContext.fetch  sD     A"MM}5u%	
 	
r8   c                     | j                         \  }}}t        | j                  || j                  d   | j                  d         }t	        |||      S )z
        Fetch the ApplicationInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        r   r   r.   r   )r   r   r<   r3   r   r5   r   r   r   instances        r7   rQ   z'ApplicationContext.fetch_with_http_info.  sS     )-%g&MM}5u%	
 k7SSr8   c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   S 7 w)z
        Internal async helper for fetch operation

        Returns:
            tuple: (payload, status_code, headers)
        r   r   r   r   N)r   r   r<   fetch_with_response_info_asyncr   r   s     r7   _fetch_asynczApplicationContext._fetch_async>  sQ      ))B-.]]AAdii B 
 
 	
 
s   AAA	Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d   | j                  d         S 7 ;w)rN   Nr   r   r.   )r   r   r<   r3   r   s      r7   rO   zApplicationContext.fetch_asyncN  sS      #//11A"MM}5u%	
 	
 2s   AA<Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d   | j                  d         }t	        |||      S 7 Iw)z
        Asynchronous coroutine to fetch the ApplicationInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        Nr   r   r.   r   )r   r   r<   r3   r   r   s        r7   rS   z-ApplicationContext.fetch_with_http_info_async]  sc      /3.?.?.A(A%g&MM}5u%	
 k7SS )Bs   A"A A
A"r   r   r,   r+   r*   r)   r%   r&   r(   r$   r"   r!   r    r#   r   r-   c                 h   t        j                  i d|d|d|d|d|d|d|d|d	t        j                  |	      d
|
d|d|d|d|d|dt        j                  |            }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||      S )z{
        Internal helper for update operation

        Returns:
            tuple: (payload, status_code, headers)
        FriendlyName
ApiVersionVoiceUrlVoiceMethodVoiceFallbackUrlVoiceFallbackMethodStatusCallbackStatusCallbackMethodVoiceCallerIdLookupSmsUrl	SmsMethodSmsFallbackUrlSmsFallbackMethodSmsStatusCallbackMessageStatusCallbackPublicApplicationConnectEnabled!application/x-www-form-urlencodedContent-Typer   r   POSTr   r'   r   r   )r   r   r   boolean_to_stringr<   update_with_response_infor   r5   r   r   r,   r+   r*   r)   r%   r&   r(   r$   r"   r!   r    r#   r   r-   r   r   s                      r7   _updatezApplicationContext._updatem  sB   4 yyk I |	
 #$6 &'< !/ '(> &y'B'B*( ' Z !"2 $%8  $%8!" ()@#$ 293N3N64%
0 ))B-"E.}}66tyytW 7 
 	
r8   c                     | j                  |||||||||	|
||||||      \  }}}t        | j                  || j                  d   | j                  d         S )rU   rV   r   r   r.   )r   r   r<   r3   r5   r   r   r,   r+   r*   r)   r%   r&   r(   r$   r"   r!   r    r#   r   r-   r   r   s                      r7   rW   zApplicationContext.update  s    R '#%1"7+#9#9!- 3 3$;/Q! % 
A$ #MM}5u%	
 	
r8   c                     | j                  |||||||||	|
||||||      \  }}}t        | j                  || j                  d   | j                  d         }t	        |||      S )a6	  
        Update the ApplicationInstance and return response metadata

        :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: ApiResponse with instance, status code, and headers
        rV   r   r   r.   r   )r   r   r<   r3   r   r5   r   r   r,   r+   r*   r)   r%   r&   r(   r$   r"   r!   r    r#   r   r-   r   r   r   r   s                        r7   r^   z(ApplicationContext.update_with_http_info  s    R )-'#%1"7+#9#9!- 3 3$;/Q! )5 )
%g$ 'MM}5u%	
 k7SSr8   c                   K   t        j                  i d|d|d|d|d|d|d|d|d	t        j                  |	      d
|
d|d|d|d|d|dt        j                  |            }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||       d{   S 7 w)z
        Internal async helper for update operation

        Returns:
            tuple: (payload, status_code, headers)
        r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   N)r   r   r   r   r<   update_with_response_info_asyncr   r   s                      r7   _update_asyncz ApplicationContext._update_async.  sQ    4 yyk I |	
 #$6 &'< !/ '(> &y'B'B*( ' Z !"2 $%8  $%8!" ()@#$ 293N3N64%
0 ))B-"E.]]BBtyytW C 
 
 	
 
s   B7C 9B>:C c                    K   | j                  |||||||||	|
||||||       d{   \  }}}t        | j                  || j                  d   | j                  d         S 7 ;w)rZ   rV   Nr   r   r.   )r   r   r<   r3   r   s                      r7   r[   zApplicationContext.update_asyncj  s     R #00'#%1"7+#9#9!- 3 3$;/Q! 1 
 
A$ #MM}5u%	
 	
%
   %A%A#<A%c                    K   | j                  |||||||||	|
||||||       d{   \  }}}t        | j                  || j                  d   | j                  d         }t	        |||      S 7 Iw)aP	  
        Asynchronous coroutine to update the ApplicationInstance and return response metadata

        :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: ApiResponse with instance, status code, and headers
        rV   Nr   r   r.   r   )r   r   r<   r3   r   r   s                        r7   r`   z.ApplicationContext.update_with_http_info_async  s     R /3.@.@'#%1"7+#9#9!- 3 3$;/Q! /A /
 )
%g$ 'MM}5u%	
 k7SS1)
s   %A3A1A
A3c                     dj                  d | j                  j                         D              }dj                  |      S )rb   rc   c              3   F   K   | ]  \  }}d j                  ||        ywre   rf   rh   s      r7   rl   z.ApplicationContext.__repr__.<locals>.<genexpr>  rm   rn   z(<Twilio.Api.V2010.ApplicationContext {}>ro   rr   s     r7   rt   zApplicationContext.__repr__  s6     ((SDNN<P<P<RSS9@@IIr8   )"ru   rv   rw   r   ry   r0   tupler   r{   rA   r   rG   r   rD   rI   r   r   rL   rQ   r   rO   rS   r   r|   r   r}   r   rW   r^   r   r[   r`   rt   r~   r   s   @r7   r;   r;     sQ   
 
c 
 
&
 
 S{ S
U 
D S; S
 
 
* 
Tk T 
E 
 
#6 
T+ T$ -3LL*0,,(.+1<<174:LL.4ll5;\\6<ll&,ll)//5||28,,28,,6<llBH,,#:
S&[):
 3;':
 f%	:

 CK(:
 "#v+.:
  %S&[1:
 sF{+:
 !&c6k 2:
 !&dFl 3:
 sF{#:
 #v+&:
  V,:
 #3;/:
 #3;/:
  "'sF{!3!:
" -2$,,?#:
$ 
%:
| -3LL*0,,(.+1<<174:LL.4ll5;\\6<ll&,ll)//5||28,,28,,6<llBH,,#@
S&[)@
 3;'@
 f%	@

 CK(@
 "#v+.@
  %S&[1@
 sF{+@
 !&c6k 2@
 !&dFl 3@
 sF{#@
 #v+&@
  V,@
 #3;/@
 #3;/@
  "'sF{!3!@
" -2$,,?#@
$ 
%@
H -3LL*0,,(.+1<<174:LL.4ll5;\\6<ll&,ll)//5||28,,28,,6<llBH,,#ATS&[)AT 3;'AT f%	AT
 CK(AT "#v+.AT  %S&[1AT sF{+AT !&c6k 2AT !&dFl 3AT sF{#AT #v+&AT  V,AT #3;/AT #3;/AT  "'sF{!3!AT" -2$,,?#AT$ 
%ATJ -3LL*0,,(.+1<<174:LL.4ll5;\\6<ll&,ll)//5||28,,28,,6<llBH,,#:
S&[):
 3;':
 f%	:

 CK(:
 "#v+.:
  %S&[1:
 sF{+:
 !&c6k 2:
 !&dFl 3:
 sF{#:
 #v+&:
  V,:
 #3;/:
 #3;/:
  "'sF{!3!:
" -2$,,?#:
$ 
%:
| -3LL*0,,(.+1<<174:LL.4ll5;\\6<ll&,ll)//5||28,,28,,6<llBH,,#@
S&[)@
 3;'@
 f%	@

 CK(@
 "#v+.@
  %S&[1@
 sF{+@
 !&c6k 2@
 !&dFl 3@
 sF{#@
 #v+&@
  V,@
 #3;/@
 #3;/@
  "'sF{!3!@
" -2$,,?#@
$ 
%@
H -3LL*0,,(.+1<<174:LL.4ll5;\\6<ll&,ll)//5||28,,28,,6<llBH,,#ATS&[)AT 3;'AT f%	AT
 CK(AT "#v+.AT  %S&[1AT sF{+AT !&c6k 2AT !&dFl 3AT sF{#AT #v+&AT  V,AT #3;/AT #3;/AT  "'sF{!3!AT" -2$,,?#AT$ 
%ATFJ# Jr8   r;   c                   2    e Zd Zdeeef   defdZdefdZy)ApplicationPager   r9   c                 L    t        | j                  || j                  d         S )zq
        Build an instance of ApplicationInstance

        :param payload: Payload response from the API
        r   r   )r   r<   r3   )r5   r   s     r7   get_instancezApplicationPage.get_instance  s%     #MM7}0M
 	
r8   c                      y)rb   z"<Twilio.Api.V2010.ApplicationPage>r   r=   s    r7   rt   zApplicationPage.__repr__       4r8   N)	ru   rv   rw   r   ry   r   r   r   rt   r   r8   r7   r   r     s*    
DcN 
7J 
4# 4r8   r   c            #       (    e Zd Zdedef f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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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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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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Zej                  ddfdeee	f   dee   dee   dee   fdZej                  ddfdeee	f   dee   dee   dee   fdZej                  ddfdeee	f   dee   dee   defd Zej                  ddfdeee	f   dee   dee   defd!Zej                  ddfdeee	f   dee   dee   dee   fd"Zej                  ddfdeee	f   dee   dee   dee   fd#Zej                  ddfdeee	f   dee   dee   defd$Zej                  ddfdeee	f   dee   dee   def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(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)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*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+Z%d,ede!fd-Z&d,ede!fd.Z'd/ede(fd0Z)d/ede(fd1Z*defd2Z+ xZ,S )3ApplicationListr   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)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.jsonNr   r   )r5   r   r   r6   s      r7   r0   zApplicationList.__init__  sA     	! ;
 G?FFXX	r8   r   r,   r+   r*   r)   r%   r&   r(   r$   r"   r!   r    r#   r   r   r-   r9   c                 l   t        j                  i d|d|d|d|d|d|d|dt        j                  |      d	|	d
|
d|d|d|d|d|dt        j                  |            }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||      S )z{
        Internal helper for create operation

        Returns:
            tuple: (payload, status_code, headers)
        r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )r   r   r   r   r<   create_with_response_infor   r5   r   r,   r+   r*   r)   r%   r&   r(   r$   r"   r!   r    r#   r   r   r-   r   r   s                      r7   _createzApplicationList._create   sI   4 yykI | #$6	
 &'< !/ '(> &y'B'B*( ' Z !"2 $%8 $%8  ()@!" #$ 293N3N64%
0 ))^-PQR"E.}}66tyytW 7 
 	
r8   c                     | j                  |||||||||	|
||||||      \  }}}t        | j                  || j                  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
        r   r,   r+   r*   r)   r%   r&   r(   r$   r"   r!   r    r#   r   r   r-   r   r   )r   r   r<   r3   r5   r   r,   r+   r*   r)   r%   r&   r(   r$   r"   r!   r    r#   r   r   r-   r   r   s                      r7   createzApplicationList.create\  sq    R #%1"7+#9#9!- 3 3$;'/Q! % 
A$ #MM7}0M
 	
r8   c                     | j                  |||||||||	|
||||||      \  }}}t        | j                  || j                  d         }t	        |||      S )a  
        Create the ApplicationInstance and return response metadata

        :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: ApiResponse with instance, status code, and headers
        r   r   r   r   )r   r   r<   r3   r   r5   r   r,   r+   r*   r)   r%   r&   r(   r$   r"   r!   r    r#   r   r   r-   r   r   r   r   s                        r7   create_with_http_infoz%ApplicationList.create_with_http_info  s    R )-#%1"7+#9#9!- 3 3$;'/Q! )5 )
%g$ 'MM7}0M
 k7SSr8   c                   K   t        j                  i d|d|d|d|d|d|d|dt        j                  |      d	|	d
|
d|d|d|d|d|dt        j                  |            }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||       d{   S 7 w)z
        Internal async helper for create operation

        Returns:
            tuple: (payload, status_code, headers)
        r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   N)r   r   r   r   r<   create_with_response_info_asyncr   r   s                      r7   _create_asynczApplicationList._create_async  sX    4 yykI | #$6	
 &'< !/ '(> &y'B'B*( ' Z !"2 $%8 $%8  ()@!" #$ 293N3N64%
0 ))^-PQR"E.]]BBtyytW C 
 
 	
 
s   B9C;C <Cc                    K   | j                  |||||||||	|
||||||       d{   \  }}}t        | j                  || j                  d         S 7 -w)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   Nr   r   )r   r   r<   r3   r   s                      r7   create_asynczApplicationList.create_async  s     R #00#%1"7+#9#9!- 3 3$;'/Q! 1 
 
A$ #MM7}0M
 	
%
s   %AA.Ac                    K   | j                  |||||||||	|
||||||       d{   \  }}}t        | j                  || j                  d         }t	        |||      S 7 ;w)a  
        Asynchronously create the ApplicationInstance and return response metadata

        :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: ApiResponse with instance, status code, and headers
        r   Nr   r   r   )r   r   r<   r3   r   r   s                        r7   create_with_http_info_asyncz+ApplicationList.create_with_http_info_asyncV  s     R /3.@.@#%1"7+#9#9!- 3 3$;'/Q! /A /
 )
%g$ 'MM7}0M
 k7SS+)
r   Nlimit	page_sizec                     | j                   j                  ||      }| j                  ||d         }| j                   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   )r<   read_limitspagestreamr5   r   r   r   limitsr   s         r7   r   zApplicationList.stream  sL    , **5)<yy}{@SyT}}##D&/::r8   c                    K   | j                   j                  ||      }| j                  ||d          d{   }| j                   j                  ||d         S 7 #w)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   )r<   r   
page_asyncstream_asyncr   s         r7   r   zApplicationList.stream_async  sb     , **5)<__'6+3F % 
 
 }}))$w@@	
s   6AA$Ac                     | j                   j                  ||      }| j                  ||d         }| j                   j                  |j                  |d         }||j
                  |j                  fS )a  
        Streams ApplicationInstance and returns headers from first page


        :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: tuple of (generator, status_code, headers) where generator yields instances
        r   r   r   )r<   r   page_with_http_infor   r   r   r   r5   r   r   r   r   page_response	generators          r7   stream_with_http_infoz%ApplicationList.stream_with_http_info  st    ( **5)<00'6+3F 1 
 MM((););VG_M	=44m6K6KLLr8   c                   K   | j                   j                  ||      }| j                  ||d          d{   }| j                   j                  |j                  |d         }||j
                  |j                  fS 7 Fw)a$  
        Asynchronously streams ApplicationInstance and returns headers from first page


        :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: tuple of (generator, status_code, headers) where generator yields instances
        r   r   Nr   )r<   r   page_with_http_info_asyncr   r   r   r   r   s          r7   stream_with_http_info_asyncz+ApplicationList.stream_with_http_info_async  s     ( **5)<"<<'6+3F = 
 
 MM..}/A/A6'?S	=44m6K6KLL
s   6BA?ABc                 <    t        | j                  |||            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   )r5   r   r   r   s       r7   r  zApplicationList.list  s+    * KK+#  
 	
r8   c                 |   K   | j                  |||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)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
        r  N)r   )r5   r   r   r   records        r7   
list_asynczApplicationList.list_async#  sW     . '+&7&7+# '8 ' !
 
 !
 
 	
 
s0   </<731
37<37<c                 d    | j                  |||      \  }}}t        |      }t        |||      S )a   
        Lists ApplicationInstance and returns headers from first page


        :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: ApiResponse with list of instances, status code, and headers
        r  r   )r   r  r   )r5   r   r   r   r   r   r   rq   s           r7   list_with_http_infoz#ApplicationList.list_with_http_infoA  sD    ( +/*D*D' +E +
'	;
 Y;PPr8   c                    K   | j                  |||       d{   \  }}}|2 cg c3 d{   }|7 7 	6 nc c}w }}t        |||      S w)a  
        Asynchronously lists ApplicationInstance and returns headers from first page


        :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: ApiResponse with list of instances, status code, and headers
        r  Nr   )r  r   )	r5   r   r   r   r   r   r   r  rq   s	            r7   list_with_http_info_asyncz)ApplicationList.list_with_http_info_async]  si     ( 150P0P' 1Q 1
 +
'	;
 -666&+

 7666;PPs4   A5A;97
9;A9;A
page_tokenpage_numberc                    t        j                  ||||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      }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
        r   	PageTokenr   PageSizer   r   r   r   r   r   r'   paramsr   )r   r   r<   r   r   r   r3   r5   r   r  r  r   r   r   responses           r7   r   zApplicationList.pagey  s    $ yy -'#%	
 ))^-PQR.==%%diig & 
 t}}hGGr8   c                   K   t        j                  ||||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                        S 7 %w)	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   r   r   r   r  N)r   r   r<   r   r   r   r3   r  s           r7   r   zApplicationList.page_async  s     $ yy -'#%	
 ))^-PQR.11diig 2 
 
 t}}hGG
s   A#B%B&&Bc                 &   t        j                  ||||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      \  }}}	t        | j                  || j                        }
t        |
||	      S )	a  
        Retrieve a single page with response metadata


        :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: ApiResponse with ApplicationPage, status code, and headers
        r  r   r   r   r   r   r  r   )r   r   r<   page_with_response_infor   r   r3   r   r5   r   r  r  r   r   r   r  r   response_headersr   s              r7   r   z#ApplicationList.page_with_http_info  s    $ yy -'#%	
 ))^-PQR.26--2W2Wdiig 3X 3
/+/ t}}hG+GWXXr8   c                 B  K   t        j                  ||||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   \  }}}	t        | j                  || j                        }
t        |
||		      S 7 7w)
a  
        Asynchronously retrieve a single page with response metadata


        :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: ApiResponse with ApplicationPage, status code, and headers
        r  r   r   r   r   r   r  Nr   )r   r   r<   page_with_response_info_asyncr   r   r3   r   r  s              r7   r  z)ApplicationList.page_with_http_info_async  s     $ yy -'#%	
 ))^-PQR. --==$))D' >   	0+/
 t}}hG+GWXXs   A#B%B&8B
target_urlc                     | j                   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
        r   )r<   domaintwiliorequestr   r3   r5   r  r  s      r7   get_pagezApplicationList.get_page  s=     ==''..66ujIt}}hGGr8   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   || j
                        S 7 %w)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
        r   N)r<   r   r!  request_asyncr   r3   r#  s      r7   get_page_asynczApplicationList.get_page_async  sJ      --44BB5*UUt}}hGG Vs   4AA&Ar   c                 L    t        | j                  | j                  d   |      S z
        Constructs a ApplicationContext

        :param sid: The Twilio-provided string that uniquely identifies the Application resource to update.
        r   r.   r;   r<   r3   r5   r   s     r7   r1   zApplicationList.get%  %     "MMt~~m'D#
 	
r8   c                 L    t        | j                  | j                  d   |      S r)  r*  r+  s     r7   __call__zApplicationList.__call__/  r,  r8   c                      y)rb   z"<Twilio.Api.V2010.ApplicationList>r   r=   s    r7   rt   zApplicationList.__repr__9  r   r8   )-ru   rv   rw   r   ry   r0   r   r|   r   r}   r{   r   r   r   r   r   r   r   r   r   r   intr	   r   r
   r   r   r  r   r  r  r
  r  r   r   r   r   r  r$  r'  r;   r1   r.  rt   r~   r   s   @r7   r   r     s?   Y Yc Y$ +1,,(.+1<<174:LL.4ll5;\\6<ll&,ll)//5||28,,28,,6<ll,2LLBH,,#:
3;':
 f%:
 CK(	:

 "#v+.:
  %S&[1:
 sF{+:
 !&c6k 2:
 !&dFl 3:
 sF{#:
 #v+&:
  V,:
 #3;/:
 #3;/:
 "'sF{!3:
  S&[)!:
" -2$,,?#:
$ 
%:
| +1,,(.+1<<174:LL.4ll5;\\6<ll&,ll)//5||28,,28,,6<ll,2LLBH,,#=
3;'=
 f%=
 CK(	=

 "#v+.=
  %S&[1=
 sF{+=
 !&c6k 2=
 !&dFl 3=
 sF{#=
 #v+&=
  V,=
 #3;/=
 #3;/=
 "'sF{!3=
  S&[)!=
" -2$,,?#=
$ 
%=
B +1,,(.+1<<174:LL.4ll5;\\6<ll&,ll)//5||28,,28,,6<ll,2LLBH,,#>T3;'>T f%>T CK(	>T
 "#v+.>T  %S&[1>T sF{+>T !&c6k 2>T !&dFl 3>T sF{#>T #v+&>T  V,>T #3;/>T #3;/>T "'sF{!3>T  S&[)!>T" -2$,,?#>T$ 
%>TD +1,,(.+1<<174:LL.4ll5;\\6<ll&,ll)//5||28,,28,,6<ll,2LLBH,,#:
3;':
 f%:
 CK(	:

 "#v+.:
  %S&[1:
 sF{+:
 !&c6k 2:
 !&dFl 3:
 sF{#:
 #v+&:
  V,:
 #3;/:
 #3;/:
 "'sF{!3:
  S&[)!:
" -2$,,?#:
$ 
%:
| +1,,(.+1<<174:LL.4ll5;\\6<ll&,ll)//5||28,,28,,6<ll,2LLBH,,#=
3;'=
 f%=
 CK(	=

 "#v+.=
  %S&[1=
 sF{+=
 !&c6k 2=
 !&dFl 3=
 sF{#=
 #v+&=
  V,=
 #3;/=
 #3;/=
 "'sF{!3=
  S&[)!=
" -2$,,?#=
$ 
%=
B +1,,(.+1<<174:LL.4ll5;\\6<ll&,ll)//5||28,,28,,6<ll,2LLBH,,#>T3;'>T f%>T CK(	>T
 "#v+.>T  %S&[1>T sF{+>T !&c6k 2>T !&dFl 3>T sF{#>T #v+&>T  V,>T #3;/>T #3;/>T "'sF{!3>T  S&[)!>T" -2$,,?#>T$ 
%>TD -3LL##'	;S&[); }; C=	;
 
%	&;: -3LL##'	AS&[)A }A C=	A
 
*	+A> -3LL##'	MS&[)M }M C=	M
 
M< -3LL##'	MS&[)M }M C=	M
 
M< -3LL##'	
S&[)
 }
 C=	

 
!	"
> -3LL##'	
S&[)
 }
 C=	

 
!	"
@ -3LL##'	QS&[)Q }Q C=	Q
 
Q< -3LL##'	QS&[)Q }Q C=	Q
 
Q< -3LL)/*0,,(."HS&[)"H #v+&"H 3;'	"H
 f%"H 
"HL -3LL)/*0,,(."HS&[)"H #v+&"H 3;'	"H
 f%"H 
"HL -3LL)/*0,,(.#YS&[)#Y #v+&#Y 3;'	#Y
 f%#Y 
#YN -3LL)/*0,,(.%YS&[)%Y #v+&%Y 3;'	%Y
 f%%Y 
%YN
H3 
H? 
H
Hs 
H 
H
s 
1 

C 
$6 
4# 4r8   r   N)rx   r   typingr   r   r   r   r   r	   r
   twilio.baser   r   r   twilio.base.api_responser   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r;   r   r   r   r8   r7   <module>r9     sm     L L L 6 6 0 8 : 2 ' !YK* YKx@	J @	JF4d 4*q4l q4r8   