microsoft/teams.net

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
samples/migration-bot

Branches

Tags

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

Clone

HTTPS

Download ZIP

core/src/Microsoft.Teams.Bot.Apps/Handlers/AdaptiveCardHandler.ActionValue.cs

68lines · modecode

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4using System.Text.Json.Serialization;
5
6namespace Microsoft.Teams.Bot.Apps.Handlers;
7
8/// <summary>
9/// Defines the structure that arrives in the Activity.Value for Invoke activity with
10/// Name of 'adaptiveCard/action'.
11/// </summary>
12public class AdaptiveCardActionValue
13{
14 /// <summary>
15 /// The action of this adaptive card invoke action value.
16 /// </summary>
17 [JsonPropertyName("action")]
18 public AdaptiveCardAction? Action { get; set; }
19
20 /// <summary>
21 /// The state for this adaptive card invoke action value.
22 /// </summary>
23 [JsonPropertyName("state")]
24 public string? State { get; set; }
25
26 /// <summary>
27 /// What triggered the action.
28 /// </summary>
29 [JsonPropertyName("trigger")]
30 public string? Trigger { get; set; }
31}
32
33/// <summary>
34/// Defines the structure that arrives in the Activity.Value.Action for Invoke
35/// activity with Name of 'adaptiveCard/action'.
36/// </summary>
37public class AdaptiveCardAction
38{
39 /// <summary>
40 /// The Type of this Adaptive Card Invoke Action.
41 /// </summary>
42 [JsonPropertyName("type")]
43 public string? Type { get; set; }
44
45 /// <summary>
46 /// The id of this Adaptive Card Invoke Action.
47 /// </summary>
48 [JsonPropertyName("id")]
49 public string? Id { get; set; }
50
51 /// <summary>
52 /// The title of this Adaptive Card Invoke Action.
53 /// </summary>
54 [JsonPropertyName("title")]
55 public string? Title { get; set; }
56
57 /// <summary>
58 /// The Verb of this adaptive card action invoke.
59 /// </summary>
60 [JsonPropertyName("verb")]
61 public string? Verb { get; set; }
62
63 /// <summary>
64 /// The Data of this adaptive card action invoke.
65 /// </summary>
66 [JsonPropertyName("data")]
67 public Dictionary<string, object>? Data { get; set; }
68}
69