§
    �’j½Y  ã                  óš  — 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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&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¦  «        Z2dS )é    )Ú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                  ó°   — e Zd Zed)d„¦   «         Zed*d„¦   «         Z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œd-d„Z
eeedddedœd.d&„Zdddedœd/d(„ZdS )0r!   ÚreturnÚRolesWithRawResponsec                ó    — 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
        )r%   ©Úselfs    úWC:\Projects\DSCons\.venv\Lib\site-packages\openai\resources\admin\organization\roles.pyÚwith_raw_responsezRoles.with_raw_response   s   € õ $ DÑ)Ô)Ð)ó    ÚRolesWithStreamingResponsec                ó    — 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
        )r-   r(   s    r*   Úwith_streaming_responsezRoles.with_streaming_response$   s   € õ *¨$Ñ/Ô/Ð/r,   N©ÚdescriptionÚextra_headersÚextra_queryÚ
extra_bodyÚtimeoutÚpermissionsúSequenceNotStr[str]Ú	role_nameÚstrr2   úOptional[str] | Omitr3   úHeaders | Noner4   úQuery | Noner5   úBody | Noner6   ú(float | httpx2.Timeout | None | NotGivenr   c               óž   — |                       dt          |||dœt          j        ¦  «        t	          ||||ddi¬¦  «        t
          ¬¦  «        S )á  
        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©r7   r9   r2   Úadmin_api_key_authT©r3   r4   r5   r6   Úsecurity©ÚbodyÚoptionsÚcast_to)Ú_postr   r   ÚRoleCreateParamsr   r   ©r)   r7   r9   r2   r3   r4   r5   r6   s           r*   ÚcreatezRoles.create-   sw   € ð> �zŠzØ!Ý à#.Ø!*Ø#.ðð õ
 #Ô3ñô õ )Ø+Ø'Ø%ØØ.°Ð5ðñ ô õ ð# ñ 
ô 
ð 	
r,   ©r3   r4   r5   r6   Úrole_idc               óª   — |st          d|›�¦  «        ‚|                      t          d|¬¦  «        t          ||||ddi¬¦  «        t          ¬¦  «        S )áS  
        Retrieves an organization role.

        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
        ú6Expected a non-empty value for `role_id` but received ú/organization/roles/{role_id}©rP   rD   TrE   ©rI   rJ   ©Ú
ValueErrorÚ_getr   r   r   ©r)   rP   r3   r4   r5   r6   s         r*   ÚretrievezRoles.retrieve`   s|   € ð. ð 	cÝÐaÐV]ÐaÐaÑbÔbÐbØ�yŠyÝÐ9À7ÐKÑKÔKÝ(Ø+Ø'Ø%ØØ.°Ð5ðñ ô õ ð ñ 

ô 

ð 
	
r,   ©r2   r7   r9   r3   r4   r5   r6   ú$Optional[SequenceNotStr[str]] | Omitc               óä   — |st          d|›�¦  «        ‚|                      t          d|¬¦  «        t          |||dœt          j        ¦  «        t          ||||ddi¬¦  «        t          ¬¦  «        S )	áþ  
        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
        rS   rT   rU   ©r2   r7   r9   rD   TrE   rG   )rX   rK   r   r   r   ÚRoleUpdateParamsr   r   ©	r)   rP   r2   r7   r9   r3   r4   r5   r6   s	            r*   ÚupdatezRoles.update…   s§   € ð@ ð 	cÝÐaÐV]ÐaÐaÑbÔbÐbØ�zŠzÝÐ9À7ÐKÑKÔKÝ à#.Ø#.Ø!*ðð õ
 #Ô3ñô õ )Ø+Ø'Ø%ØØ.°Ð5ðñ ô õ ð# ñ 
ô 
ð 	
r,   ©ÚafterÚlimitÚorderr3   r4   r5   r6   re   ú
str | Omitrf   ú
int | Omitrg   úLiteral['asc', 'desc'] | OmitúSyncNextCursorPage[Role]c               óÀ   — |                       dt          t                   t          ||||t	          |||dœt
          j        ¦  «        ddi¬¦  «        t          ¬¦  «        S ©au  
        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
        rB   )re   rf   rg   rD   T)r3   r4   r5   r6   ÚqueryrF   )ÚpagerI   Úmodel)Ú_get_api_listr   r   r   r   r   ÚRoleListParams©r)   re   rf   rg   r3   r4   r5   r6   s           r*   Úlistz
Roles.list»   s‚   € ð@ ×!Ò!Ø!Ý#¥DÔ)Ý(Ø+Ø'Ø%ØÝ%à!&Ø!&Ø!&ðð õ
 %Ô3ñô ð /°Ð5ðñ ô õ ð% "ñ 
ô 
ð 	
r,   r    c               óª   — |st          d|›�¦  «        ‚|                      t          d|¬¦  «        t          ||||ddi¬¦  «        t          ¬¦  «        S )á`  
        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
        rS   rT   rU   rD   TrE   rV   ©rX   Ú_deleter   r   r    rZ   s         r*   ÚdeletezRoles.deleteð   s|   € ð. ð 	cÝÐaÐV]ÐaÐaÑbÔbÐbØ�|Š|ÝÐ9À7ÐKÑKÔKÝ(Ø+Ø'Ø%ØØ.°Ð5ðñ ô õ 'ð ñ 

ô 

ð 
	
r,   )r$   r%   )r$   r-   ©r7   r8   r9   r:   r2   r;   r3   r<   r4   r=   r5   r>   r6   r?   r$   r   ©rP   r:   r3   r<   r4   r=   r5   r>   r6   r?   r$   r   ©rP   r:   r2   r;   r7   r]   r9   r;   r3   r<   r4   r=   r5   r>   r6   r?   r$   r   )re   rh   rf   ri   rg   rj   r3   r<   r4   r=   r5   r>   r6   r?   r$   rk   ©rP   r:   r3   r<   r4   r=   r5   r>   r6   r?   r$   r    ©Ú__name__Ú
__module__Ú__qualname__r   r+   r0   r   r   rN   r[   rc   rt   ry   © r,   r*   r!   r!      sM  € € € € € Øð*ð *ð *ñ „_ð*ð ð0ð 0ð 0ñ „_ð0ð -1ð )-Ø$(Ø"&Ø<Eð1
ð 1
ð 1
ð 1
ð 1
ð 1
ðr )-Ø$(Ø"&Ø<Eð#
ð #
ð #
ð #
ð #
ð #
ðR -1Ø<@Ø*.ð )-Ø$(Ø"&Ø<Eð4
ð 4
ð 4
ð 4
ð 4
ð 4
ðr !Ø Ø/3ð )-Ø$(Ø"&Ø<Eð3
ð 3
ð 3
ð 3
ð 3
ð 3
ðv )-Ø$(Ø"&Ø<Eð#
ð #
ð #
ð #
ð #
ð #
ð #
ð #
r,   c                  ó°   — e Zd Zed)d„¦   «         Zed*d„¦   «         Z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œd-d„Z
eeedddedœd.d&„Zdddedœd/d(„ZdS )0r"   r$   ÚAsyncRolesWithRawResponsec                ó    — t          | ¦  «        S r'   )r„   r(   s    r*   r+   zAsyncRoles.with_raw_response  s   € õ )¨Ñ.Ô.Ð.r,   ÚAsyncRolesWithStreamingResponsec                ó    — t          | ¦  «        S r/   )r†   r(   s    r*   r0   z"AsyncRoles.with_streaming_response!  s   € õ /¨tÑ4Ô4Ð4r,   Nr1   r7   r8   r9   r:   r2   r;   r3   r<   r4   r=   r5   r>   r6   r?   r   c             ƒ  óº   K  — |                       dt          |||dœt          j        ¦  «        ƒ d{V —†t	          ||||ddi¬¦  «        t
          ¬¦  «        ƒ d{V —†S )rA   rB   rC   NrD   TrE   rG   )rK   r   r   rL   r   r   rM   s           r*   rN   zAsyncRoles.create*  s·   è è € ð> —Z’ZØ!Ý,à#.Ø!*Ø#.ðð õ
 #Ô3ñô ð ð ð ð ð ð õ )Ø+Ø'Ø%ØØ.°Ð5ðñ ô õ ð#  ñ 
ô 
ð 
ð 
ð 
ð 
ð 
ð 
ð 	
r,   rO   rP   c             ƒ  óº   K  — |st          d|›�¦  «        ‚|                      t          d|¬¦  «        t          ||||ddi¬¦  «        t          ¬¦  «        ƒ d{V —†S )	rR   rS   rT   rU   rD   TrE   rV   NrW   rZ   s         r*   r[   zAsyncRoles.retrieve]  sž   è è € ð. ð 	cÝÐaÐV]ÐaÐaÑbÔbÐbØ—Y’YÝÐ9À7ÐKÑKÔKÝ(Ø+Ø'Ø%ØØ.°Ð5ðñ ô õ ð ñ 

ô 

ð 

ð 

ð 

ð 

ð 

ð 

ð 
	
r,   r\   r]   c             ƒ  ó   K  — |st          d|›�¦  «        ‚|                      t          d|¬¦  «        t          |||dœt          j        ¦  «        ƒ d{V —†t          ||||ddi¬¦  «        t          ¬	¦  «        ƒ d{V —†S )
r_   rS   rT   rU   r`   NrD   TrE   rG   )rX   rK   r   r   r   ra   r   r   rb   s	            r*   rc   zAsyncRoles.update‚  sç   è è € ð@ ð 	cÝÐaÐV]ÐaÐaÑbÔbÐbØ—Z’ZÝÐ9À7ÐKÑKÔKÝ,à#.Ø#.Ø!*ðð õ
 #Ô3ñô ð ð ð ð ð ð õ )Ø+Ø'Ø%ØØ.°Ð5ðñ ô õ ð#  ñ 
ô 
ð 
ð 
ð 
ð 
ð 
ð 
ð 	
r,   rd   re   rh   rf   ri   rg   rj   ú/AsyncPaginator[Role, AsyncNextCursorPage[Role]]c               óÀ   — |                       dt          t                   t          ||||t	          |||dœt
          j        ¦  «        ddi¬¦  «        t          ¬¦  «        S rm   )rq   r   r   r   r   r   rr   rs   s           r*   rt   zAsyncRoles.list¸  s‚   € ð@ ×!Ò!Ø!Ý$¥TÔ*Ý(Ø+Ø'Ø%ØÝ%à!&Ø!&Ø!&ðð õ
 %Ô3ñô ð /°Ð5ðñ ô õ ð% "ñ 
ô 
ð 	
r,   r    c             ƒ  óº   K  — |st          d|›�¦  «        ‚|                      t          d|¬¦  «        t          ||||ddi¬¦  «        t          ¬¦  «        ƒ d{V —†S )	rv   rS   rT   rU   rD   TrE   rV   Nrw   rZ   s         r*   ry   zAsyncRoles.deleteí  sž   è è € ð. ð 	cÝÐaÐV]ÐaÐaÑbÔbÐbØ—\’\ÝÐ9À7ÐKÑKÔKÝ(Ø+Ø'Ø%ØØ.°Ð5ðñ ô õ 'ð "ñ 

ô 

ð 

ð 

ð 

ð 

ð 

ð 

ð 
	
r,   )r$   r„   )r$   r†   rz   r{   r|   )re   rh   rf   ri   rg   rj   r3   r<   r4   r=   r5   r>   r6   r?   r$   r‹   r}   r~   r‚   r,   r*   r"   r"     sM  € € € € € Øð/ð /ð /ñ „_ð/ð ð5ð 5ð 5ñ „_ð5ð -1ð )-Ø$(Ø"&Ø<Eð1
ð 1
ð 1
ð 1
ð 1
ð 1
ðr )-Ø$(Ø"&Ø<Eð#
ð #
ð #
ð #
ð #
ð #
ðR -1Ø<@Ø*.ð )-Ø$(Ø"&Ø<Eð4
ð 4
ð 4
ð 4
ð 4
ð 4
ðr !Ø Ø/3ð )-Ø$(Ø"&Ø<Eð3
ð 3
ð 3
ð 3
ð 3
ð 3
ðv )-Ø$(Ø"&Ø<Eð#
ð #
ð #
ð #
ð #
ð #
ð #
ð #
r,   c                  ó   — e Zd Zdd„ZdS )r%   Úrolesr!   r$   ÚNonec                ó@  — || _         t          j        |j        ¦  «        | _        t          j        |j        ¦  «        | _        t          j        |j        ¦  «        | _        t          j        |j        ¦  «        | _        t          j        |j        ¦  «        | _        d S ©N)Ú_rolesr   Úto_raw_response_wrapperrN   r[   rc   rt   ry   ©r)   r�   s     r*   Ú__init__zRolesWithRawResponse.__init__  s’   € ØˆŒå&Ô>ØŒLñ
ô 
ˆŒõ )Ô@ØŒNñ
ô 
ˆŒõ 'Ô>ØŒLñ
ô 
ˆŒõ %Ô<ØŒJñ
ô 
ˆŒ	õ 'Ô>ØŒLñ
ô 
ˆŒˆˆr,   N©r�   r!   r$   r�   ©r   r€   r�   r–   r‚   r,   r*   r%   r%     ó(   € € € € € ð
ð 
ð 
ð 
ð 
ð 
r,   r%   c                  ó   — e Zd Zdd„ZdS )r„   r�   r"   r$   r�   c                ó@  — || _         t          j        |j        ¦  «        | _        t          j        |j        ¦  «        | _        t          j        |j        ¦  «        | _        t          j        |j        ¦  «        | _        t          j        |j        ¦  «        | _        d S r’   )r“   r   Úasync_to_raw_response_wrapperrN   r[   rc   rt   ry   r•   s     r*   r–   z"AsyncRolesWithRawResponse.__init__)  s’   € ØˆŒå&ÔDØŒLñ
ô 
ˆŒõ )ÔFØŒNñ
ô 
ˆŒõ 'ÔDØŒLñ
ô 
ˆŒõ %ÔBØŒJñ
ô 
ˆŒ	õ 'ÔDØŒLñ
ô 
ˆŒˆˆr,   N©r�   r"   r$   r�   r˜   r‚   r,   r*   r„   r„   (  r™   r,   r„   c                  ó   — e Zd Zdd„ZdS )r-   r�   r!   r$   r�   c                ó  — || _         t          |j        ¦  «        | _        t          |j        ¦  «        | _        t          |j        ¦  «        | _        t          |j        ¦  «        | _        t          |j        ¦  «        | _        d S r’   )r“   r   rN   r[   rc   rt   ry   r•   s     r*   r–   z#RolesWithStreamingResponse.__init__>  sƒ   € ØˆŒå2ØŒLñ
ô 
ˆŒõ 5ØŒNñ
ô 
ˆŒõ 3ØŒLñ
ô 
ˆŒõ 1ØŒJñ
ô 
ˆŒ	õ 3ØŒLñ
ô 
ˆŒˆˆr,   Nr—   r˜   r‚   r,   r*   r-   r-   =  r™   r,   r-   c                  ó   — e Zd Zdd„ZdS )r†   r�   r"   r$   r�   c                ó  — || _         t          |j        ¦  «        | _        t          |j        ¦  «        | _        t          |j        ¦  «        | _        t          |j        ¦  «        | _        t          |j        ¦  «        | _        d S r’   )r“   r   rN   r[   rc   rt   ry   r•   s     r*   r–   z(AsyncRolesWithStreamingResponse.__init__S  sƒ   € ØˆŒå8ØŒLñ
ô 
ˆŒõ ;ØŒNñ
ô 
ˆŒõ 9ØŒLñ
ô 
ˆŒõ 7ØŒJñ
ô 
ˆŒ	õ 9ØŒLñ
ô 
ˆŒˆˆr,   Nr�   r˜   r‚   r,   r*   r†   r†   R  r™   r,   r†   )3Ú
__future__r   Útypingr   Útyping_extensionsr   Úhttpx2Ú 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„   r-   r†   r‚   r,   r*   ú<module>r²      s�  ðð #Ð "Ð "Ð "Ð "Ð "à Ð Ð Ð Ð Ð Ø %Ð %Ð %Ð %Ð %Ð %à €€€à !Ð !Ð !Ð !Ð !Ð !Ø \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ø LÐ LÐ LÐ LÐ LÐ LÐ LÐ LÐ LÐ LØ 'Ð 'Ð 'Ð 'Ð 'Ð 'Ø ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ø ZÐ ZÐ ZÐ ZÐ ZÐ ZÐ ZÐ ZØ BÐ BÐ BÐ BÐ BÐ BÐ BÐ BØ AÐ AÐ AÐ AÐ AÐ AÐ AÐ AØ aÐ aÐ aÐ aÐ aÐ aÐ aÐ aÐ aÐ aØ 2Ð 2Ð 2Ð 2Ð 2Ð 2Ø PÐ PÐ PÐ PÐ PÐ Pà�LÐ
!€ðz
ð z
ð z
ð z
ð z
ˆOñ z
ô z
ð z
ðzz
ð z
ð z
ð z
ð z
Ð!ñ z
ô z
ð z
ðz
ð 
ð 
ð 
ð 
ñ 
ô 
ð 
ð*
ð 
ð 
ð 
ð 
ñ 
ô 
ð 
ð*
ð 
ð 
ð 
ð 
ñ 
ô 
ð 
ð*
ð 
ð 
ð 
ð 
ñ 
ô 
ð 
ð 
ð 
r,   