
    pi%:                         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 - Pricing
    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                   r     e Zd Zd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 )CountryInstancea  
    :ivar country: The name of the country.
    :ivar iso_country: The [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
    :ivar outbound_prefix_prices: The list of OutboundPrefixPrice records, which include a list of the `prefixes`, the `friendly_name`, `base_price`, and the   `current_price` for those prefixes.
    :ivar inbound_call_prices: The list of [InboundCallPrice](https://www.twilio.com/docs/voice/pricing#inbound-call-price) records.
    :ivar price_unit: The currency in which prices are measured, specified in [ISO 4127](http://www.iso.org/iso/home/standards/currency_codes.htm) format (e.g. `usd`, `eur`, `jpy`).
    :ivar url: The absolute URL of the resource.
    versionpayloadiso_countryc                 h   t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        d|xs | j                  i| _	        d | _
        y )Ncountryr   outbound_prefix_pricesinbound_call_prices
price_uniturl)super__init__getr   r   r   r   r   r   	_solution_context)selfr   r   r   	__class__s       f/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/pricing/v1/voice/country.pyr   zCountryInstance.__init__"   s     	!&-kk)&<*1++m*D;B;;$<
# 9@!9
  *1\)B")++e"4 ;:$*:*:
 37    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: CountryContext for this CountryInstance
        r   r   )r   CountryContext_versionr   r    s    r"   _proxyzCountryInstance._proxy:   s9     == * NN=9DM }}r#   c                 6    | j                   j                         S )[
        Fetch the CountryInstance


        :returns: The fetched CountryInstance
        )r*   fetchr)   s    r"   r-   zCountryInstance.fetchI   s     {{  ""r#   c                 R   K   | j                   j                          d{   S 7 w)u
        Asynchronous coroutine to fetch the CountryInstance


        :returns: The fetched CountryInstance
        N)r*   fetch_asyncr)   s    r"   r0   zCountryInstance.fetch_asyncR   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+CountryInstance.__repr__.<locals>.<genexpr>a        SDAq7>>!Q/S   !z&<Twilio.Pricing.V1.CountryInstance {}>joinr   itemsr7   r    contexts     r"   __repr__zCountryInstance.__repr__[   s6     ((SDNN<P<P<RSS7>>wGGr#   )N)r$   r'   )r$   r   )__name__
__module____qualname____doc__r   r   strr   r   r   propertyr*   r-   r0   rD   __classcell__r!   s   @r"   r   r      sf     &*	77 c3h7 c]	70  #/H# Hr#   r   c                   L     e Zd 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 )r'   r   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the CountryContext

        :param version: Version that contains the resource
        :param iso_country: The [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the pricing information to fetch.
        r   z/Voice/Countries/{iso_country}N )r   r   r   r7   _uri)r    r   r   r!   s      r"   r   zCountryContext.__init__g   s@     	! ;
 <4;;MdnnM	r#   r$   c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      }t        | j                  || j                  d         S )r,   application/jsonAcceptGETmethoduriheadersr   r&   )r
   ofr(   r-   rP   r   r   r    rX   r   s      r"   r-   zCountryContext.fetchv   s]     ))B-.--%%U		7%SMM}5
 	
r#   c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   }t        | j                  || j                  d         S 7 )w)r/   rR   rS   rT   rU   Nr   r&   )r
   rY   r(   r0   rP   r   r   rZ   s      r"   r0   zCountryContext.fetch_async   sr      ))B-.11dii 2 
 
 MM}5
 	
	
s   AA4A2	*A4c                     dj                  d | j                  j                         D              }dj                  |      S )r2   r3   c              3   F   K   | ]  \  }}d j                  ||        ywr5   r6   r8   s      r"   r<   z*CountryContext.__repr__.<locals>.<genexpr>   r=   r>   z%<Twilio.Pricing.V1.CountryContext {}>r?   rB   s     r"   rD   zCountryContext.__repr__   s6     ((SDNN<P<P<RSS6==gFFr#   )rE   rF   rG   r   rI   r   r   r-   r0   rD   rK   rL   s   @r"   r'   r'   e   s?    N Nc N
 
(
? 
,G# Gr#   r'   c                   2    e Zd Zdeeef   defdZdefdZy)CountryPager   r$   c                 .    t        | j                  |      S )zm
        Build an instance of CountryInstance

        :param payload: Payload response from the API
        )r   r(   )r    r   s     r"   get_instancezCountryPage.get_instance   s     t}}g66r#   c                      y)r2   z<Twilio.Pricing.V1.CountryPage>rO   r)   s    r"   rD   zCountryPage.__repr__        1r#   N)	rE   rF   rG   r   rI   r   r   ra   rD   rO   r#   r"   r_   r_      s)    7DcN 7 71# 1r#   r_   c            	           e Zd Zdef 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 )CountryListr   c                 2    t         |   |       d| _        y)zi
        Initialize the CountryList

        :param version: Version that contains the resource

        z/Voice/CountriesN)r   r   rP   )r    r   r!   s     r"   r   zCountryList.__init__   s     	!&	r#   limit	page_sizer$   c                     | j                   j                  ||      }| j                  |d         }| j                   j                  ||d         S )a]  
        Streams CountryInstance 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
        rh   rh   rg   )r(   read_limitspagestreamr    rg   rh   limitsrl   s        r"   rm   zCountryList.stream   sJ    ( **5)<yy6+#6y7}}##D&/::r#   c                    K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  ||d         S 7 #w)al  
        Asynchronously streams CountryInstance 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
        rh   rj   Nrg   )r(   rk   
page_asyncstream_asyncrn   s        r"   rr   zCountryList.stream_async   sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                 :    t        | j                  ||            S )a  
        Lists CountryInstance 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
        rg   rh   )listrm   )r    rg   rh   s      r"   ru   zCountryList.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 CountryInstance 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
        rt   N)rr   )r    rg   rh   records       r"   
list_asynczCountryList.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 )as  
        Retrieve a single page of CountryInstance 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 CountryInstance
        	PageTokenr   PageSizeContent-Type!application/x-www-form-urlencodedrR   rS   rT   rV   rW   paramsrX   )r
   rY   r(   rl   rP   r_   r    ry   rz   rh   datarX   responses          r"   rl   zCountryList.page1  sy      yy'#%
 ))^-PQR.==%%diig & 
 4==(33r#   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 CountryInstance 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 CountryInstance
        r|   r   r   rR   rS   rT   r   N)r
   rY   r(   rq   rP   r_   r   s          r"   rq   zCountryList.page_asyncR  s       yy'#%
 ))^-PQR.11diig 2 
 
 4==(33
s   A"B$A?%B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   |      S )z
        Retrieve a specific page of CountryInstance records from the API.
        Request is executed immediately

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

        :returns: Page of CountryInstance
        rT   )r(   domaintwiliorequestr_   r    r   r   s      r"   get_pagezCountryList.get_pages  s7     ==''..66ujI4==(33r#   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   |      S 7 w)a  
        Asynchronously retrieve a specific page of CountryInstance records from the API.
        Request is executed immediately

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

        :returns: Page of CountryInstance
        rT   N)r(   r   r   request_asyncr_   r   s      r"   get_page_asynczCountryList.get_page_async  sD      --44BB5*UU4==(33 Vs   4AAAr   c                 0    t        | j                  |      S z
        Constructs a CountryContext

        :param iso_country: The [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the pricing information to fetch.
        r&   r'   r(   r    r   s     r"   r   zCountryList.get       dmmEEr#   c                 0    t        | j                  |      S r   r   r   s     r"   __call__zCountryList.__call__  r   r#   c                      y)r2   z<Twilio.Pricing.V1.CountryList>rO   r)   s    r"   rD   zCountryList.__repr__  rc   r#   )NN)rE   rF   rG   r   r   r   intr   r   rm   r	   rr   r   ru   rx   r
   unsetr   rI   objectr_   rl   rq   r   r   r'   r   r   rD   rK   rL   s   @r"   re   re      s   	' 	'  $#';}; C=; 
/	"	;6  $#'A}A C=A 
	'	A6  $#'
}
 C=
 
o		
8  $#'
}
 C=
 
o		
: *0*0,,(.	4#v+&4 3;'4 f%	4
 
4F *0*0,,(.	4#v+&4 3;'4 f%	4
 
4B
43 
4; 
4
4s 
4{ 
4Fs F~ FFC FN F1# 1r#   re   N)rH   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   r'   r_   re   rO   r#   r"   <module>r      se    M L L  8 : 2 ' !JH& JHZBG_ BGJ1$ 1&d1, d1r#   