o
    �¨ÊhÔ3  ã                   @   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 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)Úvalues)ÚInstanceContext)ÚInstanceResource)ÚListResource)ÚPagec                       sj   e Zd ZdZ‡ fdd„Zddd„Zddd„Zejejejfd	d
„Z	dd„ Z
dd„ Zdd„ Zdd„ Z‡  ZS )Ú
MemberListú  c                    s4   t t| ƒ |¡ ||dœ| _djdi | j¤Ž| _dS )aq  
        Initialize the MemberList

        :param Version version: Version that contains the resource
        :param account_sid: The account_sid
        :param queue_sid: A string that uniquely identifies this queue

        :returns: twilio.rest.api.v2010.account.queue.member.MemberList
        :rtype: twilio.rest.api.v2010.account.queue.member.MemberList
        ©Úaccount_sidÚ	queue_sidz7/Accounts/{account_sid}/Queues/{queue_sid}/Members.jsonN© )Úsuperr   Ú__init__Ú	_solutionÚformatÚ_uri)ÚselfÚversionr   r   ©Ú	__class__r   ú\/var/www/html/env/lib/python3.10/site-packages/twilio/rest/api/v2010/account/queue/member.pyr      s   zMemberList.__init__Nc                 C   s6   | j  ||¡}| j|d d�}| j  ||d |d ¡S )aÄ  
        Streams MemberInstance 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 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.api.v2010.account.queue.member.MemberInstance]
        Ú	page_size)r   ÚlimitÚ
page_limit)Ú_versionÚread_limitsÚpageÚstream)r   r   r   Úlimitsr   r   r   r   r   %   s   zMemberList.streamc                 C   s   t | j||d�ƒS )ad  
        Lists MemberInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :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.api.v2010.account.queue.member.MemberInstance]
        )r   r   )Úlistr   )r   r   r   r   r   r   r    <   s   zMemberList.listc                 C   s6   t  |||dœ¡}| jjd| j|d�}t| j|| jƒS )aÃ  
        Retrieve a single page of MemberInstance records from the API.
        Request is executed immediately

        :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 MemberInstance
        :rtype: twilio.rest.api.v2010.account.queue.member.MemberPage
        )Ú	PageTokenr   ÚPageSizeÚGET©Úparams)r   Úofr   r   r   Ú
MemberPager   )r   Ú
page_tokenÚpage_numberr   r%   Úresponser   r   r   r   N   s   ýzMemberList.pagec                 C   s"   | j jj d|¡}t| j || jƒS )a;  
        Retrieve a specific page of MemberInstance records from the API.
        Request is executed immediately

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

        :returns: Page of MemberInstance
        :rtype: twilio.rest.api.v2010.account.queue.member.MemberPage
        r#   )r   ÚdomainÚtwilioÚrequestr'   r   )r   Ú
target_urlr*   r   r   r   Úget_pagee   s
   

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

        :param call_sid: The call_sid

        :returns: twilio.rest.api.v2010.account.queue.member.MemberContext
        :rtype: twilio.rest.api.v2010.account.queue.member.MemberContext
        r   r   ©r   r   Úcall_sid©ÚMemberContextr   r   ©r   r3   r   r   r   Úgetv   ó   	üzMemberList.getc                 C   r0   r1   r4   r6   r   r   r   Ú__call__†   r8   zMemberList.__call__c                 C   ó   dS )úz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z<Twilio.Api.V2010.MemberList>r   ©r   r   r   r   Ú__repr__–   ó   zMemberList.__repr__)NN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r    r   Úunsetr   r/   r7   r9   r=   Ú__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 )r'   r	   c                    s   t t| ƒ ||¡ || _dS )a©  
        Initialize the MemberPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API
        :param account_sid: The account_sid
        :param queue_sid: A string that uniquely identifies this queue

        :returns: twilio.rest.api.v2010.account.queue.member.MemberPage
        :rtype: twilio.rest.api.v2010.account.queue.member.MemberPage
        N)r   r'   r   r   )r   r   r*   Úsolutionr   r   r   r   £   s   
zMemberPage.__init__c                 C   s   t | j|| jd | jd d�S )a  
        Build an instance of MemberInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.api.v2010.account.queue.member.MemberInstance
        :rtype: twilio.rest.api.v2010.account.queue.member.MemberInstance
        r   r   r
   )ÚMemberInstancer   r   )r   Úpayloadr   r   r   Úget_instance´   s   	üzMemberPage.get_instancec                 C   r:   )r;   z<Twilio.Api.V2010.MemberPage>r   r<   r   r   r   r=   Ä   r>   zMemberPage.__repr__)r?   r@   rA   rB   r   rH   r=   rD   r   r   r   r   r'       s
    r'   c                       s8   e Zd ZdZ‡ fdd„Zdd„ Zdd„ Zdd	„ Z‡  ZS )
r5   r	   c                    s6   t t| ƒ |¡ |||dœ| _djdi | j¤Ž| _dS )aš  
        Initialize the MemberContext

        :param Version version: Version that contains the resource
        :param account_sid: The account_sid
        :param queue_sid: The Queue in which to find the members
        :param call_sid: The call_sid

        :returns: twilio.rest.api.v2010.account.queue.member.MemberContext
        :rtype: twilio.rest.api.v2010.account.queue.member.MemberContext
        r2   zB/Accounts/{account_sid}/Queues/{queue_sid}/Members/{call_sid}.jsonNr   )r   r5   r   r   r   r   )r   r   r   r   r3   r   r   r   r   Ñ   s   zMemberContext.__init__c                 C   sD   t  i ¡}| jjd| j|d�}t| j|| jd | jd | jd d�S )úœ
        Fetch a MemberInstance

        :returns: Fetched MemberInstance
        :rtype: twilio.rest.api.v2010.account.queue.member.MemberInstance
        r#   r$   r   r   r3   r2   )r   r&   r   Úfetchr   rF   r   )r   r%   rG   r   r   r   rJ   ã   s   
ýûzMemberContext.fetchc                 C   sJ   t  ||dœ¡}| jjd| j|d�}t| j|| jd | jd | jd d�S )úî
        Update the MemberInstance

        :param unicode url: The url
        :param unicode method: The method

        :returns: Updated MemberInstance
        :rtype: twilio.rest.api.v2010.account.queue.member.MemberInstance
        )ÚUrlÚMethodÚPOST)Údatar   r   r3   r2   )r   r&   r   Úupdater   rF   r   )r   ÚurlÚmethodrO   rG   r   r   r   rP   ú   s   
ýûzMemberContext.updatec                 C   ó$   d  dd„ | j ¡ D ƒ¡}d |¡S )r;   ú c                 s   ó    � | ]\}}d   ||¡V  qdS ©z{}={}N©r   ©Ú.0ÚkÚvr   r   r   Ú	<genexpr>  ó   € z)MemberContext.__repr__.<locals>.<genexpr>z#<Twilio.Api.V2010.MemberContext {}>©Újoinr   Úitemsr   ©r   Úcontextr   r   r   r=     ó   
zMemberContext.__repr__)	r?   r@   rA   rB   r   rJ   rP   r=   rD   r   r   r   r   r5   Î   s    r5   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dd„ Zdd„ Zdd„ Z‡  ZS )rF   r	   Nc                    sj   t t| ƒ |¡ |d t |d ¡t |d ¡|d t |d ¡dœ| _d| _|||p/| jd dœ| _dS )	zÆ
        Initialize the MemberInstance

        :returns: twilio.rest.api.v2010.account.queue.member.MemberInstance
        :rtype: twilio.rest.api.v2010.account.queue.member.MemberInstance
        r3   Údate_enqueuedÚpositionÚuriÚ	wait_time)r3   rd   re   rf   rg   Nr2   )	r   rF   r   r   Úrfc2822_datetimeÚintegerÚ_propertiesÚ_contextr   )r   r   rG   r   r   r3   r   r   r   r   "  s   û	ýzMemberInstance.__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: MemberContext for this MemberInstance
        :rtype: twilio.rest.api.v2010.account.queue.member.MemberContext
        Nr   r   r3   r2   )rk   r5   r   r   r<   r   r   r   Ú_proxy<  s   
	üzMemberInstance._proxyc                 C   ó
   | j d S )z_
        :returns: Unique string that identifies this resource
        :rtype: unicode
        r3   ©rj   r<   r   r   r   r3   N  ó   
zMemberInstance.call_sidc                 C   rm   )zU
        :returns: The date the member was enqueued
        :rtype: datetime
        rd   rn   r<   r   r   r   rd   V  ro   zMemberInstance.date_enqueuedc                 C   rm   )z`
        :returns: This member's current position in the queue.
        :rtype: unicode
        re   rn   r<   r   r   r   re   ^  ro   zMemberInstance.positionc                 C   rm   )z;
        :returns: The uri
        :rtype: unicode
        rf   rn   r<   r   r   r   rf   f  ro   zMemberInstance.uric                 C   rm   )zk
        :returns: The number of seconds the member has been in the queue.
        :rtype: unicode
        rg   rn   r<   r   r   r   rg   n  ro   zMemberInstance.wait_timec                 C   s
   | j  ¡ S )rI   )rl   rJ   r<   r   r   r   rJ   v  s   
zMemberInstance.fetchc                 C   s   | j  ||¡S )rK   )rl   rP   )r   rQ   rR   r   r   r   rP     s   
zMemberInstance.updatec                 C   rS   )r;   rT   c                 s   rU   rV   rW   rX   r   r   r   r\   ’  r]   z*MemberInstance.__repr__.<locals>.<genexpr>z$<Twilio.Api.V2010.MemberInstance {}>r^   ra   r   r   r   r=   ‹  rc   zMemberInstance.__repr__)N)r?   r@   rA   rB   r   Úpropertyrl   r3   rd   re   rf   rg   rJ   rP   r=   rD   r   r   r   r   rF     s$    





	rF   N)rB   Útwilio.baser   r   Útwilio.base.instance_contextr   Útwilio.base.instance_resourcer   Útwilio.base.list_resourcer   Útwilio.base.pager   r   r'   r5   rF   r   r   r   r   Ú<module>   s    .Q