
    piP                         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 - Voice
    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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 )SourceIpMappingInstancea  
    :ivar sid: The unique string that we created to identify the IP Record resource.
    :ivar ip_record_sid: The Twilio-provided string that uniquely identifies the IP Record resource to map from.
    :ivar sip_domain_sid: The SID of the SIP Domain that the IP Record is mapped to.
    :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 url: The absolute URL of the resource.
    versionpayloadsidc                    t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _        t        j                  |j                  d            | _	        |j                  d      | _
        d|xs | j                  i| _        d | _        y )Nr   ip_record_sidsip_domain_siddate_createddate_updatedurl)super__init__getr   r   r   r   iso8601_datetimer   r   r   	_solution_context)selfr   r   r   	__class__s       h/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/voice/v1/source_ip_mapping.pyr   z SourceIpMappingInstance.__init__#   s     	!")++e"4,3KK,H-4[[9I-J0;0L0LKK'1
 1<0L0LKK'1
 #*++e"4 3?$((
 ;?    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: SourceIpMappingContext for this SourceIpMappingInstance
        r   r   )r"   SourceIpMappingContext_versionr!   r#   s    r%   _proxyzSourceIpMappingInstance._proxy8   s9     == 2NN5)DM }}r&   c                 6    | j                   j                         S )r
        Deletes the SourceIpMappingInstance


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


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


        :returns: The fetched SourceIpMappingInstance
        )r-   fetchr,   s    r%   r7   zSourceIpMappingInstance.fetchY   s     {{  ""r&   c                 R   K   | j                   j                          d{   S 7 w)
        Asynchronous coroutine to fetch the SourceIpMappingInstance


        :returns: The fetched SourceIpMappingInstance
        N)r-   fetch_asyncr,   s    r%   r:   z#SourceIpMappingInstance.fetch_asyncb   s!      [[,,....r4   r   c                 :    | j                   j                  |      S )
        Update the SourceIpMappingInstance

        :param sip_domain_sid: The SID of the SIP Domain that the IP Record should be mapped to.

        :returns: The updated SourceIpMappingInstance
        r   )r-   updater#   r   s     r%   r>   zSourceIpMappingInstance.updatek   s#     {{!!) " 
 	
r&   c                 V   K   | j                   j                  |       d{   S 7 w)
        Asynchronous coroutine to update the SourceIpMappingInstance

        :param sip_domain_sid: The SID of the SIP Domain that the IP Record should be mapped to.

        :returns: The updated SourceIpMappingInstance
        r=   N)r-   update_asyncr?   s     r%   rB   z$SourceIpMappingInstance.update_asyncw   s1      [[--) . 
 
 	
 
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>z3SourceIpMappingInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z,<Twilio.Voice.V1.SourceIpMappingInstance {}>joinr!   itemsrI   r#   contexts     r%   __repr__z SourceIpMappingInstance.__repr__   s6     ((SDNN<P<P<RSS=DDWMMr&   )N)r'   r*   )r'   r   )__name__
__module____qualname____doc__r   r   strr   r   r   propertyr-   boolr0   r3   r7   r:   r>   rB   rV   __classcell__r$   s   @r%   r   r      s     OS??)-c3h?>Fsm?*  $ $0D 0#/

S 

-F 



 

9R 

N# Nr&   r   c                        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
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   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the SourceIpMappingContext

        :param version: Version that contains the resource
        :param sid: The Twilio-provided string that uniquely identifies the IP Record resource to update.
        r   z/SourceIpMappings/{sid}N )r   r   r!   rI   _uri)r#   r   r   r$   s      r%   r   zSourceIpMappingContext.__init__   s@     	! 3
 5-44Ft~~F	r&   r'   c                 |    t        j                  i       }| j                  j                  d| j                  |      S )r/   DELETEmethoduriheaders)r   ofr+   r0   rc   r#   ri   s     r%   r0   zSourceIpMappingContext.delete   s1     ))B-}}##8G#TTr&   c                    K   t        j                  i       }| j                  j                  d| j                  |       d{   S 7 w)r2   re   rf   N)r   rj   r+   r3   rc   rk   s     r%   r3   z#SourceIpMappingContext.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         S )r6   application/jsonAcceptGETrf   r   r)   )r   rj   r+   r7   rc   r   r!   r#   ri   r   s      r%   r7   zSourceIpMappingContext.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)r9   rn   ro   rp   rf   Nr   r)   )r   rj   r+   r:   rc   r   r!   rq   s      r%   r:   z"SourceIpMappingContext.fetch_async   sr      ))B-.11dii 2 
 
 'MMu%
 	
	
s   AA4A2	*A4r   c                 
   t        j                  d|i      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                  d   	      S )
r<   SipDomainSid!application/x-www-form-urlencodedContent-Typern   ro   POSTrg   rh   datari   r   r)   )r   rj   r+   r>   rc   r   r!   r#   r   ry   ri   r   s        r%   r>   zSourceIpMappingContext.update   s     yy

 ))B-"E.--&&tyytW ' 
 'MM7u(=
 	
r&   c                 &  K   t        j                  d|i      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                  d	   
      S 7 )w)rA   rt   ru   rv   rn   ro   rw   rx   Nr   r)   )r   rj   r+   rB   rc   r   r!   rz   s        r%   rB   z#SourceIpMappingContext.update_async   s      yy

 ))B-"E.22tyytW 3 
 
 'MM7u(=
 	
	
s   A#B%B&*B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   z2SourceIpMappingContext.__repr__.<locals>.<genexpr>   rO   rP   z+<Twilio.Voice.V1.SourceIpMappingContext {}>rQ   rT   s     r%   rV   zSourceIpMappingContext.__repr__  s6     ((SDNN<P<P<RSS<CCGLLr&   )rW   rX   rY   r   r[   r   r]   r0   r3   r   r7   r:   r>   rB   rV   r^   r_   s   @r%   r*   r*      s    G Gc G
U 
U
D 

. 
(
#: 
,
S 
-D 
8
 
9P 
8M# Mr&   r*   c                   2    e Zd Zdeeef   defdZdefdZy)SourceIpMappingPager   r'   c                 .    t        | j                  |      S )zu
        Build an instance of SourceIpMappingInstance

        :param payload: Payload response from the API
        )r   r+   )r#   r   s     r%   get_instancez SourceIpMappingPage.get_instance&  s     't}}g>>r&   c                      y)rD   z%<Twilio.Voice.V1.SourceIpMappingPage>rb   r,   s    r%   rV   zSourceIpMappingPage.__repr__.       7r&   N)	rW   rX   rY   r   r[   r   r   r   rV   rb   r&   r%   r   r   $  s*    ?DcN ?7N ?7# 7r&   r   c            	       <    e Zd Z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 )SourceIpMappingListr   c                 2    t         |   |       d| _        y)zq
        Initialize the SourceIpMappingList

        :param version: Version that contains the resource

        z/SourceIpMappingsN)r   r   rc   )r#   r   r$   s     r%   r   zSourceIpMappingList.__init__9  s     	!'	r&   r   r   r'   c                     t        j                  ||d      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||      }t        | j                  |      S )aC  
        Create the SourceIpMappingInstance

        :param ip_record_sid: The Twilio-provided string that uniquely identifies the IP Record resource to map from.
        :param sip_domain_sid: The SID of the SIP Domain that the IP Record should be mapped to.

        :returns: The created SourceIpMappingInstance
        IpRecordSidrt   rv   ru   rn   ro   rw   rx   )r   rj   r+   createrc   r   r#   r   r   ry   ri   r   s         r%   r   zSourceIpMappingList.createD  s     yy, .
 ))^-PQR"E.--&&tyytW ' 
 't}}g>>r&   c                   K   t        j                  ||d      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  |      S 7 w)	aR  
        Asynchronously create the SourceIpMappingInstance

        :param ip_record_sid: The Twilio-provided string that uniquely identifies the IP Record resource to map from.
        :param sip_domain_sid: The SID of the SIP Domain that the IP Record should be mapped to.

        :returns: The created SourceIpMappingInstance
        r   rv   ru   rn   ro   rw   rx   N)r   rj   r+   create_asyncrc   r   r   s         r%   r   z SourceIpMappingList.create_asyncb  s      yy, .
 ))^-PQR"E.22tyytW 3 
 
 't}}g>>	
s   A&B(B)Blimit	page_sizec                     | j                   j                  ||      }| j                  |d         }| j                   j                  ||d         S )ae  
        Streams SourceIpMappingInstance 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SourceIpMappingList.stream  sJ    ( **5)<yy6+#6y7}}##D&/::r&   c                    K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  ||d         S 7 #w)at  
        Asynchronously streams SourceIpMappingInstance 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 SourceIpMappingList.stream_async  sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                 :    t        | j                  ||            S )a  
        Lists SourceIpMappingInstance 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SourceIpMappingList.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 SourceIpMappingInstance 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SourceIpMappingList.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 SourceIpMappingInstance 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 SourceIpMappingInstance
        	PageTokenr   PageSizerv   ru   rn   ro   rp   rg   rh   paramsri   )r   rj   r+   r   rc   r   r#   r   r   r   ry   ri   responses          r%   r   zSourceIpMappingList.page  sy      yy'#%
 ))^-PQR.==%%diig & 
 #4==(;;r&   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 SourceIpMappingInstance 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 SourceIpMappingInstance
        r   rv   ru   rn   ro   rp   r   N)r   rj   r+   r   rc   r   r   s          r%   r   zSourceIpMappingList.page_async  s       yy'#%
 ))^-PQR.11diig 2 
 
 #4==(;;
s   A"B$A?%B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   |      S )a  
        Retrieve a specific page of SourceIpMappingInstance records from the API.
        Request is executed immediately

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

        :returns: Page of SourceIpMappingInstance
        rp   )r+   domaintwiliorequestr   r#   r   r   s      r%   get_pagezSourceIpMappingList.get_page)  s7     ==''..66ujI"4==(;;r&   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   |      S 7 w)a  
        Asynchronously retrieve a specific page of SourceIpMappingInstance records from the API.
        Request is executed immediately

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

        :returns: Page of SourceIpMappingInstance
        rp   N)r+   r   r   request_asyncr   r   s      r%   get_page_asyncz"SourceIpMappingList.get_page_async5  sD      --44BB5*UU"4==(;; Vs   4AAAr   c                 0    t        | j                  |      S z
        Constructs a SourceIpMappingContext

        :param sid: The Twilio-provided string that uniquely identifies the IP Record resource to update.
        r)   r*   r+   r#   r   s     r%   r   zSourceIpMappingList.getA       &dmm==r&   c                 0    t        | j                  |      S r   r   r   s     r%   __call__zSourceIpMappingList.__call__I  r   r&   c                      y)rD   z%<Twilio.Voice.V1.SourceIpMappingList>rb   r,   s    r%   rV   zSourceIpMappingList.__repr__Q  r   r&   )NN) rW   rX   rY   r   r   r[   r   r   r   r   intr	   r   r
   r   r   r   r   r   unsetr   objectr   r   r   r   r   r*   r   r   rV   r^   r_   s   @r%   r   r   7  sB   	( 	(? ?25?	 ?<? ?25?	 ?@  $#';}; C=; 
)	*	;6  $#'A}A C=A 
.	/	A6  $#'
}
 C=
 
%	&	
8  $#'
}
 C=
 
%	&	
: *0*0,,(.	<#v+&< 3;'< f%	<
 
<F *0*0,,(.	<#v+&< 3;'< f%	<
 
<B
<3 
<+> 
<
<s 
<7J 
<>s >5 >>C >$: >7# 7r&   r   N)rZ   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   rb   r&   r%   <module>r      sg     L L L + 8 : 2 ' !qN. qNhTM_ TMn7$ 7&`7, `7r&   