o
    e#                     @   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
      /       /
    )	serialize)values)InstanceContext)InstanceResource)ListResource)Pagec                       s8   e Zd ZdZ fddZdd Zdd Zdd	 Z  ZS )
DefaultsList 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                    s   t t| | d|i| _dS )a`  
        Initialize the DefaultsList

        :param Version version: Version that contains the resource
        :param assistant_sid: The SID of the Assistant that is the parent of the resource

        :returns: twilio.rest.autopilot.v1.assistant.defaults.DefaultsList
        :rtype: twilio.rest.autopilot.v1.assistant.defaults.DefaultsList
        assistant_sidN)superr   __init__	_solutionselfversionr
   	__class__ ^/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/autopilot/v1/assistant/defaults.pyr      s   
zDefaultsList.__init__c                 C      t | j| jd dS z
        Constructs a DefaultsContext

        :returns: twilio.rest.autopilot.v1.assistant.defaults.DefaultsContext
        :rtype: twilio.rest.autopilot.v1.assistant.defaults.DefaultsContext
        r
   r
   DefaultsContext_versionr   r   r   r   r   get%      zDefaultsList.getc                 C   r   r   r   r   r   r   r   __call__.   r   zDefaultsList.__call__c                 C      dS )z
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z"<Twilio.Autopilot.V1.DefaultsList>r   r   r   r   r   __repr__7      zDefaultsList.__repr__)	__name__
__module____qualname____doc__r   r   r   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 )DefaultsPager	   c                    s   t t| || || _dS )a  
        Initialize the DefaultsPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API
        :param assistant_sid: The SID of the Assistant that is the parent of the resource

        :returns: twilio.rest.autopilot.v1.assistant.defaults.DefaultsPage
        :rtype: twilio.rest.autopilot.v1.assistant.defaults.DefaultsPage
        N)r   r(   r   r   )r   r   responsesolutionr   r   r   r   F   s   
zDefaultsPage.__init__c                 C   s   t | j|| jd dS )a  
        Build an instance of DefaultsInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.autopilot.v1.assistant.defaults.DefaultsInstance
        :rtype: twilio.rest.autopilot.v1.assistant.defaults.DefaultsInstance
        r
   r   )DefaultsInstancer   r   r   payloadr   r   r   get_instanceV   s   	zDefaultsPage.get_instancec                 C   r   )r    z"<Twilio.Autopilot.V1.DefaultsPage>r   r   r   r   r   r!   a   r"   zDefaultsPage.__repr__)r#   r$   r%   r&   r   r.   r!   r'   r   r   r   r   r(   A   s
    r(   c                       s>   e Zd ZdZ fddZdd ZejfddZdd	 Z	  Z
S )
r   r	   c                    s2   t t| | d|i| _djdi | j| _dS )ar  
        Initialize the DefaultsContext

        :param Version version: Version that contains the resource
        :param assistant_sid: The SID of the Assistant that is the parent of the resource to fetch

        :returns: twilio.rest.autopilot.v1.assistant.defaults.DefaultsContext
        :rtype: twilio.rest.autopilot.v1.assistant.defaults.DefaultsContext
        r
   z$/Assistants/{assistant_sid}/DefaultsNr   )r   r   r   r   format_urir   r   r   r   r   p   s   

zDefaultsContext.__init__c                 C   s(   | j jd| jd}t| j || jd dS )
        Fetch the DefaultsInstance

        :returns: The fetched DefaultsInstance
        :rtype: twilio.rest.autopilot.v1.assistant.defaults.DefaultsInstance
        GET)methodurir
   r   )r   fetchr0   r+   r   r,   r   r   r   r5      s   zDefaultsContext.fetchc                 C   s>   t dt|i}| jjd| j|d}t| j|| jd dS )
        Update the DefaultsInstance

        :param dict defaults: A JSON string that describes the default task links.

        :returns: The updated DefaultsInstance
        :rtype: twilio.rest.autopilot.v1.assistant.defaults.DefaultsInstance
        DefaultsPOST)r3   r4   datar
   r   )	r   ofr   objectr   updater0   r+   r   )r   defaultsr9   r-   r   r   r   r<      s   	zDefaultsContext.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+DefaultsContext.__repr__.<locals>.<genexpr>z(<Twilio.Autopilot.V1.DefaultsContext {}>joinr   itemsr/   r   contextr   r   r   r!         
zDefaultsContext.__repr__)r#   r$   r%   r&   r   r5   r   unsetr<   r!   r'   r   r   r   r   r   k   s    r   c                       sz   e Zd ZdZ 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  ZS )r+   r	   c                    sL   t t| | |d|d|d|dd| _d| _d|i| _dS )z
        Initialize the DefaultsInstance

        :returns: twilio.rest.autopilot.v1.assistant.defaults.DefaultsInstance
        :rtype: twilio.rest.autopilot.v1.assistant.defaults.DefaultsInstance
        account_sidr
   urlr9   )rP   r
   rQ   r9   N)r   r+   r   r   _properties_contextr   )r   r   r-   r
   r   r   r   r      s   zDefaultsInstance.__init__c                 C   s&   | j du rt| j| jd d| _ | j S )a8  
        Generate an instance context for the instance, the context is capable of
        performing various actions.  All instance actions are proxied to the context

        :returns: DefaultsContext for this DefaultsInstance
        :rtype: twilio.rest.autopilot.v1.assistant.defaults.DefaultsContext
        Nr
   r   )rS   r   r   r   r   r   r   r   _proxy   s   
	zDefaultsInstance._proxyc                 C   
   | j d S )zd
        :returns: The SID of the Account that created the resource
        :rtype: unicode
        rP   rR   r   r   r   r   rP         
zDefaultsInstance.account_sidc                 C   rU   )zo
        :returns: The SID of the Assistant that is the parent of the resource
        :rtype: unicode
        r
   rV   r   r   r   r   r
      rW   zDefaultsInstance.assistant_sidc                 C   rU   )z]
        :returns: The absolute URL of the Defaults resource
        :rtype: unicode
        rQ   rV   r   r   r   r   rQ      rW   zDefaultsInstance.urlc                 C   rU   )zf
        :returns: The JSON string that describes the default task links
        :rtype: dict
        r9   rV   r   r   r   r   r9      rW   zDefaultsInstance.datac                 C   s
   | j  S )r1   )rT   r5   r   r   r   r   r5      s   
zDefaultsInstance.fetchc                 C   s   | j j|dS )r6   )r=   )rT   r<   )r   r=   r   r   r   r<      s   	zDefaultsInstance.updatec                 C   r>   )r    r?   c                 s   r@   rA   rB   rC   r   r   r   rG     rH   z,DefaultsInstance.__repr__.<locals>.<genexpr>z)<Twilio.Autopilot.V1.DefaultsInstance {}>rI   rL   r   r   r   r!      rN   zDefaultsInstance.__repr__)r#   r$   r%   r&   r   propertyrT   rP   r
   rQ   r9   r5   r   rO   r<   r!   r'   r   r   r   r   r+      s     




	r+   N)r&   twilio.baser   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.pager   r   r(   r   r+   r   r   r   r   <module>   s   0*: