o
    �¨Êh<;  ã                   @   sœ   d 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
 ddlmZ G d	d
„ d
e
ƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZdS )za
This code was generated by
\ / _    _  _|   _  _
 | (_)\/(_)(_|\/| |(/_  v1.0.0
      /       /
é    )Údeserialize)Ú	serialize)Úvalues)ÚInstanceContext)ÚInstanceResource)ÚListResource)ÚPagec                       sŒ   e Zd ZdZ‡ fdd„Zejfdd„Zejddfdd„Zejddfd	d
„Z	ejejejejfdd„Z
dd„ Zdd„ Zdd„ Zdd„ Z‡  ZS )Ú
InviteListú  c                    s4   t t| ƒ |¡ ||dœ| _djdi | j¤Ž| _dS )a™  
        Initialize the InviteList

        :param Version version: Version that contains the resource
        :param service_sid: The unique id of the Service this member belongs to.
        :param channel_sid: The unique id of the Channel for this member.

        :returns: twilio.rest.chat.v2.service.channel.invite.InviteList
        :rtype: twilio.rest.chat.v2.service.channel.invite.InviteList
        ©Úservice_sidÚchannel_sidz6/Services/{service_sid}/Channels/{channel_sid}/InvitesN© )Úsuperr	   Ú__init__Ú	_solutionÚformatÚ_uri)ÚselfÚversionr   r   ©Ú	__class__r   ú\/var/www/html/env/lib/python3.10/site-packages/twilio/rest/chat/v2/service/channel/invite.pyr      s   zInviteList.__init__c                 C   sB   t  ||dœ¡}| jjd| j|d�}t| j|| jd | jd d�S )aF  
        Create a new InviteInstance

        :param unicode identity: A unique string identifier for this User in this Service.
        :param unicode role_sid: The Role assigned to this member.

        :returns: Newly created InviteInstance
        :rtype: twilio.rest.chat.v2.service.channel.invite.InviteInstance
        )ÚIdentityÚRoleSidÚPOST)Údatar   r   r   )r   ÚofÚ_versionÚcreater   ÚInviteInstancer   )r   ÚidentityÚrole_sidr   Úpayloadr   r   r   r   &   s   
ýüzInviteList.createNc                 C   s8   | j  ||¡}| j||d d�}| j  ||d |d ¡S )a  
        Streams InviteInstance 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 unicode identity: A unique string identifier for this User in this Service.
        :param int limit: Upper limit for the number of records to return. stream()
                          guarantees to never return more than limit.  Default is no limit
        :param int 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
        :rtype: list[twilio.rest.chat.v2.service.channel.invite.InviteInstance]
        Ú	page_size)r!   r$   ÚlimitÚ
page_limit)r   Úread_limitsÚpageÚstream)r   r!   r%   r$   Úlimitsr(   r   r   r   r)   ?   s   zInviteList.streamc                 C   s   t | j|||d�ƒS )a¿  
        Lists InviteInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param unicode identity: A unique string identifier for this User in this Service.
        :param int limit: Upper limit for the number of records to return. list() guarantees
                          never to return more than limit.  Default is no limit
        :param int 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: Generator that will yield up to limit results
        :rtype: list[twilio.rest.chat.v2.service.channel.invite.InviteInstance]
        )r!   r%   r$   )Úlistr)   )r   r!   r%   r$   r   r   r   r+   W   s   zInviteList.listc                 C   sD   t  t |dd„ ¡|||dœ¡}| jjd| j|d�}t| j|| jƒS )a  
        Retrieve a single page of InviteInstance records from the API.
        Request is executed immediately

        :param unicode identity: A unique string identifier for this User in this Service.
        :param str page_token: PageToken provided by the API
        :param int page_number: Page Number, this value is simply for client state
        :param int page_size: Number of records to return, defaults to 50

        :returns: Page of InviteInstance
        :rtype: twilio.rest.chat.v2.service.channel.invite.InvitePage
        c                 S   s   | S ©Nr   )Úer   r   r   Ú<lambda>y   s    z!InviteList.page.<locals>.<lambda>)r   Ú	PageTokenr   ÚPageSizeÚGET©Úparams)	r   r   r   Úmapr   r(   r   Ú
InvitePager   )r   r!   Ú
page_tokenÚpage_numberr$   r3   Úresponser   r   r   r(   j   s   üýzInviteList.pagec                 C   s"   | j jj d|¡}t| j || jƒS )a;  
        Retrieve a specific page of InviteInstance records from the API.
        Request is executed immediately

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

        :returns: Page of InviteInstance
        :rtype: twilio.rest.chat.v2.service.channel.invite.InvitePage
        r1   )r   ÚdomainÚtwilioÚrequestr5   r   )r   Ú
target_urlr8   r   r   r   Úget_page‡   s
   

þzInviteList.get_pagec                 C   ó   t | j| jd | jd |d�S ©zÞ
        Constructs a InviteContext

        :param sid: The sid

        :returns: twilio.rest.chat.v2.service.channel.invite.InviteContext
        :rtype: twilio.rest.chat.v2.service.channel.invite.InviteContext
        r   r   ©r   r   Úsid©ÚInviteContextr   r   ©r   rA   r   r   r   Úget˜   ó   	üzInviteList.getc                 C   r>   r?   rB   rD   r   r   r   Ú__call__¨   rF   zInviteList.__call__c                 C   ó   dS )úz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z<Twilio.Chat.V2.InviteList>r   ©r   r   r   r   Ú__repr__¸   ó   zInviteList.__repr__)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Úunsetr   r)   r+   r(   r=   rE   rG   rK   Ú__classcell__r   r   r   r   r	      s    
ÿr	   c                       s0   e Zd ZdZ‡ fdd„Zdd„ Zdd„ Z‡  ZS )r5   r
   c                    s   t t| ƒ ||¡ || _dS )aÑ  
        Initialize the InvitePage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API
        :param service_sid: The unique id of the Service this member belongs to.
        :param channel_sid: The unique id of the Channel for this member.

        :returns: twilio.rest.chat.v2.service.channel.invite.InvitePage
        :rtype: twilio.rest.chat.v2.service.channel.invite.InvitePage
        N)r   r5   r   r   )r   r   r8   Úsolutionr   r   r   r   Å   s   
zInvitePage.__init__c                 C   s   t | j|| jd | jd d�S )a  
        Build an instance of InviteInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.chat.v2.service.channel.invite.InviteInstance
        :rtype: twilio.rest.chat.v2.service.channel.invite.InviteInstance
        r   r   r   )r    r   r   )r   r#   r   r   r   Úget_instanceÖ   s   	üzInvitePage.get_instancec                 C   rH   )rI   z<Twilio.Chat.V2.InvitePage>r   rJ   r   r   r   rK   æ   rL   zInvitePage.__repr__)rM   rN   rO   rP   r   rT   rK   rR   r   r   r   r   r5   Â   s
    r5   c                       s8   e Zd ZdZ‡ fdd„Zdd„ Zdd„ Zdd	„ Z‡  ZS )
rC   r
   c                    s6   t t| ƒ |¡ |||dœ| _djdi | j¤Ž| _dS )a{  
        Initialize the InviteContext

        :param Version version: Version that contains the resource
        :param service_sid: The service_sid
        :param channel_sid: The channel_sid
        :param sid: The sid

        :returns: twilio.rest.chat.v2.service.channel.invite.InviteContext
        :rtype: twilio.rest.chat.v2.service.channel.invite.InviteContext
        r@   z</Services/{service_sid}/Channels/{channel_sid}/Invites/{sid}Nr   )r   rC   r   r   r   r   )r   r   r   r   rA   r   r   r   r   ó   s   zInviteContext.__init__c                 C   sD   t  i ¡}| jjd| j|d�}t| j|| jd | jd | jd d�S )úœ
        Fetch a InviteInstance

        :returns: Fetched InviteInstance
        :rtype: twilio.rest.chat.v2.service.channel.invite.InviteInstance
        r1   r2   r   r   rA   r@   )r   r   r   Úfetchr   r    r   )r   r3   r#   r   r   r   rV     s   
ýûzInviteContext.fetchc                 C   s   | j  d| j¡S )ú}
        Deletes the InviteInstance

        :returns: True if delete succeeds, False otherwise
        :rtype: bool
        Údelete)r   rX   r   rJ   r   r   r   rX     s   zInviteContext.deletec                 C   ó$   d  dd„ | j ¡ D ƒ¡}d |¡S )rI   ú c                 s   ó    � | ]\}}d   ||¡V  qdS ©z{}={}N©r   ©Ú.0ÚkÚvr   r   r   Ú	<genexpr>,  ó   € z)InviteContext.__repr__.<locals>.<genexpr>z!<Twilio.Chat.V2.InviteContext {}>©Újoinr   Úitemsr   ©r   Úcontextr   r   r   rK   %  ó   
zInviteContext.__repr__)	rM   rN   rO   rP   r   rV   rX   rK   rR   r   r   r   r   rC   ð   s    	rC   c                       s¾   e Zd ZdZd!‡ fdd„	Zedd„ ƒZedd„ ƒZed	d
„ ƒZedd„ ƒZ	edd„ ƒZ
edd„ ƒZedd„ ƒZedd„ ƒZedd„ ƒZedd„ ƒZedd„ ƒZdd„ Zdd„ Zdd „ Z‡  ZS )"r    r
   Nc                    s‚   t t| ƒ |¡ |d |d |d |d |d t |d ¡t |d ¡|d |d	 |d
 dœ
| _d| _|||p;| jd dœ| _dS )zÆ
        Initialize the InviteInstance

        :returns: twilio.rest.chat.v2.service.channel.invite.InviteInstance
        :rtype: twilio.rest.chat.v2.service.channel.invite.InviteInstance
        rA   Úaccount_sidr   r   r!   Údate_createdÚdate_updatedr"   Ú
created_byÚurl)
rA   rj   r   r   r!   rk   rl   r"   rm   rn   Nr@   )r   r    r   r   Úiso8601_datetimeÚ_propertiesÚ_contextr   )r   r   r#   r   r   rA   r   r   r   r   3  s"   öýzInviteInstance.__init__c                 C   s6   | j du rt| j| jd | jd | jd d�| _ | j S )a1  
        Generate an instance context for the instance, the context is capable of
        performing various actions.  All instance actions are proxied to the context

        :returns: InviteContext for this InviteInstance
        :rtype: twilio.rest.chat.v2.service.channel.invite.InviteContext
        Nr   r   rA   r@   )rq   rC   r   r   rJ   r   r   r   Ú_proxyR  s   
	üzInviteInstance._proxyc                 C   ó
   | j d S )zq
        :returns: A 34 character string that uniquely identifies this resource.
        :rtype: unicode
        rA   ©rp   rJ   r   r   r   rA   d  ó   
zInviteInstance.sidc                 C   rs   )zm
        :returns: The unique id of the Account responsible for this member.
        :rtype: unicode
        rj   rt   rJ   r   r   r   rj   l  ru   zInviteInstance.account_sidc                 C   rs   )za
        :returns: The unique id of the Channel for this member.
        :rtype: unicode
        r   rt   rJ   r   r   r   r   t  ru   zInviteInstance.channel_sidc                 C   rs   )zh
        :returns: The unique id of the Service this member belongs to.
        :rtype: unicode
        r   rt   rJ   r   r   r   r   |  ru   zInviteInstance.service_sidc                 C   rs   )zm
        :returns: A unique string identifier for this User in this Service.
        :rtype: unicode
        r!   rt   rJ   r   r   r   r!   „  ru   zInviteInstance.identityc                 C   rs   )z]
        :returns: The date that this resource was created.
        :rtype: datetime
        rk   rt   rJ   r   r   r   rk   Œ  ru   zInviteInstance.date_createdc                 C   rs   )zb
        :returns: The date that this resource was last updated.
        :rtype: datetime
        rl   rt   rJ   r   r   r   rl   ”  ru   zInviteInstance.date_updatedc                 C   rs   )zU
        :returns: The Role assigned to this member.
        :rtype: unicode
        r"   rt   rJ   r   r   r   r"   œ  ru   zInviteInstance.role_sidc                 C   rs   )zB
        :returns: The created_by
        :rtype: unicode
        rm   rt   rJ   r   r   r   rm   ¤  ru   zInviteInstance.created_byc                 C   rs   )zT
        :returns: An absolute URL for this member.
        :rtype: unicode
        rn   rt   rJ   r   r   r   rn   ¬  ru   zInviteInstance.urlc                 C   ó
   | j  ¡ S )rU   )rr   rV   rJ   r   r   r   rV   ´  ó   
zInviteInstance.fetchc                 C   rv   )rW   )rr   rX   rJ   r   r   r   rX   ½  rw   zInviteInstance.deletec                 C   rY   )rI   rZ   c                 s   r[   r\   r]   r^   r   r   r   rb   Í  rc   z*InviteInstance.__repr__.<locals>.<genexpr>z"<Twilio.Chat.V2.InviteInstance {}>rd   rg   r   r   r   rK   Æ  ri   zInviteInstance.__repr__r,   )rM   rN   rO   rP   r   Úpropertyrr   rA   rj   r   r   r!   rk   rl   r"   rm   rn   rV   rX   rK   rR   r   r   r   r   r    0  s8    










		r    N)rP   Útwilio.baser   r   r   Útwilio.base.instance_contextr   Útwilio.base.instance_resourcer   Útwilio.base.list_resourcer   Útwilio.base.pager   r	   r5   rC   r    r   r   r   r   Ú<module>   s    1.@