
    d{i                         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 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 - Taskrouter
    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)ApiResponse)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d	Zdd
ZdefdZdefdZdefdZ xZS )EventInstancea  
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Event resource.
    :ivar actor_sid: The SID of the resource that triggered the event.
    :ivar actor_type: The type of resource that triggered the event.
    :ivar actor_url: The absolute URL of the resource that triggered the event.
    :ivar description: A description of the event.
    :ivar event_data: Data about the event. For more information, see [Event types](https://www.twilio.com/docs/taskrouter/api/event#event-types).
    :ivar event_date: The time the event was sent, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
    :ivar event_date_ms: The time the event was sent in milliseconds.
    :ivar event_type: The identifier for the event.
    :ivar resource_sid: The SID of the object the event is most relevant to, such as a TaskSid, ReservationSid, or a  WorkerSid.
    :ivar resource_type: The type of object the event is most relevant to, such as a Task, Reservation, or a Worker).
    :ivar resource_url: The URL of the resource the event is most relevant to.
    :ivar sid: The unique string that we created to identify the Event resource.
    :ivar source: Where the Event originated.
    :ivar source_ip_address: The IP from which the Event originated.
    :ivar url: The absolute URL of the Event resource.
    :ivar workspace_sid: The SID of the Workspace that contains the Event.
    versionpayloadworkspace_sidsidc                 t   t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _        |j                  d      | _        |j                  d	      | _        |j                  d
      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        ||xs | j"                  d| _        d | _        y )Naccount_sid	actor_sid
actor_type	actor_urldescription
event_data
event_dateevent_date_ms
event_typeresource_sidresource_typeresource_urlr   sourcesource_ip_addressurlr   r   r   )super__init__getr   r   r   r   r   r    r   iso8601_datetimer!   r"   r#   r$   r%   r&   r   r'   r(   r)   r   	_solution_context)selfr   r   r   r   	__class__s        g/home/sas/my/fyp/ringai/.venv/lib/python3.12/site-packages/twilio/rest/taskrouter/v1/workspace/event.pyr,   zEventInstance.__init__/   s]    	!*1++m*D(/K(@)0\)B(/K(@*1++m*D7>{{<7P.9.J.JKK%/
 -4KK,H)0\)B+2;;~+F,3KK,H+2;;~+F")++e"4%,[[%:07<O0P")++e"4,3KK,H +?$((
 15    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: EventContext for this EventInstance
        r   r   r*   )r0   EventContext_versionr/   r1   s    r3   _proxyzEventInstance._proxyR   sE     == ("nn_=NN5)DM
 }}r4   c                 6    | j                   j                         S )W
        Fetch the EventInstance


        :returns: The fetched EventInstance
        )r:   fetchr9   s    r3   r=   zEventInstance.fetchb   s     {{  ""r4   c                 R   K   | j                   j                          d{   S 7 w)q
        Asynchronous coroutine to fetch the EventInstance


        :returns: The fetched EventInstance
        N)r:   fetch_asyncr9   s    r3   r@   zEventInstance.fetch_asynck   s!      [[,,....   '%'c                 6    | j                   j                         S )z
        Fetch the EventInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        )r:   fetch_with_http_infor9   s    r3   rC   z"EventInstance.fetch_with_http_infot   s     {{//11r4   c                 R   K   | j                   j                          d{   S 7 w)z
        Asynchronous coroutine to fetch the EventInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        N)r:   fetch_with_http_info_asyncr9   s    r3   rE   z(EventInstance.fetch_with_http_info_async}   s!      [[;;====rA   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      r3   	<genexpr>z)EventInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z'<Twilio.Taskrouter.V1.EventInstance {}>joinr/   itemsrL   r1   contexts     r3   __repr__zEventInstance.__repr__   s6     ((SDNN<P<P<RSS8??HHr4   )N)r5   r7   )r5   r   )__name__
__module____qualname____doc__r   r   strr   r   r,   propertyr:   r=   r@   r   rC   rE   rY   __classcell__r2   s   @r3   r   r      s    2 "!5!5 c3h!5 	!5
 c]!5F  #/2k 2>+ >I# Ir4   r   c                        e Zd Zdededef fdZdefdZdefdZ	de
fdZdefd	Zdefd
Zde
fdZdefdZ xZS )r7   r   r   r   c                 z    t         |   |       ||d| _         dj                  di | j                  | _        y)z
        Initialize the EventContext

        :param version: Version that contains the resource
        :param workspace_sid: The SID of the Workspace with the Event to fetch.
        :param sid: The SID of the Event resource to fetch.
        r*   z(/Workspaces/{workspace_sid}/Events/{sid}N r+   r,   r/   rL   _uri)r1   r   r   r   r2   s       r3   r,   zEventContext.__init__   sB     	! +
 F>EEWW	r4   r5   c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      S )zz
        Internal helper for fetch operation

        Returns:
            tuple: (payload, status_code, headers)
        application/jsonAcceptGETmethoduriheaders)r   ofr8   fetch_with_response_inforf   r1   rn   s     r3   _fetchzEventContext._fetch   sB     ))B-.}}55dii 6 
 	
r4   c                     | j                         \  }}}t        | j                  || j                  d   | j                  d         S )r<   r   r   r*   )rr   r   r8   r/   r1   r   _s      r3   r=   zEventContext.fetch   sD     AMM..9u%	
 	
r4   c                     | j                         \  }}}t        | j                  || j                  d   | j                  d         }t	        |||      S )z
        Fetch the EventInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        r   r   r*   datastatus_codern   )rr   r   r8   r/   r   r1   r   ry   rn   instances        r3   rC   z!EventContext.fetch_with_http_info   sS     )-%g MM..9u%	
 k7SSr4   c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   S 7 w)z
        Internal async helper for fetch operation

        Returns:
            tuple: (payload, status_code, headers)
        rh   ri   rj   rk   N)r   ro   r8   fetch_with_response_info_asyncrf   rq   s     r3   _fetch_asynczEventContext._fetch_async   sQ      ))B-.]]AAdii B 
 
 	
 
s   AAA	Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d   | j                  d         S 7 ;w)r?   Nr   r   r*   )r~   r   r8   r/   rt   s      r3   r@   zEventContext.fetch_async   sS      #//11AMM..9u%	
 	
 2s   AA<Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d   | j                  d         }t	        |||      S 7 Iw)z
        Asynchronous coroutine to fetch the EventInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        Nr   r   r*   rw   )r~   r   r8   r/   r   rz   s        r3   rE   z'EventContext.fetch_with_http_info_async   sc      /3.?.?.A(A%g MM..9u%	
 k7SS )Bs   A"A A
A"c                     dj                  d | j                  j                         D              }dj                  |      S )rG   rH   c              3   F   K   | ]  \  }}d j                  ||        ywrJ   rK   rM   s      r3   rQ   z(EventContext.__repr__.<locals>.<genexpr>  rR   rS   z&<Twilio.Taskrouter.V1.EventContext {}>rT   rW   s     r3   rY   zEventContext.__repr__  s6     ((SDNN<P<P<RSS7>>wGGr4   )rZ   r[   r\   r   r^   r,   tuplerr   r   r=   r   rC   r~   r@   rE   rY   r`   ra   s   @r3   r7   r7      s{    X X X# X"
 
 
} 
Tk T 
E 
 
= 
T+ T H# Hr4   r7   c                   2    e Zd Zdeeef   defdZdefdZy)	EventPager   r5   c                 L    t        | j                  || j                  d         S )zk
        Build an instance of EventInstance

        :param payload: Payload response from the API
        r   )r   )r   r8   r/   )r1   r   s     r3   get_instancezEventPage.get_instance  s%     MM7$..2Q
 	
r4   c                      y)rG   z <Twilio.Taskrouter.V1.EventPage>rd   r9   s    r3   rY   zEventPage.__repr__       2r4   N)	rZ   r[   r\   r   r^   r   r   r   rY   rd   r4   r3   r   r     s)    
DcN 
} 
2# 2r4   r   c                   4    e Zd Zdedef fdZej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  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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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                  ej                  ej                  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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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                  ej                  ej                  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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ee
f   deee
f   dee   dee   defdZej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  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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ee
f   deee
f   dee   dee   defdZej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  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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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                  ej                  ej                  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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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                  ej                  ej                  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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ee
f   deee
f   dee   dee   defdZej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  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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ee
f   deee
f   dee   dee   defdZej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  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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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                  ej                  ej                  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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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                  ej                  ej                  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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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                  ej                  ej                  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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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 )'	EventListr   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the EventList

        :param version: Version that contains the resource
        :param workspace_sid: The SID of the Workspace with the Events to read. Returns only the Events that pertain to the specified Workspace.

        r   z"/Workspaces/{workspace_sid}/EventsNrd   re   )r1   r   r   r2   s      r3   r,   zEventList.__init__"  sA     	! ]
 @8??Q$..Q	r4   Nend_dater#   minutesreservation_sid
start_datetask_queue_sidtask_sid
worker_sidworkflow_sidtask_channelr   limit	page_sizer5   c                     | j                   j                  ||      }| j                  |||||||||	|
||d         }| j                   j                  ||d         S )a	  
        Streams EventInstance 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 datetime end_date: Only include Events that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
        :param str event_type: The type of Events to read. Returns only Events of the type specified.
        :param int minutes: The period of events to read in minutes. Returns only Events that occurred since this many minutes in the past. The default is `15` minutes. Task Attributes for Events occuring more 43,200 minutes ago will be redacted.
        :param str reservation_sid: The SID of the Reservation with the Events to read. Returns only Events that pertain to the specified Reservation.
        :param datetime start_date: Only include Events from on or after this date and time, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Task Attributes for Events older than 30 days will be redacted.
        :param str task_queue_sid: The SID of the TaskQueue with the Events to read. Returns only the Events that pertain to the specified TaskQueue.
        :param str task_sid: The SID of the Task with the Events to read. Returns only the Events that pertain to the specified Task.
        :param str worker_sid: The SID of the Worker with the Events to read. Returns only the Events that pertain to the specified Worker.
        :param str workflow_sid: The SID of the Workflow with the Events to read. Returns only the Events that pertain to the specified Workflow.
        :param str task_channel: The TaskChannel with the Events to read. Returns only the Events that pertain to the specified TaskChannel.
        :param str sid: The SID of the Event resource to read.
        :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   r   r   r   r   r   r   r   r   r   r   )r8   read_limitspagestreamr1   r   r#   r   r   r   r   r   r   r   r   r   r   r   limitsr   s                   r3   r   zEventList.stream2  st    T **5)<yy!+!)!%%[)  
 }}##D&/::r4   c                    K   | j                   j                  ||      }| j                  |||||||||	|
||d          d{   }| j                   j                  ||d         S 7 #w)a	  
        Asynchronously streams EventInstance 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 datetime end_date: Only include Events that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
        :param str event_type: The type of Events to read. Returns only Events of the type specified.
        :param int minutes: The period of events to read in minutes. Returns only Events that occurred since this many minutes in the past. The default is `15` minutes. Task Attributes for Events occuring more 43,200 minutes ago will be redacted.
        :param str reservation_sid: The SID of the Reservation with the Events to read. Returns only Events that pertain to the specified Reservation.
        :param datetime start_date: Only include Events from on or after this date and time, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Task Attributes for Events older than 30 days will be redacted.
        :param str task_queue_sid: The SID of the TaskQueue with the Events to read. Returns only the Events that pertain to the specified TaskQueue.
        :param str task_sid: The SID of the Task with the Events to read. Returns only the Events that pertain to the specified Task.
        :param str worker_sid: The SID of the Worker with the Events to read. Returns only the Events that pertain to the specified Worker.
        :param str workflow_sid: The SID of the Workflow with the Events to read. Returns only the Events that pertain to the specified Workflow.
        :param str task_channel: The TaskChannel with the Events to read. Returns only the Events that pertain to the specified TaskChannel.
        :param str sid: The SID of the Event resource to read.
        :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   )r8   r   
page_asyncstream_asyncr   s                   r3   r   zEventList.stream_asyncn  s     T **5)<__!+!)!%%[) % 
 
 }}))$w@@
s   A A(A&$A(c                     | j                   j                  ||      }| j                  |||||||||	|
||d         }| j                   j                  |j                  |d         }||j
                  |j                  fS )a?	  
        Streams EventInstance and returns headers from first page


        :param datetime end_date: Only include Events that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
        :param str event_type: The type of Events to read. Returns only Events of the type specified.
        :param int minutes: The period of events to read in minutes. Returns only Events that occurred since this many minutes in the past. The default is `15` minutes. Task Attributes for Events occuring more 43,200 minutes ago will be redacted.
        :param str reservation_sid: The SID of the Reservation with the Events to read. Returns only Events that pertain to the specified Reservation.
        :param datetime start_date: Only include Events from on or after this date and time, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Task Attributes for Events older than 30 days will be redacted.
        :param str task_queue_sid: The SID of the TaskQueue with the Events to read. Returns only the Events that pertain to the specified TaskQueue.
        :param str task_sid: The SID of the Task with the Events to read. Returns only the Events that pertain to the specified Task.
        :param str worker_sid: The SID of the Worker with the Events to read. Returns only the Events that pertain to the specified Worker.
        :param str workflow_sid: The SID of the Workflow with the Events to read. Returns only the Events that pertain to the specified Workflow.
        :param str task_channel: The TaskChannel with the Events to read. Returns only the Events that pertain to the specified TaskChannel.
        :param str sid: The SID of the Event resource to read.
        :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: tuple of (generator, status_code, headers) where generator yields instances
        r   r   r   )r8   r   page_with_http_infor   rx   ry   rn   r1   r   r#   r   r   r   r   r   r   r   r   r   r   r   r   page_response	generators                    r3   stream_with_http_infozEventList.stream_with_http_info  s    P **5)<00!+!)!%%[) 1 
 MM((););VG_M	=44m6K6KLLr4   c                   K   | j                   j                  ||      }| j                  |||||||||	|
||d          d{   }| j                   j                  |j                  |d         }||j
                  |j                  fS 7 Fw)aN	  
        Asynchronously streams EventInstance and returns headers from first page


        :param datetime end_date: Only include Events that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
        :param str event_type: The type of Events to read. Returns only Events of the type specified.
        :param int minutes: The period of events to read in minutes. Returns only Events that occurred since this many minutes in the past. The default is `15` minutes. Task Attributes for Events occuring more 43,200 minutes ago will be redacted.
        :param str reservation_sid: The SID of the Reservation with the Events to read. Returns only Events that pertain to the specified Reservation.
        :param datetime start_date: Only include Events from on or after this date and time, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Task Attributes for Events older than 30 days will be redacted.
        :param str task_queue_sid: The SID of the TaskQueue with the Events to read. Returns only the Events that pertain to the specified TaskQueue.
        :param str task_sid: The SID of the Task with the Events to read. Returns only the Events that pertain to the specified Task.
        :param str worker_sid: The SID of the Worker with the Events to read. Returns only the Events that pertain to the specified Worker.
        :param str workflow_sid: The SID of the Workflow with the Events to read. Returns only the Events that pertain to the specified Workflow.
        :param str task_channel: The TaskChannel with the Events to read. Returns only the Events that pertain to the specified TaskChannel.
        :param str sid: The SID of the Event resource to read.
        :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: tuple of (generator, status_code, headers) where generator yields instances
        r   r   Nr   )r8   r   page_with_http_info_asyncr   rx   ry   rn   r   s                    r3   stream_with_http_info_asyncz%EventList.stream_with_http_info_async  s     P **5)<"<<!+!)!%%[) = 
 
 MM..}/A/A6'?S	=44m6K6KLL!
s   A BB	ABc                 P    t        | j                  |||||||||	|
|||            S )a	  
        Lists EventInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param datetime end_date: Only include Events that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
        :param str event_type: The type of Events to read. Returns only Events of the type specified.
        :param int minutes: The period of events to read in minutes. Returns only Events that occurred since this many minutes in the past. The default is `15` minutes. Task Attributes for Events occuring more 43,200 minutes ago will be redacted.
        :param str reservation_sid: The SID of the Reservation with the Events to read. Returns only Events that pertain to the specified Reservation.
        :param datetime start_date: Only include Events from on or after this date and time, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Task Attributes for Events older than 30 days will be redacted.
        :param str task_queue_sid: The SID of the TaskQueue with the Events to read. Returns only the Events that pertain to the specified TaskQueue.
        :param str task_sid: The SID of the Task with the Events to read. Returns only the Events that pertain to the specified Task.
        :param str worker_sid: The SID of the Worker with the Events to read. Returns only the Events that pertain to the specified Worker.
        :param str workflow_sid: The SID of the Workflow with the Events to read. Returns only the Events that pertain to the specified Workflow.
        :param str task_channel: The TaskChannel with the Events to read. Returns only the Events that pertain to the specified TaskChannel.
        :param str sid: The SID of the Event resource to read.
        :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#   r   r   r   r   r   r   r   r   r   r   r   )listr   )r1   r   r#   r   r   r   r   r   r   r   r   r   r   r   s                 r3   r   zEventList.list   sJ    R KK!% /%-!%))#  
 	
r4   c                    K   | j                  |||||||||	|
|||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)a	  
        Asynchronously lists EventInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param datetime end_date: Only include Events that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
        :param str event_type: The type of Events to read. Returns only Events of the type specified.
        :param int minutes: The period of events to read in minutes. Returns only Events that occurred since this many minutes in the past. The default is `15` minutes. Task Attributes for Events occuring more 43,200 minutes ago will be redacted.
        :param str reservation_sid: The SID of the Reservation with the Events to read. Returns only Events that pertain to the specified Reservation.
        :param datetime start_date: Only include Events from on or after this date and time, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Task Attributes for Events older than 30 days will be redacted.
        :param str task_queue_sid: The SID of the TaskQueue with the Events to read. Returns only the Events that pertain to the specified TaskQueue.
        :param str task_sid: The SID of the Task with the Events to read. Returns only the Events that pertain to the specified Task.
        :param str worker_sid: The SID of the Worker with the Events to read. Returns only the Events that pertain to the specified Worker.
        :param str workflow_sid: The SID of the Workflow with the Events to read. Returns only the Events that pertain to the specified Workflow.
        :param str task_channel: The TaskChannel with the Events to read. Returns only the Events that pertain to the specified TaskChannel.
        :param str sid: The SID of the Event resource to read.
        :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   )r1   r   r#   r   r   r   r   r   r   r   r   r   r   r   records                  r3   
list_asynczEventList.list_async[  sv     V '+&7&7!% /%-!%))# '8 ' !
 
 !
 
 	
 
s7   "A9AA=;
=AA=AAc                 x    | j                  |||||||||	|
|||      \  }}}t        |      }t        |||      S )a*	  
        Lists EventInstance and returns headers from first page


        :param datetime end_date: Only include Events that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
        :param str event_type: The type of Events to read. Returns only Events of the type specified.
        :param int minutes: The period of events to read in minutes. Returns only Events that occurred since this many minutes in the past. The default is `15` minutes. Task Attributes for Events occuring more 43,200 minutes ago will be redacted.
        :param str reservation_sid: The SID of the Reservation with the Events to read. Returns only Events that pertain to the specified Reservation.
        :param datetime start_date: Only include Events from on or after this date and time, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Task Attributes for Events older than 30 days will be redacted.
        :param str task_queue_sid: The SID of the TaskQueue with the Events to read. Returns only the Events that pertain to the specified TaskQueue.
        :param str task_sid: The SID of the Task with the Events to read. Returns only the Events that pertain to the specified Task.
        :param str worker_sid: The SID of the Worker with the Events to read. Returns only the Events that pertain to the specified Worker.
        :param str workflow_sid: The SID of the Workflow with the Events to read. Returns only the Events that pertain to the specified Workflow.
        :param str task_channel: The TaskChannel with the Events to read. Returns only the Events that pertain to the specified TaskChannel.
        :param str sid: The SID of the Event resource to read.
        :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: ApiResponse with list of instances, status code, and headers
        r   rw   )r   r   r   )r1   r   r#   r   r   r   r   r   r   r   r   r   r   r   r   ry   rn   rV   s                     r3   list_with_http_infozEventList.list_with_http_info  sc    P +/*D*D!+!)!%% +E +
'	; Y;PPr4   c                    K   | j                  |||||||||	|
|||       d{   \  }}}|2 cg c3 d{   }|7 7 	6 nc c}w }}t        |||      S w)a9	  
        Asynchronously lists EventInstance and returns headers from first page


        :param datetime end_date: Only include Events that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
        :param str event_type: The type of Events to read. Returns only Events of the type specified.
        :param int minutes: The period of events to read in minutes. Returns only Events that occurred since this many minutes in the past. The default is `15` minutes. Task Attributes for Events occuring more 43,200 minutes ago will be redacted.
        :param str reservation_sid: The SID of the Reservation with the Events to read. Returns only Events that pertain to the specified Reservation.
        :param datetime start_date: Only include Events from on or after this date and time, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Task Attributes for Events older than 30 days will be redacted.
        :param str task_queue_sid: The SID of the TaskQueue with the Events to read. Returns only the Events that pertain to the specified TaskQueue.
        :param str task_sid: The SID of the Task with the Events to read. Returns only the Events that pertain to the specified Task.
        :param str worker_sid: The SID of the Worker with the Events to read. Returns only the Events that pertain to the specified Worker.
        :param str workflow_sid: The SID of the Workflow with the Events to read. Returns only the Events that pertain to the specified Workflow.
        :param str task_channel: The TaskChannel with the Events to read. Returns only the Events that pertain to the specified TaskChannel.
        :param str sid: The SID of the Event resource to read.
        :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: ApiResponse with list of instances, status code, and headers
        r   Nrw   )r   r   )r1   r   r#   r   r   r   r   r   r   r   r   r   r   r   r   ry   rn   r   rV   s                      r3   list_with_http_info_asyncz#EventList.list_with_http_info_async  s     P 150P0P!+!)!%% 1Q 1
 +
'	; -666&+
 7666;PPs>   "A?AAAA
AAAAAA
page_tokenpage_numberc                 b   t        j                  t        j                  |      |||t        j                  |      ||||	|
||||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                        S )a  
        Retrieve a single page of EventInstance records from the API.
        Request is executed immediately

        :param end_date: Only include Events that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
        :param event_type: The type of Events to read. Returns only Events of the type specified.
        :param minutes: The period of events to read in minutes. Returns only Events that occurred since this many minutes in the past. The default is `15` minutes. Task Attributes for Events occuring more 43,200 minutes ago will be redacted.
        :param reservation_sid: The SID of the Reservation with the Events to read. Returns only Events that pertain to the specified Reservation.
        :param start_date: Only include Events from on or after this date and time, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Task Attributes for Events older than 30 days will be redacted.
        :param task_queue_sid: The SID of the TaskQueue with the Events to read. Returns only the Events that pertain to the specified TaskQueue.
        :param task_sid: The SID of the Task with the Events to read. Returns only the Events that pertain to the specified Task.
        :param worker_sid: The SID of the Worker with the Events to read. Returns only the Events that pertain to the specified Worker.
        :param workflow_sid: The SID of the Workflow with the Events to read. Returns only the Events that pertain to the specified Workflow.
        :param task_channel: The TaskChannel with the Events to read. Returns only the Events that pertain to the specified TaskChannel.
        :param sid: The SID of the Event resource to read.
        :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 EventInstance
        EndDate	EventTypeMinutesReservationSid	StartDateTaskQueueSidTaskSid	WorkerSidWorkflowSidTaskChannelSid	PageTokenr   PageSizeContent-Type!application/x-www-form-urlencodedrh   ri   rj   rl   rm   paramsrn   )	r   ro   r   r.   r8   r   rf   r   r/   r1   r   r#   r   r   r   r   r   r   r   r   r   r   r   r   rx   rn   responses                     r3   r   zEventList.page  s    L yy$55h?'""1&77
C .#'++'#%
& ))^-PQR.==%%diig & 
 $..AAr4   c                 ~  K   t        j                  t        j                  |      |||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 EventInstance records from the API.
        Request is executed immediately

        :param end_date: Only include Events that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
        :param event_type: The type of Events to read. Returns only Events of the type specified.
        :param minutes: The period of events to read in minutes. Returns only Events that occurred since this many minutes in the past. The default is `15` minutes. Task Attributes for Events occuring more 43,200 minutes ago will be redacted.
        :param reservation_sid: The SID of the Reservation with the Events to read. Returns only Events that pertain to the specified Reservation.
        :param start_date: Only include Events from on or after this date and time, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Task Attributes for Events older than 30 days will be redacted.
        :param task_queue_sid: The SID of the TaskQueue with the Events to read. Returns only the Events that pertain to the specified TaskQueue.
        :param task_sid: The SID of the Task with the Events to read. Returns only the Events that pertain to the specified Task.
        :param worker_sid: The SID of the Worker with the Events to read. Returns only the Events that pertain to the specified Worker.
        :param workflow_sid: The SID of the Workflow with the Events to read. Returns only the Events that pertain to the specified Workflow.
        :param task_channel: The TaskChannel with the Events to read. Returns only the Events that pertain to the specified TaskChannel.
        :param sid: The SID of the Event resource to read.
        :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 EventInstance
        r   r   r   rh   ri   rj   r   N)	r   ro   r   r.   r8   r   rf   r   r/   r   s                     r3   r   zEventList.page_asyncM  s     L yy$55h?'""1&77
C .#'++'#%
& ))^-PQR.11diig 2 
 
 $..AA
s   BB=B;&B=c                    t        j                  t        j                  |      |||t        j                  |      ||||	|
||||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      \  }}}t        | j                  || j                        }t        |||      S )	a  
        Retrieve a single page with response metadata


        :param end_date: Only include Events that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
        :param event_type: The type of Events to read. Returns only Events of the type specified.
        :param minutes: The period of events to read in minutes. Returns only Events that occurred since this many minutes in the past. The default is `15` minutes. Task Attributes for Events occuring more 43,200 minutes ago will be redacted.
        :param reservation_sid: The SID of the Reservation with the Events to read. Returns only Events that pertain to the specified Reservation.
        :param start_date: Only include Events from on or after this date and time, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Task Attributes for Events older than 30 days will be redacted.
        :param task_queue_sid: The SID of the TaskQueue with the Events to read. Returns only the Events that pertain to the specified TaskQueue.
        :param task_sid: The SID of the Task with the Events to read. Returns only the Events that pertain to the specified Task.
        :param worker_sid: The SID of the Worker with the Events to read. Returns only the Events that pertain to the specified Worker.
        :param workflow_sid: The SID of the Workflow with the Events to read. Returns only the Events that pertain to the specified Workflow.
        :param task_channel: The TaskChannel with the Events to read. Returns only the Events that pertain to the specified TaskChannel.
        :param sid: The SID of the Event resource to read.
        :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: ApiResponse with EventPage, status code, and headers
        r   r   r   rh   ri   rj   r   rw   )
r   ro   r   r.   r8   page_with_response_inforf   r   r/   r   r1   r   r#   r   r   r   r   r   r   r   r   r   r   r   r   rx   rn   r   ry   response_headersr   s                        r3   r   zEventList.page_with_http_info  s    L yy$55h?'""1&77
C .#'++'#%
& ))^-PQR.26--2W2Wdiig 3X 3
/+/ $..A+GWXXr4   c                   K   t        j                  t        j                  |      |||t        j                  |      ||||	|
||||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   \  }}}t        | j                  || j                        }t        |||	      S 7 7w)
a  
        Asynchronously retrieve a single page with response metadata


        :param end_date: Only include Events that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
        :param event_type: The type of Events to read. Returns only Events of the type specified.
        :param minutes: The period of events to read in minutes. Returns only Events that occurred since this many minutes in the past. The default is `15` minutes. Task Attributes for Events occuring more 43,200 minutes ago will be redacted.
        :param reservation_sid: The SID of the Reservation with the Events to read. Returns only Events that pertain to the specified Reservation.
        :param start_date: Only include Events from on or after this date and time, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Task Attributes for Events older than 30 days will be redacted.
        :param task_queue_sid: The SID of the TaskQueue with the Events to read. Returns only the Events that pertain to the specified TaskQueue.
        :param task_sid: The SID of the Task with the Events to read. Returns only the Events that pertain to the specified Task.
        :param worker_sid: The SID of the Worker with the Events to read. Returns only the Events that pertain to the specified Worker.
        :param workflow_sid: The SID of the Workflow with the Events to read. Returns only the Events that pertain to the specified Workflow.
        :param task_channel: The TaskChannel with the Events to read. Returns only the Events that pertain to the specified TaskChannel.
        :param sid: The SID of the Event resource to read.
        :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: ApiResponse with EventPage, status code, and headers
        r   r   r   rh   ri   rj   r   Nrw   )
r   ro   r   r.   r8   page_with_response_info_asyncrf   r   r/   r   r   s                        r3   r   z#EventList.page_with_http_info_async  s     L yy$55h?'""1&77
C .#'++'#%
& ))^-PQR. --==$))D' >   	0+/
 $..A+GWXXs   BCC8C
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   || j
                        S )z
        Retrieve a specific page of EventInstance records from the API.
        Request is executed immediately

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

        :returns: Page of EventInstance
        rj   )r8   domaintwiliorequestr   r/   r1   r   r   s      r3   get_pagezEventList.get_page  s=     ==''..66ujI$..AAr4   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   || j
                        S 7 %w)z
        Asynchronously retrieve a specific page of EventInstance records from the API.
        Request is executed immediately

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

        :returns: Page of EventInstance
        rj   N)r8   r   r   request_asyncr   r/   r   s      r3   get_page_asynczEventList.get_page_async#  sJ      --44BB5*UU$..AA Vs   4AA&Ac                 L    t        | j                  | j                  d   |      S zh
        Constructs a EventContext

        :param sid: The SID of the Event resource to fetch.
        r   r*   r7   r8   r/   r1   r   s     r3   r-   zEventList.get/  %     MM)Hc
 	
r4   c                 L    t        | j                  | j                  d   |      S r   r   r   s     r3   __call__zEventList.__call__9  r   r4   c                      y)rG   z <Twilio.Taskrouter.V1.EventList>rd   r9   s    r3   rY   zEventList.__repr__C  r   r4   )'rZ   r[   r\   r   r^   r,   r   unsetr   r   objectintr   r	   r   r   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r7   r-   r   rY   r`   ra   s   @r3   r   r      s   R R R$ -3LL)/&,ll.4ll.4ll-3\\'-||)/+1<<+1<<"(,,##':;&():; #v+&:; sF{#	:;
 sF{+:; (F*+:; c6k*:; V$:; #v+&:; CK(:; CK(:; 3;:; }:; C=:; 
-	 :;| -3LL)/&,ll.4ll.4ll-3\\'-||)/+1<<+1<<"(,,##':A&():A #v+&:A sF{#	:A
 sF{+:A (F*+:A c6k*:A V$:A #v+&:A CK(:A CK(:A 3;:A }:A C=:A 
}	%:A| -3LL)/&,ll.4ll.4ll-3\\'-||)/+1<<+1<<"(,,##'9M&()9M #v+&9M sF{#	9M
 sF{+9M (F*+9M c6k*9M V$9M #v+&9M CK(9M CK(9M 3;9M }9M C=9M 
9Mz -3LL)/&,ll.4ll.4ll-3\\'-||)/+1<<+1<<"(,,##'9M&()9M #v+&9M sF{#	9M
 sF{+9M (F*+9M c6k*9M V$9M #v+&9M CK(9M CK(9M 3;9M }9M C=9M 
9Mz -3LL)/&,ll.4ll.4ll-3\\'-||)/+1<<+1<<"(,,##'9
&()9
 #v+&9
 sF{#	9

 sF{+9
 (F*+9
 c6k*9
 V$9
 #v+&9
 CK(9
 CK(9
 3;9
 }9
 C=9
 
m	9
z -3LL)/&,ll.4ll.4ll-3\\'-||)/+1<<+1<<"(,,##':
&():
 #v+&:
 sF{#	:

 sF{+:
 (F*+:
 c6k*:
 V$:
 #v+&:
 CK(:
 CK(:
 3;:
 }:
 C=:
 
m	:
| -3LL)/&,ll.4ll.4ll-3\\'-||)/+1<<+1<<"(,,##'8Q&()8Q #v+&8Q sF{#	8Q
 sF{+8Q (F*+8Q c6k*8Q V$8Q #v+&8Q CK(8Q CK(8Q 3;8Q }8Q C=8Q 
8Qx -3LL)/&,ll.4ll.4ll-3\\'-||)/+1<<+1<<"(,,##'8Q&()8Q #v+&8Q sF{#	8Q
 sF{+8Q (F*+8Q c6k*8Q V$8Q #v+&8Q CK(8Q CK(8Q 3;8Q }8Q C=8Q 
8Qx -3LL)/&,ll.4ll.4ll-3\\'-||)/+1<<+1<<"(,,)/*0,,(.@B&()@B #v+&@B sF{#	@B
 sF{+@B (F*+@B c6k*@B V$@B #v+&@B CK(@B CK(@B 3;@B #v+&@B 3;'@B f%@B  
!@BH -3LL)/&,ll.4ll.4ll-3\\'-||)/+1<<+1<<"(,,)/*0,,(.@B&()@B #v+&@B sF{#	@B
 sF{+@B (F*+@B c6k*@B V$@B #v+&@B CK(@B CK(@B 3;@B #v+&@B 3;'@B f%@B  
!@BH -3LL)/&,ll.4ll.4ll-3\\'-||)/+1<<+1<<"(,,)/*0,,(.AY&()AY #v+&AY sF{#	AY
 sF{+AY (F*+AY c6k*AY V$AY #v+&AY CK(AY CK(AY 3;AY #v+&AY 3;'AY f%AY  
!AYJ -3LL)/&,ll.4ll.4ll-3\\'-||)/+1<<+1<<"(,,)/*0,,(.CY&()CY #v+&CY sF{#	CY
 sF{+CY (F*+CY c6k*CY V$CY #v+&CY CK(CY CK(CY 3;CY #v+&CY 3;'CY f%CY  
!CYJ
B3 
B9 
B
Bs 
By 
B
s 
| 

C 
L 
2# 2r4   r   N)r]   r   typingr   r   r   r   r   r	   r
   twilio.baser   r   r   twilio.base.api_responser   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r7   r   r   rd   r4   r3   <module>r      sm     L L L 6 6 0 8 : 2 ' !sI$ sIlxH? xHv2 2*i2 i2r4   