o
    eP"                     @   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
 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
      /       /
    )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 )
	UsageList 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 UsageList

        :param Version version: Version that contains the resource
        :param sim_sid: The sim_sid

        :returns: twilio.rest.preview.wireless.sim.usage.UsageList
        :rtype: twilio.rest.preview.wireless.sim.usage.UsageList
        sim_sidN)superr   __init__	_solutionselfversionr	   	__class__ Y/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/preview/wireless/sim/usage.pyr      s   
zUsageList.__init__c                 C      t | j| jd dS z
        Constructs a UsageContext

        :returns: twilio.rest.preview.wireless.sim.usage.UsageContext
        :rtype: twilio.rest.preview.wireless.sim.usage.UsageContext
        r	   r	   UsageContext_versionr   r   r   r   r   get$      zUsageList.getc                 C   r   r   r   r   r   r   r   __call__-   r   zUsageList.__call__c                 C      dS )z
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z#<Twilio.Preview.Wireless.UsageList>r   r   r   r   r   __repr__6      zUsageList.__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 )	UsagePager   c                    s   t t| || || _dS )aO  
        Initialize the UsagePage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API
        :param sim_sid: The sim_sid

        :returns: twilio.rest.preview.wireless.sim.usage.UsagePage
        :rtype: twilio.rest.preview.wireless.sim.usage.UsagePage
        N)r
   r'   r   r   )r   r   responsesolutionr   r   r   r   E   s   
zUsagePage.__init__c                 C   s   t | j|| jd dS )z
        Build an instance of UsageInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.preview.wireless.sim.usage.UsageInstance
        :rtype: twilio.rest.preview.wireless.sim.usage.UsageInstance
        r	   r   )UsageInstancer   r   )r   payloadr   r   r   get_instanceU   s   	zUsagePage.get_instancec                 C   r   )r   z#<Twilio.Preview.Wireless.UsagePage>r   r   r   r   r   r    `   r!   zUsagePage.__repr__)r"   r#   r$   r%   r   r,   r    r&   r   r   r   r   r'   @   s
    r'   c                       s:   e Zd ZdZ fddZej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 )a   
        Initialize the UsageContext

        :param Version version: Version that contains the resource
        :param sim_sid: The sim_sid

        :returns: twilio.rest.preview.wireless.sim.usage.UsageContext
        :rtype: twilio.rest.preview.wireless.sim.usage.UsageContext
        r	   z/Sims/{sim_sid}/UsageNr   )r
   r   r   r   format_urir   r   r   r   r   o   s   

zUsageContext.__init__c                 C   s:   t ||d}| jjd| j|d}t| j|| jd dS )
        Fetch the UsageInstance

        :param unicode end: The end
        :param unicode start: The start

        :returns: The fetched UsageInstance
        :rtype: twilio.rest.preview.wireless.sim.usage.UsageInstance
        )EndStartGET)methoduriparamsr	   r   )r   ofr   fetchr.   r*   r   )r   endstartdatar+   r   r   r   r7      s   
zUsageContext.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(UsageContext.__repr__.<locals>.<genexpr>z)<Twilio.Preview.Wireless.UsageContext {}>joinr   itemsr-   r   contextr   r   r   r          
zUsageContext.__repr__)
r"   r#   r$   r%   r   r   unsetr7   r    r&   r   r   r   r   r   j   s
    r   c                       s   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
edd Zedd Zedd Zedd Zedd ZejejfddZdd Z  ZS )r*   r   c                    st   t t| | |d|d|d|d|d|d|d|d|d	d
	| _d| _d|i| _dS )z
        Initialize the UsageInstance

        :returns: twilio.rest.preview.wireless.sim.usage.UsageInstance
        :rtype: twilio.rest.preview.wireless.sim.usage.UsageInstance
        r	   sim_unique_nameaccount_sidperiodcommands_usagecommands_costs
data_usage
data_costsurl)	r	   rM   rN   rO   rP   rQ   rR   rS   rT   N)r
   r*   r   r   _properties_contextr   )r   r   r+   r	   r   r   r   r      s   zUsageInstance.__init__c                 C   s&   | j du rt| j| 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: UsageContext for this UsageInstance
        :rtype: twilio.rest.preview.wireless.sim.usage.UsageContext
        Nr	   r   )rV   r   r   r   r   r   r   r   _proxy   s   
	zUsageInstance._proxyc                 C   
   | j d S )z?
        :returns: The sim_sid
        :rtype: unicode
        r	   rU   r   r   r   r   r	         
zUsageInstance.sim_sidc                 C   rX   )zG
        :returns: The sim_unique_name
        :rtype: unicode
        rM   rY   r   r   r   r   rM      rZ   zUsageInstance.sim_unique_namec                 C   rX   )zC
        :returns: The account_sid
        :rtype: unicode
        rN   rY   r   r   r   r   rN      rZ   zUsageInstance.account_sidc                 C   rX   )z;
        :returns: The period
        :rtype: dict
        rO   rY   r   r   r   r   rO      rZ   zUsageInstance.periodc                 C   rX   )zC
        :returns: The commands_usage
        :rtype: dict
        rP   rY   r   r   r   r   rP      rZ   zUsageInstance.commands_usagec                 C   rX   )zC
        :returns: The commands_costs
        :rtype: dict
        rQ   rY   r   r   r   r   rQ      rZ   zUsageInstance.commands_costsc                 C   rX   )z?
        :returns: The data_usage
        :rtype: dict
        rR   rY   r   r   r   r   rR      rZ   zUsageInstance.data_usagec                 C   rX   )z?
        :returns: The data_costs
        :rtype: dict
        rS   rY   r   r   r   r   rS      rZ   zUsageInstance.data_costsc                 C   rX   )z;
        :returns: The url
        :rtype: unicode
        rT   rY   r   r   r   r   rT     rZ   zUsageInstance.urlc                 C   s   | j j||dS )r/   )r8   r9   )rW   r7   )r   r8   r9   r   r   r   r7     s   
zUsageInstance.fetchc                 C   r;   )r   r<   c                 s   r=   r>   r?   r@   r   r   r   rD   !  rE   z)UsageInstance.__repr__.<locals>.<genexpr>z*<Twilio.Preview.Wireless.UsageInstance {}>rF   rI   r   r   r   r      rK   zUsageInstance.__repr__)r"   r#   r$   r%   r   propertyrW   r	   rM   rN   rO   rP   rQ   rR   rS   rT   r   rL   r7   r    r&   r   r   r   r   r*      s2    









r*   N)r%   twilio.baser   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*0