o
    �¨ÊhŠ7  ã                   @   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 )ÚStepListúÉ PLEASE NOTE that this class contains preview products that are subject
    to change. Use them with caution. If you currently do not have developer
    preview access, please contact help@twilio.com. c                    s4   t t| ƒ |¡ ||dœ| _djdi | j¤Ž| _dS )aT  
        Initialize the StepList

        :param Version version: Version that contains the resource
        :param flow_sid: Flow Sid.
        :param engagement_sid: Engagement Sid.

        :returns: twilio.rest.preview.studio.flow.engagement.step.StepList
        :rtype: twilio.rest.preview.studio.flow.engagement.step.StepList
        ©Úflow_sidÚengagement_sidz4/Flows/{flow_sid}/Engagements/{engagement_sid}/StepsN© )Úsuperr   Ú__init__Ú	_solutionÚformatÚ_uri)ÚselfÚversionr   r   ©Ú	__class__r   úa/var/www/html/env/lib/python3.10/site-packages/twilio/rest/preview/studio/flow/engagement/step.pyr      s   zStepList.__init__Nc                 C   s6   | j  ||¡}| j|d d�}| j  ||d |d ¡S )aÅ  
        Streams StepInstance 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.preview.studio.flow.engagement.step.StepInstance]
        Ú	page_size)r   ÚlimitÚ
page_limit)Ú_versionÚread_limitsÚpageÚstream)r   r   r   Úlimitsr   r   r   r   r   '   s   zStepList.streamc                 C   s   t | j||d�ƒS )ae  
        Lists StepInstance 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.preview.studio.flow.engagement.step.StepInstance]
        )r   r   )Úlistr   )r   r   r   r   r   r   r    >   s   zStepList.listc                 C   s6   t  |||dœ¡}| jjd| j|d�}t| j|| jƒS )aÂ  
        Retrieve a single page of StepInstance 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 StepInstance
        :rtype: twilio.rest.preview.studio.flow.engagement.step.StepPage
        )Ú	PageTokenr   ÚPageSizeÚGET©Úparams)r   Úofr   r   r   ÚStepPager   )r   Ú
page_tokenÚpage_numberr   r%   Úresponser   r   r   r   P   s   ýzStepList.pagec                 C   s"   | j jj d|¡}t| j || jƒS )a:  
        Retrieve a specific page of StepInstance records from the API.
        Request is executed immediately

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

        :returns: Page of StepInstance
        :rtype: twilio.rest.preview.studio.flow.engagement.step.StepPage
        r#   )r   ÚdomainÚtwilioÚrequestr'   r   )r   Ú
target_urlr*   r   r   r   Úget_pageg   s
   

þzStepList.get_pagec                 C   ó   t | j| jd | jd |d�S ©zâ
        Constructs a StepContext

        :param sid: The sid

        :returns: twilio.rest.preview.studio.flow.engagement.step.StepContext
        :rtype: twilio.rest.preview.studio.flow.engagement.step.StepContext
        r   r   ©r   r   Úsid©ÚStepContextr   r   ©r   r3   r   r   r   Úgetx   ó   	üzStepList.getc                 C   r0   r1   r4   r6   r   r   r   Ú__call__ˆ   r8   zStepList.__call__c                 C   ó   dS )úz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z <Twilio.Preview.Studio.StepList>r   ©r   r   r   r   Ú__repr__˜   ó   zStepList.__repr__)NN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r    r   Úunsetr   r/   r7   r9   r=   Ú__classcell__r   r   r   r   r      s    


ÿr   c                       ó0   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 StepPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API
        :param flow_sid: Flow Sid.
        :param engagement_sid: Engagement Sid.

        :returns: twilio.rest.preview.studio.flow.engagement.step.StepPage
        :rtype: twilio.rest.preview.studio.flow.engagement.step.StepPage
        N)r   r'   r   r   )r   r   r*   Úsolutionr   r   r   r   §   s   
zStepPage.__init__c                 C   s   t | j|| jd | jd d�S )a  
        Build an instance of StepInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.preview.studio.flow.engagement.step.StepInstance
        :rtype: twilio.rest.preview.studio.flow.engagement.step.StepInstance
        r   r   r
   )ÚStepInstancer   r   )r   Úpayloadr   r   r   Úget_instance¸   s   	üzStepPage.get_instancec                 C   r:   )r;   z <Twilio.Preview.Studio.StepPage>r   r<   r   r   r   r=   È   r>   zStepPage.__repr__)r?   r@   rA   rB   r   rI   r=   rD   r   r   r   r   r'   ¢   s
    r'   c                       rE   )r5   r	   c                    s6   t t| ƒ |¡ |||dœ| _djdi | j¤Ž| _dS )a  
        Initialize the StepContext

        :param Version version: Version that contains the resource
        :param flow_sid: The flow_sid
        :param engagement_sid: The engagement_sid
        :param sid: The sid

        :returns: twilio.rest.preview.studio.flow.engagement.step.StepContext
        :rtype: twilio.rest.preview.studio.flow.engagement.step.StepContext
        r2   z:/Flows/{flow_sid}/Engagements/{engagement_sid}/Steps/{sid}Nr   )r   r5   r   r   r   r   )r   r   r   r   r3   r   r   r   r   ×   s   zStepContext.__init__c                 C   sD   t  i ¡}| jjd| j|d�}t| j|| jd | jd | jd d�S )ú›
        Fetch a StepInstance

        :returns: Fetched StepInstance
        :rtype: twilio.rest.preview.studio.flow.engagement.step.StepInstance
        r#   r$   r   r   r3   r2   )r   r&   r   Úfetchr   rG   r   )r   r%   rH   r   r   r   rK   é   s   
ýûzStepContext.fetchc                 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'StepContext.__repr__.<locals>.<genexpr>z&<Twilio.Preview.Studio.StepContext {}>©Újoinr   Úitemsr   ©r   Úcontextr   r   r   r=      ó   
zStepContext.__repr__)r?   r@   rA   rB   r   rK   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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‡  ZS )"rG   r	   Nc                    sˆ   t t| ƒ |¡ |d |d |d |d |d |d |d |d t |d	 ¡t |d
 ¡|d dœ| _d| _|||p>| jd dœ| _dS )zÊ
        Initialize the StepInstance

        :returns: twilio.rest.preview.studio.flow.engagement.step.StepInstance
        :rtype: twilio.rest.preview.studio.flow.engagement.step.StepInstance
        r3   Úaccount_sidr   r   Únamer[   Útransitioned_fromÚtransitioned_toÚdate_createdÚdate_updatedÚurl)r3   r]   r   r   r^   r[   r_   r`   ra   rb   rc   Nr2   )r   rG   r   r   Úiso8601_datetimeÚ_propertiesÚ_contextr   )r   r   rH   r   r   r3   r   r   r   r     s$   õýzStepInstance.__init__c                 C   s6   | j du rt| j| jd | jd | jd d�| _ | j S )a0  
        Generate an instance context for the instance, the context is capable of
        performing various actions.  All instance actions are proxied to the context

        :returns: StepContext for this StepInstance
        :rtype: twilio.rest.preview.studio.flow.engagement.step.StepContext
        Nr   r   r3   r2   )rf   r5   r   r   r<   r   r   r   Ú_proxy0  s   
	üzStepInstance._proxyc                 C   ó
   | j d S )z`
        :returns: A string that uniquely identifies this Step.
        :rtype: unicode
        r3   ©re   r<   r   r   r   r3   B  ó   
zStepInstance.sidc                 C   rh   )z@
        :returns: Account Sid.
        :rtype: unicode
        r]   ri   r<   r   r   r   r]   J  rj   zStepInstance.account_sidc                 C   rh   )z=
        :returns: Flow Sid.
        :rtype: unicode
        r   ri   r<   r   r   r   r   R  rj   zStepInstance.flow_sidc                 C   rh   )zC
        :returns: Engagement Sid.
        :rtype: unicode
        r   ri   r<   r   r   r   r   Z  rj   zStepInstance.engagement_sidc                 C   rh   )zZ
        :returns: The Widget that implemented this Step.
        :rtype: unicode
        r^   ri   r<   r   r   r   r^   b  rj   zStepInstance.namec                 C   rh   )zF
        :returns: Nested resource URLs.
        :rtype: dict
        r[   ri   r<   r   r   r   r[   j  rj   zStepInstance.contextc                 C   rh   )zf
        :returns: The Widget that preceded the Widget for this Step.
        :rtype: unicode
        r_   ri   r<   r   r   r   r_   r  rj   zStepInstance.transitioned_fromc                 C   rh   )zi
        :returns: The Widget that will follow the Widget for this Step.
        :rtype: unicode
        r`   ri   r<   r   r   r   r`   z  rj   zStepInstance.transitioned_toc                 C   rh   )zS
        :returns: The date this Step was created
        :rtype: datetime
        ra   ri   r<   r   r   r   ra   ‚  rj   zStepInstance.date_createdc                 C   rh   )zS
        :returns: The date this Step was updated
        :rtype: datetime
        rb   ri   r<   r   r   r   rb   Š  rj   zStepInstance.date_updatedc                 C   rh   )zM
        :returns: The URL of this resource.
        :rtype: unicode
        rc   ri   r<   r   r   r   rc   ’  rj   zStepInstance.urlc                 C   s
   | j  ¡ S )rJ   )rg   rK   r<   r   r   r   rK   š  s   
zStepInstance.fetchc                 C   rL   )r;   rM   c                 s   rN   rO   rP   rQ   r   r   r   rU   ª  rV   z(StepInstance.__repr__.<locals>.<genexpr>z'<Twilio.Preview.Studio.StepInstance {}>rW   rZ   r   r   r   r=   £  r\   zStepInstance.__repr__)N)r?   r@   rA   rB   r   Úpropertyrg   r3   r]   r   r   r^   r[   r_   r`   ra   rb   rc   rK   r=   rD   r   r   r   r   rG     s:     











	rG   N)rB   Útwilio.baser   r   Útwilio.base.instance_contextr   Útwilio.base.instance_resourcer   Útwilio.base.list_resourcer   Útwilio.base.pager   r   r'   r5   rG   r   r   r   r   Ú<module>   s    09