
    _jz                    8   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	J
r
Jr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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%J&r&J'r'J(r(J)r)  SSK*J+r+J,r,J-r-J.r.J/r/J0r0  SSK1J2r2J3r3J4r4J5r5J6r6J7r7  SSK8J9r9J:r:  SSK;J<r<J=r=  SSK>J?r?J@r@JArAJBrBJCrCJDrD  SSKEJFrFJGrG  SSKHJIrIJJrJ  SSKKJLrLJMrMJNrNJOrOJPrPJQrQ  SSKRJSrSJTrTJUrU  SSKVJWrW  SS/rX " S S\95      rY " S S\:5      rZ " S S5      r[ " S S5      r\ " S S 5      r] " S! S"5      r^g)#    )annotations)OptionalN   )_legacy_response   )Roles
AsyncRolesRolesWithRawResponseAsyncRolesWithRawResponseRolesWithStreamingResponseAsyncRolesWithStreamingResponse)APIKeysAsyncAPIKeysAPIKeysWithRawResponseAsyncAPIKeysWithRawResponseAPIKeysWithStreamingResponse!AsyncAPIKeysWithStreamingResponse)BodyOmitQueryHeadersNotGivenomit	not_given)path_templatemaybe_transformasync_maybe_transform)cached_property)
RateLimitsAsyncRateLimitsRateLimitsWithRawResponseAsyncRateLimitsWithRawResponseRateLimitsWithStreamingResponse$AsyncRateLimitsWithStreamingResponse)Users
AsyncUsersUsersWithRawResponseAsyncUsersWithRawResponseUsersWithStreamingResponseAsyncUsersWithStreamingResponse)CertificatesAsyncCertificatesCertificatesWithRawResponse AsyncCertificatesWithRawResponse!CertificatesWithStreamingResponse&AsyncCertificatesWithStreamingResponse)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)GroupsAsyncGroupsGroupsWithRawResponseAsyncGroupsWithRawResponseGroupsWithStreamingResponse AsyncGroupsWithStreamingResponse)SyncConversationCursorPageAsyncConversationCursorPage)AsyncPaginatormake_request_options)ServiceAccountsAsyncServiceAccountsServiceAccountsWithRawResponse#AsyncServiceAccountsWithRawResponse$ServiceAccountsWithStreamingResponse)AsyncServiceAccountsWithStreamingResponse)project_list_paramsproject_create_paramsproject_update_params)ProjectProjectsAsyncProjectsc                     \ rS rSr\SS j5       r\SS j5       r\SS j5       r\SS j5       r\SS j5       r	\SS j5       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SS\S.           S S jjrSrg)#rI   O   c                ,    [        U R                  5      $ N)r%   _clientselfs    j/home/rurouni/.local/lib/python3.13/site-packages/openai/resources/admin/organization/projects/projects.pyusersProjects.usersP       T\\""    c                ,    [        U R                  5      $ rN   )r?   rO   rP   s    rR   service_accountsProjects.service_accountsT       t||,,rV   c                ,    [        U R                  5      $ rN   )r   rO   rP   s    rR   api_keysProjects.api_keysX   s    t||$$rV   c                ,    [        U R                  5      $ rN   )r   rO   rP   s    rR   rate_limitsProjects.rate_limits\       $,,''rV   c                ,    [        U R                  5      $ rN   )r5   rO   rP   s    rR   groupsProjects.groups`   s    dll##rV   c                ,    [        U R                  5      $ rN   )r   rO   rP   s    rR   rolesProjects.rolesd   rU   rV   c                ,    [        U R                  5      $ rN   )r+   rO   rP   s    rR   certificatesProjects.certificatesh       DLL))rV   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
)ProjectsWithRawResponserP   s    rR   with_raw_responseProjects.with_raw_responsel   s     't,,rV   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
)ProjectsWithStreamingResponserP   s    rR   with_streaming_response Projects.with_streaming_responsev   s     -T22rV   Nexternal_key_id	geographyextra_headersextra_query
extra_bodytimeoutc                   U R                  S[        UUUS.[        R                  5      [	        UUUUSS0S9[
        S9$ )K  Create a new project in the organization.

Projects can be created and archived,
but cannot be deleted.

Args:
  name: The friendly name of the project, this name appears in reports.

  external_key_id: External key ID to associate with the project.

  geography: Create the project with the specified data residency region. Your organization
      must have access to Data residency functionality in order to use. See
      [data residency controls](https://platform.openai.com/docs/guides/your-data#data-residency-controls)
      to review the functionality and limitations of setting this field.

  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
/organization/projectsnamerw   rx   admin_api_key_authTry   rz   r{   r|   securitybodyoptionscast_to)_postr   rF   ProjectCreateParamsr>   rH   rQ   r   rw   rx   ry   rz   r{   r|   s           rR   createProjects.create   sb    H zz$  '6!*
 &99 )+'%.5 #  
 	
rV   ry   rz   r{   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$ )  
Retrieves a project.

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
9Expected a non-empty value for `project_id` but received #/organization/projects/{project_id}
project_idr   Tr   r   r   
ValueError_getr   r>   rH   rQ   r   ry   rz   r{   r|   s         rR   retrieveProjects.retrieve   s^    . XYcXfghhyy?JW(+'%.5   

 
	
rV   rw   rx   r   ry   rz   r{   r|   c                   U(       d  [        SU< 35      eU R                  [        SUS9[        UUUS.[        R
                  5      [        UUUUSS0S9[        S9$ )	  
Modifies a project in the organization.

Args:
  external_key_id: External key ID to associate with the project.

  geography: Geography for the project.

  name: The updated name of the project, this name appears in reports.

  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   r   r   rw   rx   r   r   Tr   r   )r   r   r   r   rG   ProjectUpdateParamsr>   rH   	rQ   r   rw   rx   r   ry   rz   r{   r|   s	            rR   updateProjects.update   s    @ XYcXfghhzz?JW '6!* 
 &99 )+'%.5 #  
 	
rV   afterinclude_archivedlimitry   rz   r{   r|   c                   U R                  S[        [           [        UUUU[	        UUUS.[
        R                  5      SS0S9[        S9$ aR  Returns a list of projects.

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.

  include_archived: If `true` returns all projects including those that have been `archived`.
      Archived projects are not included by default.

  limit: A limit on the number of objects to be returned. Limit can range between 1 and
      100, and the default is 20.

  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   )r   r   r   r   T)ry   rz   r{   r|   queryr   )pager   model)_get_api_listr;   rH   r>   r   rE   ProjectListParamsrQ   r   r   r   ry   rz   r{   r|   s           rR   listProjects.list  sl    J !!$+G4(+'%%!&,<!&
 (99 /5 % " 
 	
rV   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$ )P  Archives a project in the organization.

Archived projects cannot be used or
updated.

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   +/organization/projects/{project_id}/archiver   r   Tr   r   r   r   r   r>   rH   r   s         rR   archiveProjects.archiveL  s_    2 XYcXfghhzzGT^_(+'%.5   

 
	
rV    )returnr%   )r   r?   )r   r   )r   r   )r   r5   )r   r   )r   r+   )r   rn   )r   rs   r   strrw   Optional[str] | Omitrx   r   ry   Headers | Nonerz   Query | Noner{   Body | Noner|   'float | httpx.Timeout | None | NotGivenr   rH   r   r   ry   r   rz   r   r{   r   r|   r   r   rH   r   r   rw   r   rx   r   r   r   ry   r   rz   r   r{   r   r|   r   r   rH   )r   
str | Omitr   bool | Omitr   
int | Omitry   r   rz   r   r{   r   r|   r   r   z#SyncConversationCursorPage[Project]__name__
__module____qualname____firstlineno__r   rS   rX   r\   r_   rc   rf   ri   ro   rt   r   r   r   r   r   r   r   __static_attributes__r   rV   rR   rI   rI   O   s   # # - - % % ( ( $ $ # # * * - - 3 3 15*. )-$("&;D6
 6
 .	6

 (6
 &6
 "6
  6
 96
 
6
| )-$("&;D#
#
 &#
 "#
  #
 9#
 
#
R 15*.%) )-$("&;D4
4
 .	4

 (4
 #4
 &4
 "4
  4
 94
 
4
r !(,  )-$("&;D8
 8
 &	8

 8
 &8
 "8
  8
 98
 
-8
@ )-$("&;D%
%
 &%
 "%
  %
 9%
 
%
 %
rV   c                     \ rS rSr\SS j5       r\SS j5       r\SS j5       r\SS j5       r\SS j5       r	\SS j5       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SS\S.           S S jjrSrg)#rJ   it  c                ,    [        U R                  5      $ rN   )r&   rO   rP   s    rR   rS   AsyncProjects.usersu  ra   rV   c                ,    [        U R                  5      $ rN   )r@   rO   rP   s    rR   rX   AsyncProjects.service_accountsy  s    #DLL11rV   c                ,    [        U R                  5      $ rN   )r   rO   rP   s    rR   r\   AsyncProjects.api_keys}  rk   rV   c                ,    [        U R                  5      $ rN   )r    rO   rP   s    rR   r_   AsyncProjects.rate_limits  rZ   rV   c                ,    [        U R                  5      $ rN   )r6   rO   rP   s    rR   rc   AsyncProjects.groups  s    4<<((rV   c                ,    [        U R                  5      $ rN   )r	   rO   rP   s    rR   rf   AsyncProjects.roles  ra   rV   c                ,    [        U R                  5      $ rN   )r,   rO   rP   s    rR   ri   AsyncProjects.certificates  s     ..rV   c                    [        U 5      $ rm   )AsyncProjectsWithRawResponserP   s    rR   ro   AsyncProjects.with_raw_response  s     ,D11rV   c                    [        U 5      $ rr   )"AsyncProjectsWithStreamingResponserP   s    rR   rt   %AsyncProjects.with_streaming_response  s     2$77rV   Nrv   c                  #    U R                  S[        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)r~   r   r   Nr   Tr   r   )r   r   rF   r   r>   rH   r   s           rR   r   AsyncProjects.create  sy     H ZZ$, '6!*
 &99  )+'%.5 #   
 
 	

s!   .A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   r   Tr   r   Nr   r   s         rR   r   AsyncProjects.retrieve  sk     . XYcXfghhYY?JW(+'%.5   

 

 
	
 

   AAAAr   c                  #    U(       d  [        SU< 35      eU R                  [        SUS9[        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)
r   r   r   r   r   Nr   Tr   r   )r   r   r   r   rG   r   r>   rH   r   s	            rR   r   AsyncProjects.update  s     @ XYcXfghhZZ?JW,'6!* 
 &99  )+'%.5 #   
 
 	

s$   AA4A0
A4+A2,A42A4r   c                   U R                  S[        [           [        UUUU[	        UUUS.[
        R                  5      SS0S9[        S9$ r   )r   r<   rH   r>   r   rE   r   r   s           rR   r   AsyncProjects.list7  sl    J !!$,W5(+'%%!&,<!&
 (99 /5 % " 
 	
rV   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   r   Tr   r   Nr   r   s         rR   r   AsyncProjects.archiveq  sl     2 XYcXfghhZZGT^_(+'%.5    

 

 
	
 

r   r   )r   r&   )r   r@   )r   r   )r   r    )r   r6   )r   r	   )r   r,   )r   r   )r   r   r   r   r   )r   r   r   r   r   r   ry   r   rz   r   r{   r   r|   r   r   z=AsyncPaginator[Project, AsyncConversationCursorPage[Project]]r   r   rV   rR   rJ   rJ   t  s   ( ( 2 2 * * - - ) ) ( ( / / 2 2 8 8 15*. )-$("&;D6
 6
 .	6

 (6
 &6
 "6
  6
 96
 
6
| )-$("&;D#
#
 &#
 "#
  #
 9#
 
#
R 15*.%) )-$("&;D4
4
 .	4

 (4
 #4
 &4
 "4
  4
 94
 
4
r !(,  )-$("&;D8
 8
 &	8

 8
 &8
 "8
  8
 98
 
G8
@ )-$("&;D%
%
 &%
 "%
  %
 9%
 
%
 %
rV   c                      \ rS rSrSS jr\SS j5       r\SS j5       r\SS j5       r\SS j5       r	\SS j5       r
\SS j5       r\SS	 j5       rS
rg)rn   i  c                   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        [        R                  " UR                  5      U l        g rN   )	_projectsr   to_raw_response_wrapperr   r   r   r   r   rQ   projectss     rR   __init__ ProjectsWithRawResponse.__init__  s    !&>>OO
 )@@
 '>>OO
 %<<MM
	 (??
rV   c                @    [        U R                  R                  5      $ rN   )r'   r   rS   rP   s    rR   rS   ProjectsWithRawResponse.users      #DNN$8$899rV   c                @    [        U R                  R                  5      $ rN   )rA   r   rX   rP   s    rR   rX   (ProjectsWithRawResponse.service_accounts  s    -dnn.M.MNNrV   c                @    [        U R                  R                  5      $ rN   )r   r   r\   rP   s    rR   r\    ProjectsWithRawResponse.api_keys  s    %dnn&=&=>>rV   c                @    [        U R                  R                  5      $ rN   )r!   r   r_   rP   s    rR   r_   #ProjectsWithRawResponse.rate_limits  s    ()C)CDDrV   c                @    [        U R                  R                  5      $ rN   )r7   r   rc   rP   s    rR   rc   ProjectsWithRawResponse.groups  s    $T^^%:%:;;rV   c                @    [        U R                  R                  5      $ rN   )r
   r   rf   rP   s    rR   rf   ProjectsWithRawResponse.roles  r   rV   c                @    [        U R                  R                  5      $ rN   )r-   r   ri   rP   s    rR   ri   $ProjectsWithRawResponse.certificates  s    *4>>+F+FGGrV   r   r   r   r   r   r   Nr   rI   r   None)r   r'   )r   rA   )r   r   )r   r!   )r   r7   )r   r
   )r   r-   r   r   r   r   r   r   rS   rX   r\   r_   rc   rf   ri   r   r   rV   rR   rn   rn     s    
& : : O O ? ? E E < < : : H HrV   rn   c                      \ rS rSrSS jr\SS j5       r\SS j5       r\SS j5       r\SS j5       r	\SS j5       r
\SS j5       r\SS	 j5       rS
rg)r   i  c                   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        [        R                  " UR                  5      U l        g rN   )r   r   async_to_raw_response_wrapperr   r   r   r   r   r   s     rR   r   %AsyncProjectsWithRawResponse.__init__  s    !&DDOO
 )FF
 'DDOO
 %BBMM
	 (EE
rV   c                @    [        U R                  R                  5      $ rN   )r(   r   rS   rP   s    rR   rS   "AsyncProjectsWithRawResponse.users      ()=)=>>rV   c                @    [        U R                  R                  5      $ rN   )rB   r   rX   rP   s    rR   rX   -AsyncProjectsWithRawResponse.service_accounts  s    24>>3R3RSSrV   c                @    [        U R                  R                  5      $ rN   )r   r   r\   rP   s    rR   r\   %AsyncProjectsWithRawResponse.api_keys  s    *4>>+B+BCCrV   c                @    [        U R                  R                  5      $ rN   )r"   r   r_   rP   s    rR   r_   (AsyncProjectsWithRawResponse.rate_limits  s    -dnn.H.HIIrV   c                @    [        U R                  R                  5      $ rN   )r8   r   rc   rP   s    rR   rc   #AsyncProjectsWithRawResponse.groups  s    )$..*?*?@@rV   c                @    [        U R                  R                  5      $ rN   )r   r   rf   rP   s    rR   rf   "AsyncProjectsWithRawResponse.roles  r  rV   c                @    [        U R                  R                  5      $ rN   )r.   r   ri   rP   s    rR   ri   )AsyncProjectsWithRawResponse.certificates  s    /0K0KLLrV   r  Nr   rJ   r   r  )r   r(   )r   rB   )r   r   )r   r"   )r   r8   )r   r   )r   r.   r  r   rV   rR   r   r     s    
& ? ? T T D D J J A A ? ? M MrV   r   c                      \ rS rSrSS jr\SS j5       r\SS j5       r\SS j5       r\SS j5       r	\SS j5       r
\SS j5       r\SS	 j5       rS
rg)rs   i  c                   Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        [        UR
                  5      U l        [        UR                  5      U l        g rN   )r   r3   r   r   r   r   r   r   s     rR   r   &ProjectsWithStreamingResponse.__init__  sr    !2OO
 5
 3OO
 1MM
	 4
rV   c                @    [        U R                  R                  5      $ rN   )r)   r   rS   rP   s    rR   rS   #ProjectsWithStreamingResponse.users      )$..*>*>??rV   c                @    [        U R                  R                  5      $ rN   )rC   r   rX   rP   s    rR   rX   .ProjectsWithStreamingResponse.service_accounts  s    3DNN4S4STTrV   c                @    [        U R                  R                  5      $ rN   )r   r   r\   rP   s    rR   r\   &ProjectsWithStreamingResponse.api_keys  s    +DNN,C,CDDrV   c                @    [        U R                  R                  5      $ rN   )r#   r   r_   rP   s    rR   r_   )ProjectsWithStreamingResponse.rate_limits  s    .t~~/I/IJJrV   c                @    [        U R                  R                  5      $ rN   )r9   r   rc   rP   s    rR   rc   $ProjectsWithStreamingResponse.groups  s    *4>>+@+@AArV   c                @    [        U R                  R                  5      $ rN   )r   r   rf   rP   s    rR   rf   #ProjectsWithStreamingResponse.roles#  r   rV   c                @    [        U R                  R                  5      $ rN   )r/   r   ri   rP   s    rR   ri   *ProjectsWithStreamingResponse.certificates'  s    01L1LMMrV   r  Nr  )r   r)   )r   rC   )r   r   )r   r#   )r   r9   )r   r   )r   r/   r  r   rV   rR   rs   rs     s    
& @ @ U U E E K K B B @ @ N NrV   rs   c                      \ rS rSrSS jr\SS j5       r\SS j5       r\SS j5       r\SS j5       r	\SS j5       r
\SS j5       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        [        UR                  5      U l        g rN   )r   r4   r   r   r   r   r   r   s     rR   r   +AsyncProjectsWithStreamingResponse.__init__-  sr    !8OO
 ;
 9OO
 7MM
	 :
rV   c                @    [        U R                  R                  5      $ rN   )r*   r   rS   rP   s    rR   rS   (AsyncProjectsWithStreamingResponse.users@      .t~~/C/CDDrV   c                @    [        U R                  R                  5      $ rN   )rD   r   rX   rP   s    rR   rX   3AsyncProjectsWithStreamingResponse.service_accountsD  s    89X9XYYrV   c                @    [        U R                  R                  5      $ rN   )r   r   r\   rP   s    rR   r\   +AsyncProjectsWithStreamingResponse.api_keysH  s    01H1HIIrV   c                @    [        U R                  R                  5      $ rN   )r$   r   r_   rP   s    rR   r_   .AsyncProjectsWithStreamingResponse.rate_limitsL  s    3DNN4N4NOOrV   c                @    [        U R                  R                  5      $ rN   )r:   r   rc   rP   s    rR   rc   )AsyncProjectsWithStreamingResponse.groupsP  s    /0E0EFFrV   c                @    [        U R                  R                  5      $ rN   )r   r   rf   rP   s    rR   rf   (AsyncProjectsWithStreamingResponse.rolesT  r2  rV   c                @    [        U R                  R                  5      $ rN   )r0   r   ri   rP   s    rR   ri   /AsyncProjectsWithStreamingResponse.certificatesX  s    5dnn6Q6QRRrV   r  Nr  )r   r*   )r   rD   )r   r   )r   r$   )r   r:   )r   r   )r   r0   r  r   rV   rR   r   r   ,  s    
& E E Z Z J J P P G G E E S SrV   r   )_
__future__r   typingr   httpx r   rf   r   r	   r
   r   r   r   r\   r   r   r   r   r   r   _typesr   r   r   r   r   r   r   _utilsr   r   r   _compatr   r_   r   r    r!   r"   r#   r$   users.usersr%   r&   r'   r(   r)   r*   ri   r+   r,   r-   r.   r/   r0   	_resourcer1   r2   	_responser3   r4   groups.groupsr5   r6   r7   r8   r9   r:   
paginationr;   r<   _base_clientr=   r>   rX   r?   r@   rA   rB   rC   rD   types.admin.organizationrE   rF   rG    types.admin.organization.projectrH   __all__rI   rJ   rn   r   rs   r   r   rV   rR   <module>rO     s    #   "   N M M M M (    = [  T B  l k 9
'b
 b
J	b
$ b
J	.H .Hb.M .Mb.N .Nb.S .SrV   