microsoft/teams.net
Publicmirrored from https://github.com/microsoft/teams.netAvailable
Libraries/Microsoft.Teams.Api/Activities/Invokes/Messages/SubmitActionActivity.cs
54lines · 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.Invokes; |
| 9 | |
| 10 | public partial class Name : StringEnum |
| 11 | { |
| 12 | public partial class Messages : StringEnum |
| 13 | { |
| 14 | public static readonly Messages SubmitAction = new("message/submitAction"); |
| 15 | public bool IsSubmitAction => SubmitAction.Equals(Value); |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | public static partial class Messages |
| 20 | { |
| 21 | public class SubmitActionActivity() : MessageActivity(Name.Messages.SubmitAction) |
| 22 | { |
| 23 | /// <summary> |
| 24 | /// A value that is associated with the activity. |
| 25 | /// </summary> |
| 26 | [JsonPropertyName("value")] |
| 27 | [JsonPropertyOrder(32)] |
| 28 | public new required SubmitActionValue Value |
| 29 | { |
| 30 | get => (SubmitActionValue)base.Value!; |
| 31 | set => base.Value = value; |
| 32 | } |
| 33 | |
| 34 | /// <summary> |
| 35 | /// The Submit Action |
| 36 | /// </summary> |
| 37 | public class SubmitActionValue |
| 38 | { |
| 39 | /// <summary> |
| 40 | /// Action name. |
| 41 | /// </summary> |
| 42 | [JsonPropertyName("actionName")] |
| 43 | [JsonPropertyOrder(0)] |
| 44 | public required string ActionName { get; set; } |
| 45 | |
| 46 | /// <summary> |
| 47 | /// Action value. |
| 48 | /// </summary> |
| 49 | [JsonPropertyName("actionValue")] |
| 50 | [JsonPropertyOrder(1)] |
| 51 | public object? ActionValue { get; set; } |
| 52 | } |
| 53 | } |
| 54 | } |