
    2Rj1T                       d dl mZ 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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/m0Z0 ddl1m2Z2 ddl3m4Z4 ddgZ5 G d de      Z6 G d de      Z7 G d d      Z8 G d d      Z9 G d d      Z: G d d      Z;y)     )annotations)Iterable)LiteralN   )_legacy_response)container_list_paramscontainer_create_params)	BodyOmitQueryHeadersNoneTypeNotGivenSequenceNotStromit	not_given)path_template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eeddded		 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ	ddded	 	 	 	 	 	 	 	 	 	 	 ddZ
e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    n/var/www/html/meridian/meridian-ai/venv/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    r1   with_raw_responsezContainers.with_raw_response'   s     )..r3   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    r1   with_streaming_responsez"Containers.with_streaming_response1   s     /t44r3   N	expires_afterfile_idsmemory_limitnetwork_policyskillsextra_headersextra_query
extra_bodytimeoutc       
            | j                  dt        ||||||dt        j                        t	        |||	|
ddi      t
              S )  
        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".

          network_policy: Network access policy for the container.

          skills: An optional list of skills referenced by id or inline data.

          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@   rA   bearer_authTrB   rC   rD   rE   securitybodyoptionscast_to)_postr   r	   ContainerCreateParamsr%   r'   r0   rJ   r=   r>   r?   r@   rA   rB   rC   rD   rE   s              r1   createzContainers.create:   sk    P zz  %2 ($0&4$ (==
 )+'%'. ,)  
 	
r3   rB   rC   rD   rE   c                   |st        d|      | j                  t        d|      t        ||||ddi      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/{container_id}container_idrK   TrL   rP   rQ   
ValueError_getr   r%   r(   r0   r\   rB   rC   rD   rE   s         r1   retrievezContainers.retrievey   s^    . Z[gZjkllyy6\R(+'%'. .  

 
	
r3   afterlimitrJ   orderrB   rC   rD   rE   c                   | j                  dt        t           t        ||||t	        ||||dt
        j                        ddi      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.

          name: Filter results by container name.

          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
        rH   )rd   re   rJ   rf   rK   T)rB   rC   rD   rE   queryrM   )pagerP   model)_get_api_listr"   r&   r%   r   r   ContainerListParams	r0   rd   re   rJ   rf   rB   rC   rD   rE   s	            r1   listzContainers.list   sp    P !! 56(+'%%!&!& $!&	 *== (.  (' " 
 	
r3   c                   |st        d|      ddi|xs i }| j                  t        d|      t        ||||ddi      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
        rY   Accept*/*rZ   r[   rK   TrL   r]   r_   _deleter   r%   r   ra   s         r1   deletezContainers.delete   sr    . Z[gZjkll!5B]-@bB||6\R(+'%'.   

 
	
r3   )returnr   )rw   r6   )rw   r:   rJ   strr=   z+container_create_params.ExpiresAfter | Omitr>   zSequenceNotStr[str] | Omitr?   z(Literal['1g', '4g', '16g', '64g'] | Omitr@   z,container_create_params.NetworkPolicy | OmitrA   z.Iterable[container_create_params.Skill] | OmitrB   Headers | NonerC   Query | NonerD   Body | NonerE   'float | httpx.Timeout | None | NotGivenrw   r'   r\   ry   rB   rz   rC   r{   rD   r|   rE   r}   rw   r(   )rd   
str | Omitre   
int | OmitrJ   r   rf   Literal['asc', 'desc'] | OmitrB   rz   rC   r{   rD   r|   rE   r}   rw   z%SyncCursorPage[ContainerListResponse]r\   ry   rB   rz   rC   r{   rD   r|   rE   r}   rw   None__name__
__module____qualname__r   r2   r7   r;   r   r   rU   rb   ro   rv    r3   r1   r)   r)   "   s   # # / / 5 5 FJ/3AEGKAE )-$("&;D=
 =
 C	=

 -=
 ?=
 E=
 ?=
 &=
 "=
  =
 9=
 
!=
J )-$("&;D#
#
 &#
 "#
  #
 9#
 
##
P ! /3 )-$("&;D<
 <
 	<

 <
 -<
 &<
 "<
  <
 9<
 
/<
H )-$("&;D$
$
 &$
 "$
  $
 9$
 
$
r3   c            
         e Zd Zedd       Zedd       Zedd       Zeeeeeddded		 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ	ddded	 	 	 	 	 	 	 	 	 	 	 ddZ
e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    r1   r2   zAsyncContainers.files  s    $,,''r3   c                    t        |       S r5   )AsyncContainersWithRawResponser/   s    r1   r7   z!AsyncContainers.with_raw_response  s     .d33r3   c                    t        |       S r9   )$AsyncContainersWithStreamingResponser/   s    r1   r;   z'AsyncContainers.with_streaming_response  s     4D99r3   Nr<   c       
           K   | j                  dt        ||||||dt        j                         d{   t	        |||	|
ddi      t
               d{   S 7 '7 w)rG   rH   rI   NrK   TrL   rN   )rR   r   r	   rS   r%   r'   rT   s              r1   rU   zAsyncContainers.create  s     P ZZ, %2 ($0&4$ (==
 
 )+'%'. ,)   
 
 	


s!   1AA
"AAAArV   c                  K   |st        d|      | j                  t        d|      t        ||||ddi      t               d{   S 7 w)	rX   rY   rZ   r[   rK   TrL   r]   Nr^   ra   s         r1   rb   zAsyncContainers.retrieveZ  sl     . Z[gZjkllYY6\R(+'%'. .  

 

 
	
 

s   AA	A
Arc   c                   | j                  dt        t           t        ||||t	        ||||dt
        j                        ddi      t              S rh   )rl   r#   r&   r%   r   r   rm   rn   s	            r1   ro   zAsyncContainers.list  sp    P !! !67(+'%%!&!& $!&	 *== (.  (' " 
 	
r3   c                  K   |st        d|      ddi|xs i }| j                  t        d|      t        ||||ddi      t        	       d
{   S 7 w)rq   rY   rr   rs   rZ   r[   rK   TrL   r]   Nrt   ra   s         r1   rv   zAsyncContainers.delete  s     . Z[gZjkll!5B]-@bB\\6\R(+'%'.  " 

 

 
	
 

s   AAAA)rw   r   )rw   r   )rw   r   rx   r~   )rd   r   re   r   rJ   r   rf   r   rB   rz   rC   r{   rD   r|   rE   r}   rw   zMAsyncPaginator[ContainerListResponse, AsyncCursorPage[ContainerListResponse]]r   r   r   r3   r1   r*   r*     s   ( ( 4 4 : : FJ/3AEGKAE )-$("&;D=
 =
 C	=

 -=
 ?=
 E=
 ?=
 &=
 "=
  =
 9=
 
!=
J )-$("&;D#
#
 &#
 "#
  #
 9#
 
##
P ! /3 )-$("&;D<
 <
 	<

 <
 -<
 &<
 "<
  <
 9<
 
W<
H )-$("&;D$
$
 &$
 "$
  $
 9$
 
$
r3   c                  &    e Zd ZddZedd       Zy)r6   c                2   || _         t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j
                        | _        t        j                  |j                        | _        y r-   )_containersr   to_raw_response_wrapperrU   rb   ro   rv   r0   
containerss     r1   __init__z"ContainersWithRawResponse.__init__  sz    %&>>
 )@@
 %<<OO
	 '>>
r3   c                @    t        | j                  j                        S r-   )r   r   r2   r/   s    r1   r2   zContainersWithRawResponse.files  s    #D$4$4$:$:;;r3   Nr   r)   rw   r   )rw   r   r   r   r   r   r   r2   r   r3   r1   r6   r6     s    
  < <r3   r6   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_wrapperrU   rb   ro   rv   r   s     r1   r   z'AsyncContainersWithRawResponse.__init__  sz    %&DD
 )FF
 %BBOO
	 'DD
r3   c                @    t        | j                  j                        S r-   )r   r   r2   r/   s    r1   r2   z$AsyncContainersWithRawResponse.files  s    ()9)9)?)?@@r3   Nr   r*   rw   r   )rw   r   r   r   r3   r1   r   r     s    
  A Ar3   r   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   rU   rb   ro   rv   r   s     r1   r   z(ContainersWithStreamingResponse.__init__  sb    %2
 5
 1OO
	 3
r3   c                @    t        | j                  j                        S r-   )r    r   r2   r/   s    r1   r2   z%ContainersWithStreamingResponse.files!  s    )$*:*:*@*@AAr3   Nr   )rw   r    r   r   r3   r1   r:   r:     s    
  B Br3   r:   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   rU   rb   ro   rv   r   s     r1   r   z-AsyncContainersWithStreamingResponse.__init__'  sb    %8
 ;
 7OO
	 9
r3   c                @    t        | j                  j                        S r-   )r!   r   r2   r/   s    r1   r2   z*AsyncContainersWithStreamingResponse.files7  s    .t/?/?/E/EFFr3   Nr   )rw   r!   r   r   r3   r1   r   r   &  s    
  G Gr3   r   )<
__future__r   typingr   typing_extensionsr   httpx r   typesr   r	   _typesr
   r   r   r   r   r   r   r   r   _utilsr   r   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*   r6   r   r:   r   r   r3   r1   <module>r      s    #  %    C e e e K K & : Y  : @ B F J*
+^
 ^
B^
& ^
B< <,A A,B B,G Gr3   