
    -2iL                       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          Z8dS )    )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 d0d(Zdddedd1d*ZdS )2r'   returnr   c                *    t          | j                  S N)r   _clientselfs    e/var/www/html/pixcura-vrs/venv/lib/python3.11/site-packages/openai/resources/containers/containers.pyfileszContainers.files"   s    T\"""    ContainersWithRawResponsec                     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
        )r3   r.   s    r0   with_raw_responsezContainers.with_raw_response&   s     )...r2   ContainersWithStreamingResponsec                     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
        )r7   r.   s    r0   with_streaming_responsez"Containers.with_streaming_response0   s     /t444r2   Nexpires_afterfile_idsmemory_limitextra_headersextra_query
extra_bodytimeoutnamestrr<   +container_create_params.ExpiresAfter | Omitr=   SequenceNotStr[str] | Omitr>   (Literal['1g', '4g', '16g', '64g'] | Omitr?   Headers | Noner@   Query | NonerA   Body | NonerB   'float | httpx.Timeout | None | NotGivenr%   c          
         |                      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rC   r<   r=   r>   r?   r@   rA   rB   bodyoptionscast_to)_postr   r   ContainerCreateParamsr#   r%   	r/   rC   r<   r=   r>   r?   r@   rA   rB   s	            r0   createzContainers.create9   sr    D zz  %2 ($0	  (=  )+Q[el   ,  
 
 	
r2   rP   container_idr&   c          	         |st          d|          |                     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/rP   rS   rT   
ValueError_getr#   r&   r/   rY   r?   r@   rA   rB   s         r0   retrievezContainers.retrievel   sm    .  	mk[gkklllyy)<))(+Q[el   .  
 
 	
r2   afterlimitorderr?   r@   rA   rB   re   
str | Omitrf   
int | Omitrg   Literal['asc', 'desc'] | Omit%SyncCursorPage[ContainerListResponse]c                   |                      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
        rN   )re   rf   rg   )r?   r@   rA   rB   query)pagerS   model)_get_api_listr    r$   r#   r   r   ContainerListParamsr/   re   rf   rg   r?   r@   rA   rB   s           r0   listzContainers.list   sy    J !! 56(+'%%!&!&!& 
 *=    (# " 
 
 	
r2   Nonec          	         |st          d|          ddi|pi }|                     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
        r\   Accept*/*r]   rP   r^   r`   _deleter#   r   rb   s         r0   deletezContainers.delete   s    .  	mk[gkklll!5B]-@bB||)<))(+Q[el     
 
 	
r2   )r*   r   )r*   r3   )r*   r7   rC   rD   r<   rE   r=   rF   r>   rG   r?   rH   r@   rI   rA   rJ   rB   rK   r*   r%   rY   rD   r?   rH   r@   rI   rA   rJ   rB   rK   r*   r&   )re   rh   rf   ri   rg   rj   r?   rH   r@   rI   rA   rJ   rB   rK   r*   rk   rY   rD   r?   rH   r@   rI   rA   rJ   rB   rK   r*   ru   __name__
__module____qualname__r   r1   r6   r:   r   r   rX   rc   rt   r|    r2   r0   r'   r'   !   s=       # # # _# / / / _/ 5 5 5 _5 FJ/3AE )-$("&;D1
 1
 1
 1
 1
 1
r )-$("&;D
 
 
 
 
 
H ! /3 )-$("&;D7
 7
 7
 7
 7
 7
~ )-$("&;D 
  
  
  
  
  
  
  
r2   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 d0d(Zdddedd1d*ZdS )2r(   r*   r   c                *    t          | j                  S r,   )r   r-   r.   s    r0   r1   zAsyncContainers.files   s    $,'''r2   AsyncContainersWithRawResponsec                     t          |           S r5   )r   r.   s    r0   r6   z!AsyncContainers.with_raw_response   s     .d333r2   $AsyncContainersWithStreamingResponsec                     t          |           S r9   )r   r.   s    r0   r:   z'AsyncContainers.with_streaming_response   s     4D999r2   Nr;   rC   rD   r<   rE   r=   rF   r>   rG   r?   rH   r@   rI   rA   rJ   rB   rK   r%   c          
        K   |                      dt          ||||dt          j                   d{V t	          ||||          t
                     d{V S )rM   rN   rO   NrP   rQ   )rU   r   r   rV   r#   r%   rW   s	            r0   rX   zAsyncContainers.create  s      D ZZ, %2 ($0	  (=        )+Q[el   ,   
 
 
 
 
 
 
 
 	
r2   rP   rY   r&   c          	        K   |st          d|          |                     d| t          ||||          t                     d{V S )r[   r\   r]   rP   r^   Nr_   rb   s         r0   rc   zAsyncContainers.retrieve4  s      .  	mk[gkklllYY)<))(+Q[el   .  
 
 
 
 
 
 
 
 	
r2   rd   re   rh   rf   ri   rg   rj   MAsyncPaginator[ContainerListResponse, AsyncCursorPage[ContainerListResponse]]c                   |                      dt          t                   t          ||||t	          |||dt
          j                            t                    S rm   )rq   r!   r$   r#   r   r   rr   rs   s           r0   rt   zAsyncContainers.listU  sy    J !! !67(+'%%!&!&!& 
 *=    (# " 
 
 	
r2   ru   c          	        K   |st          d|          ddi|pi }|                     d| t          ||||          t                     d{V S )rw   r\   rx   ry   r]   rP   r^   Nrz   rb   s         r0   r|   zAsyncContainers.delete  s      .  	mk[gkklll!5B]-@bB\\)<))(+Q[el    " 
 
 
 
 
 
 
 
 	
r2   )r*   r   )r*   r   )r*   r   r}   r~   )re   rh   rf   ri   rg   rj   r?   rH   r@   rI   rA   rJ   rB   rK   r*   r   r   r   r   r2   r0   r(   r(      s=       ( ( ( _( 4 4 4 _4 : : : _: FJ/3AE )-$("&;D1
 1
 1
 1
 1
 1
r )-$("&;D
 
 
 
 
 
H ! /3 )-$("&;D7
 7
 7
 7
 7
 7
~ )-$("&;D 
  
  
  
  
  
  
  
r2   c                  .    e Zd Zd	dZed
d            ZdS )r3   
containersr'   r*   ru   c                   || _         t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        d S r,   )_containersr   to_raw_response_wrapperrX   rc   rt   r|   r/   r   s     r0   __init__z"ContainersWithRawResponse.__init__  s{    %&>
 
 )@
 
 %<O
 
	 '>
 
r2   r   c                4    t          | j        j                  S r,   )r   r   r1   r.   s    r0   r1   zContainersWithRawResponse.files  s    #D$4$:;;;r2   Nr   r'   r*   ru   )r*   r   r   r   r   r   r   r1   r   r2   r0   r3   r3     sH        
 
 
 
  < < < _< < <r2   r3   c                  .    e Zd Zd	dZed
d            ZdS )r   r   r(   r*   ru   c                   || _         t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        d S r,   )r   r   async_to_raw_response_wrapperrX   rc   rt   r|   r   s     r0   r   z'AsyncContainersWithRawResponse.__init__  s{    %&D
 
 )F
 
 %BO
 
	 'D
 
r2   r   c                4    t          | j        j                  S r,   )r   r   r1   r.   s    r0   r1   z$AsyncContainersWithRawResponse.files  s    ()9)?@@@r2   Nr   r(   r*   ru   )r*   r   r   r   r2   r0   r   r     sN        
 
 
 
  A A A _A A Ar2   r   c                  .    e Zd Zd	dZed
d            ZdS )r7   r   r'   r*   ru   c                    || _         t          |j                  | _        t          |j                  | _        t          |j                  | _        t          |j                  | _        d S r,   )r   r   rX   rc   rt   r|   r   s     r0   r   z(ContainersWithStreamingResponse.__init__  so    %2
 
 5
 
 1O
 
	 3
 
r2   r   c                4    t          | j        j                  S r,   )r   r   r1   r.   s    r0   r1   z%ContainersWithStreamingResponse.files  s    )$*:*@AAAr2   Nr   )r*   r   r   r   r2   r0   r7   r7     sN        
 
 
 
  B B B _B B Br2   r7   c                  .    e Zd Zd	dZed
d            ZdS )r   r   r(   r*   ru   c                    || _         t          |j                  | _        t          |j                  | _        t          |j                  | _        t          |j                  | _        d S r,   )r   r   rX   rc   rt   r|   r   s     r0   r   z-AsyncContainersWithStreamingResponse.__init__  so    %8
 
 ;
 
 7O
 
	 9
 
r2   r   c                4    t          | j        j                  S r,   )r   r   r1   r.   s    r0   r1   z*AsyncContainersWithStreamingResponse.files  s    .t/?/EFFFr2   Nr   )r*   r   r   r   r2   r0   r   r     sN        
 
 
 
  G G G _G G Gr2   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(   r3   r   r7   r   r   r2   r0   <module>r      s   # " " " " " % % % % % %              C C C C C C C C e e e e e e e e e e e e e e e e e e e e e e < < < < < < < < & & & & & & : : : : : : : : Y Y Y Y Y Y Y Y                : 9 9 9 9 9 9 9 @ @ @ @ @ @ @ @ B B B B B B F F F F F F J J J J J J*
+E
 E
 E
 E
 E
 E
 E
 E
PE
 E
 E
 E
 E
& E
 E
 E
P< < < < < < < <,A A A A A A A A,B B B B B B B B,G G G G G G G G G Gr2   