
    p h:M                         d Z ddlmZ ddlmZmZmZmZmZmZm	Z	 ddl
mZ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e          Z G d de          Z G d de          Z G d de          ZdS )a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Preview
    This is the public Twilio REST API.

    NOTE: This class is auto generated by OpenAPI Generator.
    https://openapi-generator.tech
    Do not edit the class manually.
    )datetime)AnyDictListOptionalUnionIteratorAsyncIterator)deserializevalues)InstanceContext)InstanceResource)ListResource)Version)Pagec                        e Zd ZdZ	 ddedeeef         dee         f fdZ	e
dd	            Zdd
ZddZdefdZ xZS )CommandInstancez
    :ivar sid:
    :ivar account_sid:
    :ivar device_sid:
    :ivar sim_sid:
    :ivar command:
    :ivar command_mode:
    :ivar status:
    :ivar direction:
    :ivar date_created:
    :ivar date_updated:
    :ivar url:
    Nversionpayloadsidc                    t                                          |           |                    d          | _        |                    d          | _        |                    d          | _        |                    d          | _        |                    d          | _        |                    d          | _        |                    d          | _	        |                    d          | _
        t          j        |                    d	                    | _        t          j        |                    d
                    | _        |                    d          | _        d|p| j        i| _        d | _        d S )Nr   account_sid
device_sidsim_sidcommandcommand_modestatus	directiondate_createddate_updatedurl)super__init__getr   r   r   r   r   r   r   r   r   iso8601_datetimer   r    r!   	_solution_context)selfr   r   r   	__class__s       `/var/www/html/Sam_Eipo/venv/lib/python3.11/site-packages/twilio/rest/preview/wireless/command.pyr#   zCommandInstance.__init__(   s9    	!!!")++e"4"4*1++m*D*D)0\)B)B&-kk)&<&<&-kk)&<&<+2;;~+F+F%,[[%:%:(/K(@(@0;0LKK''1
 1
 1<0LKK''1
 1
 #*++e"4"4 3?$(
 37    returnCommandContextc                 j    | j         &t          | j        | j        d                   | _         | j         S )z
        Generate an instance context for the instance, the context is capable of
        performing various actions. All instance actions are proxied to the context

        :returns: CommandContext for this CommandInstance
        Nr   r   )r'   r-   _versionr&   r(   s    r*   _proxyzCommandInstance._proxyB   s;     = *N5)  DM }r+   c                 4    | j                                         S )[
        Fetch the CommandInstance


        :returns: The fetched CommandInstance
        )r2   fetchr1   s    r*   r5   zCommandInstance.fetchQ   s     {  """r+   c                 D   K   | j                                          d{V S )u
        Asynchronous coroutine to fetch the CommandInstance


        :returns: The fetched CommandInstance
        N)r2   fetch_asyncr1   s    r*   r8   zCommandInstance.fetch_asyncZ   s.       [,,.........r+   c                     d                     d | j                                        D                       }d                    |          S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c              3   H   K   | ]\  }}d                      ||          V  dS z{}={}Nformat.0kvs      r*   	<genexpr>z+CommandInstance.__repr__.<locals>.<genexpr>i   4      SSDAq7>>!Q//SSSSSSr+   z,<Twilio.Preview.Wireless.CommandInstance {}>joinr&   itemsr?   r(   contexts     r*   __repr__zCommandInstance.__repr__c   sF     ((SSDN<P<P<R<RSSSSS=DDWMMMr+   N)r,   r-   )r,   r   )__name__
__module____qualname____doc__r   r   strr   r   r#   propertyr2   r5   r8   rK   __classcell__r)   s   @r*   r   r      s          OS7 77)-c3h7>Fsm7 7 7 7 7 74    X# # # #/ / / /N# N N N N N N N Nr+   r   c                   L     e Zd Zdedef fdZdefdZdefdZdefdZ	 xZ
S )r-   r   r   c                     t                                          |           d|i| _         dj        di | j        | _        dS )z
        Initialize the CommandContext

        :param version: Version that contains the resource
        :param sid:
        r   z/Commands/{sid}N )r"   r#   r&   r?   _uri)r(   r   r   r)   s      r*   r#   zCommandContext.__init__o   sP     	!!! 3
 -%,>>t~>>			r+   r,   c                     t          j        i           }d|d<   | j                            d| j        |          }t          | j        || j        d                   S )r4   application/jsonAcceptGETmethoduriheadersr   r/   )r   ofr0   r5   rX   r   r&   r(   r`   r   s      r*   r5   zCommandContext.fetch~   sb     )B--.-%%U	7%SSMu%
 
 
 	
r+   c                    K   t          j        i           }d|d<   | j                            d| j        |           d{V }t          | j        || j        d                   S )r7   rZ   r[   r\   r]   Nr   r/   )r   ra   r0   r8   rX   r   r&   rb   s      r*   r8   zCommandContext.fetch_async   s       )B--.11di 2 
 
 
 
 
 
 
 
 Mu%
 
 
 	
r+   c                     d                     d | j                                        D                       }d                    |          S )r:   r;   c              3   H   K   | ]\  }}d                      ||          V  dS r=   r>   r@   s      r*   rD   z*CommandContext.__repr__.<locals>.<genexpr>   rE   r+   z+<Twilio.Preview.Wireless.CommandContext {}>rF   rI   s     r*   rK   zCommandContext.__repr__   sF     ((SSDN<P<P<R<RSSSSS<CCGLLLr+   )rM   rN   rO   r   rQ   r#   r   r5   r8   rK   rS   rT   s   @r*   r-   r-   m   s        ? ?c ? ? ? ? ? ?
 
 
 
 
(
? 
 
 
 
,M# M M M M M M M Mr+   r-   c                   :    e Zd Zdeeef         defdZdefdZdS )CommandPager   r,   c                 ,    t          | j        |          S )zm
        Build an instance of CommandInstance

        :param payload: Payload response from the API
        )r   r0   )r(   r   s     r*   get_instancezCommandPage.get_instance   s     t}g666r+   c                     dS )r:   z%<Twilio.Preview.Wireless.CommandPage>rW   r1   s    r*   rK   zCommandPage.__repr__   
     76r+   N)	rM   rN   rO   r   rQ   r   r   ri   rK   rW   r+   r*   rg   rg      sY        7DcN 7 7 7 7 77# 7 7 7 7 7 7r+   rg   c                       e Zd Zdef fdZej        ej        ej        ej        ej        ej        fdedeee	f         deee	f         deee	f         deee	f         deee	f         d	eee	f         d
e
fdZej        ej        ej        ej        ej        ej        fdedeee	f         deee	f         deee	f         deee	f         deee	f         d	eee	f         d
e
fdZej        ej        ej        ej        ddfdeee	f         deee	f         deee	f         deee	f         dee         dee         d
ee
         fdZej        ej        ej        ej        ddfdeee	f         deee	f         deee	f         deee	f         dee         dee         d
ee
         fdZej        ej        ej        ej        ddfdeee	f         deee	f         deee	f         deee	f         dee         dee         d
ee
         fdZej        ej        ej        ej        ddfdeee	f         deee	f         deee	f         deee	f         dee         dee         d
ee
         fdZej        ej        ej        ej        ej        ej        ej        fdeee	f         deee	f         deee	f         deee	f         deee	f         deee	f         deee	f         d
efdZej        ej        ej        ej        ej        ej        ej        fdeee	f         deee	f         deee	f         deee	f         deee	f         deee	f         deee	f         d
efdZded
efdZded
efdZded
efdZded
efdZd
efd Z xZS )!CommandListr   c                 X    t                                          |           d| _        dS )zi
        Initialize the CommandList

        :param version: Version that contains the resource

        z	/CommandsN)r"   r#   rX   )r(   r   r)   s     r*   r#   zCommandList.__init__   s(     	!!!			r+   r   devicesimcallback_methodcallback_urlr   include_sidr,   c           
          t          j        |||||||d          }t          j        ddi          }	d|	d<   d|	d<   | j                            d| j        ||	          }
t          | j        |
          S )a  
        Create the CommandInstance

        :param command:
        :param device:
        :param sim:
        :param callback_method:
        :param callback_url:
        :param command_mode:
        :param include_sid:

        :returns: The created CommandInstance
        CommandDeviceSimCallbackMethodCallbackUrlCommandMode
IncludeSidContent-Type!application/x-www-form-urlencodedrZ   r[   POSTr^   r_   datar`   )r   ra   r0   createrX   r   r(   r   ro   rp   rq   rr   r   rs   r   r`   r   s              r*   r   zCommandList.create   s    0 y" "1++) 

 

 )^-PQRR"E.-&&tytW ' 
 
 t}g666r+   c           
         K   t          j        |||||||d          }t          j        ddi          }	d|	d<   d|	d<   | j                            d| j        ||	           d{V }
t          | j        |
          S )	a$  
        Asynchronously create the CommandInstance

        :param command:
        :param device:
        :param sim:
        :param callback_method:
        :param callback_url:
        :param command_mode:
        :param include_sid:

        :returns: The created CommandInstance
        ru   r}   r~   rZ   r[   r   r   N)r   ra   r0   create_asyncrX   r   r   s              r*   r   zCommandList.create_async  s      0 y" "1++) 

 

 )^-PQRR"E.22tytW 3 
 
 
 
 
 
 
 
 t}g666r+   Nr   r   limit	page_sizec                     | j                             ||          }|                     |||||d                   }| j                             ||d                   S )a  
        Streams CommandInstance 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 str device:
        :param str sim:
        :param str status:
        :param str direction:
        :param limit: Upper limit for the number of records to return. stream()
                      guarantees to never return more than limit.  Default is no limit
        :param 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
        r   ro   rp   r   r   r   r   )r0   read_limitspagestream	r(   ro   rp   r   r   r   r   limitsr   s	            r*   r   zCommandList.stream0  se    8 **5)<<yy[)  
 
 }##D&/:::r+   c                    K   | j                             ||          }|                     |||||d                    d{V }| j                             ||d                   S )a  
        Asynchronously streams CommandInstance 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 str device:
        :param str sim:
        :param str status:
        :param str direction:
        :param limit: Upper limit for the number of records to return. stream()
                      guarantees to never return more than limit.  Default is no limit
        :param 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
        r   r   Nr   )r0   r   
page_asyncstream_asyncr   s	            r*   r   zCommandList.stream_asyncW  s      8 **5)<<__[) % 
 
 
 
 
 
 
 
 }))$w@@@r+   c           
      R    t          |                     ||||||                    S )af  
        Lists CommandInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str device:
        :param str sim:
        :param str status:
        :param str direction:
        :param limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param 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: list that will contain up to limit results
        ro   rp   r   r   r   r   )listr   r(   ro   rp   r   r   r   r   s          r*   r   zCommandList.list~  s>    6 KK##   	
 	
 		
r+   c           	      h   K   d |                      ||||||           d{V 2              d{V S )au  
        Asynchronously lists CommandInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str device:
        :param str sim:
        :param str status:
        :param str direction:
        :param limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param 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: list that will contain up to limit results
        c                 $   K   g | 3 d {V 	 }|6 S rL   rW   )rA   records     r*   
<listcomp>z*CommandList.list_async.<locals>.<listcomp>  sO       

 

 

 

 

 

 

 

 

 

 

 

 

s   r   N)r   r   s          r*   
list_asynczCommandList.list_async  s      6

 

&*&7&7## '8 ' ' ! ! ! ! ! !

 

 

 

 

 

 

 

 

 
	
r+   
page_tokenpage_numberc           
          t          j        |||||||d          }t          j        ddi          }	d|	d<   | j                            d| j        ||	          }
t          | j        |
          S )a  
        Retrieve a single page of CommandInstance records from the API.
        Request is executed immediately

        :param device:
        :param sim:
        :param status:
        :param direction:
        :param page_token: PageToken provided by the API
        :param page_number: Page Number, this value is simply for client state
        :param page_size: Number of records to return, defaults to 50

        :returns: Page of CommandInstance
        rw   rx   Status	Direction	PageTokenr   PageSizer}   r~   rZ   r[   r\   r^   r_   paramsr`   )r   ra   r0   r   rX   rg   r(   ro   rp   r   r   r   r   r   r   r`   responses              r*   r   zCommandList.page  s    0 y  &'#% 

 

 )^-PQRR.=%%dig & 
 
 4=(333r+   c           
         K   t          j        |||||||d          }t          j        ddi          }	d|	d<   | j                            d| j        ||	           d{V }
t          | j        |
          S )	a  
        Asynchronously retrieve a single page of CommandInstance records from the API.
        Request is executed immediately

        :param device:
        :param sim:
        :param status:
        :param direction:
        :param page_token: PageToken provided by the API
        :param page_number: Page Number, this value is simply for client state
        :param page_size: Number of records to return, defaults to 50

        :returns: Page of CommandInstance
        r   r}   r~   rZ   r[   r\   r   N)r   ra   r0   r   rX   rg   r   s              r*   r   zCommandList.page_async  s      0 y  &'#% 

 

 )^-PQRR.11dig 2 
 
 
 
 
 
 
 
 4=(333r+   
target_urlc                 v    | j         j        j                            d|          }t	          | j         |          S )z
        Retrieve a specific page of CommandInstance records from the API.
        Request is executed immediately

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

        :returns: Page of CommandInstance
        r\   )r0   domaintwiliorequestrg   r(   r   r   s      r*   get_pagezCommandList.get_page%  s3     ='.66ujII4=(333r+   c                    K   | j         j        j                            d|           d{V }t	          | j         |          S )a  
        Asynchronously retrieve a specific page of CommandInstance records from the API.
        Request is executed immediately

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

        :returns: Page of CommandInstance
        r\   N)r0   r   r   request_asyncrg   r   s      r*   get_page_asynczCommandList.get_page_async1  sI       -4BB5*UUUUUUUU4=(333r+   r   c                 .    t          | j        |          S zB
        Constructs a CommandContext

        :param sid:
        r/   r-   r0   r(   r   s     r*   r$   zCommandList.get=       dm5555r+   c                 .    t          | j        |          S r   r   r   s     r*   __call__zCommandList.__call__E  r   r+   c                     dS )r:   z%<Twilio.Preview.Wireless.CommandList>rW   r1   s    r*   rK   zCommandList.__repr__M  rk   r+   ) rM   rN   rO   r   r#   r   unsetrQ   r   objectr   r   r   r   intr	   r   r
   r   r   r   r   rg   r   r   r   r   r-   r$   r   rK   rS   rT   s   @r*   rm   rm      s       	  	  	  	  	  	  	  &,\"(,.4l+1<+1<*0,-7 -7-7 c6k"-7 3;	-7
 sF{+-7 CK(-7 CK(-7 3;'-7 
-7 -7 -7 -7d &,\"(,.4l+1<+1<*0,-7 -7-7 c6k"-7 3;	-7
 sF{+-7 CK(-7 CK(-7 3;'-7 
-7 -7 -7 -7b &,\"(,%+\(.##'%; %;c6k"%; 3;%; c6k"	%;
 f%%; }%; C=%; 
/	"%; %; %; %;R &,\"(,%+\(.##'%A %Ac6k"%A 3;%A c6k"	%A
 f%%A }%A C=%A 
	'%A %A %A %AR &,\"(,%+\(.##'$
 $
c6k"$
 3;$
 c6k"	$

 f%$
 }$
 C=$
 
o	$
 $
 $
 $
P &,\"(,%+\(.##'%
 %
c6k"%
 3;%
 c6k"	%

 f%%
 }%
 C=%
 
o	%
 %
 %
 %
R &,\"(,%+\(.)/*0,(.+4 +4c6k"+4 3;+4 c6k"	+4
 f%+4 #v+&+4 3;'+4 f%+4 
+4 +4 +4 +4^ &,\"(,%+\(.)/*0,(.+4 +4c6k"+4 3;+4 c6k"	+4
 f%+4 #v+&+4 3;'+4 f%+4 
+4 +4 +4 +4Z
43 
4; 
4 
4 
4 
4
4s 
4{ 
4 
4 
4 
46s 6~ 6 6 6 66C 6N 6 6 6 67# 7 7 7 7 7 7 7 7r+   rm   N)rP   r   typingr   r   r   r   r   r	   r
   twilio.baser   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r-   rg   rm   rW   r+   r*   <module>r      s          L L L L L L L L L L L L L L L L L L + + + + + + + + 8 8 8 8 8 8 : : : : : : 2 2 2 2 2 2 ' ' ' ' ' ' ! ! ! ! ! !QN QN QN QN QN& QN QN QNhBM BM BM BM BM_ BM BM BMJ7 7 7 7 7$ 7 7 7&N7 N7 N7 N7 N7, N7 N7 N7 N7 N7r+   