
    d{i                         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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 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y)a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Api
    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	serializevalues)ApiResponse)InstanceContext)InstanceResource)ListResource)Version)Pagec                        e Zd ZdZ	 ddedeeef   dededee   f
 fdZ	e
dd	       Zdefd
ZdefdZdefdZdefdZddZddZdefdZdefdZdefdZ xZS )MediaInstanceal  
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with this Media resource.
    :ivar content_type: The default [MIME type](https://en.wikipedia.org/wiki/Internet_media_type) of the media, for example `image/jpeg`, `image/png`, or `image/gif`.
    :ivar date_created: The date and time in GMT when this Media resource was created, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
    :ivar date_updated: The date and time in GMT when this Media resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
    :ivar parent_sid: The SID of the Message resource that is associated with this Media resource.
    :ivar sid: The unique string that identifies this Media resource.
    :ivar uri: The URI of this Media resource, relative to `https://api.twilio.com`.
    versionpayloadaccount_sidmessage_sidsidc                    t         |   |       |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _        t        j                  |j                  d            | _        |j                  d      | _	        |j                  d      | _
        |j                  d      | _        |||xs | j                  d| _        d | _        y )	Nr   content_typedate_createddate_updated
parent_sidr   urir   r   r   )super__init__getr   r   r   rfc2822_datetimer   r   r   r   r    	_solution_context)selfr   r   r   r   r   	__class__s         i/home/sas/my/fyp/ringai/.venv/lib/python3.12/site-packages/twilio/rest/api/v2010/account/message/media.pyr#   zMediaInstance.__init__%   s     	!*1++m*D+2;;~+F0;0L0LKK'1
 1<0L0LKK'1
 *1\)B")++e"4")++e"4 '&?$((

 15    returnc                     | j                   Et        | j                  | j                  d   | j                  d   | 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: MediaContext for this MediaInstance
        r   r   r   r!   )r'   MediaContext_versionr&   r(   s    r*   _proxyzMediaInstance._proxyB   sQ     == ( NN=9 NN=9NN5)	DM }}r+   c                 6    | j                   j                         S zh
        Deletes the MediaInstance


        :returns: True if delete succeeds, False otherwise
        )r1   deleter0   s    r*   r4   zMediaInstance.deleteS   s     {{!!##r+   c                 R   K   | j                   j                          d{   S 7 wz
        Asynchronous coroutine that deletes the MediaInstance


        :returns: True if delete succeeds, False otherwise
        N)r1   delete_asyncr0   s    r*   r7   zMediaInstance.delete_async\   s!      [[--////   '%'c                 6    | j                   j                         S )z
        Deletes the MediaInstance with HTTP info


        :returns: ApiResponse with success boolean, status code, and headers
        )r1   delete_with_http_infor0   s    r*   r:   z#MediaInstance.delete_with_http_infoe   s     {{0022r+   c                 R   K   | j                   j                          d{   S 7 w)z
        Asynchronous coroutine that deletes the MediaInstance with HTTP info


        :returns: ApiResponse with success boolean, status code, and headers
        N)r1   delete_with_http_info_asyncr0   s    r*   r<   z)MediaInstance.delete_with_http_info_asyncn   s!      [[<<>>>>r8   c                 6    | j                   j                         S )W
        Fetch the MediaInstance


        :returns: The fetched MediaInstance
        )r1   fetchr0   s    r*   r?   zMediaInstance.fetchw   s     {{  ""r+   c                 R   K   | j                   j                          d{   S 7 w)q
        Asynchronous coroutine to fetch the MediaInstance


        :returns: The fetched MediaInstance
        N)r1   fetch_asyncr0   s    r*   rB   zMediaInstance.fetch_async   s!      [[,,....r8   c                 6    | j                   j                         S )z
        Fetch the MediaInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        )r1   fetch_with_http_infor0   s    r*   rD   z"MediaInstance.fetch_with_http_info   s     {{//11r+   c                 R   K   | j                   j                          d{   S 7 w)z
        Asynchronous coroutine to fetch the MediaInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        N)r1   fetch_with_http_info_asyncr0   s    r*   rF   z(MediaInstance.fetch_with_http_info_async   s!      [[;;====r8   c                     dj                  d | j                  j                         D              }dj                  |      S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c              3   F   K   | ]  \  }}d j                  ||        ywz{}={}Nformat.0kvs      r*   	<genexpr>z)MediaInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z#<Twilio.Api.V2010.MediaInstance {}>joinr&   itemsrM   r(   contexts     r*   __repr__zMediaInstance.__repr__   s6     ((SDNN<P<P<RSS4;;GDDr+   )N)r,   r.   )r,   r   )__name__
__module____qualname____doc__r   r   strr   r   r#   propertyr1   boolr4   r7   r   r:   r<   r?   rB   rD   rF   rZ   __classcell__r)   s   @r*   r   r      s      "55 c3h5 	5
 5 c]5:   $ $0D 03{ 3?; ?#/2k 2>+ >E# Er+   r   c                        e Zd Zdedededef fdZdefdZdefdZ	de
fd	Zdefd
ZdefdZde
fdZdefdZdefdZde
fdZdefdZdefdZde
fdZdefdZ xZS )r.   r   r   r   r   c                 |    t         |   |       |||d| _         dj                  di | j                  | _        y)a  
        Initialize the MediaContext

        :param version: Version that contains the resource
        :param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with the Media resource.
        :param message_sid: The SID of the Message resource that is associated with the Media resource.
        :param sid: The Twilio-provided string that uniquely identifies the Media resource to fetch.
        r!   z?/Accounts/{account_sid}/Messages/{message_sid}/Media/{sid}.jsonN r"   r#   r&   rM   _uri)r(   r   r   r   r   r)   s        r*   r#   zMediaContext.__init__   sM     	! '&
 UMTT .. 		r+   r,   c                 |    t        j                  i       }| j                  j                  d| j                  |      S )z
        Internal helper for delete operation

        Returns:
            tuple: (success_boolean, status_code, headers)
        DELETEmethodr    headers)r   ofr/   delete_with_response_inforh   r(   rm   s     r*   _deletezMediaContext._delete   s8     ))B-}}66G 7 
 	
r+   c                 .    | j                         \  }}}|S r3   )rq   r(   success_s      r*   r4   zMediaContext.delete   s     Ar+   c                 F    | j                         \  }}}t        |||      S )z
        Deletes the MediaInstance and return response metadata


        :returns: ApiResponse with success boolean, status code, and headers
        datastatus_coderm   )rq   r   r(   rt   ry   rm   s       r*   r:   z"MediaContext.delete_with_http_info   s%     )-%g['RRr+   c                    K   t        j                  i       }| j                  j                  d| j                  |       d{   S 7 w)z
        Internal async helper for delete operation

        Returns:
            tuple: (success_boolean, status_code, headers)
        rj   rk   N)r   rn   r/   delete_with_response_info_asyncrh   rp   s     r*   _delete_asynczMediaContext._delete_async   sG      ))B-]]BBG C 
 
 	
 
s   AA
AA
c                 J   K   | j                          d{   \  }}}|S 7 
wr6   )r}   rs   s      r*   r7   zMediaContext.delete_async   s)      #0022A 3s   #!#c                 b   K   | j                          d{   \  }}}t        |||      S 7 w)z
        Asynchronous coroutine that deletes the MediaInstance and return response metadata


        :returns: ApiResponse with success boolean, status code, and headers
        Nrw   )r}   r   rz   s       r*   r<   z(MediaContext.delete_with_http_info_async   s5      /3.@.@.B(B%g['RR )Cs   /-/c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      S )zz
        Internal helper for fetch operation

        Returns:
            tuple: (payload, status_code, headers)
        application/jsonAcceptGETrk   )r   rn   r/   fetch_with_response_inforh   rp   s     r*   _fetchzMediaContext._fetch  sB     ))B-.}}55dii 6 
 	
r+   c                     | j                         \  }}}t        | j                  || j                  d   | j                  d   | j                  d         S )r>   r   r   r   r!   )r   r   r/   r&   r(   r   ru   s      r*   r?   zMediaContext.fetch  sP     AMM}5}5u%
 	
r+   c                     | j                         \  }}}t        | j                  || j                  d   | j                  d   | j                  d         }t	        |||      S )z
        Fetch the MediaInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        r   r   r   r!   rw   )r   r   r/   r&   r   r(   r   ry   rm   instances        r*   rD   z!MediaContext.fetch_with_http_info"  s_     )-%g MM}5}5u%
 k7SSr+   c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   S 7 w)z
        Internal async helper for fetch operation

        Returns:
            tuple: (payload, status_code, headers)
        r   r   r   rk   N)r   rn   r/   fetch_with_response_info_asyncrh   rp   s     r*   _fetch_asynczMediaContext._fetch_async3  sQ      ))B-.]]AAdii B 
 
 	
 
s   AAA	Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d   | j                  d   | j                  d         S 7 Iw)rA   Nr   r   r   r!   )r   r   r/   r&   r   s      r*   rB   zMediaContext.fetch_asyncC  s_      #//11AMM}5}5u%
 	
 2s   A"A A
A"c                    K   | j                          d{   \  }}}t        | j                  || j                  d   | j                  d   | j                  d         }t	        |||      S 7 Ww)z
        Asynchronous coroutine to fetch the MediaInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        Nr   r   r   r!   rw   )r   r   r/   r&   r   r   s        r*   rF   z'MediaContext.fetch_with_http_info_asyncS  so      /3.?.?.A(A%g MM}5}5u%
 k7SS )Bs   A0A.AA0c                     dj                  d | j                  j                         D              }dj                  |      S )rH   rI   c              3   F   K   | ]  \  }}d j                  ||        ywrK   rL   rN   s      r*   rR   z(MediaContext.__repr__.<locals>.<genexpr>j  rS   rT   z"<Twilio.Api.V2010.MediaContext {}>rU   rX   s     r*   rZ   zMediaContext.__repr__d  s6     ((SDNN<P<P<RSS3::7CCr+   )r[   r\   r]   r   r_   r#   tuplerq   ra   r4   r   r:   r}   r7   r<   r   r   r?   rD   r   rB   rF   rZ   rb   rc   s   @r*   r.   r.      s    
 
c 
 
RU 
.
 
 S{ S
U 
D S; S
 
 
} 
 Tk T"
E 
 
= 
 T+ T"D# Dr+   r.   c                   2    e Zd Zdeeef   defdZdefdZy)	MediaPager   r,   c                 h    t        | j                  || j                  d   | j                  d         S )zk
        Build an instance of MediaInstance

        :param payload: Payload response from the API
        r   r   r   r   )r   r/   r&   )r(   r   s     r*   get_instancezMediaPage.get_instancep  s3     MM}5}5	
 	
r+   c                      y)rH   z<Twilio.Api.V2010.MediaPage>rf   r0   s    r*   rZ   zMediaPage.__repr__}       .r+   N)	r[   r\   r]   r   r_   r   r   r   rZ   rf   r+   r*   r   r   n  s)    
DcN 
} 
.# .r+   r   c                       e Zd Zdededef fdZ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   d
ee   dee   fdZ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   d
ee   dee   fdZ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   d
ee   defdZ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   d
ee   defdZ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   d
ee   dee   fdZ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   d
ee   dee   fdZ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   d
ee   defdZ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   d
ee   defdZ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fdZ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fdZ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fdZ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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 )!	MediaListr   r   r   c                 z    t         |   |       ||d| _         dj                  di | j                  | _        y)a_  
        Initialize the MediaList

        :param version: Version that contains the resource
        :param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is associated with the Media resources.
        :param message_sid: The SID of the Message resource that is associated with the Media resources.

        r   z9/Accounts/{account_sid}/Messages/{message_sid}/Media.jsonNrf   rg   )r(   r   r   r   r)   s       r*   r#   zMediaList.__init__  sG     	! '&
 WOVV 
nn
	r+   Nr   date_created_beforedate_created_afterlimit	page_sizer,   c                     | j                   j                  ||      }| j                  ||||d         }| j                   j                  ||d         S )a  
        Streams MediaInstance 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 datetime date_created: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :param datetime date_created_before: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :param datetime date_created_after: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :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   r   r   r   r   )r/   read_limitspagestreamr(   r   r   r   r   r   limitsr   s           r*   r   zMediaList.stream  s[    4 **5)<yy% 31[)	  
 }}##D&/::r+   c                    K   | j                   j                  ||      }| j                  ||||d          d{   }| j                   j                  ||d         S 7 #w)a  
        Asynchronously streams MediaInstance 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 datetime date_created: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :param datetime date_created_before: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :param datetime date_created_after: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :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   )r/   r   
page_asyncstream_asyncr   s           r*   r   zMediaList.stream_async  si     4 **5)<__% 31[)	 % 
 
 }}))$w@@
s   8A A$A c                     | j                   j                  ||      }| j                  ||||d         }| j                   j                  |j                  |d         }||j
                  |j                  fS )a  
        Streams MediaInstance and returns headers from first page


        :param datetime date_created: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :param datetime date_created_before: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :param datetime date_created_after: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :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: tuple of (generator, status_code, headers) where generator yields instances
        r   r   r   )r/   r   page_with_http_infor   rx   ry   rm   	r(   r   r   r   r   r   r   page_response	generators	            r*   stream_with_http_infozMediaList.stream_with_http_info  s{    0 **5)<00% 31[)	 1 
 MM((););VG_M	=44m6K6KLLr+   c                 
  K   | j                   j                  ||      }| j                  ||||d          d{   }| j                   j                  |j                  |d         }||j
                  |j                  fS 7 Fw)a  
        Asynchronously streams MediaInstance and returns headers from first page


        :param datetime date_created: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :param datetime date_created_before: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :param datetime date_created_after: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :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: tuple of (generator, status_code, headers) where generator yields instances
        r   r   Nr   )r/   r   page_with_http_info_asyncr   rx   ry   rm   r   s	            r*   stream_with_http_info_asyncz%MediaList.stream_with_http_info_async  s     0 **5)<"<<% 31[)	 = 
 
 MM..}/A/A6'?S	=44m6K6KLL
s   8BBABc           	      @    t        | j                  |||||            S )a6  
        Lists MediaInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param datetime date_created: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :param datetime date_created_before: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :param datetime date_created_after: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :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
        r   r   r   r   r   )listr   )r(   r   r   r   r   r   s         r*   r   zMediaList.list*  s1    2 KK)$7#5#  
 	
r+   c                    K   | j                  |||||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)aE  
        Asynchronously lists MediaInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param datetime date_created: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :param datetime date_created_before: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :param datetime date_created_after: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :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
        r   N)r   )r(   r   r   r   r   r   records          r*   
list_asynczMediaList.list_asyncM  s]     6 '+&7&7)$7#5# '8 ' !	
 	
 !	
 	
 		
 	
s0   >1>953
59>59>c                 h    | j                  |||||      \  }}}t        |      }	t        |	||      S )a  
        Lists MediaInstance and returns headers from first page


        :param datetime date_created: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :param datetime date_created_before: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :param datetime date_created_after: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :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: ApiResponse with list of instances, status code, and headers
        r   rw   )r   r   r   )
r(   r   r   r   r   r   r   ry   rm   rW   s
             r*   list_with_http_infozMediaList.list_with_http_infoq  sJ    0 +/*D*D% 31 +E +
'	; Y;PPr+   c                    K   | j                  |||||       d{   \  }}}|2 	cg c3 d{   }	|	7 7 	6 nc c}	w }
}	t        |
||      S w)a  
        Asynchronously lists MediaInstance and returns headers from first page


        :param datetime date_created: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :param datetime date_created_before: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :param datetime date_created_after: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :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: ApiResponse with list of instances, status code, and headers
        r   Nrw   )r   r   )r(   r   r   r   r   r   r   ry   rm   r   rW   s              r*   list_with_http_info_asyncz#MediaList.list_with_http_info_async  so     0 150P0P% 31 1Q 1
 +
'	; -666&+
 7666;PPs4   A7A=;9
;=A;=A
page_tokenpage_numberc           	      x   t        j                  t        j                  |      t        j                  |      t        j                  |      |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      }	t        | j                  |	| j                        S )a  
        Retrieve a single page of MediaInstance records from the API.
        Request is executed immediately

        :param date_created: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :param date_created_before: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :param date_created_after: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :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 MediaInstance
        DateCreatedzDateCreated<zDateCreated>	PageTokenr   PageSizeContent-Type!application/x-www-form-urlencodedr   r   r   rl   r    paramsrm   )	r   rn   r   iso8601_datetimer/   r   rh   r   r&   
r(   r   r   r   r   r   r   rx   rm   responses
             r*   r   zMediaList.page  s    , yy(99,G ) : :;N O ) : :;M N'#%	
 ))^-PQR.==%%diig & 
 $..AAr+   c           	        K   t        j                  t        j                  |      t        j                  |      t        j                  |      |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   }	t        | j                  |	| j                        S 7 %w)	a  
        Asynchronously retrieve a single page of MediaInstance records from the API.
        Request is executed immediately

        :param date_created: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :param date_created_before: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :param date_created_after: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :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 MediaInstance
        r   r   r   r   r   r   r   N)	r   rn   r   r   r/   r   rh   r   r&   r   s
             r*   r   zMediaList.page_async  s     , yy(99,G ) : :;N O ) : :;M N'#%	
 ))^-PQR.11diig 2 
 
 $..AA
s   BC C!&Cc           	         t        j                  t        j                  |      t        j                  |      t        j                  |      |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      \  }	}
}t        | j                  |	| j                        }t        ||
|      S )	az  
        Retrieve a single page with response metadata


        :param date_created: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :param date_created_before: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :param date_created_after: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :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: ApiResponse with MediaPage, status code, and headers
        r   r   r   r   r   r   r   rw   )
r   rn   r   r   r/   page_with_response_inforh   r   r&   r   r(   r   r   r   r   r   r   rx   rm   r   ry   response_headersr   s                r*   r   zMediaList.page_with_http_info	  s    , yy(99,G ) : :;N O ) : :;M N'#%	
 ))^-PQR.26--2W2Wdiig 3X 3
/+/ $..A+GWXXr+   c           	        K   t        j                  t        j                  |      t        j                  |      t        j                  |      |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   \  }	}
}t        | j                  |	| j                        }t        ||
|	      S 7 7w)
a  
        Asynchronously retrieve a single page with response metadata


        :param date_created: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :param date_created_before: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :param date_created_after: Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
        :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: ApiResponse with MediaPage, status code, and headers
        r   r   r   r   r   r   r   Nrw   )
r   rn   r   r   r/   page_with_response_info_asyncrh   r   r&   r   r   s                r*   r   z#MediaList.page_with_http_info_async4  s     , yy(99,G ) : :;N O ) : :;M N'#%	
 ))^-PQR. --==$))D' >   	0+/
 $..A+GWXXs   BC C!8C
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   || j
                        S )z
        Retrieve a specific page of MediaInstance records from the API.
        Request is executed immediately

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

        :returns: Page of MediaInstance
        r   )r/   domaintwiliorequestr   r&   r(   r   r   s      r*   get_pagezMediaList.get_pagea  s=     ==''..66ujI$..AAr+   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   || j
                        S 7 %w)z
        Asynchronously retrieve a specific page of MediaInstance records from the API.
        Request is executed immediately

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

        :returns: Page of MediaInstance
        r   N)r/   r   r   request_asyncr   r&   r   s      r*   get_page_asynczMediaList.get_page_asyncm  sJ      --44BB5*UU$..AA Vs   4AA&Ar   c                 h    t        | j                  | j                  d   | j                  d   |      S z
        Constructs a MediaContext

        :param sid: The Twilio-provided string that uniquely identifies the Media resource to fetch.
        r   r   r!   r.   r/   r&   r(   r   s     r*   r$   zMediaList.gety  3     MM}5}5	
 	
r+   c                 h    t        | j                  | j                  d   | j                  d   |      S r   r   r   s     r*   __call__zMediaList.__call__  r   r+   c                      y)rH   z<Twilio.Api.V2010.MediaList>rf   r0   s    r*   rZ   zMediaList.__repr__  r   r+   )'r[   r\   r]   r   r_   r#   r   unsetr   r   objectr   intr	   r   r   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r.   r$   r   rZ   rb   rc   s   @r*   r   r     s   
 
c 
 
, 177=||6<ll##'";Hf,-"; #8V#34"; "(F"23	";
 }"; C="; 
-	 ";L 177=||6<ll##'"AHf,-"A #8V#34"A "(F"23	"A
 }"A C="A 
}	%"AL 177=||6<ll##'!MHf,-!M #8V#34!M "(F"23	!M
 }!M C=!M 
!MJ 177=||6<ll##'!MHf,-!M #8V#34!M "(F"23	!M
 }!M C=!M 
!MJ 177=||6<ll##'!
Hf,-!
 #8V#34!
 "(F"23	!

 }!
 C=!
 
m	!
J 177=||6<ll##'"
Hf,-"
 #8V#34"
 "(F"23	"

 }"
 C="
 
m	"
L 177=||6<ll##' QHf,- Q #8V#34 Q "(F"23	 Q
 } Q C= Q 
 QH 177=||6<ll##' QHf,- Q #8V#34 Q "(F"23	 Q
 } Q C= Q 
 QH 177=||6<ll)/*0,,(.(BHf,-(B #8V#34(B "(F"23	(B
 #v+&(B 3;'(B f%(B 
(BX 177=||6<ll)/*0,,(.(BHf,-(B #8V#34(B "(F"23	(B
 #v+&(B 3;'(B f%(B 
(BX 177=||6<ll)/*0,,(.)YHf,-)Y #8V#34)Y "(F"23	)Y
 #v+&)Y 3;')Y f%)Y 
)YZ 177=||6<ll)/*0,,(.+YHf,-+Y #8V#34+Y "(F"23	+Y
 #v+&+Y 3;'+Y f%+Y 
+YZ
B3 
B9 
B
Bs 
By 
B
s 
| 

C 
L 
.# .r+   r   N)r^   r   typingr   r   r   r   r   r	   r
   twilio.baser   r   r   twilio.base.api_responser   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r.   r   r   rf   r+   r*   <module>r      sm     L L L 6 6 0 8 : 2 ' !HE$ HEVFD? FDR. .0S. S.r+   