
    _jJ                    t   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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   SSK!J"r"J#r#  SSK$J%r%J&r&J'r'  SSK(J)r)  SSK*J+r+  SS/r, " S S\5      r- " S S\5      r. " S S5      r/ " S S5      r0 " S S5      r1 " S S5      r2g)    )annotations)Optional)LiteralN   )_legacy_response)BodyOmitQueryHeaders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)SyncNextCursorPageAsyncNextCursorPage)AsyncPaginatormake_request_options)role_list_paramsrole_create_paramsrole_update_params)Role)RoleDeleteResponseRoles
AsyncRolesc                     \ rS rS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 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
)RolesWithRawResponseselfs    ^/home/rurouni/.local/lib/python3.13/site-packages/openai/resources/admin/organization/roles.pywith_raw_responseRoles.with_raw_response   s     $D))    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
)RolesWithStreamingResponser(   s    r*   with_streaming_responseRoles.with_streaming_response$   s     *$//r-   Ndescription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$ )  
Creates a custom role for the organization.

Args:
  permissions: Permissions to grant to the role.

  role_name: Unique name for the role.

  description: Optional description of the role.

  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/rolespermissions	role_namer4   admin_api_key_authTr5   r6   r7   r8   securitybodyoptionscast_to)_postr   r   RoleCreateParamsr   r   r)   r=   r>   r4   r5   r6   r7   r8   s           r*   createRoles.create-   sa    > zz! #.!*#.
 #33 )+'%.5 #  
 	
r-   r4   r=   r>   r5   r6   r7   r8   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$ )	  
Updates an existing organization role.

Args:
  description: New description for the role.

  permissions: Updated set of permissions for the role.

  role_name: New name for the role.

  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
6Expected a non-empty value for `role_id` but received /organization/roles/{role_id}role_idr4   r=   r>   r?   Tr@   rB   )
ValueErrorrF   r   r   r   RoleUpdateParamsr   r   	r)   rQ   r4   r=   r>   r5   r6   r7   r8   s	            r*   updateRoles.update`   s    @ UV]U`abbzz97K #.#.!*
 #33 )+'%.5 #  
 	
r-   afterlimitorderr5   r6   r7   r8   c                   U R                  S[        [           [        UUUU[	        UUUS.[
        R                  5      SS0S9[        S9$ a  
Lists the roles configured for the organization.

Args:
  after: Cursor for pagination. Provide the value from the previous response's `next`
      field to continue listing roles.

  limit: A limit on the number of roles to return. Defaults to 1000.

  order: Sort order for the returned roles.

  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;   )rY   rZ   r[   r?   T)r5   r6   r7   r8   queryrA   )pagerD   model)_get_api_listr   r   r   r   r   RoleListParamsr)   rY   rZ   r[   r5   r6   r7   r8   s           r*   list
Roles.list   sl    @ !!!#D)(+'%%!&!&!&
 %33 /5 % " 
 	
r-   r5   r6   r7   r8   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$ )(  
Deletes a custom role from the organization.

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
rN   rO   rP   r?   Tr@   rD   rE   rS   _deleter   r   r    r)   rQ   r5   r6   r7   r8   s         r*   deleteRoles.delete   s^    . UV]U`abb||97K(+'%.5 '  

 
	
r-    )returnr'   )rp   r0   r=   zSequenceNotStr[str]r>   strr4   Optional[str] | Omitr5   Headers | Noner6   Query | Noner7   Body | Noner8   'float | httpx.Timeout | None | NotGivenrp   r   rQ   rr   r4   rs   r=   z$Optional[SequenceNotStr[str]] | Omitr>   rs   r5   rt   r6   ru   r7   rv   r8   rw   rp   r   )rY   
str | OmitrZ   
int | Omitr[   Literal['asc', 'desc'] | Omitr5   rt   r6   ru   r7   rv   r8   rw   rp   zSyncNextCursorPage[Role]rQ   rr   r5   rt   r6   ru   r7   rv   r8   rw   rp   r    __name__
__module____qualname____firstlineno__r   r+   r1   r   r   rI   rV   rd   rm   __static_attributes__ro   r-   r*   r!   r!      s   * * 0 0 -1 )-$("&;D1
 )1
 	1

 *1
 &1
 "1
  1
 91
 
1
n -1<@*. )-$("&;D4
4
 *	4

 :4
 (4
 &4
 "4
  4
 94
 
4
r ! /3 )-$("&;D3
 3
 	3

 -3
 &3
 "3
  3
 93
 
"3
v )-$("&;D#
#
 &#
 "#
  #
 9#
 
#
 #
r-   c                     \ rS rS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 5      $ r&   )AsyncRolesWithRawResponser(   s    r*   r+   AsyncRoles.with_raw_response   s     )..r-   c                    [        U 5      $ r/   )AsyncRolesWithStreamingResponser(   s    r*   r1   "AsyncRoles.with_streaming_response   s     /t44r-   Nr3   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@   rB   )rF   r   r   rG   r   r   rH   s           r*   rI   AsyncRoles.create  sx     > ZZ!,#.!*#.
 #33  )+'%.5 #   
 
 	

s!   .AA
AAAArK   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)
rM   rN   rO   rP   rR   Nr?   Tr@   rB   )rS   rF   r   r   r   rT   r   r   rU   s	            r*   rV   AsyncRoles.update8  s     @ UV]U`abbZZ97K,#.#.!*
 #33  )+'%.5 #   
 
 	

s$   AA4A0
A4+A2,A42A4rX   c                   U R                  S[        [           [        UUUU[	        UUUS.[
        R                  5      SS0S9[        S9$ r]   )ra   r   r   r   r   r   rb   rc   s           r*   rd   AsyncRoles.listn  sl    @ !!!$T*(+'%%!&!&!&
 %33 /5 % " 
 	
r-   rf   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)	rh   rN   rO   rP   r?   Tr@   ri   Nrj   rl   s         r*   rm   AsyncRoles.delete  sk     . UV]U`abb\\97K(+'%.5 ' " 

 

 
	
 

s   AAAAro   )rp   r   )rp   r   rq   rx   )rY   ry   rZ   rz   r[   r{   r5   rt   r6   ru   r7   rv   r8   rw   rp   z/AsyncPaginator[Role, AsyncNextCursorPage[Role]]r|   r}   ro   r-   r*   r"   r"      s   / / 5 5 -1 )-$("&;D1
 )1
 	1

 *1
 &1
 "1
  1
 91
 
1
n -1<@*. )-$("&;D4
4
 *	4

 :4
 (4
 &4
 "4
  4
 94
 
4
r ! /3 )-$("&;D3
 3
 	3

 -3
 &3
 "3
  3
 93
 
93
v )-$("&;D#
#
 &#
 "#
  #
 9#
 
#
 #
r-   c                      \ rS rSrSS j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 N)_rolesr   to_raw_response_wrapperrI   rV   rd   rm   r)   roless     r*   __init__RolesWithRawResponse.__init__  sq    &>>LL
 '>>LL
 %<<JJ
	 '>>LL
r-   r   rI   rm   rd   rV   Nr   r!   rp   Noner~   r   r   r   r   r   ro   r-   r*   r'   r'         
r-   r'   c                      \ rS rSrSS j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_wrapperrI   rV   rd   rm   r   s     r*   r   "AsyncRolesWithRawResponse.__init__  sq    &DDLL
 'DDLL
 %BBJJ
	 'DDLL
r-   r   Nr   r"   rp   r   r   ro   r-   r*   r   r     r   r-   r   c                      \ rS rSrSS jrSrg)r0   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   rI   rV   rd   rm   r   s     r*   r   #RolesWithStreamingResponse.__init__  sY    2LL
 3LL
 1JJ
	 3LL
r-   r   Nr   r   ro   r-   r*   r0   r0     r   r-   r0   c                      \ rS rSrSS j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   rI   rV   rd   rm   r   s     r*   r   (AsyncRolesWithStreamingResponse.__init__   sY    8LL
 9LL
 7JJ
	 9LL
r-   r   Nr   r   ro   r-   r*   r   r     r   r-   r   )3
__future__r   typingr   typing_extensionsr   httpx r   _typesr   r	   r
   r   r   r   r   r   _utilsr   r   r   _compatr   	_resourcer   r   	_responser   r   
paginationr   r   _base_clientr   r   types.admin.organizationr   r   r   types.admin.organization.roler   -types.admin.organization.role_delete_responser    __all__r!   r"   r'   r   r0   r   ro   r-   r*   <module>r      s    #  %  ! \ \ \ L L ' ; Z B A a a 2 PL
!U
O U
pU
! U
p
 
$
 
$
 
$
 
r-   