
    _j1T                       S SK Jr  S SKJr  S SKJr  S SKrSSKJr  SSK	J
r
Jr  SSKJrJrJrJrJrJrJrJrJr  SS	KJrJrJr  SS
KJr  SSKJrJr  SSKJ r J!r!  SSK"J#r#J$r$J%r%J&r&J'r'J(r(  SSK)J*r*J+r+  SSK,J-r-J.r.  SSK/J0r0  SSK1J2r2  SSK3J4r4  SS/r5 " S S\5      r6 " S S\5      r7 " S S5      r8 " S S5      r9 " S S5      r: " S S5      r;g)     )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            
      :   \ rS rSr\SS j5       r\SS j5       r\SS j5       r\\\\\SSS\	S.	                     SS jjr
SSS\	S.           SS	 jjr\\\\SSS\	S
.                 SS jjrSSS\	S.           SS jjrSrg)r)   "   c                ,    [        U R                  5      $ N)r   _clientselfs    [/home/rurouni/.local/lib/python3.13/site-packages/openai/resources/containers/containers.pyfilesContainers.files#   s    T\\""    c                    [        U 5      $ z
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
)ContainersWithRawResponser0   s    r2   with_raw_responseContainers.with_raw_response'   s     )..r5   c                    [        U 5      $ 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
)ContainersWithStreamingResponser0   s    r2   with_streaming_response"Containers.with_streaming_response1   s     /t44r5   N	expires_afterfile_idsmemory_limitnetwork_policyskillsextra_headersextra_query
extra_bodytimeoutc       
            U R                  S[        UUUUUUS.[        R                  5      [	        UUU	U
SS0S9[
        S9$ )  
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namerA   rB   rC   rD   rE   bearer_authTrF   rG   rH   rI   securitybodyoptionscast_to)_postr   r	   ContainerCreateParamsr%   r'   r1   rN   rA   rB   rC   rD   rE   rF   rG   rH   rI   s              r2   createContainers.create:   sk    P zz  %2 ($0&4$ (==
 )+'%'. ,)  
 	
r5   rF   rG   rH   rI   c                   U(       d  [        SU< 35      eU R                  [        SUS9[        UUUUSS0S9[        S9$ )  
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_idrO   TrP   rT   rU   
ValueError_getr   r%   r(   r1   ra   rF   rG   rH   rI   s         r2   retrieveContainers.retrievey   s^    . Z[gZjkllyy6\R(+'%'. .  

 
	
r5   afterlimitrN   orderrF   rG   rH   rI   c                   U R                  S[        [           [        UUUU[	        UUUUS.[
        R                  5      SS0S9[        S9$ aa  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
rL   )rj   rk   rN   rl   rO   T)rF   rG   rH   rI   queryrQ   )pagerT   model)_get_api_listr"   r&   r%   r   r   ContainerListParams	r1   rj   rk   rN   rl   rF   rG   rH   rI   s	            r2   listContainers.list   sp    P !! 56(+'%%!&!& $!&	 *== (.  (' " 
 	
r5   c                   U(       d  [        SU< 35      eSS0U=(       d    0 EnU R                  [        SUS9[        UUUUSS0S9[        S	9$ )
  
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
r^   Accept*/*r_   r`   rO   TrP   rb   rd   _deleter   r%   r   rf   s         r2   deleteContainers.delete   sr    . Z[gZjkll!5B]-@bB||6\R(+'%'.   

 
	
r5    )returnr   )r   r8   )r   r=   rN   strrA   z+container_create_params.ExpiresAfter | OmitrB   zSequenceNotStr[str] | OmitrC   z(Literal['1g', '4g', '16g', '64g'] | OmitrD   z,container_create_params.NetworkPolicy | OmitrE   z.Iterable[container_create_params.Skill] | OmitrF   Headers | NonerG   Query | NonerH   Body | NonerI   'float | httpx.Timeout | None | NotGivenr   r'   ra   r   rF   r   rG   r   rH   r   rI   r   r   r(   )rj   
str | Omitrk   
int | OmitrN   r   rl   Literal['asc', 'desc'] | OmitrF   r   rG   r   rH   r   rI   r   r   z%SyncCursorPage[ContainerListResponse]ra   r   rF   r   rG   r   rH   r   rI   r   r   None__name__
__module____qualname____firstlineno__r   r3   r9   r>   r   r   rY   rg   ru   r}   __static_attributes__r   r5   r2   r)   r)   "   s   # # / / 5 5 FJ/3AEGKAE )-$("&;D=
 =
 C	=

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

 <
 -<
 &<
 "<
  <
 9<
 
/<
H )-$("&;D$
$
 &$
 "$
  $
 9$
 
$
 $
r5   c            
      :   \ rS rSr\SS j5       r\SS j5       r\SS j5       r\\\\\SSS\	S.	                     SS jjr
SSS\	S.           SS	 jjr\\\\SSS\	S
.                 SS jjrSSS\	S.           SS jjrSrg)r*   i  c                ,    [        U R                  5      $ r.   )r   r/   r0   s    r2   r3   AsyncContainers.files  s    $,,''r5   c                    [        U 5      $ r7   )AsyncContainersWithRawResponser0   s    r2   r9   !AsyncContainers.with_raw_response  s     .d33r5   c                    [        U 5      $ r<   )$AsyncContainersWithStreamingResponser0   s    r2   r>   'AsyncContainers.with_streaming_response  s     4D99r5   Nr@   c       
           #    U R                  S[        UUUUUUS.[        R                  5      I Sh  vN [	        UUU	U
SS0S9[
        S9I Sh  vN $  N! N7f)rK   rL   rM   NrO   TrP   rR   )rV   r   r	   rW   r%   r'   rX   s              r2   rY   AsyncContainers.create  s     P ZZ, %2 ($0&4$ (==
 
 )+'%'. ,)   
 
 	


s!   1AA
AAAAr[   c                  #    U(       d  [        SU< 35      eU R                  [        SUS9[        UUUUSS0S9[        S9I Sh  vN $  N7f)	r]   r^   r_   r`   rO   TrP   rb   Nrc   rf   s         r2   rg   AsyncContainers.retrieveZ  sk     . Z[gZjkllYY6\R(+'%'. .  

 

 
	
 

s   AAAAri   c                   U R                  S[        [           [        UUUU[	        UUUUS.[
        R                  5      SS0S9[        S9$ rn   )rr   r#   r&   r%   r   r   rs   rt   s	            r2   ru   AsyncContainers.list  sp    P !! !67(+'%%!&!& $!&	 *== (.  (' " 
 	
r5   c                  #    U(       d  [        SU< 35      eSS0U=(       d    0 EnU R                  [        SUS9[        UUUUSS0S9[        S	9I S
h  vN $  N7f)rx   r^   ry   rz   r_   r`   rO   TrP   rb   Nr{   rf   s         r2   r}   AsyncContainers.delete  s     . Z[gZjkll!5B]-@bB\\6\R(+'%'.  " 

 

 
	
 

s   AAAAr   )r   r   )r   r   )r   r   r   r   )rj   r   rk   r   rN   r   rl   r   rF   r   rG   r   rH   r   rI   r   r   zMAsyncPaginator[ContainerListResponse, AsyncCursorPage[ContainerListResponse]]r   r   r   r5   r2   r*   r*     s   ( ( 4 4 : : FJ/3AEGKAE )-$("&;D=
 =
 C	=

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

 <
 -<
 &<
 "<
  <
 9<
 
W<
H )-$("&;D$
$
 &$
 "$
  $
 9$
 
$
 $
r5   c                  2    \ rS rSrSS jr\SS j5       rSrg)r8   i  c                8   Xl         [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR
                  5      U l        [        R                  " UR                  5      U l        g r.   )_containersr   to_raw_response_wrapperrY   rg   ru   r}   r1   
containerss     r2   __init__"ContainersWithRawResponse.__init__  sx    %&>>
 )@@
 %<<OO
	 '>>
r5   c                @    [        U R                  R                  5      $ r.   )r   r   r3   r0   s    r2   r3   ContainersWithRawResponse.files  s    #D$4$4$:$:;;r5   r   rY   r}   ru   rg   Nr   r)   r   r   )r   r   r   r   r   r   r   r   r3   r   r   r5   r2   r8   r8     s    
  < <r5   r8   c                  2    \ rS rSrSS jr\SS j5       rSrg)r   i  c                8   Xl         [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR
                  5      U l        [        R                  " UR                  5      U l        g r.   )r   r   async_to_raw_response_wrapperrY   rg   ru   r}   r   s     r2   r   'AsyncContainersWithRawResponse.__init__  sx    %&DD
 )FF
 %BBOO
	 'DD
r5   c                @    [        U R                  R                  5      $ r.   )r   r   r3   r0   s    r2   r3   $AsyncContainersWithRawResponse.files  s    ()9)9)?)?@@r5   r   Nr   r*   r   r   )r   r   r   r   r5   r2   r   r     s    
  A Ar5   r   c                  2    \ rS rSrSS jr\SS j5       rSrg)r=   i  c                    Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        [        UR
                  5      U l        g r.   )r   r   rY   rg   ru   r}   r   s     r2   r   (ContainersWithStreamingResponse.__init__  s`    %2
 5
 1OO
	 3
r5   c                @    [        U R                  R                  5      $ r.   )r    r   r3   r0   s    r2   r3   %ContainersWithStreamingResponse.files!  s    )$*:*:*@*@AAr5   r   Nr   )r   r    r   r   r5   r2   r=   r=     s    
  B Br5   r=   c                  2    \ rS rSrSS jr\SS j5       rSrg)r   i&  c                    Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        [        UR
                  5      U l        g r.   )r   r   rY   rg   ru   r}   r   s     r2   r   -AsyncContainersWithStreamingResponse.__init__'  s`    %8
 ;
 7OO
	 9
r5   c                @    [        U R                  R                  5      $ r.   )r!   r   r3   r0   s    r2   r3   *AsyncContainersWithStreamingResponse.files7  s    .t/?/?/E/EFFr5   r   Nr   )r   r!   r   r   r5   r2   r   r   &  s    
  G Gr5   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*   r8   r   r=   r   r   r5   r2   <module>r      s    #  %    C e e e K K & : Y  : @ B F J*
+^
 ^
B^
& ^
B< <,A A,B B,G Gr5   