
    pi_                         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 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 - Verify
    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values)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dZddZdedd fdZdedd fdZdefdZ xZS )MessagingConfigurationInstancea  
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Service resource.
    :ivar service_sid: The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with.
    :ivar country: The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`.
    :ivar messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to be used to send SMS to the country of this configuration.
    :ivar date_created: The date and time in GMT when 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 when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
    :ivar url: The URL of this resource.
    versionpayloadservice_sidcountryc                    t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _	        t        j                  |j                  d            | _
        |j                  d      | _        ||xs | j
                  d| _        d | _        y )	Naccount_sidr   r   messaging_service_siddate_createddate_updatedurlr   r   )super__init__getr   r   r   r   r   iso8601_datetimer   r   r   	_solution_context)selfr   r   r   r   	__class__s        w/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/verify/v2/service/messaging_configuration.pyr    z'MessagingConfigurationInstance.__init__$   s     	!*1++m*D*1++m*D&-kk)&<4;KK@W4X"0;0L0LKK'1
 1<0L0LKK'1
 #*++e"4 '.$,,
 BF    returnc                     | j                   7t        | j                  | j                  d   | j                  d         | _         | j                   S )a  
        Generate an instance context for the instance, the context is capable of
        performing various actions. All instance actions are proxied to the context

        :returns: MessagingConfigurationContext for this MessagingConfigurationInstance
        r   r   r   )r$   MessagingConfigurationContext_versionr#   r%   s    r'   _proxyz%MessagingConfigurationInstance._proxy?   sE     == 9 NN=9y1DM
 }}r(   c                 6    | j                   j                         S )y
        Deletes the MessagingConfigurationInstance


        :returns: True if delete succeeds, False otherwise
        )r.   deleter-   s    r'   r1   z%MessagingConfigurationInstance.deleteO   s     {{!!##r(   c                 R   K   | j                   j                          d{   S 7 w)
        Asynchronous coroutine that deletes the MessagingConfigurationInstance


        :returns: True if delete succeeds, False otherwise
        N)r.   delete_asyncr-   s    r'   r4   z+MessagingConfigurationInstance.delete_asyncX   s!      [[--////   '%'c                 6    | j                   j                         S )y
        Fetch the MessagingConfigurationInstance


        :returns: The fetched MessagingConfigurationInstance
        )r.   fetchr-   s    r'   r8   z$MessagingConfigurationInstance.fetcha   s     {{  ""r(   c                 R   K   | j                   j                          d{   S 7 w)
        Asynchronous coroutine to fetch the MessagingConfigurationInstance


        :returns: The fetched MessagingConfigurationInstance
        N)r.   fetch_asyncr-   s    r'   r;   z*MessagingConfigurationInstance.fetch_asyncj   s!      [[,,....r5   r   c                 :    | j                   j                  |      S )<  
        Update the MessagingConfigurationInstance

        :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to be used to send SMS to the country of this configuration.

        :returns: The updated MessagingConfigurationInstance
        r   )r.   updater%   r   s     r'   r?   z%MessagingConfigurationInstance.updates   s#     {{!!"7 " 
 	
r(   c                 V   K   | j                   j                  |       d{   S 7 w)V  
        Asynchronous coroutine to update the MessagingConfigurationInstance

        :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to be used to send SMS to the country of this configuration.

        :returns: The updated MessagingConfigurationInstance
        r>   N)r.   update_asyncr@   s     r'   rC   z+MessagingConfigurationInstance.update_async   s1      [[--"7 . 
 
 	
 
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:MessagingConfigurationInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z4<Twilio.Verify.V2.MessagingConfigurationInstance {}>joinr#   itemsrJ   r%   contexts     r'   __repr__z'MessagingConfigurationInstance.__repr__   s6     ((SDNN<P<P<RSSELLWUUr(   )N)r)   r+   )r)   r   )__name__
__module____qualname____doc__r   r   strr   r   r    propertyr.   boolr1   r4   r8   r;   r?   rC   rW   __classcell__r&   s   @r'   r   r      s     "&FF c3hF 	F
 #F6  $ $0D 0#/

C 

4T 


%(
	)
V# Vr(   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de	fdZd
e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)a  
        Initialize the MessagingConfigurationContext

        :param version: Version that contains the resource
        :param service_sid: The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with.
        :param country: The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`.
        r   z9/Services/{service_sid}/MessagingConfigurations/{country}N r   r    r#   rJ   _uri)r%   r   r   r   r&   s       r'   r    z&MessagingConfigurationContext.__init__   sG     	! '
 WOVV 
nn
	r(   r)   c                 |    t        j                  i       }| j                  j                  d| j                  |      S )r0   DELETEmethoduriheaders)r   ofr,   r1   re   r%   rk   s     r'   r1   z$MessagingConfigurationContext.delete   s1     ))B-}}##8G#TTr(   c                    K   t        j                  i       }| j                  j                  d| j                  |       d{   S 7 w)r3   rg   rh   N)r   rl   r,   r4   re   rm   s     r'   r4   z*MessagingConfigurationContext.delete_async   sF      ))B-]]//G 0 
 
 	
 
s   AA
AA
c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      }t        | j                  || j                  d   | j                  d         S )r7   application/jsonAcceptGETrh   r   r   r   )r   rl   r,   r8   re   r   r#   r%   rk   r   s      r'   r8   z#MessagingConfigurationContext.fetch   si     ))B-.--%%U		7%S-MM}5NN9-	
 	
r(   c                   K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   }t        | j                  || j                  d   | j                  d         S 7 7w)	r:   rp   rq   rr   rh   Nr   r   r   )r   rl   r,   r;   re   r   r#   rs   s      r'   r;   z)MessagingConfigurationContext.fetch_async   s~      ))B-.11dii 2 
 
 .MM}5NN9-	
 	
	
s   ABB 	8Br   c                 &   t        j                  d|i      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                  d   | j                  d	   
      S )r=   MessagingServiceSid!application/x-www-form-urlencodedContent-Typerp   rq   POSTri   rj   datark   r   r   r   )r   rl   r,   r?   re   r   r#   r%   r   r{   rk   r   s        r'   r?   z$MessagingConfigurationContext.update   s     yy%'<

 ))B-"E.--&&tyytW ' 
 .MM}5NN9-	
 	
r(   c                 B  K   t        j                  d|i      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                  d	   | j                  d
         S 7 7w)rB   rv   rw   rx   rp   rq   ry   rz   Nr   r   r   )r   rl   r,   rC   re   r   r#   r|   s        r'   rC   z*MessagingConfigurationContext.update_async  s      yy%'<

 ))B-"E.22tyytW 3 
 
 .MM}5NN9-	
 	
	
s   A#B%B&8Bc                     dj                  d | j                  j                         D              }dj                  |      S )rE   rF   c              3   F   K   | ]  \  }}d j                  ||        ywrH   rI   rK   s      r'   rO   z9MessagingConfigurationContext.__repr__.<locals>.<genexpr>8  rP   rQ   z3<Twilio.Verify.V2.MessagingConfigurationContext {}>rR   rU   s     r'   rW   z&MessagingConfigurationContext.__repr__2  s6     ((SDNN<P<P<RSSDKKGTTr(   )rX   rY   rZ   r   r\   r    r^   r1   r4   r   r8   r;   r?   rC   rW   r_   r`   s   @r'   r+   r+      s    
 
c 
C 
&
U 
U
D 

5 
*
#A 
.
C 
4R 
>
%(
	'
BU# Ur(   r+   c                   2    e Zd Zdeeef   defdZdefdZy)MessagingConfigurationPager   r)   c                 L    t        | j                  || j                  d         S )z|
        Build an instance of MessagingConfigurationInstance

        :param payload: Payload response from the API
        r   r   )r   r,   r#   )r%   r   s     r'   get_instancez'MessagingConfigurationPage.get_instance>  s%     .MM7}0M
 	
r(   c                      y)rE   z-<Twilio.Verify.V2.MessagingConfigurationPage>rc   r-   s    r'   rW   z#MessagingConfigurationPage.__repr__H       ?r(   N)	rX   rY   rZ   r   r\   r   r   r   rW   rc   r(   r'   r   r   <  s*    
DcN 
7U 
?# ?r(   r   c            	       @    e Zd Zdedef fdZdededefdZde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 )MessagingConfigurationListr   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)a  
        Initialize the MessagingConfigurationList

        :param version: Version that contains the resource
        :param service_sid: The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with.

        r   z//Services/{service_sid}/MessagingConfigurationsNrc   rd   )r%   r   r   r&   s      r'   r    z#MessagingConfigurationList.__init__S  sF     	! ;
 MELL 
nn
	r(   r   r   r)   c                    t        j                  ||d      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                  d   	      S )
a   
        Create the MessagingConfigurationInstance

        :param country: The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`.
        :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to be used to send SMS to the country of this configuration.

        :returns: The created MessagingConfigurationInstance
        Countryrv   rx   rw   rp   rq   ry   rz   r   r   )r   rl   r,   createre   r   r#   r%   r   r   r{   rk   r   s         r'   r   z!MessagingConfigurationList.createe  s     yy"'<
 ))^-PQR"E.--&&tyytW ' 
 .MM7}0M
 	
r(   c                 ,  K   t        j                  ||d      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                  d	   
      S 7 )w)a/  
        Asynchronously create the MessagingConfigurationInstance

        :param country: The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`.
        :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to be used to send SMS to the country of this configuration.

        :returns: The created MessagingConfigurationInstance
        r   rx   rw   rp   rq   ry   rz   Nr   r   )r   rl   r,   create_asyncre   r   r#   r   s         r'   r   z'MessagingConfigurationList.create_async  s      yy"'<
 ))^-PQR"E.22tyytW 3 
 
 .MM7}0M
 	
	
s   A&B(B)*Blimit	page_sizec                     | j                   j                  ||      }| j                  |d         }| j                   j                  ||d         S )al  
        Streams MessagingConfigurationInstance 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!MessagingConfigurationList.stream  sJ    ( **5)<yy6+#6y7}}##D&/::r(   c                    K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  ||d         S 7 #w)a{  
        Asynchronously streams MessagingConfigurationInstance 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'MessagingConfigurationList.stream_async  sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                 :    t        | j                  ||            S )a	  
        Lists MessagingConfigurationInstance 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MessagingConfigurationList.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 MessagingConfigurationInstance 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%MessagingConfigurationList.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                  || j                        S )a  
        Retrieve a single page of MessagingConfigurationInstance 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 MessagingConfigurationInstance
        	PageTokenr   PageSizerx   rw   rp   rq   rr   ri   rj   paramsrk   )r   rl   r,   r   re   r   r#   r%   r   r   r   r{   rk   responses          r'   r   zMessagingConfigurationList.page  s      yy'#%
 ))^-PQR.==%%diig & 
 *$--4>>RRr(   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 MessagingConfigurationInstance 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 MessagingConfigurationInstance
        r   rx   rw   rp   rq   rr   r   N)r   rl   r,   r   re   r   r#   r   s          r'   r   z%MessagingConfigurationList.page_async-  s       yy'#%
 ))^-PQR.11diig 2 
 
 *$--4>>RR
s   A"B$B
%&B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   || j
                        S )a  
        Retrieve a specific page of MessagingConfigurationInstance records from the API.
        Request is executed immediately

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

        :returns: Page of MessagingConfigurationInstance
        rr   )r,   domaintwiliorequestr   r#   r%   r   r   s      r'   get_pagez#MessagingConfigurationList.get_pageN  s=     ==''..66ujI)$--4>>RRr(   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   || j
                        S 7 %w)a   
        Asynchronously retrieve a specific page of MessagingConfigurationInstance records from the API.
        Request is executed immediately

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

        :returns: Page of MessagingConfigurationInstance
        rr   N)r,   r   r   request_asyncr   r#   r   s      r'   get_page_asyncz)MessagingConfigurationList.get_page_asyncZ  sJ      --44BB5*UU)$--4>>RR Vs   4AA&Ac                 L    t        | j                  | j                  d   |      S a!  
        Constructs a MessagingConfigurationContext

        :param country: The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`.
        r   r   r+   r,   r#   r%   r   s     r'   r!   zMessagingConfigurationList.getf  %     -MMt~~m'Dg
 	
r(   c                 L    t        | j                  | j                  d   |      S r   r   r   s     r'   __call__z#MessagingConfigurationList.__call__p  r   r(   c                      y)rE   z-<Twilio.Verify.V2.MessagingConfigurationList>rc   r-   s    r'   rW   z#MessagingConfigurationList.__repr__z  r   r(   )NN) rX   rY   rZ   r   r\   r    r   r   r   r   intr	   r   r
   r   r   r   r   r   unsetr   objectr   r   r   r   r   r+   r!   r   rW   r_   r`   s   @r'   r   r   Q  sZ   
 
c 
$

36
	'
@

36
	'
D  $#';}; C=; 
0	1	;6  $#'A}A C=A 
5	6	A6  $#'
}
 C=
 
,	-	
8  $#'
}
 C=
 
,	-	
: *0*0,,(.	S#v+&S 3;'S f%	S
 
$SF *0*0,,(.	S#v+&S 3;'S f%	S
 
$SB
S3 
S+E 
S
Ss 
S7Q 
S
3 
#@ 

 
(E 
?# ?r(   r   N)r[   r   typingr   r   r   r   r   r	   r
   twilio.baser   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r+   r   r   rc   r(   r'   <module>r      sg     L L L + 8 : 2 ' !{V%5 {V|bUO bUJ? ?*o? o?r(   