microsoft/teams.net

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
1e6c6424b397bc7a2e03de41e3d58c1434d9ba5e

Branches

Tags

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

Clone

HTTPS

Download ZIP

Libraries/Microsoft.Teams.Api/Config/ConfigResponse.cs

53lines · modecode

1using System.Text.Json.Serialization;
2
3namespace Microsoft.Teams.Api.Config;
4
5/// <summary>
6/// Envelope for Config Response Payload.
7/// </summary>
8public class ConfigResponse
9{
10 /// <summary>
11 /// Gets or sets response type invoke request.
12 /// </summary>
13 /// <value> Invoke request response type.</value>
14 [JsonPropertyName("responseType")]
15 [JsonPropertyOrder(0)]
16 public string ResponseType { get; set; } = "config";
17
18 /// <summary>
19 /// Gets or sets the response to the config message.
20 /// Possible values for the config type include: 'auth'or 'task'.
21 /// </summary>
22 /// <value>
23 /// Response to a config request.
24 /// </value>
25 [JsonPropertyName("config")]
26 [JsonPropertyOrder(1)]
27 public object? Config { get; set; }
28
29 /// <summary>
30 /// Gets or sets response cache Info.
31 /// </summary>
32 /// <value> Value of cache info. </value>
33 [JsonPropertyName("cacheInfo")]
34 [JsonPropertyOrder(2)]
35 public CacheInfo? CacheInfo { get; set; }
36}
37
38/// <summary>
39/// Envelope for Config Response Payload.
40/// </summary>
41public class ConfigResponse<T>(T config) : ConfigResponse where T : notnull
42{
43 /// <summary>
44 /// Gets or sets the response to the config message.
45 /// Possible values for the config type include: 'auth'or 'task'.
46 /// </summary>
47 /// <value>
48 /// Response to a config request.
49 /// </value>
50 [JsonPropertyName("config")]
51 [JsonPropertyOrder(1)]
52 public new T Config { get; set; } = config;
53}