microsoft/teams.net
Publicmirrored from https://github.com/microsoft/teams.netAvailable
Libraries/Microsoft.Teams.Api/Activities/Events/MeetingParticipantJoinActivity.cs
68lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | using System.Text.Json.Serialization; |
| 5 | |
| 6 | using Microsoft.Teams.Common; |
| 7 | |
| 8 | namespace Microsoft.Teams.Api.Activities.Events; |
| 9 | |
| 10 | public partial class Name : StringEnum |
| 11 | { |
| 12 | public static readonly Name MeetingParticipantJoin = new("application/vnd.microsoft.meetingParticipantJoin"); |
| 13 | public bool IsMeetingParticipantJoin => MeetingParticipantJoin.Equals(Value); |
| 14 | } |
| 15 | |
| 16 | public class MeetingParticipantJoinActivity() : EventActivity(Name.MeetingParticipantJoin) |
| 17 | { |
| 18 | /// <summary> |
| 19 | /// A value that is associated with the activity. |
| 20 | /// </summary> |
| 21 | [JsonPropertyName("value")] |
| 22 | [JsonPropertyOrder(32)] |
| 23 | public required MeetingParticipantJoinActivityValue Value { get; set; } |
| 24 | } |
| 25 | |
| 26 | /// <summary> |
| 27 | /// A value that is associated with the activity. |
| 28 | /// </summary> |
| 29 | public class MeetingParticipantJoinActivityValue |
| 30 | { |
| 31 | /// <summary> |
| 32 | /// The participants info. |
| 33 | /// </summary> |
| 34 | [JsonPropertyName("members")] |
| 35 | [JsonPropertyOrder(0)] |
| 36 | public required IList<Member> Members { get; set; } |
| 37 | |
| 38 | public class Member |
| 39 | { |
| 40 | /// <summary> |
| 41 | /// The participant account. |
| 42 | /// </summary> |
| 43 | [JsonPropertyName("user")] |
| 44 | [JsonPropertyOrder(0)] |
| 45 | public required Account User { get; set; } |
| 46 | |
| 47 | /// <summary> |
| 48 | /// The participants info. |
| 49 | /// </summary> |
| 50 | [JsonPropertyName("meeting")] |
| 51 | [JsonPropertyOrder(1)] |
| 52 | public required Meeting Meeting { get; set; } |
| 53 | } |
| 54 | |
| 55 | public class Meeting |
| 56 | { |
| 57 | /// <summary> |
| 58 | /// The user in meeting indicator. |
| 59 | /// </summary> |
| 60 | [JsonPropertyName("inMeeting")] |
| 61 | [JsonPropertyOrder(0)] |
| 62 | public required bool InMeeting { get; set; } |
| 63 | |
| 64 | [JsonPropertyName("role")] |
| 65 | [JsonPropertyOrder(1)] |
| 66 | public required Role Role { get; set; } |
| 67 | } |
| 68 | } |