
    0j
              	           d Z ddlZddlZddlZddlmZmZmZmZ  ededef                   Z	 G d de
          Zdd	d
edee         dee	ge	f         fdZdS )z[
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.
    N)AnyCallableOptionalTypeVarF.)boundc                       e Zd ZdZdS )ExperimentalWarningz]Warning category for Teams SDK preview APIs.

    Preview APIs may change in the future.
    N)__name__
__module____qualname____doc__     k/home/rurouni/.hermes/hermes-agent/venv/lib/python3.11/site-packages/microsoft_teams/common/experimental.pyr
   r
      s         
 	Dr   r
   )message
diagnosticr   returnc                4     dt           dt           f fd}|S )aw  Mark a class or function as a preview API.

    Emits an ExperimentalWarning when the decorated class is instantiated
    or the decorated function is called.

    Args:
        diagnostic: The diagnostic code (e.g., "ExperimentalTeamsReactions") for granular opt-in.
        message: Optional custom warning message. If not provided, a default message is used.

    Usage::

        @experimental("ExperimentalTeamsReactions")
        class ReactionClient:
            ...

        @experimental("ExperimentalTeamsTargeted", message="Targeted messages are in preview.")
        async def create_targeted(...):
            ...
    objr   c                 8    t           dt           dt                                         }p| d t           t                    rH j        t          j                  dt          dt          dt          dd ffd            }| _         S t          j	                   r8t          j                   dt          dt          dt          f fd	            }|S t          j                   dt          dt          dt          f fd
            }|S )Nr   r   z9 is in preview and may change in the future. Diagnostic: selfargskwargsr   c                 X    t          j        t          d            | g|R i | d S N   )
stacklevelwarningswarnr
   )r   r   r   original_initwarn_msgs      r   new_initz1experimental.<locals>.decorator.<locals>.new_init3   sA    h(;JJJJd4T444V44444r   c                  \   K   t          j        t          d            | i | d {V S r   r   r   r   r   r#   s     r   async_wrapperz6experimental.<locals>.decorator.<locals>.async_wrapper=   sF      M(,?ANNNN!$d!5f!5!55555555r   c                  L    t          j        t          d            | i |S r   r   r&   s     r   wrapperz0experimental.<locals>.decorator.<locals>.wrapperE   s0    M(,?ANNNN3////r   )
getattrstr
isinstancetype__init__	functoolswrapsr   inspectiscoroutinefunction)	r   namer$   r'   r)   r"   r#   r   r   s	   `    @@r   	decoratorzexperimental.<locals>.decorator,   s{   sNGCSXX,N,NOOn$mmakmmc4   	LM_]++5s 53 5# 5$ 5 5 5 5 5 5 ,+5 $CLJ*3// %%6s 6c 6c 6 6 6 6 6 6 &%6 %$ %%03 0# 0# 0 0 0 0 0 0 &%0 r   )r   )r   r   r4   s   `` r   experimentalr5      s>    *q Q       @ r   )r   r/   r1   r    typingr   r   r   r   r   FutureWarningr
   r+   r5   r   r   r   <module>r8      s    
       3 3 3 3 3 3 3 3 3 3 3 3GCxS)***	 	 	 	 	- 	 	 	 ?C 5 5 5S 5hsm 5xQRPSUVPVGW 5 5 5 5 5 5r   