
    piYW                         d Z ddlmZmZmZmZ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 - Numbers
    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.
    )AnyDictListOptionalUnionIteratorAsyncIterator)values)InstanceContext)InstanceResource)ListResource)Version)Pagec                        e Zd Z G d de      Z G d de      Z G d de      Z	 	 ddedee	e
f   d	ee	   f fd
Zedd       ZddZddZde	fdZ xZS )ApplicationInstancec                   ,    e Zd ZdZdeeef   fdZd Zy)5ApplicationInstance.CreateShortCodeApplicationRequest
        :ivar friendly_name: The friendly name for the short code application.
        :ivar iso_country: The ISO country code.
        :ivar business_information:
        :ivar setup:
        payloadc                     |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        y Nfriendly_nameiso_countrybusiness_informationsetupgetr   r   r   r   selfr   s     d/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/numbers/v2/application.py__init__z>ApplicationInstance.CreateShortCodeApplicationRequest.__init__"   P    07O0LD.5kk-.HD 23 %
 G$ J    c                     | j                   | j                  | j                  | j                  j                         nd | j                  | j                  j                         dS d dS N)r   r   r   r   r   r   r   to_dictr   r   s    r    r'   z=ApplicationInstance.CreateShortCodeApplicationRequest.to_dict-   m    !%!3!3#// 00< --557151G++-	 	 NR	 	r#   N	__name__
__module____qualname____doc__r   strr   r!   r'    r#   r    !CreateShortCodeApplicationRequestr           			%DcN 		%
	r#   r1   c                   ,    e Zd ZdZdeeef   fdZd Zy)HApplicationInstance.CreateShortCodeApplicationRequestBusinessInformationu
        :ivar customer_facing_profile: The Compliance Profile SID for the customer-facing business profile.
        r   c                 0    |j                  d      | _        y Ncustomer_facing_profiler   r8   r   s     r    r!   zQApplicationInstance.CreateShortCodeApplicationRequestBusinessInformation.__init__>       :A++);D(r#   c                     d| j                   iS r7   r8   r(   s    r    r'   zPApplicationInstance.CreateShortCodeApplicationRequestBusinessInformation.to_dictD       )4+G+G r#   Nr*   r0   r#   r    4CreateShortCodeApplicationRequestBusinessInformationr4   9        		DcN 		r#   r>   c                   ,    e Zd ZdZdeeef   fdZd Zy):ApplicationInstance.CreateShortCodeApplicationRequestSetup&
        :ivar charges_apply:
        r   c                 0    |j                  d      | _        y Ncharges_applyr   rE   r   s     r    r!   zCApplicationInstance.CreateShortCodeApplicationRequestSetup.__init__N       18_1MDr#   c                     d| j                   iS rD   rE   r(   s    r    r'   zBApplicationInstance.CreateShortCodeApplicationRequestSetup.to_dictR       !3!3 r#   Nr*   r0   r#   r    &CreateShortCodeApplicationRequestSetuprA   I   "    		NDcN 	N	r#   rK   versionr   sidc                 h   t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        d|xs | j                  i| _	        d | _
        y )NrN   
bundle_sidapplication_requirements_sidr   r   state)superr!   r   rN   rP   rQ   r   r   rR   	_solution_context)r   rM   r   rN   	__class__s       r    r!   zApplicationInstance.__init__`   s     	!")++e"4)0\)B;B;;*<
) -4KK,H*1++m*D$+KK$8
 3?$((
 7;r#   returnc                     | j                   )t        | j                  | 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
        rN   rN   )rU   ApplicationContext_versionrT   r(   s    r    _proxyzApplicationInstance._proxys   s9     == .NN5)DM }}r#   c                 6    | j                   j                         S )c
        Fetch the ApplicationInstance


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


        :returns: The fetched ApplicationInstance
        N)r\   fetch_asyncr(   s    r    rb   zApplicationInstance.fetch_async   s!      [[,,....s   '%'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      r    	<genexpr>z/ApplicationInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z*<Twilio.Numbers.V2.ApplicationInstance {}>joinrT   itemsri   r   contexts     r    __repr__zApplicationInstance.__repr__   s6     ((SDNN<P<P<RSS;BB7KKr#   )N)rW   rZ   )rW   r   )r+   r,   r-   objectr1   r>   rK   r   r   r/   r   r   r!   propertyr\   r_   rb   rv   __classcell__rV   s   @r    r   r      s    F >v    OS;;)-c3h;>Fsm;&  #/L# Lr#   r   c                        e Zd Z G d de      Z G d de      Z G d de      Zdedef fd	Z	d
e
fdZd
e
fdZd
efdZ xZS )rZ   c                   ,    e Zd ZdZdeeef   fdZd Zy)4ApplicationContext.CreateShortCodeApplicationRequestr   r   c                     |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        y r   r   r   s     r    r!   z=ApplicationContext.CreateShortCodeApplicationRequest.__init__   r"   r#   c                     | j                   | j                  | j                  | j                  j                         nd | j                  | j                  j                         dS d dS r%   r&   r(   s    r    r'   z<ApplicationContext.CreateShortCodeApplicationRequest.to_dict   r)   r#   Nr*   r0   r#   r    r1   r}      r2   r#   r1   c                   ,    e Zd ZdZdeeef   fdZd Zy)GApplicationContext.CreateShortCodeApplicationRequestBusinessInformationr5   r   c                 0    |j                  d      | _        y r7   r9   r   s     r    r!   zPApplicationContext.CreateShortCodeApplicationRequestBusinessInformation.__init__   r:   r#   c                     d| j                   iS r7   r<   r(   s    r    r'   zOApplicationContext.CreateShortCodeApplicationRequestBusinessInformation.to_dict   r=   r#   Nr*   r0   r#   r    r>   r      r?   r#   r>   c                   ,    e Zd ZdZdeeef   fdZd Zy)9ApplicationContext.CreateShortCodeApplicationRequestSetuprB   r   c                 0    |j                  d      | _        y rD   rF   r   s     r    r!   zBApplicationContext.CreateShortCodeApplicationRequestSetup.__init__   rG   r#   c                     d| j                   iS rD   rI   r(   s    r    r'   zAApplicationContext.CreateShortCodeApplicationRequestSetup.to_dict   rJ   r#   Nr*   r0   r#   r    rK   r      rL   r#   rK   rM   rN   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the ApplicationContext

        :param version: Version that contains the resource
        :param sid: The unique string that identifies the Short Code Application resource.
        rN   z/ShortCodes/Applications/{sid}Nr0   )rS   r!   rT   ri   _uri)r   rM   rN   rV   s      r    r!   zApplicationContext.__init__   s@     	! 3
 <4;;MdnnM	r#   rW   c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      }t        | j                  || j                  d         S )r^   application/jsonAcceptGETmethoduriheadersrN   rY   )r
   ofr[   r_   r   r   rT   r   r   r   s      r    r_   zApplicationContext.fetch   s]     ))B-.--%%U		7%S"MMu%
 	
r#   c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   }t        | j                  || j                  d         S 7 )w)ra   r   r   r   r   NrN   rY   )r
   r   r[   rb   r   r   rT   r   s      r    rb   zApplicationContext.fetch_async   sr      ))B-.11dii 2 
 
 #MMu%
 	
	
s   AA4A2	*A4c                     dj                  d | j                  j                         D              }dj                  |      S )rd   re   c              3   F   K   | ]  \  }}d j                  ||        ywrg   rh   rj   s      r    rn   z.ApplicationContext.__repr__.<locals>.<genexpr>  ro   rp   z)<Twilio.Numbers.V2.ApplicationContext {}>rq   rt   s     r    rv   zApplicationContext.__repr__  s6     ((SDNN<P<P<RSS:AA'JJr#   )r+   r,   r-   rw   r1   r>   rK   r   r/   r!   r   r_   rb   rv   ry   rz   s   @r    rZ   rZ      se    F >v   N Nc N
* 
(
#6 
,K# Kr#   rZ   c                   2    e Zd Zdeeef   defdZdefdZy)ApplicationPager   rW   c                 .    t        | j                  |      S )zq
        Build an instance of ApplicationInstance

        :param payload: Payload response from the API
        )r   r[   r   s     r    get_instancezApplicationPage.get_instance"  s     #4=='::r#   c                      y)rd   z#<Twilio.Numbers.V2.ApplicationPage>r0   r(   s    r    rv   zApplicationPage.__repr__*       5r#   N)	r+   r,   r-   r   r/   r   r   r   rv   r0   r#   r    r   r      s*    ;DcN ;7J ;5# 5r#   r   c            	       v    e Zd Z G d de      Z G d de      Z G d de      Zdef fdZd	ed
e	fdZ
d	ed
e	fdZ	 	 ddee   dee   d
ee	   fdZ	 	 ddee   dee   d
ee	   fdZ	 	 ddee   dee   d
ee	   fdZ	 	 ddee   dee   d
ee	   fdZej,                  ej,                  ej,                  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,                  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dZded
efdZ d
efdZ! xZ"S )ApplicationListc                   ,    e Zd ZdZdeeef   fdZd Zy)1ApplicationList.CreateShortCodeApplicationRequestr   r   c                     |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        y r   r   r   s     r    r!   z:ApplicationList.CreateShortCodeApplicationRequest.__init__=  r"   r#   c                     | j                   | j                  | j                  | j                  j                         nd | j                  | j                  j                         dS d dS r%   r&   r(   s    r    r'   z9ApplicationList.CreateShortCodeApplicationRequest.to_dictH  r)   r#   Nr*   r0   r#   r    r1   r   5  r2   r#   r1   c                   ,    e Zd ZdZdeeef   fdZd Zy)DApplicationList.CreateShortCodeApplicationRequestBusinessInformationr5   r   c                 0    |j                  d      | _        y r7   r9   r   s     r    r!   zMApplicationList.CreateShortCodeApplicationRequestBusinessInformation.__init__Y  r:   r#   c                     d| j                   iS r7   r<   r(   s    r    r'   zLApplicationList.CreateShortCodeApplicationRequestBusinessInformation.to_dict_  r=   r#   Nr*   r0   r#   r    r>   r   T  r?   r#   r>   c                   ,    e Zd ZdZdeeef   fdZd Zy)6ApplicationList.CreateShortCodeApplicationRequestSetuprB   r   c                 0    |j                  d      | _        y rD   rF   r   s     r    r!   z?ApplicationList.CreateShortCodeApplicationRequestSetup.__init__i  rG   r#   c                     d| j                   iS rD   rI   r(   s    r    r'   z>ApplicationList.CreateShortCodeApplicationRequestSetup.to_dictm  rJ   r#   Nr*   r0   r#   r    rK   r   d  rL   r#   rK   rM   c                 2    t         |   |       d| _        y)zm
        Initialize the ApplicationList

        :param version: Version that contains the resource

        z/ShortCodes/ApplicationsN)rS   r!   r   )r   rM   rV   s     r    r!   zApplicationList.__init__r  s     	!.	r#   %create_short_code_application_requestrW   c                     |j                         }t        j                  ddi      }d|d<   d|d<   | j                  j	                  d| j
                  ||      }t        | j                  |      S )z
        Create the ApplicationInstance

        :param create_short_code_application_request:

        :returns: The created ApplicationInstance
        Content-Type!application/x-www-form-urlencodedr   r   POSTr   r   datar   )r'   r
   r   r[   creater   r   r   r   r   r   r   s        r    r   zApplicationList.create}  ss     5<<>))^-PQR"4.--&&tyytW ' 
 #4=='::r#   c                    K   |j                         }t        j                  ddi      }d|d<   d|d<   | j                  j	                  d| j
                  ||       d{   }t        | j                  |      S 7 w)z
        Asynchronously create the ApplicationInstance

        :param create_short_code_application_request:

        :returns: The created ApplicationInstance
        r   r   r   r   r   r   N)r'   r
   r   r[   create_asyncr   r   r   s        r    r   zApplicationList.create_async  s      5<<>))^-PQR"4.22tyytW 3 
 
 #4=='::	
s   AA= A;!A=limit	page_sizec                     | j                   j                  ||      }| j                  |d         }| j                   j                  ||d         S )aa  
        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 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[   read_limitspagestreamr   r   r   limitsr   s        r    r   zApplicationList.stream  sJ    ( **5)<yy6+#6y7}}##D&/::r#   c                    K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  ||d         S 7 #w)ap  
        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 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        r    r   zApplicationList.stream_async  sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$A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 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   )listr   )r   r   r   s      r    r   zApplicationList.list  s(    & KK#  
 	
r#   c                 z   K   | j                  ||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)a  
        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 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   )r   r   r   records       r    
list_asynczApplicationList.list_async  sT     * '+&7&7# '8 ' !
 
 !
 
 	
 
s0   ;.;620
26;26;
page_tokenpage_numberc                     t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      }t        | j                  |      S )a{  
        Retrieve a single page of ApplicationInstance records from the API.
        Request is executed immediately

        :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
        	PageTokenr   PageSizer   r   r   r   r   r   r   paramsr   )r
   r   r[   r   r   r   r   r   r   r   r   r   responses          r    r   zApplicationList.page  sy      yy'#%
 ))^-PQR.==%%diig & 
 t}}h77r#   c                   K   t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  |      S 7 w)	a  
        Asynchronously retrieve a single page of ApplicationInstance records from the API.
        Request is executed immediately

        :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   r   s          r    r   zApplicationList.page_async5  s       yy'#%
 ))^-PQR.11diig 2 
 
 t}}h77
s   A"B$A?%B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | 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   r   r   r   s      r    get_pagezApplicationList.get_pageV  s7     ==''..66ujIt}}h77r#   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | 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   r   s      r    get_page_asynczApplicationList.get_page_asyncb  sD      --44BB5*UUt}}h77 Vs   4AAArN   c                 0    t        | j                  |      S z
        Constructs a ApplicationContext

        :param sid: The unique string that identifies the Short Code Application resource.
        rY   rZ   r[   r   rN   s     r    r   zApplicationList.getn       "$--S99r#   c                 0    t        | j                  |      S r   r   r   s     r    __call__zApplicationList.__call__v  r   r#   c                      y)rd   z#<Twilio.Numbers.V2.ApplicationList>r0   r(   s    r    rv   zApplicationList.__repr__~  r   r#   )NN)#r+   r,   r-   rw   r1   r>   rK   r   r!   r   r   r   r   intr   r   r	   r   r   r   r   r
   unsetr   r/   r   r   r   r   r   rZ   r   r   rv   ry   rz   s   @r    r   r   3  sS   F >v   	/ 	/;5V;	;0;5V;	;4  $#';}; C=; 
%	&	;6  $#'A}A C=A 
*	+	A6  $#'
}
 C=
 
!	"	
8  $#'
}
 C=
 
!	"	
: *0*0,,(.	8#v+&8 3;'8 f%	8
 
8F *0*0,,(.	8#v+&8 3;'8 f%	8
 
8B
83 
8? 
8
8s 
8 
8:s :1 ::C :$6 :5# 5r#   r   N)r.   typingr   r   r   r   r   r   r	   twilio.baser
   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   rZ   r   r   r0   r#   r    <module>r      se    M L L  8 : 2 ' !CL* CLLK KD5d 5&Q5l Q5r#   