
    i?1iQ                         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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 - Serverless
    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	serializevalues)InstanceContext)InstanceResource)ListResource)Version)Pagec                        e Zd Z G d de      Z	 	 ddedeeef   dede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 )LogInstancec                       e Zd ZdZdZdZy)LogInstance.LevelinfowarnerrorN)__name__
__module____qualname__INFOWARNERROR     {/home/www/therecruiter.miabetepe.com/venv/lib/python3.12/site-packages/twilio/rest/serverless/v1/service/environment/log.pyLevelr      s    r!   r#   versionpayloadservice_sidenvironment_sidsidc                    t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _	        |j                  d      | _
        |j                  d	      | _        |j                  d
      | _        t        j                  |j                  d            | _        |j                  d      | _        |||xs | j                  d| _        d | _        y )Nr(   account_sidr&   r'   	build_siddeployment_sidfunction_sidrequest_sidlevelmessagedate_createdurlr&   r'   r(   )super__init__getr(   r*   r&   r'   r+   r,   r-   r.   r/   r0   r   iso8601_datetimer1   r2   	_solution_context)selfr$   r%   r&   r'   r(   	__class__s         r"   r5   zLogInstance.__init__/   s    	!")++e"4*1++m*D*1++m*D.5kk:K.L(/K(@-4[[9I-J+2;;~+F*1++m*D4;KK4H
&-kk)&<0;0L0LKK'1
 #*++e"4 '.?$((

 /3r!   returnc                     | j                   Et        | j                  | j                  d   | 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: LogContext for this LogInstance
        r&   r'   r(   r3   )r9   
LogContext_versionr8   r:   s    r"   _proxyzLogInstance._proxyO   sR     == & NN=9 $/@ ANN5)	DM }}r!   c                 6    | j                   j                         S )S
        Fetch the LogInstance


        :returns: The fetched LogInstance
        )rA   fetchr@   s    r"   rD   zLogInstance.fetch`   s     {{  ""r!   c                 R   K   | j                   j                          d{   S 7 w)m
        Asynchronous coroutine to fetch the LogInstance


        :returns: The fetched LogInstance
        N)rA   fetch_asyncr@   s    r"   rG   zLogInstance.fetch_asynci   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'LogInstance.__repr__.<locals>.<genexpr>x        SDAq7>>!Q/S   !z%<Twilio.Serverless.V1.LogInstance {}>joinr8   itemsrN   r:   contexts     r"   __repr__zLogInstance.__repr__r   s6     ((SDNN<P<P<RSS6==gFFr!   )N)r<   r>   )r<   r   )r   r   r   objectr#   r   r   strr   r   r5   propertyrA   rD   rG   r[   __classcell__r;   s   @r"   r   r      s     
* "33 c3h3 	3
 3 c]3@   #/G# Gr!   r   c                   T     e Zd Zde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	 xZ
S )
r>   r$   r&   r'   r(   c                 |    t         |   |       |||d| _         dj                  di | j                  | _        y)aO  
        Initialize the LogContext

        :param version: Version that contains the resource
        :param service_sid: The SID of the Service to fetch the Log resource from.
        :param environment_sid: The SID of the environment with the Log resource to fetch.
        :param sid: The SID of the Log resource to fetch.
        r3   zA/Services/{service_sid}/Environments/{environment_sid}/Logs/{sid}Nr    r4   r5   r8   rN   _uri)r:   r$   r&   r'   r(   r;   s        r"   r5   zLogContext.__init__}   sM     	! '.
 WOVV .. 		r!   r<   c                     | j                   j                  d| j                        }t        | j                   || j                  d   | j                  d   | j                  d         S )rC   GETmethodurir&   r'   r(   r3   )r?   rD   rd   r   r8   r:   r%   s     r"   rD   zLogContext.fetch   se     --%%		 & 

 MM}5 NN+<=u%
 	
r!   c                    K   | j                   j                  d| j                         d{   }t        | j                   || j                  d   | j                  d   | j                  d         S 7 Ew)rF   rf   rg   Nr&   r'   r(   r3   )r?   rG   rd   r   r8   rj   s     r"   rG   zLogContext.fetch_async   ss      11		 2 
 

 MM}5 NN+<=u%
 	

s   +A5A3AA5c                     dj                  d | j                  j                         D              }dj                  |      S )rI   rJ   c              3   F   K   | ]  \  }}d j                  ||        ywrL   rM   rO   s      r"   rS   z&LogContext.__repr__.<locals>.<genexpr>   rT   rU   z$<Twilio.Serverless.V1.LogContext {}>rV   rY   s     r"   r[   zLogContext.__repr__   s6     ((SDNN<P<P<RSS5<<WEEr!   )r   r   r   r   r]   r5   r   rD   rG   r[   r_   r`   s   @r"   r>   r>   |   sN    

-0
CF
MP
2
{ 
*
; 
*F# Fr!   r>   c                   2    e Zd Zdeeef   defdZdefdZy)LogPager%   r<   c                 h    t        | j                  || j                  d   | j                  d         S )zi
        Build an instance of LogInstance

        :param payload: Payload response from the API
        r&   r'   r&   r'   )r   r?   r8   rj   s     r"   get_instancezLogPage.get_instance   s4     MM}5 NN+<=	
 	
r!   c                      y)rI   z<Twilio.Serverless.V1.LogPage>r    r@   s    r"   r[   zLogPage.__repr__        0r!   N)	r   r   r   r   r]   r   r   rr   r[   r    r!   r"   ro   ro      s)    
DcN 
{ 
0# 0r!   ro   c                       e Zd Zdededef fdZej                  ej                  ej                  ddfdeee	f   dee
e	f   dee
e	f   d	ee   d
ee   dee   fdZej                  ej                  ej                  ddfdeee	f   dee
e	f   dee
e	f   d	ee   d
ee   dee   fdZej                  ej                  ej                  ddfdeee	f   dee
e	f   dee
e	f   d	ee   d
ee   dee   fdZej                  ej                  ej                  ddfdeee	f   dee
e	f   dee
e	f   d	ee   d
ee   dee   fdZej                  ej                  ej                  ej                  ej                  ej                  fdeee	f   dee
e	f   dee
e	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                  ej                  ej                  ej                  fdeee	f   dee
e	f   dee
e	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 )LogListr$   r&   r'   c                 z    t         |   |       ||d| _         dj                  di | j                  | _        y)a  
        Initialize the LogList

        :param version: Version that contains the resource
        :param service_sid: The SID of the Service to read the Log resource from.
        :param environment_sid: The SID of the environment with the Log resources to read.

        rq   z;/Services/{service_sid}/Environments/{environment_sid}/LogsNr    rc   )r:   r$   r&   r'   r;   s       r"   r5   zLogList.__init__   sJ     	! '.

 QIPP .. 		r!   Nr-   
start_dateend_datelimit	page_sizer<   c                     | j                   j                  ||      }| j                  ||||d         }| j                   j                  ||d         S )a	  
        Streams LogInstance 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 str function_sid: The SID of the function whose invocation produced the Log resources to read.
        :param datetime start_date: The date/time (in GMT, ISO 8601) after which the Log resources must have been created. Defaults to 1 day prior to current date/time.
        :param datetime end_date: The date/time (in GMT, ISO 8601) before which the Log resources must have been created. Defaults to current date/time.
        :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-   rx   ry   r{   rz   )r?   read_limitspagestreamr:   r-   rx   ry   rz   r{   limitsr   s           r"   r   zLogList.stream   s[    4 **5)<yy%![)	  
 }}##D&/::r!   c                    K   | j                   j                  ||      }| j                  ||||d          d{   }| j                   j                  ||d         S 7 #w)a  
        Asynchronously streams LogInstance 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 str function_sid: The SID of the function whose invocation produced the Log resources to read.
        :param datetime start_date: The date/time (in GMT, ISO 8601) after which the Log resources must have been created. Defaults to 1 day prior to current date/time.
        :param datetime end_date: The date/time (in GMT, ISO 8601) before which the Log resources must have been created. Defaults to current date/time.
        :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}   Nrz   )r?   r~   
page_asyncstream_asyncr   s           r"   r   zLogList.stream_async  si     4 **5)<__%![)	 % 
 
 }}))$w@@
s   8A A$A c           	      @    t        | j                  |||||            S )a  
        Lists LogInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str function_sid: The SID of the function whose invocation produced the Log resources to read.
        :param datetime start_date: The date/time (in GMT, ISO 8601) after which the Log resources must have been created. Defaults to 1 day prior to current date/time.
        :param datetime end_date: The date/time (in GMT, ISO 8601) before which the Log resources must have been created. Defaults to current date/time.
        :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-   rx   ry   rz   r{   )listr   )r:   r-   rx   ry   rz   r{   s         r"   r   zLogList.list@  s1    2 KK)%!#  
 	
r!   c                    K   | j                  |||||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)a  
        Asynchronously lists LogInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str function_sid: The SID of the function whose invocation produced the Log resources to read.
        :param datetime start_date: The date/time (in GMT, ISO 8601) after which the Log resources must have been created. Defaults to 1 day prior to current date/time.
        :param datetime end_date: The date/time (in GMT, ISO 8601) before which the Log resources must have been created. Defaults to current date/time.
        :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-   rx   ry   rz   r{   records          r"   
list_asynczLogList.list_asyncc  s]     6 '+&7&7)%!# '8 ' !	
 	
 !	
 	
 		
 	
s0   >1>953
59>59>
page_tokenpage_numberc           	         t        j                  |t        j                  |      t        j                  |      |||d      }| j                  j                  d| j                  |      }t        | j                  || j                        S )a  
        Retrieve a single page of LogInstance records from the API.
        Request is executed immediately

        :param function_sid: The SID of the function whose invocation produced the Log resources to read.
        :param start_date: The date/time (in GMT, ISO 8601) after which the Log resources must have been created. Defaults to 1 day prior to current date/time.
        :param end_date: The date/time (in GMT, ISO 8601) before which the Log resources must have been created. Defaults to current date/time.
        :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 LogInstance
        FunctionSid	StartDateEndDate	PageTokenr   PageSizerf   rh   ri   params)	r   ofr   r7   r?   r   rd   ro   r8   	r:   r-   rx   ry   r   r   r{   dataresponses	            r"   r   zLogList.page  sw    , yy+&77
C$55h?'#%	
 ==%%U		$%Ot}}h??r!   c           	      4  K   t        j                  |t        j                  |      t        j                  |      |||d      }| j                  j                  d| j                  |       d{   }t        | j                  || j                        S 7 %w)a  
        Asynchronously retrieve a single page of LogInstance records from the API.
        Request is executed immediately

        :param function_sid: The SID of the function whose invocation produced the Log resources to read.
        :param start_date: The date/time (in GMT, ISO 8601) after which the Log resources must have been created. Defaults to 1 day prior to current date/time.
        :param end_date: The date/time (in GMT, ISO 8601) before which the Log resources must have been created. Defaults to current date/time.
        :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 LogInstance
        r   rf   r   N)	r   r   r   r7   r?   r   rd   ro   r8   r   s	            r"   r   zLogList.page_async  s     , yy+&77
C$55h?'#%	
 11dii 2 
 
 t}}h??
s   A.B0B1&B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   || j
                        S )z
        Retrieve a specific page of LogInstance records from the API.
        Request is executed immediately

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

        :returns: Page of LogInstance
        rf   )r?   domaintwiliorequestro   r8   r:   r   r   s      r"   get_pagezLogList.get_page  s=     ==''..66ujIt}}h??r!   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   || j
                        S 7 %w)z
        Asynchronously retrieve a specific page of LogInstance records from the API.
        Request is executed immediately

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

        :returns: Page of LogInstance
        rf   N)r?   r   r   request_asyncro   r8   r   s      r"   get_page_asynczLogList.get_page_async  sJ      --44BB5*UUt}}h?? Vs   4AA&Ar(   c                 h    t        | j                  | j                  d   | j                  d   |      S zd
        Constructs a LogContext

        :param sid: The SID of the Log resource to fetch.
        r&   r'   r3   r>   r?   r8   r:   r(   s     r"   r6   zLogList.get  4     MM}5 NN+<=	
 	
r!   c                 h    t        | j                  | j                  d   | j                  d   |      S r   r   r   s     r"   __call__zLogList.__call__  r   r!   c                      y)rI   z<Twilio.Serverless.V1.LogList>r    r@   s    r"   r[   zLogList.__repr__  rt   r!   )r   r   r   r   r]   r5   r   unsetr   r\   r   r   intr	   r   r   r
   r   r   r   r   ro   r   r   r   r   r>   r6   r   r[   r_   r`   s   @r"   rv   rv      s
   
 
c 
C 
0 ,2<<.4ll,2LL##'";CK("; (F*+"; &()	";
 }"; C="; 
+	";L ,2<<.4ll,2LL##'"ACK("A (F*+"A &()	"A
 }"A C="A 
{	#"AL ,2<<.4ll,2LL##'!
CK(!
 (F*+!
 &()	!

 }!
 C=!
 
k	!
J ,2<<.4ll,2LL##'"
CK("
 (F*+"
 &()	"

 }"
 C="
 
k	"
L ,2<<.4ll,2LL)/*0,,(."@CK("@ (F*+"@ &()	"@
 #v+&"@ 3;'"@ f%"@ 
"@L ,2<<.4ll,2LL)/*0,,(.$@CK($@ (F*+$@ &()	$@
 #v+&$@ 3;'$@ f%$@ 
$@L
@3 
@7 
@
@s 
@w 
@
s 
z 

C 
J 
0# 0r!   rv   N)__doc__r   typingr   r   r   r   r   r	   r
   twilio.baser   r   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r>   ro   rv   r    r!   r"   <module>r      sj     L L L 6 6 8 : 2 ' !_G" _GDKF KF\0d 0.h0l h0r!   