
    YjJ                    x   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	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 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l(m)Z) ddl*m+Z+ ddgZ, G d de      Z- G d de      Z. G d d      Z/ G d d      Z0 G d d      Z1 G d d      Z2y)    )annotations)LiteralN   )_legacy_response)BodyOmitQueryHeadersNotGivenomit	not_given)path_templatemaybe_transformasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)SyncNextCursorPageAsyncNextCursorPage)AsyncPaginatormake_request_options)user_list_paramsuser_create_params)UserCreateResponse)UserDeleteResponse)UserRetrieveResponse)OrganizationGroupUserUsers
AsyncUsersc                      e Zd Zed
d       Zedd       Zddded	 	 	 	 	 	 	 	 	 	 	 	 	 ddZddded	 	 	 	 	 	 	 	 	 	 	 	 	 ddZe	e	e	ddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ
ddded	 	 	 	 	 	 	 	 	 	 	 	 	 dd	Zy)r    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
        )UsersWithRawResponseselfs    o/var/www/html/vmm-quimica/venv/lib/python3.12/site-packages/openai/resources/admin/organization/groups/users.pywith_raw_responsezUsers.with_raw_response   s     $D))    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
        )UsersWithStreamingResponser&   s    r(   with_streaming_responsezUsers.with_streaming_response%   s     *$//r*   Nextra_headersextra_query
extra_bodytimeoutc                   |st        d|      | j                  t        d|      t        d|it        j
                        t        ||||ddi      t              S )	  
        Adds a user to a group.

        Args:
          user_id: Identifier of the user to add to the group.

          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
        7Expected a non-empty value for `group_id` but received %/organization/groups/{group_id}/usersgroup_iduser_idadmin_api_key_authTr0   r1   r2   r3   securitybodyoptionscast_to)
ValueError_postr   r   r   UserCreateParamsr   r   r'   r9   r:   r0   r1   r2   r3   s          r(   createzUsers.create.   st    4 VW_VbcddzzAHU )W!57I7Z7Z[(+'%.5 '  
 	
r*   c                   |st        d|      |st        d|      | j                  t        d||      t        ||||ddi      t              S )	P  
        Retrieves a user in a group.

        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
        r6   6Expected a non-empty value for `user_id` but received //organization/groups/{group_id}/users/{user_id}r9   r:   r;   Tr<   r@   rA   rB   _getr   r   r   r'   r:   r9   r0   r1   r2   r3   s          r(   retrievezUsers.retrieveW   sz    0 VW_VbcddUV]U`abbyyKV^hop(+'%.5 )  

 
	
r*   afterlimitorderr0   r1   r2   r3   c                   |st        d|      | j                  t        d|      t        t           t        ||||t        |||dt        j                        ddi      t              S 	a  
        Lists the users assigned to a group.

        Args:
          after: A cursor for use in pagination. Provide the ID of the last user from the
              previous list response to retrieve the next page.

          limit: A limit on the number of users to be returned. Limit can range between 0 and
              1000, and the default is 100.

          order: Specifies the sort order of users in the list.

          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
        r6   r7   r8   )rR   rS   rT   r;   T)r0   r1   r2   r3   queryr=   )pager@   model)	rB   _get_api_listr   r   r   r   r   r   UserListParams	r'   r9   rR   rS   rT   r0   r1   r2   r3   s	            r(   listz
Users.list   s    D VW_Vbcdd!!AHU#$9:(+'%%!&!&!&
 %33 /5 (% " 
 	
r*   c                   |st        d|      |st        d|      | j                  t        d||      t        ||||ddi      t              S )	P  
        Removes a user from a group.

        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
        r6   rI   rJ   rK   r;   Tr<   rL   rB   _deleter   r   r   rO   s          r(   deletezUsers.delete   sz    0 VW_VbcddUV]U`abb||KV^hop(+'%.5 '  

 
	
r*   )returnr%   )rc   r-   r9   strr:   re   r0   Headers | Noner1   Query | Noner2   Body | Noner3   (float | httpx2.Timeout | None | NotGivenrc   r   r:   re   r9   re   r0   rf   r1   rg   r2   rh   r3   ri   rc   r   )r9   re   rR   
str | OmitrS   
int | OmitrT   Literal['asc', 'desc'] | Omitr0   rf   r1   rg   r2   rh   r3   ri   rc   z)SyncNextCursorPage[OrganizationGroupUser]r:   re   r9   re   r0   rf   r1   rg   r2   rh   r3   ri   rc   r   __name__
__module____qualname__r   r)   r.   r   rF   rP   r   r]   rb    r*   r(   r    r       s   * * 0 0 )-$("&<E'
'
 	'
 &'
 "'
  '
 :'
 
'
` )-$("&<E&
&
 	&
 &&
 "&
  &
 :&
 
&
X ! /3 )-$("&<E7
7
 	7

 7
 -7
 &7
 "7
  7
 :7
 
37
@ )-$("&<E&
&
 	&
 &&
 "&
  &
 :&
 
&
r*   c                      e Zd Zed
d       Zedd       Zddded	 	 	 	 	 	 	 	 	 	 	 	 	 ddZddded	 	 	 	 	 	 	 	 	 	 	 	 	 ddZe	e	e	ddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ
ddded	 	 	 	 	 	 	 	 	 	 	 	 	 dd	Zy)r!   c                    t        |       S r$   )AsyncUsersWithRawResponser&   s    r(   r)   zAsyncUsers.with_raw_response   s     )..r*   c                    t        |       S r,   )AsyncUsersWithStreamingResponser&   s    r(   r.   z"AsyncUsers.with_streaming_response   s     /t44r*   Nr/   c                  K   |st        d|      | j                  t        d|      t        d|it        j
                         d{   t        ||||ddi      t        	       d{   S 7 '7 w)
r5   r6   r7   r8   r:   Nr;   Tr<   r>   )rB   rC   r   r   r   rD   r   r   rE   s          r(   rF   zAsyncUsers.create   s     4 VW_VbcddZZAHU,i-ACUCfCfgg(+'%.5 '   
 
 	
g
s$   AA5	A1

"A5,A3-A53A5c                  K   |st        d|      |st        d|      | j                  t        d||      t        ||||ddi      t               d	{   S 7 w)
rH   r6   rI   rJ   rK   r;   Tr<   rL   NrM   rO   s          r(   rP   zAsyncUsers.retrieve  s     0 VW_VbcddUV]U`abbYYKV^hop(+'%.5 )  

 

 
	
 

   AA!AA!rQ   c                   |st        d|      | j                  t        d|      t        t           t        ||||t        |||dt        j                        ddi      t              S rV   )	rB   rZ   r   r   r   r   r   r   r[   r\   s	            r(   r]   zAsyncUsers.listF  s    D VW_Vbcdd!!AHU$%:;(+'%%!&!&!&
 %33 /5 (% " 
 	
r*   c                  K   |st        d|      |st        d|      | j                  t        d||      t        ||||ddi      t               d	{   S 7 w)
r_   r6   rI   rJ   rK   r;   Tr<   rL   Nr`   rO   s          r(   rb   zAsyncUsers.delete  s     0 VW_VbcddUV]U`abb\\KV^hop(+'%.5 ' " 

 

 
	
 

r{   )rc   rv   )rc   rx   rd   rj   )r9   re   rR   rk   rS   rl   rT   rm   r0   rf   r1   rg   r2   rh   r3   ri   rc   zQAsyncPaginator[OrganizationGroupUser, AsyncNextCursorPage[OrganizationGroupUser]]rn   ro   rs   r*   r(   r!   r!      s   / / 5 5 )-$("&<E'
'
 	'
 &'
 "'
  '
 :'
 
'
` )-$("&<E&
&
 	&
 &&
 "&
  &
 :&
 
&
X ! /3 )-$("&<E7
7
 	7

 7
 -7
 &7
 "7
  7
 :7
 
[7
@ )-$("&<E&
&
 	&
 &&
 "&
  &
 :&
 
&
r*   c                      e Zd ZddZy)r%   c                2   || _         t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j
                        | _        t        j                  |j                        | _        y N)_usersr   to_raw_response_wrapperrF   rP   r]   rb   r'   userss     r(   __init__zUsersWithRawResponse.__init__  ss    &>>LL
 )@@NN
 %<<JJ
	 '>>LL
r*   Nr   r    rc   Nonerp   rq   rr   r   rs   r*   r(   r%   r%         
r*   r%   c                      e Zd ZddZy)rv   c                2   || _         t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j
                        | _        t        j                  |j                        | _        y r   )r   r   async_to_raw_response_wrapperrF   rP   r]   rb   r   s     r(   r   z"AsyncUsersWithRawResponse.__init__  ss    &DDLL
 )FFNN
 %BBJJ
	 'DDLL
r*   Nr   r!   rc   r   r   rs   r*   r(   rv   rv     r   r*   rv   c                      e Zd ZddZy)r-   c                    || _         t        |j                        | _        t        |j                        | _        t        |j                        | _        t        |j
                        | _        y r   )r   r   rF   rP   r]   rb   r   s     r(   r   z#UsersWithStreamingResponse.__init__  s[    2LL
 5NN
 1JJ
	 3LL
r*   Nr   r   rs   r*   r(   r-   r-     r   r*   r-   c                      e Zd ZddZy)rx   c                    || _         t        |j                        | _        t        |j                        | _        t        |j                        | _        t        |j
                        | _        y r   )r   r   rF   rP   r]   rb   r   s     r(   r   z(AsyncUsersWithStreamingResponse.__init__  s[    8LL
 ;NN
 7JJ
	 9LL
r*   Nr   r   rs   r*   r(   rx   rx     r   r*   rx   )3
__future__r   typing_extensionsr   httpx2 r   _typesr   r   r	   r
   r   r   r   _utilsr   r   r   _compatr   	_resourcer   r   	_responser   r   
paginationr   r   _base_clientr   r   types.admin.organization.groupsr   r   4types.admin.organization.groups.user_create_responser   4types.admin.organization.groups.user_delete_responser   6types.admin.organization.groups.user_retrieve_responser   7types.admin.organization.groups.organization_group_userr   __all__r    r!   r%   rv   r-   rx   rs   r*   r(   <module>r      s    # %  " M M M M M ( < [ C B U X X \ ^L
!D
O D
ND
! D
N
 
$
 
$
 
$
 
r*   