
    0j$                        d Z ddlZddlmZ ddlmZmZ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
lmZ ddlmZ ddlmZ ddlmZ ddlmZ  G d de          Z G d de          Z G d de          ZdS )z[
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.
    N)datetime)AnyListOptionalSelf)AccountConversationAccount)ChannelData)ChannelInfo)NotificationInfo)TeamInfo)	ChannelID)Entity)MeetingInfo)ExperimentalWarning   )CustomBaseModelc                   
   e Zd ZU dZdZee         ed<   	 dZee	         ed<   	 dZ
ee         ed<   	 dZee	         ed<   	 dZeed<   	 eed	<   	 eed
<   	 dZee         ed<   	 dZeee                  ed<   	 dZee         ed<   dS )_ActivityBasez-Base class containing shared activity fields.Nservice_url	timestamplocalelocal_timestampmsteams
channel_idfrom_conversationreply_to_identitieschannel_data)__name__
__module____qualname____doc__r   r   str__annotations__r   r   r   r   r   r   r   r	   r   r   r   r   r    r
        k/home/rurouni/.hermes/hermes-agent/venv/lib/python3.11/site-packages/microsoft_teams/api/models/activity.pyr   r      s         77!%K#%%%]$(Ix!(((e FHSM    +/OXh'...
 &J	%%%RNNN/%%%%D!%K#%%%J'+HhtF|$+++E*.L(;'...,,r(   r   c                   V   e Zd ZU dZdZee         ed<   	 dZee         ed<   	 dZ	ee
         ed<   	 dZee         ed<   	 dZee         ed<   	 dZee         ed<   	 ed	ee         fd
            Zed	ee         fd            Zed	ee         fd            Zed	ee         fd            Zed	efd            Zded	efdZde
d	efdZded	efdZded	efdZddedee          d	efdZ!ded	efdZ"de#d	efdZ$ded	efdZ%de#d	efdZ&de'd	efdZ(de)d	efdZ*de)d	efdZ+d	e fdZ,dS ) ActivityInputz9Input model for creating activities with builder methods.Ntypeidr   r   r   	recipientreturnc                 ,    | j         r| j         j        ndS z<Information about the channel in which the message was sent.Nr    channelselfs    r)   r3   zActivityInput.channelV        -1,=Gt ((4Gr(   c                 ,    | j         r| j         j        ndS z9Information about the team in which the message was sent.Nr    teamr4   s    r)   r:   zActivityInput.team[        *.):Dt %%Dr(   c                 ,    | j         r| j         j        ndS z;Information about the tenant in which the message was sent.Nr    meetingr4   s    r)   r?   zActivityInput.meeting`   r6   r(   c                 ,    | j         r| j         j        ndS z&Notification settings for the message.Nr    notificationr4   s    r)   rC   zActivityInput.notificatione        261BLt --Lr(   c                 ,    | j         r| j         j        ndS r=   r    tenantr4   s    r)   rG   zActivityInput.tenantj        ,0+<Ft ''$Fr(   valuec                     || _         | S )zSet the id.)r-   r5   rI   s     r)   with_idzActivityInput.with_ido   s    r(   c                     || _         | S )zSet the channel_id.)r   rK   s     r)   with_channel_idzActivityInput.with_channel_idt   s    r(   c                     || _         | S )zSet the from field.)r   rK   s     r)   	with_fromzActivityInput.with_fromy   s    
r(   c                     || _         | S )zSet the conversation.)r   rK   s     r)   with_conversationzActivityInput.with_conversation~   s    !r(   is_targetedc                     |                                 }|du rdnd|_        || _        |du rt          j        dt
          d           | S )a  
        Set the recipient.

        Args:
            value: The recipient account
            is_targeted: If True, marks this as a targeted message visible only to this
                recipient. If False or None (the default), targeted routing is cleared.

                .. warning:: Preview
                    The ``is_targeted`` parameter is in preview and may change or be
                    removed in future versions. Diagnostic: ExperimentalTeamsTargeted

        Returns:
            Self for method chaining
        TNzThe is_targeted parameter of with_recipient is in preview and may change or be removed in future versions. Diagnostic: ExperimentalTeamsTargeted   )
stacklevel)
model_copyrS   r.   warningswarnr   )r5   rI   rS   r.   s       r)   with_recipientzActivityInput.with_recipient   si      $$&&	(3t(;(;	"$MZ#	    r(   c                     || _         | S )zSet the service_url.)r   rK   s     r)   with_service_urlzActivityInput.with_service_url   s     r(   c                     || _         | S )zSet the timestamp.)r   rK   s     r)   with_timestampzActivityInput.with_timestamp   s    r(   c                     || _         | S )zSet the locale.)r   rK   s     r)   with_localezActivityInput.with_locale   s    r(   c                     || _         | S )zSet the local_timestamp.)r   rK   s     r)   with_local_timestampz"ActivityInput.with_local_timestamp   s    $r(   c                     | j         s|| _         n@i | j                                         |                                }t          di || _         | S )zSet or update channel_data.r'   )r    
model_dumpr
   )r5   rI   datas      r)   with_channel_datazActivityInput.with_channel_data   s]      	4 %DKd'2244K8H8H8J8JKD + 3 3d 3 3Dr(   c                 V    | j         sg | _         | j                             |           | S )zAdd an entity.)r   appendrK   s     r)   
add_entityzActivityInput.add_entity   s.    } 	DMU###r(   valuesc                 V    | j         sg | _         | j                             |           | S )zAdd multiple entities.)r   extend)r5   rj   s     r)   add_entitieszActivityInput.add_entities   s.    } 	DMV$$$r(   c                 j    t          | j        ot          d | j        pg D                                 S )&Check if this is a streaming activity.c              3   ,   K   | ]}|j         d k    V  dS 
streaminfoNr,   .0es     r)   	<genexpr>z-ActivityInput.is_streaming.<locals>.<genexpr>   )      )^)^Q!&L*@)^)^)^)^)^)^r(   boolr   anyr4   s    r)   is_streamingzActivityInput.is_streaming   6    DM^c)^)^$-J][])^)^)^&^&^___r(   )N)-r!   r"   r#   r$   r,   r   r%   r&   r-   r   r   r   r   r   r	   r.   propertyr   r3   r   r:   r   r?   r   rC   r   rG   r   rL   rN   rP   rR   rz   rZ   r\   r   r^   r`   rb   r
   rf   r   ri   rm   r|   r'   r(   r)   r+   r+   A   sf        CCD(3-,BN&*J#***R#E8G###/26L(./666D#'Ix '''2H+. H H H XH Ehx( E E E XE H+. H H H XH Mh'78 M M M XM G G G G XGS T    
Y 4    
w 4    
': t    
 G (4. TX    8c d    
H     
     
( t    
{ t     4    F t    `d ` ` ` ` ` `r(   r+   c                   (   e Zd ZU dZeed<   	 eed<   	 dZeed<   	 eed<   	 e	ed<   	 eed<   	 e
d	ee         fd
            Ze
d	ee         fd            Ze
d	ee         fd            Ze
d	ee         fd            Ze
d	efd            Zd	efdZdS )ActivityzSOutput model for received activities with required fields and read-only properties.r,   r-   r   r   r   r   r.   r/   c                 ,    | j         r| j         j        ndS r1   r2   r4   s    r)   r3   zActivity.channel   r6   r(   c                 ,    | j         r| j         j        ndS r8   r9   r4   s    r)   r:   zActivity.team   r;   r(   c                 ,    | j         r| j         j        ndS r=   r>   r4   s    r)   r?   zActivity.meeting   r6   r(   c                 ,    | j         r| j         j        ndS rA   rB   r4   s    r)   rC   zActivity.notification   rD   r(   c                 ,    | j         r| j         j        ndS r=   rF   r4   s    r)   rG   zActivity.tenant   rH   r(   c                 j    t          | j        ot          d | j        pg D                                 S )ro   c              3   ,   K   | ]}|j         d k    V  dS rq   rs   rt   s     r)   rw   z(Activity.is_streaming.<locals>.<genexpr>   rx   r(   ry   r4   s    r)   r|   zActivity.is_streaming   r}   r(   N)r!   r"   r#   r$   r%   r&   r   r   r   r	   r~   r   r   r3   r   r:   r   r?   r   rC   r   rG   rz   r|   r'   r(   r)   r   r      s        ]]
III,GGGN%J	%%%RNNN/%%%%D2H+. H H H XH Ehx( E E E XE H+. H H H XH Mh'78 M M M XM G G G G XG`d ` ` ` ` ` `r(   r   ) r$   rX   r   typingr   r   r   r   "microsoft_teams.api.models.accountr   r	   4microsoft_teams.api.models.channel_data.channel_datar
   4microsoft_teams.api.models.channel_data.channel_infor   9microsoft_teams.api.models.channel_data.notification_infor   1microsoft_teams.api.models.channel_data.team_infor   %microsoft_teams.api.models.channel_idr   (microsoft_teams.api.models.entity.entityr   0microsoft_teams.api.models.meetings.meeting_infor   #microsoft_teams.common.experimentalr   custom_base_modelr   r   r+   r   r'   r(   r)   <module>r      s   
        , , , , , , , , , , , , K K K K K K K K L L L L L L L L L L L L V V V V V V F F F F F F ; ; ; ; ; ; ; ; ; ; ; ; H H H H H H C C C C C C . . . . . .'- '- '- '- '-O '- '- '-TK` K` K` K` K`M K` K` K`\0` 0` 0` 0` 0`} 0` 0` 0` 0` 0`r(   