microsoft/teams.net

Public

mirrored fromhttps://github.com/microsoft/teams.netAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
docs/update-release-process

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

Libraries/Microsoft.Teams.Api/Activities/Conversation/ConversationUpdateActivity.cs

91lines · modecode

1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT License.
3
4using System.Text.Json.Serialization;
5
6using Microsoft.Teams.Common;
7
8namespace Microsoft.Teams.Api.Activities;
9
10public partial class ActivityType : StringEnum
11{
12 public static readonly ActivityType ConversationUpdate = new("conversationUpdate");
13 public bool IsConversationUpdate => ConversationUpdate.Equals(Value);
14}
15
16public class ConversationUpdateActivity() : Activity(ActivityType.ConversationUpdate)
17{
18 /// <summary>
19 /// The updated topic name of the conversation.
20 /// </summary>
21 [JsonPropertyName("topicName")]
22 [JsonPropertyOrder(31)]
23 public string? TopicName { get; set; }
24
25 /// <summary>
26 /// Indicates whether the prior history of the channel is disclosed.
27 /// </summary>
28 [JsonPropertyName("historyDisclosed")]
29 [JsonPropertyOrder(32)]
30 public bool? HistoryDisclosed { get; set; }
31
32 /// <summary>
33 /// The collection of members added to the conversation.
34 /// </summary>
35 [JsonPropertyName("membersAdded")]
36 [JsonPropertyOrder(33)]
37 public Account[] MembersAdded { get; set; } = [];
38
39 /// <summary>
40 /// The collection of members removed from the conversation.
41 /// </summary>
42 [JsonPropertyName("membersRemoved")]
43 [JsonPropertyOrder(34)]
44 public Account[] MembersRemoved { get; set; } = [];
45
46 [JsonConverter(typeof(JsonConverter<EventType>))]
47 public class EventType(string value) : StringEnum(value)
48 {
49 public static readonly EventType ChannelCreated = new("channelCreated");
50 public bool IsChannelCreated => ChannelCreated.Equals(Value);
51
52 public static readonly EventType ChannelDeleted = new("channelDeleted");
53 public bool IsChannelDeleted => ChannelDeleted.Equals(Value);
54
55 public static readonly EventType ChannelRenamed = new("channelRenamed");
56 public bool IsChannelRenamed => ChannelRenamed.Equals(Value);
57
58 public static readonly EventType ChannelRestored = new("channelRestored");
59 public bool IsChannelRestored => ChannelRestored.Equals(Value);
60
61 public static readonly EventType ChannelShared = new("channelShared");
62 public bool IsChannelShared => ChannelShared.Equals(Value);
63
64 public static readonly EventType ChannelUnShared = new("channelUnshared");
65 public bool IsChannelUnShared => ChannelUnShared.Equals(Value);
66
67 public static readonly EventType ChannelMemberAdded = new("channelMemberAdded");
68 public bool IsChannelMemberAdded => ChannelMemberAdded.Equals(Value);
69
70 public static readonly EventType ChannelMemberRemoved = new("channelMemberRemoved");
71 public bool IsChannelMemberRemoved => ChannelMemberRemoved.Equals(Value);
72
73 public static readonly EventType TeamArchived = new("teamArchived");
74 public bool IsTeamArchived => TeamArchived.Equals(Value);
75
76 public static readonly EventType TeamDeleted = new("teamDeleted");
77 public bool IsTeamDeleted => TeamDeleted.Equals(Value);
78
79 public static readonly EventType TeamHardDeleted = new("teamHardDeleted");
80 public bool IsTeamHardDeleted => TeamHardDeleted.Equals(Value);
81
82 public static readonly EventType TeamRenamed = new("teamRenamed");
83 public bool IsTeamRenamed => TeamRenamed.Equals(Value);
84
85 public static readonly EventType TeamRestored = new("teamRestored");
86 public bool IsTeamRestored => TeamRestored.Equals(Value);
87
88 public static readonly EventType TeamUnarchived = new("teamUnarchived");
89 public bool IsTeamUnarchived => TeamUnarchived.Equals(Value);
90 }
91}