
    iQ                       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    w/Users/manta/Documents/Projects/TheRoad-I1/.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	        |||	|
      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   rB   rC   rD   rE   bodyoptionscast_to)_postr   r	   ContainerCreateParamsr%   r'   r0   rJ   r=   r>   r?   r@   rA   rB   rC   rD   rE   s              r1   createzContainers.create:   sb    P zz  %2 ($0&4$ (==
 )+Q[el ,!  
 	
r3   rK   c          	         |st        d|      | j                  t        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/{container_id}container_idrK   rN   rO   
ValueError_getr   r%   r(   r0   rY   rB   rC   rD   rE   s         r1   retrievezContainers.retrieveu   sU    . Z[gZjkllyy6\R(+Q[el .  
 	
r3   afterlimitrJ   orderrB   rC   rD   rE   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.

          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   )ra   rb   rJ   rc   )rB   rC   rD   rE   query)pagerN   model)_get_api_listr"   r&   r%   r   r   ContainerListParams	r0   ra   rb   rJ   rc   rB   rC   rD   rE   s	            r1   listzContainers.list   sf    P !! 56(+'%%!&!& $!&	 *== (% " 
 	
r3   c          	         |st        d|      ddi|xs i }| j                  t        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
        rV   Accept*/*rW   rX   rK   rZ   r\   _deleter   r%   r   r^   s         r1   deletezContainers.delete   si    . Z[gZjkll!5B]-@bB||6\R(+Q[el   
 	
r3   )returnr   )rt   r6   )rt   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 | NotGivenrt   r'   rY   rv   rB   rw   rC   rx   rD   ry   rE   rz   rt   r(   )ra   
str | Omitrb   
int | OmitrJ   r|   rc   Literal['asc', 'desc'] | OmitrB   rw   rC   rx   rD   ry   rE   rz   rt   z%SyncCursorPage[ContainerListResponse]rY   rv   rB   rw   rC   rx   rD   ry   rE   rz   rt   None__name__
__module____qualname__r   r2   r7   r;   r   r   rS   r_   rl   rs    r3   r1   r)   r)   "   s   # # / / 5 5 FJ/3AEGKAE )-$("&;D9
 9
 C	9

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

 ;
 -;
 &;
 ";
  ;
 9;
 
/;
F )-$("&;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	        |||	|
      t
               d{   S 7 $7 w)rG   rH   rI   NrK   rL   )rP   r   r	   rQ   r%   r'   rR   s              r1   rS   zAsyncContainers.create  s{     P ZZ, %2 ($0&4$ (==
 
 )+Q[el ,!   
 
 	


s!   1AA
AAAArK   c          	        K   |st        d|      | j                  t        d|      t        ||||      t               d{   S 7 w)rU   rV   rW   rX   rK   rZ   Nr[   r^   s         r1   r_   zAsyncContainers.retrieveI  sc     . Z[gZjkllYY6\R(+Q[el .  
 
 	
 
s   AAAAr`   c                   | j                  dt        t           t        ||||t	        ||||dt
        j                              t              S re   )ri   r#   r&   r%   r   r   rj   rk   s	            r1   rl   zAsyncContainers.listj  sf    P !! !67(+'%%!&!& $!&	 *== (% " 
 	
r3   c          	        K   |st        d|      ddi|xs i }| j                  t        d|      t        ||||      t               d{   S 7 w)	rn   rV   ro   rp   rW   rX   rK   rZ   Nrq   r^   s         r1   rs   zAsyncContainers.delete  sw     . Z[gZjkll!5B]-@bB\\6\R(+Q[el  " 
 
 	
 
s   AAAA)rt   r   )rt   r   )rt   r   ru   r{   )ra   r|   rb   r}   rJ   r|   rc   r~   rB   rw   rC   rx   rD   ry   rE   rz   rt   zMAsyncPaginator[ContainerListResponse, AsyncCursorPage[ContainerListResponse]]r   r   r   r3   r1   r*   r*      s   ( ( 4 4 : : FJ/3AEGKAE )-$("&;D9
 9
 C	9

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

 ;
 -;
 &;
 ";
  ;
 9;
 
W;
F )-$("&;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_wrapperrS   r_   rl   rs   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)   rt   r   )rt   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_wrapperrS   r_   rl   rs   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*   rt   r   )rt   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   rS   r_   rl   rs   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   )rt   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   rS   r_   rl   rs   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.files  s    .t/?/?/E/EFFr3   Nr   )rt   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*
+Q
 Q
hQ
& Q
h< <,A A,B B,G Gr3   