
    i?1i`                         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 - Autopilot
    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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d f
dZ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d f
dZdefdZ xZS )WebhookInstancea]  
    :ivar url: The absolute URL of the Webhook resource.
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Webhook resource.
    :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 assistant_sid: The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource.
    :ivar sid: The unique string that we created to identify the Webhook resource.
    :ivar unique_name: An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource.
    :ivar events: The list of space-separated events that this Webhook is subscribed to.
    :ivar webhook_url: The URL associated with this Webhook.
    :ivar webhook_method: The method used when calling the webhook's URL.
    versionpayloadassistant_sidsidc                 f   t         |   |       |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _        t        j                  |j                  d            | _        |j                  d      | _	        |j                  d      | _
        |j                  d      | _        |j                  d      | _        |j                  d	      | _        |j                  d
      | _        ||xs | j                  d| _        d | _        y )Nurlaccount_siddate_createddate_updatedr   r   unique_nameeventswebhook_urlwebhook_methodr   r   )super__init__getr   r   r   iso8601_datetimer   r   r   r   r   r   r   r    	_solution_context)selfr   r   r   r   	__class__s        t/home/www/therecruiter.miabetepe.com/venv/lib/python3.12/site-packages/twilio/rest/autopilot/v1/assistant/webhook.pyr#   zWebhookInstance.__init__)   s     	!")++e"4*1++m*D0;0L0LKK'1
 1<0L0LKK'1
 -4KK,H")++e"4*1++m*D%,[[%:*1++m*D-4[[9I-J +?$((
 37    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: WebhookContext for this WebhookInstance
        r   r   r!   )r'   WebhookContext_versionr&   r(   s    r*   _proxyzWebhookInstance._proxyG   sE     == *"nn_=NN5)DM
 }}r+   c                 6    | j                   j                         S )j
        Deletes the WebhookInstance


        :returns: True if delete succeeds, False otherwise
        )r1   deleter0   s    r*   r4   zWebhookInstance.deleteW   s     {{!!##r+   c                 R   K   | j                   j                          d{   S 7 w)
        Asynchronous coroutine that deletes the WebhookInstance


        :returns: True if delete succeeds, False otherwise
        N)r1   delete_asyncr0   s    r*   r7   zWebhookInstance.delete_async`   s!      [[--////   '%'c                 6    | j                   j                         S )[
        Fetch the WebhookInstance


        :returns: The fetched WebhookInstance
        )r1   fetchr0   s    r*   r;   zWebhookInstance.fetchi   s     {{  ""r+   c                 R   K   | j                   j                          d{   S 7 w)u
        Asynchronous coroutine to fetch the WebhookInstance


        :returns: The fetched WebhookInstance
        N)r1   fetch_asyncr0   s    r*   r>   zWebhookInstance.fetch_asyncr   s!      [[,,....r8   r   r   r   r    c                 @    | j                   j                  ||||      S )M  
        Update the WebhookInstance

        :param unique_name: An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. This value must be unique and 64 characters or less in length.
        :param events: The list of space-separated events that this Webhook will subscribe to.
        :param webhook_url: The URL associated with this Webhook.
        :param webhook_method: The method to be used when calling the webhook's URL.

        :returns: The updated WebhookInstance
        r   r   r   r    )r1   updater(   r   r   r   r    s        r*   rB   zWebhookInstance.update{   s,    " {{!!##)	 " 
 	
r+   c                 \   K   | j                   j                  ||||       d{   S 7 w)g  
        Asynchronous coroutine to update the WebhookInstance

        :param unique_name: An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. This value must be unique and 64 characters or less in length.
        :param events: The list of space-separated events that this Webhook will subscribe to.
        :param webhook_url: The URL associated with this Webhook.
        :param webhook_method: The method to be used when calling the webhook's URL.

        :returns: The updated WebhookInstance
        rA   N)r1   update_asyncrC   s        r*   rF   zWebhookInstance.update_async   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+WebhookInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z(<Twilio.Autopilot.V1.WebhookInstance {}>joinr&   itemsrM   r(   contexts     r*   __repr__zWebhookInstance.__repr__   s6     ((SDNN<P<P<RSS9@@IIr+   )N)r,   r.   )r,   r   )__name__
__module____qualname____doc__r   r   strr   r   r#   propertyr1   boolr4   r7   r;   r>   r   unsetr   objectrB   rF   rZ   __classcell__r)   s   @r*   r   r      sv   $ "77 c3h7 	7
 c]7<  $ $0D 0#/ +1,,%+\\*0,,-3\\
3;'
 c6k"
 3;'	

 c6k*
 

4 +1,,%+\\*0,,-3\\
3;'
 c6k"
 3;'	

 c6k*
 

0J# J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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	f
dZ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	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)ao  
        Initialize the WebhookContext

        :param version: Version that contains the resource
        :param assistant_sid: The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update.
        :param sid: The Twilio-provided string that uniquely identifies the Webhook resource to update.
        r!   z*/Assistants/{assistant_sid}/Webhooks/{sid}N r"   r#   r&   rM   _uri)r(   r   r   r   r)   s       r*   r#   zWebhookContext.__init__   sG     	! +
 H@GG 
nn
	r+   r,   c                 P    | j                   j                  d| j                        S )r3   DELETEmethoduri)r/   r4   rj   r0   s    r*   r4   zWebhookContext.delete   s*     }}##		 $ 
 	
r+   c                 l   K   | j                   j                  d| j                         d{   S 7 w)r6   rl   rm   N)r/   r7   rj   r0   s    r*   r7   zWebhookContext.delete_async   s8      ]]//		 0 
 
 	
 
s   +424c                     | j                   j                  d| j                        }t        | j                   || j                  d   | j                  d         S )r:   GETrm   r   r   r!   )r/   r;   rj   r   r&   r(   r   s     r*   r;   zWebhookContext.fetch   sX     --%%		 & 

 MM..9u%	
 	
r+   c                    K   | j                   j                  d| j                         d{   }t        | j                   || j                  d   | j                  d         S 7 7w)r=   rr   rm   Nr   r   r!   )r/   r>   rj   r   r&   rs   s     r*   r>   zWebhookContext.fetch_async   sf      11		 2 
 

 MM..9u%	
 	

s   +A'A%8A'r   r   r   r    c                     t        j                  ||||d      }| j                  j                  d| j                  |      }t        | j                  || j                  d   | j                  d         S )r@   
UniqueNameEvents
WebhookUrlWebhookMethodPOSTrn   ro   datar   r   r!   )r   ofr/   rB   rj   r   r&   r(   r   r   r   r    r}   r   s          r*   rB   zWebhookContext.update	  s|    " yy) )!/	
 --&&		 ' 
 MM..9u%	
 	
r+   c                   K   t        j                  ||||d      }| j                  j                  d| j                  |       d{   }t        | j                  || j                  d   | j                  d         S 7 7w)rE   rv   r{   r|   Nr   r   r!   )r   r~   r/   rF   rj   r   r&   r   s          r*   rF   zWebhookContext.update_async0  s     " yy) )!/	
 22		 3 
 
 MM..9u%	
 	

s   ABB 	8Bc                     dj                  d | j                  j                         D              }dj                  |      S )rH   rI   c              3   F   K   | ]  \  }}d j                  ||        ywrK   rL   rN   s      r*   rR   z*WebhookContext.__repr__.<locals>.<genexpr>]  rS   rT   z'<Twilio.Autopilot.V1.WebhookContext {}>rU   rX   s     r*   rZ   zWebhookContext.__repr__W  s6     ((SDNN<P<P<RSS8??HHr+   )r[   r\   r]   r   r_   r#   ra   r4   r7   r   r;   r>   r   rb   r   rc   rB   rF   rZ   rd   re   s   @r*   r.   r.      sK   
 
 
# 
&

 



D 


 
(
? 
, +1,,%+\\*0,,-3\\%
3;'%
 c6k"%
 3;'	%

 c6k*%
 
%
R +1,,%+\\*0,,-3\\%
3;'%
 c6k"%
 3;'	%

 c6k*%
 
%
NI# Ir+   r.   c                   2    e Zd Zdeeef   defdZdefdZy)WebhookPager   r,   c                 L    t        | j                  || j                  d         S )zm
        Build an instance of WebhookInstance

        :param payload: Payload response from the API
        r   r   )r   r/   r&   rs   s     r*   get_instancezWebhookPage.get_instanceb  s%     MM7$..2Q
 	
r+   c                      y)rH   z!<Twilio.Autopilot.V1.WebhookPage>rh   r0   s    r*   rZ   zWebhookPage.__repr__l       3r+   N)	r[   r\   r]   r   r_   r   r   r   rZ   rh   r+   r*   r   r   a  s)    
DcN 
 
3# 3r+   r   c                       e Zd Zdedef fdZej                  fdedededeee	f   de
f
d	Zej                  fdedededeee	f   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 )WebhookListr   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)a  
        Initialize the WebhookList

        :param version: Version that contains the resource
        :param assistant_sid: The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to read.

        r   z$/Assistants/{assistant_sid}/WebhooksNrh   ri   )r(   r   r   r)   s      r*   r#   zWebhookList.__init__v  sA     	! ]
 B:AASDNNS	r+   r   r   r   r    r,   c                     t        j                  ||||d      }| j                  j                  d| j                  |      }t        | j                  || j                  d         S )aM  
        Create the WebhookInstance

        :param unique_name: An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. This value must be unique and 64 characters or less in length.
        :param events: The list of space-separated events that this Webhook will subscribe to.
        :param webhook_url: The URL associated with this Webhook.
        :param webhook_method: The method to be used when calling the webhook's URL.

        :returns: The created WebhookInstance
        rv   r{   r|   r   r   )r   r~   r/   createrj   r   r&   r   s          r*   r   zWebhookList.create  sn    " yy) )!/	
 --&&		 ' 
 MM7$..2Q
 	
r+   c                    K   t        j                  ||||d      }| j                  j                  d| j                  |       d{   }t        | j                  || j                  d         S 7 )w)a\  
        Asynchronously create the WebhookInstance

        :param unique_name: An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. This value must be unique and 64 characters or less in length.
        :param events: The list of space-separated events that this Webhook will subscribe to.
        :param webhook_url: The URL associated with this Webhook.
        :param webhook_method: The method to be used when calling the webhook's URL.

        :returns: The created WebhookInstance
        rv   r{   r|   Nr   r   )r   r~   r/   create_asyncrj   r   r&   r   s          r*   r   zWebhookList.create_async  s|     " yy) )!/	
 22		 3 
 
 MM7$..2Q
 	

s   AA4A2	*A4limit	page_sizec                     | j                   j                  ||      }| j                  |d         }| j                   j                  ||d         S )a]  
        Streams WebhookInstance 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WebhookList.stream  sJ    ( **5)<yy6+#6y7}}##D&/::r+   c                    K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  ||d         S 7 #w)al  
        Asynchronously streams WebhookInstance 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WebhookList.stream_async  sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                 :    t        | j                  ||            S )a  
        Lists WebhookInstance 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WebhookList.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 WebhookInstance 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WebhookList.list_async  sT     * '+&7&7# '8 ' !
 
 !
 
 	
 
s0   ;.;620
26;26;
page_tokenpage_numberc                     t        j                  |||d      }| j                  j                  d| j                  |      }t        | j                  || j                        S )as  
        Retrieve a single page of WebhookInstance 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 WebhookInstance
        	PageTokenr   PageSizerr   rn   ro   params)r   r~   r/   r   rj   r   r&   r(   r   r   r   r}   responses         r*   r   zWebhookList.page5  sX      yy'#%
 ==%%U		$%O4==(DNNCCr+   c                    K   t        j                  |||d      }| j                  j                  d| j                  |       d{   }t        | j                  || j                        S 7 %w)a  
        Asynchronously retrieve a single page of WebhookInstance 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 WebhookInstance
        r   rr   r   N)r   r~   r/   r   rj   r   r&   r   s         r*   r   zWebhookList.page_asyncP  sm       yy'#%
 11dii 2 
 
 4==(DNNCC
s   AA/A-&A/
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   || j
                        S )z
        Retrieve a specific page of WebhookInstance records from the API.
        Request is executed immediately

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

        :returns: Page of WebhookInstance
        rr   )r/   domaintwiliorequestr   r&   r(   r   r   s      r*   get_pagezWebhookList.get_pagem  s=     ==''..66ujI4==(DNNCCr+   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   || j
                        S 7 %w)a  
        Asynchronously retrieve a specific page of WebhookInstance records from the API.
        Request is executed immediately

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

        :returns: Page of WebhookInstance
        rr   N)r/   r   r   request_asyncr   r&   r   s      r*   get_page_asynczWebhookList.get_page_asyncy  sJ      --44BB5*UU4==(DNNCC Vs   4AA&Ar   c                 L    t        | j                  | j                  d   |      S z
        Constructs a WebhookContext

        :param sid: The Twilio-provided string that uniquely identifies the Webhook resource to update.
        r   r!   r.   r/   r&   r(   r   s     r*   r$   zWebhookList.get  %     MM)Hc
 	
r+   c                 L    t        | j                  | j                  d   |      S r   r   r   s     r*   __call__zWebhookList.__call__  r   r+   c                      y)rH   z!<Twilio.Autopilot.V1.WebhookList>rh   r0   s    r*   rZ   zWebhookList.__repr__  r   r+   )NN) r[   r\   r]   r   r_   r#   r   rb   r   rc   r   r   r   r   intr	   r   r
   r   r   r   r   r   r   r   r   r   r.   r$   r   rZ   rd   re   s   @r*   r   r   u  s   T T T* .4\\"
"
 "
 	"

 c6k*"
 
"
R .4\\"
"
 "
 	"

 c6k*"
 
"
L  $#';}; C=; 
/	"	;6  $#'A}A C=A 
	'	A6  $#'
}
 C=
 
o		
8  $#'
}
 C=
 
o		
: *0*0,,(.	D#v+&D 3;'D f%	D
 
D: *0*0,,(.	D#v+&D 3;'D f%	D
 
D:
D3 
D; 
D
Ds 
D{ 
D
s 
~ 

C 
N 
3# 3r+   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   rh   r+   r*   <module>r      sg     L L L + 8 : 2 ' !XJ& XJviI_ iIX3$ 3(j3, j3r+   