
    pi=K                         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 - Messaging
    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fdZ xZS )AlphaSenderInstancea  
    :ivar sid: The unique string that we created to identify the AlphaSender resource.
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the AlphaSender resource.
    :ivar service_sid: The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) the resource is associated with.
    :ivar date_created: The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
    :ivar date_updated: The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
    :ivar alpha_sender: The Alphanumeric Sender ID string.
    :ivar capabilities: An array of values that describe whether the number can receive calls or messages. Can be: `SMS`.
    :ivar url: The absolute URL of the AlphaSender resource.
    versionpayloadservice_sidsidc                    t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _        t        j                  |j                  d            | _	        |j                  d      | _
        |j                  d      | _        |j                  d      | _        ||xs | j                  d	| _        d | _        y )
Nr   account_sidr   date_createddate_updatedalpha_sendercapabilitiesurlr   r   )super__init__getr   r   r   r   iso8601_datetimer   r   r   r   r   	_solution_context)selfr   r   r   r   	__class__s        o/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/messaging/v1/service/alpha_sender.pyr!   zAlphaSenderInstance.__init__%   s     	!")++e"4*1++m*D*1++m*D0;0L0LKK'1
 1<0L0LKK'1
 ,3;;~+F18^1L")++e"4 '?$((
 7;    returnc                     | j                   7t        | j                  | j                  d   | j                  d         | _         | j                   S )z
        Generate an instance context for the instance, the context is capable of
        performing various actions. All instance actions are proxied to the context

        :returns: AlphaSenderContext for this AlphaSenderInstance
        r   r   r   )r%   AlphaSenderContext_versionr$   r&   s    r(   _proxyzAlphaSenderInstance._proxyA   sE     == . NN=9NN5)DM
 }}r)   c                 6    | j                   j                         S )n
        Deletes the AlphaSenderInstance


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


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


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


        :returns: The fetched AlphaSenderInstance
        N)r/   fetch_asyncr.   s    r(   r<   zAlphaSenderInstance.fetch_asyncl   s!      [[,,....r6   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/AlphaSenderInstance.__repr__.<locals>.<genexpr>{        SDAq7>>!Q/S   !z,<Twilio.Messaging.V1.AlphaSenderInstance {}>joinr$   itemsrC   r&   contexts     r(   __repr__zAlphaSenderInstance.__repr__u   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/   boolr2   r5   r9   r<   rP   __classcell__r'   s   @r(   r   r      s    	  ";; c3h; 	;
 c];8  $ $0D 0#/N# Nr)   r   c                   h     e Zd Zdededef fdZdefdZdefdZde	fdZ
de	fd	Zdefd
Z xZS )r,   r   r   r   c                 z    t         |   |       ||d| _         dj                  di | j                  | _        y)a:  
        Initialize the AlphaSenderContext

        :param version: Version that contains the resource
        :param service_sid: The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the resource from.
        :param sid: The SID of the AlphaSender resource to fetch.
        r   z*/Services/{service_sid}/AlphaSenders/{sid}N r    r!   r$   rC   _uri)r&   r   r   r   r'   s       r(   r!   zAlphaSenderContext.__init__   sG     	! '
 H@GG 
nn
	r)   r*   c                 |    t        j                  i       }| j                  j                  d| j                  |      S )r1   DELETEmethoduriheaders)r   ofr-   r2   r^   r&   rd   s     r(   r2   zAlphaSenderContext.delete   s1     ))B-}}##8G#TTr)   c                    K   t        j                  i       }| j                  j                  d| j                  |       d{   S 7 w)r4   r`   ra   N)r   re   r-   r5   r^   rf   s     r(   r5   zAlphaSenderContext.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 )r8   application/jsonAcceptGETra   r   r   r   )r   re   r-   r9   r^   r   r$   r&   rd   r   s      r(   r9   zAlphaSenderContext.fetch   si     ))B-.--%%U		7%S"MM}5u%	
 	
r)   c                   K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   }t        | j                  || j                  d   | j                  d         S 7 7w)	r;   ri   rj   rk   ra   Nr   r   r   )r   re   r-   r<   r^   r   r$   rl   s      r(   r<   zAlphaSenderContext.fetch_async   s~      ))B-.11dii 2 
 
 #MM}5u%	
 	
	
s   ABB 	8Bc                     dj                  d | j                  j                         D              }dj                  |      S )r>   r?   c              3   F   K   | ]  \  }}d j                  ||        ywrA   rB   rD   s      r(   rH   z.AlphaSenderContext.__repr__.<locals>.<genexpr>   rI   rJ   z+<Twilio.Messaging.V1.AlphaSenderContext {}>rK   rN   s     r(   rP   zAlphaSenderContext.__repr__   s6     ((SDNN<P<P<RSS<CCGLLr)   )rQ   rR   rS   r   rU   r!   rW   r2   r5   r   r9   r<   rP   rX   rY   s   @r(   r,   r,      s_    
 
c 
 
&
U 
U
D 

* 
*
#6 
.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)AlphaSenderPager   r*   c                 L    t        | j                  || j                  d         S )zq
        Build an instance of AlphaSenderInstance

        :param payload: Payload response from the API
        r   r   )r   r-   r$   )r&   r   s     r(   get_instancezAlphaSenderPage.get_instance   s%     #MM7}0M
 	
r)   c                      y)r>   z%<Twilio.Messaging.V1.AlphaSenderPage>r\   r.   s    r(   rP   zAlphaSenderPage.__repr__        7r)   N)	rQ   rR   rS   r   rU   r   r   rt   rP   r\   r)   r(   rq   rq      s*    
DcN 
7J 
7# 7r)   rq   c            	       8    e Zd Zde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 )AlphaSenderListr   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the AlphaSenderList

        :param version: Version that contains the resource
        :param service_sid: The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the resources from.

        r   z$/Services/{service_sid}/AlphaSendersNr\   r]   )r&   r   r   r'   s      r(   r!   zAlphaSenderList.__init__   sA     	! ;
 B:AASDNNS	r)   r   r*   c                    t        j                  d|i      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                  d   	      S )
aP  
        Create the AlphaSenderInstance

        :param alpha_sender: The Alphanumeric Sender ID string. Can be up to 11 characters long. Valid characters are A-Z, a-z, 0-9, space, hyphen `-`, plus `+`, underscore `_` and ampersand `&`. This value cannot contain only numbers.

        :returns: The created AlphaSenderInstance
        AlphaSenderContent-Type!application/x-www-form-urlencodedri   rj   POSTrb   rc   datard   r   rs   )r   re   r-   creater^   r   r$   r&   r   r   rd   r   s        r(   r   zAlphaSenderList.create  s     yy|

 ))^-PQR"E.--&&tyytW ' 
 #MM7}0M
 	
r)   c                 *  K   t        j                  d|i      }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 AlphaSenderInstance

        :param alpha_sender: The Alphanumeric Sender ID string. Can be up to 11 characters long. Valid characters are A-Z, a-z, 0-9, space, hyphen `-`, plus `+`, underscore `_` and ampersand `&`. This value cannot contain only numbers.

        :returns: The created AlphaSenderInstance
        r{   r|   r}   ri   rj   r~   r   Nr   rs   )r   re   r-   create_asyncr^   r   r$   r   s        r(   r   zAlphaSenderList.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 )aa  
        Streams AlphaSenderInstance 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AlphaSenderList.streamC  sJ    ( **5)<yy6+#6y7}}##D&/::r)   c                    K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  ||d         S 7 #w)ap  
        Asynchronously streams AlphaSenderInstance 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AlphaSenderList.stream_async\  sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                 :    t        | j                  ||            S )a  
        Lists AlphaSenderInstance 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AlphaSenderList.listu  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 AlphaSenderInstance 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AlphaSenderList.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 AlphaSenderInstance 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 AlphaSenderInstance
        	PageTokenr   PageSizer|   r}   ri   rj   rk   rb   rc   paramsrd   )r   re   r-   r   r^   rq   r$   r&   r   r   r   r   rd   responses          r(   r   zAlphaSenderList.page  s      yy'#%
 ))^-PQR.==%%diig & 
 t}}hGGr)   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 AlphaSenderInstance 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 AlphaSenderInstance
        r   r|   r}   ri   rj   rk   r   N)r   re   r-   r   r^   rq   r$   r   s          r(   r   zAlphaSenderList.page_async  s       yy'#%
 ))^-PQR.11diig 2 
 
 t}}hGG
s   A"B$B
%&B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   || j
                        S )z
        Retrieve a specific page of AlphaSenderInstance records from the API.
        Request is executed immediately

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

        :returns: Page of AlphaSenderInstance
        rk   )r-   domaintwiliorequestrq   r$   r&   r   r   s      r(   get_pagezAlphaSenderList.get_page  s=     ==''..66ujIt}}hGGr)   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   || j
                        S 7 %w)a
  
        Asynchronously retrieve a specific page of AlphaSenderInstance records from the API.
        Request is executed immediately

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

        :returns: Page of AlphaSenderInstance
        rk   N)r-   r   r   request_asyncrq   r$   r   s      r(   get_page_asynczAlphaSenderList.get_page_async  sJ      --44BB5*UUt}}hGG Vs   4AA&Ar   c                 L    t        | j                  | j                  d   |      S zt
        Constructs a AlphaSenderContext

        :param sid: The SID of the AlphaSender resource to fetch.
        r   r   r,   r-   r$   r&   r   s     r(   r"   zAlphaSenderList.get  %     "MMt~~m'D#
 	
r)   c                 L    t        | j                  | j                  d   |      S r   r   r   s     r(   __call__zAlphaSenderList.__call__  r   r)   c                      y)r>   z%<Twilio.Messaging.V1.AlphaSenderList>r\   r.   s    r(   rP   zAlphaSenderList.__repr__  rv   r)   )NN) rQ   rR   rS   r   rU   r!   r   r   r   r   intr	   r   r
   r   r   r   r   r   unsetr   objectrq   r   r   r   r   r,   r"   r   rP   rX   rY   s   @r(   rx   rx      sG   T Tc T 
3 
+> 
8
s 
7J 
<  $#';}; C=; 
%	&	;6  $#'A}A C=A 
*	+	A6  $#'
}
 C=
 
!	"	
8  $#'
}
 C=
 
!	"	
: *0*0,,(.	H#v+&H 3;'H f%	H
 
HF *0*0,,(.	H#v+&H 3;'H f%	H
 
HB
H3 
H? 
H
Hs 
H 
H
s 
1 

C 
$6 
7# 7r)   rx   N)rT   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,   rq   rx   r\   r)   r(   <module>r      sg     L L L + 8 : 2 ' !cN* cNLbM bMJ7d 7*e7l e7r)   