
    9iL                       d dl mZ d dlmZ d dlZddlmZ ddlmZm	Z	 ddl
mZmZ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mZ ddlmZmZ ddlm Z m!Z!m"Z"m#Z#m$Z$m%Z% ddl&m'Z'm(Z( ddl)m*Z*m+Z+ ddl,m-Z- ddl.m/Z/ ddl0m1Z1 ddgZ2 G d de      Z3 G d de      Z4 G d d      Z5 G d d      Z6 G d d      Z7 G d d      Z8y)    )annotations)LiteralN   )_legacy_response)container_list_paramscontainer_create_params)	BodyOmitQueryHeadersNoneTypeNotGivenSequenceNotStromit	not_given)maybe_transformasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper   )Files
AsyncFilesFilesWithRawResponseAsyncFilesWithRawResponseFilesWithStreamingResponseAsyncFilesWithStreamingResponse)SyncCursorPageAsyncCursorPage)AsyncPaginatormake_request_options)ContainerListResponse)ContainerCreateResponse)ContainerRetrieveResponse
ContainersAsyncContainersc                  
   e Zd Zedd       Zedd       Zedd       Zeeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ	ddded	 	 	 	 	 	 	 	 	 	 	 ddZ
eeeddded		 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd
Zddded	 	 	 	 	 	 	 	 	 	 	 ddZy)r'   c                ,    t        | j                        S N)r   _clientselfs    o/var/www/html/leadgen/airagagent/rag_env/lib/python3.12/site-packages/openai/resources/containers/containers.pyfileszContainers.files"   s    T\\""    c                    t        |       S a  
        This property can be used as a prefix for any HTTP method call to return
        the raw response object instead of the parsed content.

        For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
        )ContainersWithRawResponser-   s    r/   with_raw_responsezContainers.with_raw_response&   s     )..r1   c                    t        |       S z
        An alternative to `.with_raw_response` that doesn't eagerly read the response body.

        For more information, see https://www.github.com/openai/openai-python#with_streaming_response
        )ContainersWithStreamingResponser-   s    r/   with_streaming_responsez"Containers.with_streaming_response0   s     /t44r1   Nexpires_afterfile_idsmemory_limitextra_headersextra_query
extra_bodytimeoutc          
         | j                  dt        ||||dt        j                        t	        ||||      t
              S )d  
        Create Container

        Args:
          name: Name of the container to create.

          expires_after: Container expiration time in seconds relative to the 'anchor' time.

          file_ids: IDs of files to copy to the container.

          memory_limit: Optional memory limit for the container. Defaults to "1g".

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        /containersnamer;   r<   r=   r>   r?   r@   rA   bodyoptionscast_to)_postr   r   ContainerCreateParamsr#   r%   	r.   rF   r;   r<   r=   r>   r?   r@   rA   s	            r/   createzContainers.create9   s\    D zz  %2 ($0	 (== )+Q[el ,  
 	
r1   rG   c          	     r    |st        d|      | j                  d| t        ||||      t              S )F  
        Retrieve Container

        Args:
          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        ;Expected a non-empty value for `container_id` but received /containers/rG   rJ   rK   
ValueError_getr#   r&   r.   container_idr>   r?   r@   rA   s         r/   retrievezContainers.retrievel   sT    . Z[gZjkllyy<.)(+Q[el .  
 	
r1   afterlimitorderr>   r?   r@   rA   c                   | j                  dt        t           t        ||||t	        |||dt
        j                              t              S a  List Containers

        Args:
          after: A cursor for use in pagination.

        `after` is an object ID that defines your place
              in the list. For instance, if you make a list request and receive 100 objects,
              ending with obj_foo, your subsequent call can include after=obj_foo in order to
              fetch the next page of the list.

          limit: A limit on the number of objects to be returned. Limit can range between 1 and
              100, and the default is 20.

          order: Sort order by the `created_at` timestamp of the objects. `asc` for ascending
              order and `desc` for descending order.

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        rD   )r\   r]   r^   )r>   r?   r@   rA   query)pagerJ   model)_get_api_listr    r$   r#   r   r   ContainerListParamsr.   r\   r]   r^   r>   r?   r@   rA   s           r/   listzContainers.list   sc    J !! 56(+'%%!&!&!&
 *== (# " 
 	
r1   c          	         |st        d|      ddi|xs i }| j                  d| t        ||||      t              S )D  
        Delete Container

        Args:
          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        rR   Accept*/*rS   rG   rT   rV   _deleter#   r   rX   s         r/   deletezContainers.delete   sh    . Z[gZjkll!5B]-@bB||<.)(+Q[el   
 	
r1   )returnr   )ro   r4   )ro   r8   rF   strr;   z+container_create_params.ExpiresAfter | Omitr<   zSequenceNotStr[str] | Omitr=   z(Literal['1g', '4g', '16g', '64g'] | Omitr>   Headers | Noner?   Query | Noner@   Body | NonerA   'float | httpx.Timeout | None | NotGivenro   r%   rY   rq   r>   rr   r?   rs   r@   rt   rA   ru   ro   r&   )r\   
str | Omitr]   
int | Omitr^   Literal['asc', 'desc'] | Omitr>   rr   r?   rs   r@   rt   rA   ru   ro   z%SyncCursorPage[ContainerListResponse]rY   rq   r>   rr   r?   rs   r@   rt   rA   ru   ro   None__name__
__module____qualname__r   r0   r5   r9   r   r   rO   rZ   rg   rn    r1   r/   r'   r'   !   s   # # / / 5 5 FJ/3AE )-$("&;D1
 1
 C	1

 -1
 ?1
 &1
 "1
  1
 91
 
!1
r )-$("&;D

 &
 "
  
 9
 
#
H ! /3 )-$("&;D7
 7
 	7

 -7
 &7
 "7
  7
 97
 
/7
~ )-$("&;D 
 
 & 
 " 
   
 9 
 
 
r1   c                  
   e Zd Zedd       Zedd       Zedd       Zeeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ	ddded	 	 	 	 	 	 	 	 	 	 	 ddZ
eeeddded		 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd
Zddded	 	 	 	 	 	 	 	 	 	 	 ddZy)r(   c                ,    t        | j                        S r+   )r   r,   r-   s    r/   r0   zAsyncContainers.files   s    $,,''r1   c                    t        |       S r3   )AsyncContainersWithRawResponser-   s    r/   r5   z!AsyncContainers.with_raw_response   s     .d33r1   c                    t        |       S r7   )$AsyncContainersWithStreamingResponser-   s    r/   r9   z'AsyncContainers.with_streaming_response   s     4D99r1   Nr:   c          
        K   | j                  dt        ||||dt        j                         d{   t	        ||||      t
               d{   S 7 $7 w)rC   rD   rE   NrG   rH   )rL   r   r   rM   r#   r%   rN   s	            r/   rO   zAsyncContainers.create  su     D ZZ, %2 ($0	 (==  )+Q[el ,   
 
 	

s!   /AA
AAAArG   c          	        K   |st        d|      | j                  d| t        ||||      t               d{   S 7 w)rQ   rR   rS   rG   rT   NrU   rX   s         r/   rZ   zAsyncContainers.retrieve4  sb     . Z[gZjkllYY<.)(+Q[el .  
 
 	
 
s   <AAAr[   c                   | j                  dt        t           t        ||||t	        |||dt
        j                              t              S r`   )rd   r!   r$   r#   r   r   re   rf   s           r/   rg   zAsyncContainers.listU  sc    J !! !67(+'%%!&!&!&
 *== (# " 
 	
r1   c          	        K   |st        d|      ddi|xs i }| j                  d| t        ||||      t               d{   S 7 w)ri   rR   rj   rk   rS   rG   rT   Nrl   rX   s         r/   rn   zAsyncContainers.delete  sv     . Z[gZjkll!5B]-@bB\\<.)(+Q[el  " 
 
 	
 
s   AAA	A)ro   r   )ro   r   )ro   r   rp   rv   )r\   rw   r]   rx   r^   ry   r>   rr   r?   rs   r@   rt   rA   ru   ro   zMAsyncPaginator[ContainerListResponse, AsyncCursorPage[ContainerListResponse]]rz   r|   r   r1   r/   r(   r(      s   ( ( 4 4 : : FJ/3AE )-$("&;D1
 1
 C	1

 -1
 ?1
 &1
 "1
  1
 91
 
!1
r )-$("&;D

 &
 "
  
 9
 
#
H ! /3 )-$("&;D7
 7
 	7

 -7
 &7
 "7
  7
 97
 
W7
~ )-$("&;D 
 
 & 
 " 
   
 9 
 
 
r1   c                  &    e Zd ZddZedd       Zy)r4   c                2   || _         t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j
                        | _        t        j                  |j                        | _        y r+   )_containersr   to_raw_response_wrapperrO   rZ   rg   rn   r.   
containerss     r/   __init__z"ContainersWithRawResponse.__init__  sz    %&>>
 )@@
 %<<OO
	 '>>
r1   c                @    t        | j                  j                        S r+   )r   r   r0   r-   s    r/   r0   zContainersWithRawResponse.files  s    #D$4$4$:$:;;r1   Nr   r'   ro   r{   )ro   r   r}   r~   r   r   r   r0   r   r1   r/   r4   r4     s    
  < <r1   r4   c                  &    e Zd ZddZedd       Zy)r   c                2   || _         t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j
                        | _        t        j                  |j                        | _        y r+   )r   r   async_to_raw_response_wrapperrO   rZ   rg   rn   r   s     r/   r   z'AsyncContainersWithRawResponse.__init__  sz    %&DD
 )FF
 %BBOO
	 'DD
r1   c                @    t        | j                  j                        S r+   )r   r   r0   r-   s    r/   r0   z$AsyncContainersWithRawResponse.files  s    ()9)9)?)?@@r1   Nr   r(   ro   r{   )ro   r   r   r   r1   r/   r   r     s    
  A Ar1   r   c                  &    e Zd ZddZedd       Zy)r8   c                    || _         t        |j                        | _        t        |j                        | _        t        |j                        | _        t        |j
                        | _        y r+   )r   r   rO   rZ   rg   rn   r   s     r/   r   z(ContainersWithStreamingResponse.__init__  sb    %2
 5
 1OO
	 3
r1   c                @    t        | j                  j                        S r+   )r   r   r0   r-   s    r/   r0   z%ContainersWithStreamingResponse.files  s    )$*:*:*@*@AAr1   Nr   )ro   r   r   r   r1   r/   r8   r8     s    
  B Br1   r8   c                  &    e Zd ZddZedd       Zy)r   c                    || _         t        |j                        | _        t        |j                        | _        t        |j                        | _        t        |j
                        | _        y r+   )r   r   rO   rZ   rg   rn   r   s     r/   r   z-AsyncContainersWithStreamingResponse.__init__  sb    %8
 ;
 7OO
	 9
r1   c                @    t        | j                  j                        S r+   )r   r   r0   r-   s    r/   r0   z*AsyncContainersWithStreamingResponse.files  s    .t/?/?/E/EFFr1   Nr   )ro   r   r   r   r1   r/   r   r     s    
  G Gr1   r   )9
__future__r   typing_extensionsr   httpx r   typesr   r   _typesr	   r
   r   r   r   r   r   r   r   _utilsr   r   _compatr   	_resourcer   r   	_responser   r   files.filesr   r   r   r   r   r   
paginationr    r!   _base_clientr"   r#   types.container_list_responser$   types.container_create_responser%   !types.container_retrieve_responser&   __all__r'   r(   r4   r   r8   r   r   r1   r/   <module>r      s    # %    C e e e < & : Y  : @ B F J*
+E
 E
PE
& E
P< <,A A,B B,G Gr1   