microsoft/teams.net
Publicmirrored fromhttps://github.com/microsoft/teams.netAvailable
Libraries/Microsoft.Teams.Api/Config/ConfigResponse.cs
53lines · modecode
| 1 | using System.Text.Json.Serialization; |
| 2 | |
| 3 | namespace Microsoft.Teams.Api.Config; |
| 4 | |
| 5 | /// <summary> |
| 6 | /// Envelope for Config Response Payload. |
| 7 | /// </summary> |
| 8 | public 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> |
| 41 | public 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 | } |