
    עiP                       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 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l0m1Z1 ddl2m3Z3 ddgZ4 G d de      Z5 G d de      Z6 G d d      Z7 G d d      Z8 G d d      Z9 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)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    g/sites/domain-asset-master/.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    r0   with_raw_responsezContainers.with_raw_response'   s     )..r2   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    r0   with_streaming_responsez"Containers.with_streaming_response1   s     /t44r2   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?   r@   rA   rB   rC   rD   bodyoptionscast_to)_postr   r	   ContainerCreateParamsr$   r&   r/   rI   r<   r=   r>   r?   r@   rA   rB   rC   rD   s              r0   createzContainers.create:   sb    P zz  %2 ($0&4$ (==
 )+Q[el ,!  
 	
r2   rJ   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/rJ   rM   rN   
ValueError_getr$   r'   r/   container_idrA   rB   rC   rD   s         r0   retrievezContainers.retrieveu   sT    . Z[gZjkllyy<.)(+Q[el .  
 	
r2   afterlimitrI   orderrA   rB   rC   rD   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
        rG   )r_   r`   rI   ra   )rA   rB   rC   rD   query)pagerM   model)_get_api_listr!   r%   r$   r   r   ContainerListParams	r/   r_   r`   rI   ra   rA   rB   rC   rD   s	            r0   listzContainers.list   sf    P !! 56(+'%%!&!& $!&	 *== (% " 
 	
r2   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
        rU   Accept*/*rV   rJ   rW   rY   _deleter$   r   r[   s         r0   deletezContainers.delete   sh    . Z[gZjkll!5B]-@bB||<.)(+Q[el   
 	
r2   )returnr   )rr   r5   )rr   r9   rI   strr<   z+container_create_params.ExpiresAfter | Omitr=   zSequenceNotStr[str] | Omitr>   z(Literal['1g', '4g', '16g', '64g'] | Omitr?   z,container_create_params.NetworkPolicy | Omitr@   z.Iterable[container_create_params.Skill] | OmitrA   Headers | NonerB   Query | NonerC   Body | NonerD   'float | httpx.Timeout | None | NotGivenrr   r&   r\   rt   rA   ru   rB   rv   rC   rw   rD   rx   rr   r'   )r_   
str | Omitr`   
int | OmitrI   rz   ra   Literal['asc', 'desc'] | OmitrA   ru   rB   rv   rC   rw   rD   rx   rr   z%SyncCursorPage[ContainerListResponse]r\   rt   rA   ru   rB   rv   rC   rw   rD   rx   rr   None__name__
__module____qualname__r   r1   r6   r:   r   r   rR   r]   rj   rq    r2   r0   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 
 
 
r2   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    r0   r1   zAsyncContainers.files   s    $,,''r2   c                    t        |       S r4   )AsyncContainersWithRawResponser.   s    r0   r6   z!AsyncContainers.with_raw_response   s     .d33r2   c                    t        |       S r8   )$AsyncContainersWithStreamingResponser.   s    r0   r:   z'AsyncContainers.with_streaming_response  s     4D99r2   Nr;   c       
           K   | j                  dt        ||||||dt        j                         d{   t	        |||	|
      t
               d{   S 7 $7 w)rF   rG   rH   NrJ   rK   )rO   r   r	   rP   r$   r&   rQ   s              r0   rR   zAsyncContainers.create  s{     P ZZ, %2 ($0&4$ (==
 
 )+Q[el ,!   
 
 	


s!   1AA
AAAArJ   c          	        K   |st        d|      | j                  d| t        ||||      t               d{   S 7 w)rT   rU   rV   rJ   rW   NrX   r[   s         r0   r]   zAsyncContainers.retrieveI  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 rc   )rg   r"   r%   r$   r   r   rh   ri   s	            r0   rj   zAsyncContainers.listj  sf    P !! !67(+'%%!&!& $!&	 *== (% " 
 	
r2   c          	        K   |st        d|      ddi|xs i }| j                  d| t        ||||      t               d{   S 7 w)rl   rU   rm   rn   rV   rJ   rW   Nro   r[   s         r0   rq   zAsyncContainers.delete  sv     . Z[gZjkll!5B]-@bB\\<.)(+Q[el  " 
 
 	
 
s   AAA	A)rr   r   )rr   r   )rr   r   rs   ry   )r_   rz   r`   r{   rI   rz   ra   r|   rA   ru   rB   rv   rC   rw   rD   rx   rr   zMAsyncPaginator[ContainerListResponse, AsyncCursorPage[ContainerListResponse]]r}   r   r   r2   r0   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 
 
 
r2   c                  &    e Zd ZddZedd       Zy)r5   c                2   || _         t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j
                        | _        t        j                  |j                        | _        y r,   )_containersr   to_raw_response_wrapperrR   r]   rj   rq   r/   
containerss     r0   __init__z"ContainersWithRawResponse.__init__  sz    %&>>
 )@@
 %<<OO
	 '>>
r2   c                @    t        | j                  j                        S r,   )r   r   r1   r.   s    r0   r1   zContainersWithRawResponse.files  s    #D$4$4$:$:;;r2   Nr   r(   rr   r~   )rr   r   r   r   r   r   r   r1   r   r2   r0   r5   r5     s    
  < <r2   r5   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_wrapperrR   r]   rj   rq   r   s     r0   r   z'AsyncContainersWithRawResponse.__init__  sz    %&DD
 )FF
 %BBOO
	 'DD
r2   c                @    t        | j                  j                        S r,   )r   r   r1   r.   s    r0   r1   z$AsyncContainersWithRawResponse.files  s    ()9)9)?)?@@r2   Nr   r)   rr   r~   )rr   r   r   r   r2   r0   r   r     s    
  A Ar2   r   c                  &    e Zd ZddZedd       Zy)r9   c                    || _         t        |j                        | _        t        |j                        | _        t        |j                        | _        t        |j
                        | _        y r,   )r   r   rR   r]   rj   rq   r   s     r0   r   z(ContainersWithStreamingResponse.__init__  sb    %2
 5
 1OO
	 3
r2   c                @    t        | j                  j                        S r,   )r   r   r1   r.   s    r0   r1   z%ContainersWithStreamingResponse.files  s    )$*:*:*@*@AAr2   Nr   )rr   r   r   r   r2   r0   r9   r9     s    
  B Br2   r9   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   rR   r]   rj   rq   r   s     r0   r   z-AsyncContainersWithStreamingResponse.__init__  sb    %8
 ;
 7OO
	 9
r2   c                @    t        | j                  j                        S r,   )r    r   r1   r.   s    r0   r1   z*AsyncContainersWithStreamingResponse.files  s    .t/?/?/E/EFFr2   Nr   )rr   r    r   r   r2   r0   r   r     s    
  G Gr2   r   );
__future__r   typingr   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)   r5   r   r9   r   r   r2   r0   <module>r      s    #  %    C e e e < & : Y  : @ B F J*
+Q
 Q
hQ
& Q
h< <,A A,B B,G Gr2   