o
    ä›e-1  ã                   @   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                       sf   e 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 )ÚSigningKeyListc                    s2   t t| ƒ |¡ d|i| _djdi | j¤Ž| _dS )ab  
        Initialize the SigningKeyList

        :param Version version: Version that contains the resource
        :param account_sid: A 34 character string that uniquely identifies this resource.

        :returns: twilio.rest.api.v2010.account.signing_key.SigningKeyList
        :rtype: twilio.rest.api.v2010.account.signing_key.SigningKeyList
        Úaccount_sidz(/Accounts/{account_sid}/SigningKeys.jsonN© )Úsuperr   Ú__init__Ú	_solutionÚformatÚ_uri)ÚselfÚversionr	   ©Ú	__class__r
   ú\/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/api/v2010/account/signing_key.pyr      s   

zSigningKeyList.__init__Nc                 C   s0   | j  ||¡}| j|d d�}| j  ||d ¡S )aË  
        Streams SigningKeyInstance 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.signing_key.SigningKeyInstance]
        Ú	page_size)r   Úlimit)Ú_versionÚread_limitsÚpageÚstream)r   r   r   Úlimitsr   r
   r
   r   r   #   s   zSigningKeyList.streamc                 C   s   t | j||d�ƒS )ak  
        Lists SigningKeyInstance 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.signing_key.SigningKeyInstance]
        )r   r   )Úlistr   )r   r   r   r
   r
   r   r   :   s   zSigningKeyList.listc                 C   s6   t  |||dœ¡}| jjd| j|d�}t| j|| jƒS )aÎ  
        Retrieve a single page of SigningKeyInstance 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 SigningKeyInstance
        :rtype: twilio.rest.api.v2010.account.signing_key.SigningKeyPage
        )Ú	PageTokenr   ÚPageSizeÚGET)ÚmethodÚuriÚparams)r   Úofr   r   r   ÚSigningKeyPager   )r   Ú
page_tokenÚpage_numberr   ÚdataÚresponser
   r
   r   r   L   s   zSigningKeyList.pagec                 C   s"   | j jj d|¡}t| j || jƒS )aF  
        Retrieve a specific page of SigningKeyInstance records from the API.
        Request is executed immediately

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

        :returns: Page of SigningKeyInstance
        :rtype: twilio.rest.api.v2010.account.signing_key.SigningKeyPage
        r   )r   ÚdomainÚtwilioÚrequestr$   r   )r   Ú
target_urlr(   r
   r
   r   Úget_page_   s
   

þzSigningKeyList.get_pagec                 C   ó   t | j| jd |d�S ©zè
        Constructs a SigningKeyContext

        :param sid: The sid

        :returns: twilio.rest.api.v2010.account.signing_key.SigningKeyContext
        :rtype: twilio.rest.api.v2010.account.signing_key.SigningKeyContext
        r	   ©r	   Úsid©ÚSigningKeyContextr   r   ©r   r1   r
   r
   r   Úgetp   ó   	zSigningKeyList.getc                 C   r.   r/   r2   r4   r
   r
   r   Ú__call__{   r6   zSigningKeyList.__call__c                 C   ó   dS )úz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z!<Twilio.Api.V2010.SigningKeyList>r
   ©r   r
   r
   r   Ú__repr__†   ó   zSigningKeyList.__repr__)NN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   Úunsetr   r-   r5   r7   r;   Ú__classcell__r
   r
   r   r   r      s    


ÿr   c                       s,   e Zd Z‡ fdd„Zdd„ Zdd„ Z‡  ZS )r$   c                    s   t t| ƒ ||¡ || _dS )aš  
        Initialize the SigningKeyPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API
        :param account_sid: A 34 character string that uniquely identifies this resource.

        :returns: twilio.rest.api.v2010.account.signing_key.SigningKeyPage
        :rtype: twilio.rest.api.v2010.account.signing_key.SigningKeyPage
        N)r   r$   r   r   )r   r   r(   Úsolutionr   r
   r   r   ’   s   
zSigningKeyPage.__init__c                 C   s   t | j|| jd d�S )a  
        Build an instance of SigningKeyInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.api.v2010.account.signing_key.SigningKeyInstance
        :rtype: twilio.rest.api.v2010.account.signing_key.SigningKeyInstance
        r	   )r	   )ÚSigningKeyInstancer   r   ©r   Úpayloadr
   r
   r   Úget_instance¢   r6   zSigningKeyPage.get_instancec                 C   r8   )r9   z!<Twilio.Api.V2010.SigningKeyPage>r
   r:   r
   r
   r   r;   ­   r<   zSigningKeyPage.__repr__)r=   r>   r?   r   rF   r;   rA   r
   r
   r   r   r$   �   s    r$   c                       sB   e Zd Z‡ fdd„Zdd„ Zejfdd„Zdd„ Zd	d
„ Z	‡  Z
S )r3   c                    s4   t t| ƒ |¡ ||dœ| _djdi | j¤Ž| _dS )aY  
        Initialize the SigningKeyContext

        :param Version version: Version that contains the resource
        :param account_sid: The account_sid
        :param sid: The sid

        :returns: twilio.rest.api.v2010.account.signing_key.SigningKeyContext
        :rtype: twilio.rest.api.v2010.account.signing_key.SigningKeyContext
        r0   z./Accounts/{account_sid}/SigningKeys/{sid}.jsonNr
   )r   r3   r   r   r   r   )r   r   r	   r1   r   r
   r   r   ¹   s   zSigningKeyContext.__init__c                 C   s0   | j jd| jd�}t| j || jd | jd d�S )ú­
        Fetch the SigningKeyInstance

        :returns: The fetched SigningKeyInstance
        :rtype: twilio.rest.api.v2010.account.signing_key.SigningKeyInstance
        r   ©r    r!   r	   r1   r0   )r   Úfetchr   rC   r   rD   r
   r
   r   rI   Ê   s   üzSigningKeyContext.fetchc                 C   s@   t  d|i¡}| jjd| j|d�}t| j|| jd | jd d�S )úç
        Update the SigningKeyInstance

        :param unicode friendly_name: The friendly_name

        :returns: The updated SigningKeyInstance
        :rtype: twilio.rest.api.v2010.account.signing_key.SigningKeyInstance
        ÚFriendlyNameÚPOST)r    r!   r'   r	   r1   r0   )r   r#   r   Úupdater   rC   r   )r   Úfriendly_namer'   rE   r
   r
   r   rM   Ú   s   	üzSigningKeyContext.updatec                 C   s   | j jd| jd�S )ú�
        Deletes the SigningKeyInstance

        :returns: True if delete succeeds, False otherwise
        :rtype: bool
        ÚDELETErH   )r   Údeleter   r:   r
   r
   r   rQ   î   s   zSigningKeyContext.deletec                 C   ó$   d  dd„ | j ¡ D ƒ¡}d |¡S )r9   ú c                 s   ó    � | ]\}}d   ||¡V  qdS ©z{}={}N©r   ©Ú.0ÚkÚvr
   r
   r   Ú	<genexpr>þ   ó   € z-SigningKeyContext.__repr__.<locals>.<genexpr>z'<Twilio.Api.V2010.SigningKeyContext {}>©Újoinr   Úitemsr   ©r   Úcontextr
   r
   r   r;   ÷   ó   
zSigningKeyContext.__repr__)r=   r>   r?   r   rI   r   r@   rM   rQ   r;   rA   r
   r
   r   r   r3   ·   s    	r3   c                       s€   e 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	dd„ Z
ejfdd„Zdd„ Zdd„ Z‡  ZS )rC   Nc                    sd   t t| ƒ |¡ | d¡| d¡t | d¡¡t | d¡¡dœ| _d| _||p,| jd dœ| _dS )zÐ
        Initialize the SigningKeyInstance

        :returns: twilio.rest.api.v2010.account.signing_key.SigningKeyInstance
        :rtype: twilio.rest.api.v2010.account.signing_key.SigningKeyInstance
        r1   rN   Údate_createdÚdate_updated)r1   rN   rc   rd   Nr0   )	r   rC   r   r5   r   Úrfc2822_datetimeÚ_propertiesÚ_contextr   )r   r   rE   r	   r1   r   r
   r   r     s   üzSigningKeyInstance.__init__c                 C   s.   | j du rt| j| jd | jd d�| _ | j S )a<  
        Generate an instance context for the instance, the context is capable of
        performing various actions.  All instance actions are proxied to the context

        :returns: SigningKeyContext for this SigningKeyInstance
        :rtype: twilio.rest.api.v2010.account.signing_key.SigningKeyContext
        Nr	   r1   r0   )rg   r3   r   r   r:   r
   r
   r   Ú_proxy  s   
	ýzSigningKeyInstance._proxyc                 C   ó
   | j d S )z;
        :returns: The sid
        :rtype: unicode
        r1   ©rf   r:   r
   r
   r   r1   *  ó   
zSigningKeyInstance.sidc                 C   ri   )zE
        :returns: The friendly_name
        :rtype: unicode
        rN   rj   r:   r
   r
   r   rN   2  rk   z SigningKeyInstance.friendly_namec                 C   ri   )zE
        :returns: The date_created
        :rtype: datetime
        rc   rj   r:   r
   r
   r   rc   :  rk   zSigningKeyInstance.date_createdc                 C   ri   )zE
        :returns: The date_updated
        :rtype: datetime
        rd   rj   r:   r
   r
   r   rd   B  rk   zSigningKeyInstance.date_updatedc                 C   ó
   | j  ¡ S )rG   )rh   rI   r:   r
   r
   r   rI   J  ó   
zSigningKeyInstance.fetchc                 C   s   | j j|d�S )rJ   )rN   )rh   rM   )r   rN   r
   r
   r   rM   S  s   	zSigningKeyInstance.updatec                 C   rl   )rO   )rh   rQ   r:   r
   r
   r   rQ   ^  rm   zSigningKeyInstance.deletec                 C   rR   )r9   rS   c                 s   rT   rU   rV   rW   r
   r
   r   r[   n  r\   z.SigningKeyInstance.__repr__.<locals>.<genexpr>z(<Twilio.Api.V2010.SigningKeyInstance {}>r]   r`   r
   r
   r   r;   g  rb   zSigningKeyInstance.__repr__)N)r=   r>   r?   r   Úpropertyrh   r1   rN   rc   rd   rI   r   r@   rM   rQ   r;   rA   r
   r
   r   r   rC     s     




		rC   N)Ú__doc__Útwilio.baser   r   Útwilio.base.instance_contextr   Útwilio.base.instance_resourcer   Útwilio.base.list_resourcer   Útwilio.base.pager   r   r$   r3   rC   r
   r
   r
   r   Ú<module>   s   'K