
    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 - Conversations
    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 G d de      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e   dd fdZdee   dd fdZdee   defdZdee   defdZdefdZ xZS )RoleInstancec                       e Zd ZdZdZy)RoleInstance.RoleTypeconversationserviceN)__name__
__module____qualname__CONVERSATIONSERVICE     _/home/sas/my/fyp/ringai/.venv/lib/python3.12/site-packages/twilio/rest/conversations/v1/role.pyRoleTyper      s    %r    r"   versionpayloadsidc                 8   t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _        t        j                  |j                  d            | _        |j                  d	      | _        d|xs | j                  i| _        d | _        y )
Nr%   account_sidchat_service_sidfriendly_nametypepermissionsdate_createddate_updatedurl)super__init__getr%   r'   r(   r)   r*   r+   r   iso8601_datetimer,   r-   r.   	_solution_context)selfr#   r$   r%   	__class__s       r!   r0   zRoleInstance.__init__,   s     	!")++e"4*1++m*D/6{{;M/N,3KK,H7>{{67J	07M0J0;0L0LKK'1
 1<0L0LKK'1
 #*++e"4 3?$((
 04r    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: RoleContext for this RoleInstance
        r%   r%   )r4   RoleContext_versionr3   r5   s    r!   _proxyzRoleInstance._proxyD   s9     == 'NN5)DM }}r    c                 6    | j                   j                         S zg
        Deletes the RoleInstance


        :returns: True if delete succeeds, False otherwise
        )r=   deleter<   s    r!   r@   zRoleInstance.deleteS   s     {{!!##r    c                 R   K   | j                   j                          d{   S 7 wz
        Asynchronous coroutine that deletes the RoleInstance


        :returns: True if delete succeeds, False otherwise
        N)r=   delete_asyncr<   s    r!   rC   zRoleInstance.delete_async\   s!      [[--////   '%'c                 6    | j                   j                         S )z
        Deletes the RoleInstance with HTTP info


        :returns: ApiResponse with success boolean, status code, and headers
        )r=   delete_with_http_infor<   s    r!   rF   z"RoleInstance.delete_with_http_infoe   s     {{0022r    c                 R   K   | j                   j                          d{   S 7 w)z
        Asynchronous coroutine that deletes the RoleInstance with HTTP info


        :returns: ApiResponse with success boolean, status code, and headers
        N)r=   delete_with_http_info_asyncr<   s    r!   rH   z(RoleInstance.delete_with_http_info_asyncn   s!      [[<<>>>>rD   c                 6    | j                   j                         S )U
        Fetch the RoleInstance


        :returns: The fetched RoleInstance
        )r=   fetchr<   s    r!   rK   zRoleInstance.fetchw   s     {{  ""r    c                 R   K   | j                   j                          d{   S 7 w)o
        Asynchronous coroutine to fetch the RoleInstance


        :returns: The fetched RoleInstance
        N)r=   fetch_asyncr<   s    r!   rN   zRoleInstance.fetch_async   s!      [[,,....rD   c                 6    | j                   j                         S )z
        Fetch the RoleInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        )r=   fetch_with_http_infor<   s    r!   rP   z!RoleInstance.fetch_with_http_info   s     {{//11r    c                 R   K   | j                   j                          d{   S 7 w)z
        Asynchronous coroutine to fetch the RoleInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        N)r=   fetch_with_http_info_asyncr<   s    r!   rR   z'RoleInstance.fetch_with_http_info_async   s!      [[;;====rD   
permissionc                 :    | j                   j                  |      S )  
        Update the RoleInstance

        :param permission: A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`.

        :returns: The updated RoleInstance
        rS   )r=   updater5   rS   s     r!   rW   zRoleInstance.update   s#     {{!!! " 
 	
r    c                 V   K   | j                   j                  |       d{   S 7 w)3  
        Asynchronous coroutine to update the RoleInstance

        :param permission: A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`.

        :returns: The updated RoleInstance
        rV   N)r=   update_asyncrX   s     r!   r[   zRoleInstance.update_async   s1      [[--! . 
 
 	
 
    )')c                 :    | j                   j                  |      S )aC  
        Update the RoleInstance with HTTP info

        :param permission: A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`.

        :returns: ApiResponse with instance, status code, and headers
        rV   )r=   update_with_http_inforX   s     r!   r^   z"RoleInstance.update_with_http_info   s#     {{00! 1 
 	
r    c                 V   K   | j                   j                  |       d{   S 7 w)a]  
        Asynchronous coroutine to update the RoleInstance with HTTP info

        :param permission: A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`.

        :returns: ApiResponse with instance, status code, and headers
        rV   N)r=   update_with_http_info_asyncrX   s     r!   r`   z(RoleInstance.update_with_http_info_async   s1      [[<<! = 
 
 	
 
r\   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(RoleInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z)<Twilio.Conversations.V1.RoleInstance {}>joinr3   itemsrg   r5   contexts     r!   __repr__zRoleInstance.__repr__   s6     ((SDNN<P<P<RSS:AA'JJr    N)r7   r:   )r7   r   )r   r   r   objectr"   r   r   strr   r   r0   propertyr=   boolr@   rC   r   rF   rH   rK   rN   rP   rR   r   rW   r[   r^   r`   rt   __classcell__r6   s   @r!   r   r      s   6 
 OS44)-c3h4>Fsm40  $ $0D 03{ 3?; ?#/2k 2>+ >

c 

~ 



T#Y 

> 



S	 

k 



DI 

+ 

K# Kr    r   c                   H    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e   defdZdee   defdZdee   de
fdZdee   defdZdee   defdZdee   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 RoleContext

        :param version: Version that contains the resource
        :param sid: The SID of the Role resource to update.
        r%   z/Roles/{sid}Nr   )r/   r0   r3   rg   _uri)r5   r#   r%   r6   s      r!   r0   zRoleContext.__init__   s?     	! 3
 *N));DNN;	r    r7   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_infor~   r5   r   s     r!   _deletezRoleContext._delete   s8     ))B-}}66G 7 
 	
r    c                 .    | j                         \  }}}|S r?   )r   r5   success_s      r!   r@   zRoleContext.delete   s     Ar    c                 F    | j                         \  }}}t        |||      S )z
        Deletes the RoleInstance and return response metadata


        :returns: ApiResponse with success boolean, status code, and headers
        datastatus_coder   )r   r   r5   r   r   r   s       r!   rF   z!RoleContext.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)
        r   r   N)r   r   r;   delete_with_response_info_asyncr~   r   s     r!   _delete_asynczRoleContext._delete_async  sG      ))B-]]BBG C 
 
 	
 
s   AA
AA
c                 J   K   | j                          d{   \  }}}|S 7 
wrB   )r   r   s      r!   rC   zRoleContext.delete_async  s)      #0022A 3s   #!#c                 b   K   | j                          d{   \  }}}t        |||      S 7 w)z
        Asynchronous coroutine that deletes the RoleInstance and return response metadata


        :returns: ApiResponse with success boolean, status code, and headers
        Nr   )r   r   r   s       r!   rH   z'RoleContext.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GETr   )r   r   r;   fetch_with_response_infor~   r   s     r!   _fetchzRoleContext._fetch*  sB     ))B-.}}55dii 6 
 	
r    c                 t    | j                         \  }}}t        | j                  || j                  d         S )rJ   r%   r9   )r   r   r;   r3   r5   r$   r   s      r!   rK   zRoleContext.fetch:  s8     AMMu%
 	
r    c                     | j                         \  }}}t        | j                  || j                  d         }t	        |||      S )z
        Fetch the RoleInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        r%   r9   r   )r   r   r;   r3   r   r5   r$   r   r   instances        r!   rP   z RoleContext.fetch_with_http_infoH  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   r   N)r   r   r;   fetch_with_response_info_asyncr~   r   s     r!   _fetch_asynczRoleContext._fetch_asyncW  sQ      ))B-.]]AAdii B 
 
 	
 
s   AAA	Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d         S 7 -w)rM   Nr%   r9   )r   r   r;   r3   r   s      r!   rN   zRoleContext.fetch_asyncg  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 RoleInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        Nr%   r9   r   )r   r   r;   r3   r   r   s        r!   rR   z&RoleContext.fetch_with_http_info_asyncu  sW      /3.?.?.A(A%gMMu%

 k7SS )Bs   AA<ArS   c                     t        j                  dt        j                  |d       i      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||      S )	z{
        Internal helper for update operation

        Returns:
            tuple: (payload, status_code, headers)
        
Permissionc                     | S ru   r   es    r!   <lambda>z%RoleContext._update.<locals>.<lambda>      ! r    !application/x-www-form-urlencodedContent-Typer   r   POSTr   r   r   r   )r   r   r   mapr;   update_with_response_infor~   r5   rS   r   r   s       r!   _updatezRoleContext._update  ss     yyimmJD

 ))B-"E.}}66tyytW 7 
 	
r    c                 x    | j                  |      \  }}}t        | j                  || j                  d         S )rU   rV   r%   r9   )r   r   r;   r3   r5   rS   r$   r   s       r!   rW   zRoleContext.update  s6     
;ADMM7u8MNNr    c                     | j                  |      \  }}}t        | j                  || j                  d         }t	        |||      S )aQ  
        Update the RoleInstance and return response metadata

        :param permission: A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`.

        :returns: ApiResponse with instance, status code, and headers
        rV   r%   r9   r   )r   r   r;   r3   r   r5   rS   r$   r   r   r   s         r!   r^   z!RoleContext.update_with_http_info  sE     )-
(K%gwDNN5<QRk7SSr    c                   K   t        j                  dt        j                  |d       i      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||       d	{   S 7 w)
z
        Internal async helper for update operation

        Returns:
            tuple: (payload, status_code, headers)
        r   c                     | S ru   r   r   s    r!   r   z+RoleContext._update_async.<locals>.<lambda>  r   r    r   r   r   r   r   r   N)r   r   r   r   r;   update_with_response_info_asyncr~   r   s       r!   _update_asynczRoleContext._update_async  s      yyimmJD

 ))B-"E.]]BBtyytW C 
 
 	
 
s   A8B:A?;Bc                    K   | j                  |       d{   \  }}}t        | j                  || j                  d         S 7 -w)rZ   rV   Nr%   r9   )r   r   r;   r3   r   s       r!   r[   zRoleContext.update_async  sF      #00J0GGADMM7u8MNN Hs   AA.Ac                    K   | j                  |       d{   \  }}}t        | j                  || j                  d         }t	        |||      S 7 ;w)ak  
        Asynchronous coroutine to update the RoleInstance and return response metadata

        :param permission: A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`.

        :returns: ApiResponse with instance, status code, and headers
        rV   Nr%   r9   r   )r   r   r;   r3   r   r   s         r!   r`   z'RoleContext.update_with_http_info_async  sU      /3.@.@J.@.W(W%gwDNN5<QRk7SS )Xs   AA<Ac                     dj                  d | j                  j                         D              }dj                  |      S )rb   rc   c              3   F   K   | ]  \  }}d j                  ||        ywre   rf   rh   s      r!   rl   z'RoleContext.__repr__.<locals>.<genexpr>  rm   rn   z(<Twilio.Conversations.V1.RoleContext {}>ro   rr   s     r!   rt   zRoleContext.__repr__  s6     ((SDNN<P<P<RSS9@@IIr    )r   r   r   r   rw   r0   tupler   ry   r@   r   rF   r   rC   rH   r   r   rK   rP   r   rN   rR   r   r   rW   r^   r   r[   r`   rt   rz   r{   s   @r!   r:   r:      sR   < <c <
 
 S{ S
U 
D S; S
 
 
| 
Tk T
E 
 
< 
T+ T
$s) 
 
.	Oc 	O| 	O
TS	 
Tk 
T
d3i 
E 
.	OT#Y 	O< 	O
TDI 
T+ 
TJ# Jr    r:   c                   2    e Zd Zdeeef   defdZdefdZy)RolePager$   r7   c                 .    t        | j                  |      S )zj
        Build an instance of RoleInstance

        :param payload: Payload response from the API
        )r   r;   )r5   r$   s     r!   get_instancezRolePage.get_instance  s     DMM733r    c                      y)rb   z"<Twilio.Conversations.V1.RolePage>r   r<   s    r!   rt   zRolePage.__repr__       4r    N)	r   r   r   r   rw   r   r   r   rt   r   r    r!   r   r     s)    4DcN 4| 44# 4r    r   c            	       T    e Zd Zdef fdZdedddee   defdZdedddee   de	fd	Z
dedddee   defd
Zdedddee   defdZdedddee   de	fdZdedd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	 	 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 )&RoleListr#   c                 2    t         |   |       d| _        y)zf
        Initialize the RoleList

        :param version: Version that contains the resource

        z/RolesN)r/   r0   r~   )r5   r#   r6   s     r!   r0   zRoleList.__init__  s     	!	r    r)   r*   r   rS   r7   c                     t        j                  ||t        j                  |d       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)
        c                     | S ru   r   r   s    r!   r   z"RoleList._create.<locals>.<lambda>  r   r    FriendlyNameTyper   r   r   r   r   r   r   )r   r   r   r   r;   create_with_response_infor~   r5   r)   r*   rS   r   r   s         r!   _createzRoleList._create
  s~     yy -'mmJD
 ))^-PQR"E.}}66tyytW 7 
 	
r    c                 ^    | j                  |||      \  }}}t        | j                  |      S )a  
        Create the RoleInstance

        :param friendly_name: A descriptive string that you create to describe the new resource. It can be up to 64 characters long.
        :param type:
        :param permission: A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type`.

        :returns: The created RoleInstance
        r)   r*   rS   )r   r   r;   r5   r)   r*   rS   r$   r   s         r!   createzRoleList.create%  s7     'dz % 
A DMM733r    c                 z    | j                  |||      \  }}}t        | j                  |      }t        |||      S )a2  
        Create the RoleInstance and return response metadata

        :param friendly_name: A descriptive string that you create to describe the new resource. It can be up to 64 characters long.
        :param type:
        :param permission: A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type`.

        :returns: ApiResponse with instance, status code, and headers
        r   r   )r   r   r;   r   r5   r)   r*   rS   r$   r   r   r   s           r!   create_with_http_infozRoleList.create_with_http_info6  sF     )-'dz )5 )
%g  w7k7SSr    c                   K   t        j                  ||t        j                  |d       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)
        c                     | S ru   r   r   s    r!   r   z(RoleList._create_async.<locals>.<lambda>V  r   r    r   r   r   r   r   r   r   N)r   r   r   r   r;   create_with_response_info_asyncr~   r   s         r!   _create_asynczRoleList._create_asyncH  s      yy -'mmJD
 ))^-PQR"E.]]BBtyytW C 
 
 	
 
s   A<B>B?Bc                 z   K   | j                  |||       d{   \  }}}t        | j                  |      S 7 w)a	  
        Asynchronously create the RoleInstance

        :param friendly_name: A descriptive string that you create to describe the new resource. It can be up to 64 characters long.
        :param type:
        :param permission: A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type`.

        :returns: The created RoleInstance
        r   N)r   r   r;   r   s         r!   create_asynczRoleList.create_asyncc  sG      #00'dz 1 
 
A DMM733
s   ;9;c                    K   | j                  |||       d{   \  }}}t        | j                  |      }t        |||      S 7 ,w)aA  
        Asynchronously create the RoleInstance and return response metadata

        :param friendly_name: A descriptive string that you create to describe the new resource. It can be up to 64 characters long.
        :param type:
        :param permission: A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type`.

        :returns: ApiResponse with instance, status code, and headers
        r   Nr   )r   r   r;   r   r   s           r!   create_with_http_info_asyncz$RoleList.create_with_http_info_asynct  sW      /3.@.@'dz /A /
 )
%g  w7k7SS	)
s   A	A-A	limit	page_sizec                     | j                   j                  ||      }| j                  |d         }| j                   j                  ||d         S )aZ  
        Streams RoleInstance 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r5   r   r   limitsr   s        r!   r   zRoleList.stream  sJ    ( **5)<yy6+#6y7}}##D&/::r    c                    K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  ||d         S 7 #w)ai  
        Asynchronously streams RoleInstance 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RoleList.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 RoleInstance 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   r   r   r   r5   r   r   r   page_response	generators         r!   stream_with_http_infozRoleList.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 RoleInstance 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   r   r   r   r   s         r!   stream_with_http_info_asyncz$RoleList.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 RoleInstance 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   )r5   r   r   s      r!   r   zRoleList.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 RoleInstance 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   )r5   r   r   records       r!   
list_asynczRoleList.list_async  sT     * '+&7&7# '8 ' !
 
 !
 
 	
 
s0   ;.;620
26;26;c                 b    | j                  ||      \  }}}t        |      }t        |||      S )a  
        Lists RoleInstance 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   r   )r   r   r   )r5   r   r   r   r   r   rq   s          r!   list_with_http_infozRoleList.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 RoleInstance 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   Nr   )r   r   )r5   r   r   r   r   r   r   rq   s           r!   list_with_http_info_asyncz"RoleList.list_with_http_info_async8  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 )am  
        Retrieve a single page of RoleInstance 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 RoleInstance
        	PageTokenr   PageSizer   r   r   r   r   r   r   paramsr   )r   r   r;   r   r~   r   r5   r  r  r   r   r   responses          r!   r   zRoleList.pageQ  sy      yy'#%
 ))^-PQR.==%%diig & 
 x00r    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 RoleInstance 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 RoleInstance
        r  r   r   r   r   r   r  N)r   r   r;   r   r~   r   r
  s          r!   r   zRoleList.page_asyncr  s       yy'#%
 ))^-PQR.11diig 2 
 
 x00
s   A"B$A?%Bc                    t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      \  }}}t        | j                  |      }	t        |	||      S )	aV  
        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 RolePage, status code, and headers
        r  r   r   r   r   r   r  r   )r   r   r;   page_with_response_infor~   r   r   
r5   r  r  r   r   r   r  r   response_headersr   s
             r!   r   zRoleList.page_with_http_info  s      yy'#%
 ))^-PQR.26--2W2Wdiig 3X 3
/+/ x0+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)
ae  
        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 RolePage, status code, and headers
        r  r   r   r   r   r   r  Nr   )r   r   r;   page_with_response_info_asyncr~   r   r   r  s
             r!   r   z"RoleList.page_with_http_info_async  s       yy'#%
 ))^-PQR. --==$))D' >   	0+/
 x0+GWXXs   A"B$B%-B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   |      S )z
        Retrieve a specific page of RoleInstance records from the API.
        Request is executed immediately

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

        :returns: Page of RoleInstance
        r   )r;   domaintwiliorequestr   r5   r  r  s      r!   get_pagezRoleList.get_page  s7     ==''..66ujIx00r    c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   |      S 7 w)z
        Asynchronously retrieve a specific page of RoleInstance records from the API.
        Request is executed immediately

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

        :returns: Page of RoleInstance
        r   N)r;   r  r  request_asyncr   r  s      r!   get_page_asynczRoleList.get_page_async  sD      --44BB5*UUx00 Vs   4AAAr%   c                 0    t        | j                  |      S zg
        Constructs a RoleContext

        :param sid: The SID of the Role resource to update.
        r9   r:   r;   r5   r%   s     r!   r1   zRoleList.get       4==c22r    c                 0    t        | j                  |      S r  r  r   s     r!   __call__zRoleList.__call__  r!  r    c                      y)rb   z"<Twilio.Conversations.V1.RoleList>r   r<   s    r!   rt   zRoleList.__repr__  r   r    )NN),r   r   r   r   r0   rw   r   r   r   r   r   r   r   r   r   r   r   intr	   r   r
   r   r   r   r   r   r   r  r   unsetr   rv   r   r   r   r   r   r  r  r:   r1   r#  rt   rz   r{   s   @r!   r   r     s   	 	
 
(?
MQRUY
	
64 4(?4MQRUY4	4"T T(?TMQRUYT	T$
 
(?
MQRUY
	
64 4(?4MQRUY4	4"T T(?TMQRUYT	T(  $#';}; C=; 
,		;6  $#'A}A C=A 
|	$	A6  $#'M}M C=M 
	M4  $#'M}M C=M 
	M8  $#'
}
 C=
 
l		
8  $#'
}
 C=
 
l		
:  $#'Q}Q C=Q 
	Q6  $#'Q}Q C=Q 
	Q6 *0*0,,(.	1#v+&1 3;'1 f%	1
 
1F *0*0,,(.	1#v+&1 3;'1 f%	1
 
1F *0*0,,(.	 Y#v+& Y 3;' Y f%	 Y
 
 YH *0*0,,(.	"Y#v+&"Y 3;'"Y f%	"Y
 
"YH
13 
18 
1
1s 
1x 
13s 3{ 33C 3K 34# 4r    r   N)__doc__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   r   r    r!   <module>r0     sm     L L L 6 6 0 8 : 2 ' !xK# xKvRJ/ RJj4t 4&J4| J4r    