
    d{iw                         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 - Flex
    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e   f fdZ	e
dd       ZdefdZdefd	Zdefd
Zdef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 )ChannelInstanceak  
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Channel resource and owns this Workflow.
    :ivar flex_flow_sid: The SID of the Flex Flow.
    :ivar sid: The unique string that we created to identify the Channel resource.
    :ivar user_sid: The SID of the chat user.
    :ivar task_sid: The SID of the TaskRouter Task. Only valid when integration type is `task`. `null` for integration types `studio` & `external`
    :ivar url: The absolute URL of the Flex chat channel resource.
    :ivar date_created: The date and time in GMT when the Flex chat channel was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
    :ivar date_updated: The date and time in GMT when the Flex chat channel was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
    versionpayloadsidc                    t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _        t        j                  |j                  d            | _        d|xs | j
                  i| _        d | _        y )	Naccount_sidflex_flow_sidr   user_sidtask_sidurldate_createddate_updated)super__init__getr   r   r   r   r   r   r   iso8601_datetimer   r    	_solution_context)selfr   r   r   	__class__s       ]/home/sas/my/fyp/ringai/.venv/lib/python3.12/site-packages/twilio/rest/flex_api/v1/channel.pyr"   zChannelInstance.__init__&   s     	!*1++m*D,3KK,H")++e"4'.{{:'>'.{{:'>")++e"40;0L0LKK'1
 1<0L0LKK'1

 3?$((
 37    returnc                     | j                   )t        | j                  | j                  d         | _         | j                   S )z
        Generate an instance context for the instance, the context is capable of
        performing various actions. All instance actions are proxied to the context

        :returns: ChannelContext for this ChannelInstance
        r   r   )r&   ChannelContext_versionr%   r'   s    r)   _proxyzChannelInstance._proxy=   s9     == *NN5)DM }}r*   c                 6    | j                   j                         S zj
        Deletes the ChannelInstance


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


        :returns: True if delete succeeds, False otherwise
        N)r1   delete_asyncr0   s    r)   r7   zChannelInstance.delete_asyncU   s!      [[--////   '%'c                 6    | j                   j                         S )z
        Deletes the ChannelInstance with HTTP info


        :returns: ApiResponse with success boolean, status code, and headers
        )r1   delete_with_http_infor0   s    r)   r:   z%ChannelInstance.delete_with_http_info^   s     {{0022r*   c                 R   K   | j                   j                          d{   S 7 w)z
        Asynchronous coroutine that deletes the ChannelInstance with HTTP info


        :returns: ApiResponse with success boolean, status code, and headers
        N)r1   delete_with_http_info_asyncr0   s    r)   r<   z+ChannelInstance.delete_with_http_info_asyncg   s!      [[<<>>>>r8   c                 6    | j                   j                         S )[
        Fetch the ChannelInstance


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


        :returns: The fetched ChannelInstance
        N)r1   fetch_asyncr0   s    r)   rB   zChannelInstance.fetch_asyncy   s!      [[,,....r8   c                 6    | j                   j                         S )z
        Fetch the ChannelInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        )r1   fetch_with_http_infor0   s    r)   rD   z$ChannelInstance.fetch_with_http_info   s     {{//11r*   c                 R   K   | j                   j                          d{   S 7 w)z
        Asynchronous coroutine to fetch the ChannelInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        N)r1   fetch_with_http_info_asyncr0   s    r)   rF   z*ChannelInstance.fetch_with_http_info_async   s!      [[;;====r8   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+ChannelInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z&<Twilio.FlexApi.V1.ChannelInstance {}>joinr%   itemsrM   r'   contexts     r)   __repr__zChannelInstance.__repr__   s6     ((SDNN<P<P<RSS7>>wGGr*   )N)r+   r.   )r+   r   )__name__
__module____qualname____doc__r   r   strr   r   r"   propertyr1   boolr4   r7   r   r:   r<   r?   rB   rD   rF   rZ   __classcell__r(   s   @r)   r   r      s    	 OS77)-c3h7>Fsm7.  $ $0D 03{ 3?; ?#/2k 2>+ >H# Hr*   r   c                        e Zd Zdedef fdZdefdZdefdZ	de
fdZdefdZde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defdZ xZS )r.   r   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the ChannelContext

        :param version: Version that contains the resource
        :param sid: The SID of the Flex chat channel resource to fetch.
        r   z/Channels/{sid}N )r!   r"   r%   rM   _uri)r'   r   r   r(   s      r)   r"   zChannelContext.__init__   s@     	! 3
 -%,,>t~~>	r*   r+   c                 |    t        j                  i       }| j                  j                  d| j                  |      S )z
        Internal helper for delete operation

        Returns:
            tuple: (success_boolean, status_code, headers)
        DELETEmethoduriheaders)r   ofr/   delete_with_response_inforg   r'   rm   s     r)   _deletezChannelContext._delete   s8     ))B-}}66G 7 
 	
r*   c                 .    | j                         \  }}}|S r3   )rq   r'   success_s      r)   r4   zChannelContext.delete   s     Ar*   c                 F    | j                         \  }}}t        |||      S )z
        Deletes the ChannelInstance and return response metadata


        :returns: ApiResponse with success boolean, status code, and headers
        datastatus_coderm   )rq   r   r'   rt   ry   rm   s       r)   r:   z$ChannelContext.delete_with_http_info   s%     )-%g['RRr*   c                    K   t        j                  i       }| j                  j                  d| j                  |       d{   S 7 w)z
        Internal async helper for delete operation

        Returns:
            tuple: (success_boolean, status_code, headers)
        ri   rj   N)r   rn   r/   delete_with_response_info_asyncrg   rp   s     r)   _delete_asynczChannelContext._delete_async   sG      ))B-]]BBG C 
 
 	
 
s   AA
AA
c                 J   K   | j                          d{   \  }}}|S 7 
wr6   )r}   rs   s      r)   r7   zChannelContext.delete_async   s)      #0022A 3s   #!#c                 b   K   | j                          d{   \  }}}t        |||      S 7 w)z
        Asynchronous coroutine that deletes the ChannelInstance and return response metadata


        :returns: ApiResponse with success boolean, status code, and headers
        Nrw   )r}   r   rz   s       r)   r<   z*ChannelContext.delete_with_http_info_async   s5      /3.@.@.B(B%g['RR )Cs   /-/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GETrj   )r   rn   r/   fetch_with_response_inforg   rp   s     r)   _fetchzChannelContext._fetch   sB     ))B-.}}55dii 6 
 	
r*   c                 t    | j                         \  }}}t        | j                  || j                  d         S )r>   r   r-   )r   r   r/   r%   r'   r   ru   s      r)   r?   zChannelContext.fetch  s8     AMMu%
 	
r*   c                     | j                         \  }}}t        | j                  || j                  d         }t	        |||      S )z
        Fetch the ChannelInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        r   r-   rw   )r   r   r/   r%   r   r'   r   ry   rm   instances        r)   rD   z#ChannelContext.fetch_with_http_info  sG     )-%g"MMu%

 k7SSr*   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)
        r   r   r   rj   N)r   rn   r/   fetch_with_response_info_asyncrg   rp   s     r)   _fetch_asynczChannelContext._fetch_async   sQ      ))B-.]]AAdii B 
 
 	
 
s   AAA	Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d         S 7 -w)rA   Nr   r-   )r   r   r/   r%   r   s      r)   rB   zChannelContext.fetch_async0  sG      #//11AMMu%
 	
 2s   AA.Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d         }t	        |||      S 7 ;w)z
        Asynchronous coroutine to fetch the ChannelInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        Nr   r-   rw   )r   r   r/   r%   r   r   s        r)   rF   z)ChannelContext.fetch_with_http_info_async>  sW      /3.?.?.A(A%g"MMu%

 k7SS )Bs   AA<A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*ChannelContext.__repr__.<locals>.<genexpr>S  rS   rT   z%<Twilio.FlexApi.V1.ChannelContext {}>rU   rX   s     r)   rZ   zChannelContext.__repr__M  s6     ((SDNN<P<P<RSS6==gFFr*   )r[   r\   r]   r   r_   r"   tuplerq   ra   r4   r   r:   r}   r7   r<   r   r   r?   rD   r   rB   rF   rZ   rb   rc   s   @r)   r.   r.      s    ? ?c ?
 
 S{ S
U 
D S; S
 
 
 
Tk T
E 
 
? 
T+ TG# Gr*   r.   c                   2    e Zd Zdeeef   defdZdefdZy)ChannelPager   r+   c                 .    t        | j                  |      S )zm
        Build an instance of ChannelInstance

        :param payload: Payload response from the API
        )r   r/   )r'   r   s     r)   get_instancezChannelPage.get_instanceY  s     t}}g66r*   c                      y)rH   z<Twilio.FlexApi.V1.ChannelPage>rf   r0   s    r)   rZ   zChannelPage.__repr__a       1r*   N)	r[   r\   r]   r   r_   r   r   r   rZ   rf   r*   r)   r   r   W  s)    7DcN 7 71# 1r*   r   c                   d	    e Zd Zdef fdZej                  ej                  ej                  ej                  ej                  ej                  fdededede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dedede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dedede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dedede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dedede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dedede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+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fdZ	 	 d+dee   dee   defdZ	 	 d+dee   dee   dee   fdZ	 	 d+dee   dee   dee   fdZ	 	 d+dee   dee   defdZ	 	 d+dee   dee   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"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$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 ),ChannelListr   c                 2    t         |   |       d| _        y)zi
        Initialize the ChannelList

        :param version: Version that contains the resource

        z	/ChannelsN)r!   r"   rg   )r'   r   r(   s     r)   r"   zChannelList.__init__l  s     	!	r*   r   identitychat_user_friendly_namechat_friendly_nametargetchat_unique_namepre_engagement_datar   task_attributes
long_livedr+   c                     t        j                  |||||||||	t        j                  |
      d
      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||      S )z{
        Internal helper for create operation

        Returns:
            tuple: (payload, status_code, headers)
        
FlexFlowSidIdentityChatUserFriendlyNameChatFriendlyNameTargetChatUniqueNamePreEngagementDataTaskSidTaskAttributes	LongLivedContent-Type!application/x-www-form-urlencodedr   r   POSTrk   rl   rx   rm   )r   rn   r   boolean_to_stringr/   create_with_response_inforg   r'   r   r   r   r   r   r   r   r   r   r   rx   rm   s                r)   _createzChannelList._createw  s    ( yy,$(?$6 "2%8#"1&88D
 ))^-PQR"E.}}66tyytW 7 
 	
r*   c                 l    | j                  |||||||||	|

      \  }}}t        | j                  |      S )a  
        Create the ChannelInstance

        :param flex_flow_sid: The SID of the Flex Flow.
        :param identity: The `identity` value that uniquely identifies the new resource's chat User.
        :param chat_user_friendly_name: The chat participant's friendly name.
        :param chat_friendly_name: The chat channel's friendly name.
        :param target: The Target Contact Identity, for example the phone number of an SMS.
        :param chat_unique_name: The chat channel's unique name.
        :param pre_engagement_data: The pre-engagement data.
        :param task_sid: The SID of the TaskRouter Task. Only valid when integration type is `task`. `null` for integration types `studio` & `external`
        :param task_attributes: The Task attributes to be added for the TaskRouter Task.
        :param long_lived: Whether to create the channel as long-lived.

        :returns: The created ChannelInstance
        
r   r   r   r   r   r   r   r   r   r   )r   r   r/   r'   r   r   r   r   r   r   r   r   r   r   r   ru   s                r)   createzChannelList.create  sN    : '$;1- 3+! % 
A t}}g66r*   c                     | j                  |||||||||	|

      \  }}}t        | j                  |      }t        |||      S )a  
        Create the ChannelInstance and return response metadata

        :param flex_flow_sid: The SID of the Flex Flow.
        :param identity: The `identity` value that uniquely identifies the new resource's chat User.
        :param chat_user_friendly_name: The chat participant's friendly name.
        :param chat_friendly_name: The chat channel's friendly name.
        :param target: The Target Contact Identity, for example the phone number of an SMS.
        :param chat_unique_name: The chat channel's unique name.
        :param pre_engagement_data: The pre-engagement data.
        :param task_sid: The SID of the TaskRouter Task. Only valid when integration type is `task`. `null` for integration types `studio` & `external`
        :param task_attributes: The Task attributes to be added for the TaskRouter Task.
        :param long_lived: Whether to create the channel as long-lived.

        :returns: ApiResponse with instance, status code, and headers
        r   rw   )r   r   r/   r   r'   r   r   r   r   r   r   r   r   r   r   r   ry   rm   r   s                  r)   create_with_http_infoz!ChannelList.create_with_http_info  s]    : )-'$;1- 3+! )5 )
%g #4==':k7SSr*   c                   K   t        j                  |||||||||	t        j                  |
      d
      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||       d{   S 7 w)	z
        Internal async helper for create operation

        Returns:
            tuple: (payload, status_code, headers)
        r   r   r   r   r   r   r   N)r   rn   r   r   r/   create_with_response_info_asyncrg   r   s                r)   _create_asynczChannelList._create_async  s     ( yy,$(?$6 "2%8#"1&88D
 ))^-PQR"E.]]BBtyytW C 
 
 	
 
s   BB
BB
c                    K   | j                  |||||||||	|

       d{   \  }}}t        | j                  |      S 7 w)a  
        Asynchronously create the ChannelInstance

        :param flex_flow_sid: The SID of the Flex Flow.
        :param identity: The `identity` value that uniquely identifies the new resource's chat User.
        :param chat_user_friendly_name: The chat participant's friendly name.
        :param chat_friendly_name: The chat channel's friendly name.
        :param target: The Target Contact Identity, for example the phone number of an SMS.
        :param chat_unique_name: The chat channel's unique name.
        :param pre_engagement_data: The pre-engagement data.
        :param task_sid: The SID of the TaskRouter Task. Only valid when integration type is `task`. `null` for integration types `studio` & `external`
        :param task_attributes: The Task attributes to be added for the TaskRouter Task.
        :param long_lived: Whether to create the channel as long-lived.

        :returns: The created ChannelInstance
        r   N)r   r   r/   r   s                r)   create_asynczChannelList.create_async&  s^     : #00'$;1- 3+! 1 
 
A t}}g66
s   AA Ac                    K   | j                  |||||||||	|

       d{   \  }}}t        | j                  |      }t        |||      S 7 ,w)a  
        Asynchronously create the ChannelInstance and return response metadata

        :param flex_flow_sid: The SID of the Flex Flow.
        :param identity: The `identity` value that uniquely identifies the new resource's chat User.
        :param chat_user_friendly_name: The chat participant's friendly name.
        :param chat_friendly_name: The chat channel's friendly name.
        :param target: The Target Contact Identity, for example the phone number of an SMS.
        :param chat_unique_name: The chat channel's unique name.
        :param pre_engagement_data: The pre-engagement data.
        :param task_sid: The SID of the TaskRouter Task. Only valid when integration type is `task`. `null` for integration types `studio` & `external`
        :param task_attributes: The Task attributes to be added for the TaskRouter Task.
        :param long_lived: Whether to create the channel as long-lived.

        :returns: ApiResponse with instance, status code, and headers
        r   Nrw   )r   r   r/   r   r   s                  r)   create_with_http_info_asyncz'ChannelList.create_with_http_info_asyncQ  sn     : /3.@.@'$;1- 3+! /A /
 )
%g #4==':k7SS)
s   AA-Alimit	page_sizec                     | j                   j                  ||      }| j                  |d         }| j                   j                  ||d         S )a]  
        Streams ChannelInstance 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ChannelList.stream}  sJ    ( **5)<yy6+#6y7}}##D&/::r*   c                    K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  ||d         S 7 #w)al  
        Asynchronously streams ChannelInstance 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ChannelList.stream_async  sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                     | j                   j                  ||      }| j                  |d         }| j                   j                  |j                  |d         }||j
                  |j                  fS )a  
        Streams ChannelInstance and returns headers from first page


        :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   )r/   r   page_with_http_infor   rx   ry   rm   r'   r   r   r   page_response	generators         r)   stream_with_http_infoz!ChannelList.stream_with_http_info  sk    $ **5)<006+;N0OMM((););VG_M	=44m6K6KLLr*   c                   K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  |j                  |d         }||j
                  |j                  fS 7 Fw)a  
        Asynchronously streams ChannelInstance and returns headers from first page


        :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   )r/   r   page_with_http_info_asyncr   rx   ry   rm   r   s         r)   stream_with_http_info_asyncz'ChannelList.stream_with_http_info_async  s     $ **5)<"<<[) = 
 
 MM..}/A/A6'?S	=44m6K6KLL
s   5B A>AB c                 :    t        | j                  ||            S )a  
        Lists ChannelInstance 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ChannelList.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 ChannelInstance 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ChannelList.list_async  sT     * '+&7&7# '8 ' !
 
 !
 
 	
 
s0   ;.;620
26;26;c                 b    | j                  ||      \  }}}t        |      }t        |||      S )a  
        Lists ChannelInstance and returns headers from first page


        :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   )r'   r   r   r   ry   rm   rW   s          r)   list_with_http_infozChannelList.list_with_http_info  sA    $ +/*D*D +E +
'	; Y;PPr*   c                    K   | j                  ||       d{   \  }}}|2 cg c3 d{   }|7 7 	6 nc c}w }}t        |||      S w)a  
        Asynchronously lists ChannelInstance and returns headers from first page


        :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   )r'   r   r   r   ry   rm   r   rW   s           r)   list_with_http_info_asyncz%ChannelList.list_with_http_info_async/  sf     $ 150P0P 1Q 1
 +
'	; -666&	+
 7666;PPs4   A4A:86
8:A8:A
page_tokenpage_numberc                     t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      }t        | j                  |      S )as  
        Retrieve a single page of ChannelInstance 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 ChannelInstance
        	PageTokenr   PageSizer   r   r   r   r   rk   rl   paramsrm   )r   rn   r/   r   rg   r   r'   r   r   r   rx   rm   responses          r)   r   zChannelList.pageH  sy      yy'#%
 ))^-PQR.==%%diig & 
 4==(33r*   c                   K   t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  |      S 7 w)	a  
        Asynchronously retrieve a single page of ChannelInstance 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 ChannelInstance
        r   r   r   r   r   r   r   N)r   rn   r/   r   rg   r   r   s          r)   r   zChannelList.page_asynci  s       yy'#%
 ))^-PQR.11diig 2 
 
 4==(33
s   A"B$A?%Bc                    t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      \  }}}t        | j                  |      }	t        |	||      S )	aY  
        Retrieve a single page with response metadata


        :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 ChannelPage, status code, and headers
        r   r   r   r   r   r   r   rw   )r   rn   r/   page_with_response_inforg   r   r   
r'   r   r   r   rx   rm   r   ry   response_headersr   s
             r)   r   zChannelList.page_with_http_info  s      yy'#%
 ))^-PQR.26--2W2Wdiig 3X 3
/+/ 4==(3+GWXXr*   c                 *  K   t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   \  }}}t        | j                  |      }	t        |	||	      S 7 ,w)
ah  
        Asynchronously retrieve a single page with response metadata


        :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 ChannelPage, status code, and headers
        r   r   r   r   r   r   r   Nrw   )r   rn   r/   page_with_response_info_asyncrg   r   r   r   s
             r)   r   z%ChannelList.page_with_http_info_async  s       yy'#%
 ))^-PQR. --==$))D' >   	0+/
 4==(3+GWXXs   A"B$B%-B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   |      S )z
        Retrieve a specific page of ChannelInstance records from the API.
        Request is executed immediately

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

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

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

        :returns: Page of ChannelInstance
        r   N)r/   r   r   request_asyncr   r   s      r)   get_page_asynczChannelList.get_page_async  sD      --44BB5*UU4==(33 Vs   4AAAr   c                 0    t        | j                  |      S zv
        Constructs a ChannelContext

        :param sid: The SID of the Flex chat channel resource to fetch.
        r-   r.   r/   r'   r   s     r)   r#   zChannelList.get       dmm55r*   c                 0    t        | j                  |      S r  r  r  s     r)   __call__zChannelList.__call__  r  r*   c                      y)rH   z<Twilio.FlexApi.V1.ChannelList>rf   r0   s    r)   rZ   zChannelList.__repr__  r   r*   )NN)-r[   r\   r]   r   r"   r   unsetr_   r   objectra   r   r   r   r   r   r   r   r   r   r   intr	   r   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r.   r#   r  rZ   rb   rc   s   @r)   r   r   j  s   	  	 " &,\\/5||28,,'-||.4ll*0,,*
*
 *
 "%	*

  *
 c6k"*
  V,*
 #3;/*
 V$*
 sF{+*
 $,'*
 
*
d &,\\/5||28,,'-||.4ll*0,,)7)7 )7 "%	)7
  )7 c6k")7  V,)7 #3;/)7 V$)7 sF{+)7 $,')7 
)7b &,\\/5||28,,'-||.4ll*0,,*T*T *T "%	*T
  *T c6k"*T  V,*T #3;/*T V$*T sF{+*T $,'*T 
*Td &,\\/5||28,,'-||.4ll*0,,*
*
 *
 "%	*

  *
 c6k"*
  V,*
 #3;/*
 V$*
 sF{+*
 $,'*
 
*
d &,\\/5||28,,'-||.4ll*0,,)7)7 )7 "%	)7
  )7 c6k")7  V,)7 #3;/)7 V$)7 sF{+)7 $,')7 
)7b &,\\/5||28,,'-||.4ll*0,,*T*T *T "%	*T
  *T c6k"*T  V,*T #3;/*T V$*T sF{+*T $,'*T 
*T\  $#';}; C=; 
/	"	;6  $#'A}A C=A 
	'	A6  $#'M}M C=M 
	M4  $#'M}M C=M 
	M8  $#'
}
 C=
 
o		
8  $#'
}
 C=
 
o		
:  $#'Q}Q C=Q 
	Q6  $#'Q}Q C=Q 
	Q6 *0*0,,(.	4#v+&4 3;'4 f%	4
 
4F *0*0,,(.	4#v+&4 3;'4 f%	4
 
4F *0*0,,(.	 Y#v+& Y 3;' Y f%	 Y
 
 YH *0*0,,(.	"Y#v+&"Y 3;'"Y f%	"Y
 
"YH
43 
4; 
4
4s 
4{ 
46s 6~ 66C 6N 61# 1r*   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   r.   r   r   rf   r*   r)   <module>r     sm     L L L 6 6 0 8 : 2 ' !AH& AHHvG_ vGr1$ 1&T
1, T
1r*   