microsoft/teams.net
Publicmirrored from https://github.com/microsoft/teams.netAvailable
core/src/Microsoft.Teams.Bot.Apps/Schema/Invokes/FileConsentValue.cs
74lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | using System.Text.Json.Serialization; |
| 5 | |
| 6 | namespace Microsoft.Teams.Bot.Apps.Schema; |
| 7 | |
| 8 | /// <summary> |
| 9 | /// Represents the value of the invoke activity sent when the user acts on a |
| 10 | /// file consent card. |
| 11 | /// </summary> |
| 12 | public class FileConsentValue |
| 13 | { |
| 14 | /// <summary> |
| 15 | /// The type of file consent activity. Typically "fileUpload". |
| 16 | /// </summary> |
| 17 | [JsonPropertyName("type")] |
| 18 | public string? Type { get; set; } |
| 19 | |
| 20 | /// <summary> |
| 21 | /// The action the user took. Possible values: 'accept', 'decline'. |
| 22 | /// </summary> |
| 23 | [JsonPropertyName("action")] |
| 24 | public string? Action { get; set; } |
| 25 | |
| 26 | /// <summary> |
| 27 | /// The context associated with the action. |
| 28 | /// </summary> |
| 29 | [JsonPropertyName("context")] |
| 30 | public object? Context { get; set; } |
| 31 | |
| 32 | /// <summary> |
| 33 | /// If the user accepted the file, |
| 34 | /// contains information about the file to be uploaded. |
| 35 | /// </summary> |
| 36 | [JsonPropertyName("uploadInfo")] |
| 37 | public FileUploadInfo? UploadInfo { get; set; } |
| 38 | } |
| 39 | |
| 40 | /// <summary> |
| 41 | /// File upload info for accepted file consent. |
| 42 | /// </summary> |
| 43 | public class FileUploadInfo |
| 44 | { |
| 45 | /// <summary> |
| 46 | /// Name of the file. |
| 47 | /// </summary> |
| 48 | [JsonPropertyName("name")] |
| 49 | public string? Name { get; set; } |
| 50 | |
| 51 | /// <summary> |
| 52 | /// URL to upload file content. |
| 53 | /// </summary> |
| 54 | [JsonPropertyName("uploadUrl")] |
| 55 | public Uri? UploadUrl { get; set; } |
| 56 | |
| 57 | /// <summary> |
| 58 | /// URL to file content after upload. |
| 59 | /// </summary> |
| 60 | [JsonPropertyName("contentUrl")] |
| 61 | public Uri? ContentUrl { get; set; } |
| 62 | |
| 63 | /// <summary> |
| 64 | /// Unique ID for the file. |
| 65 | /// </summary> |
| 66 | [JsonPropertyName("uniqueId")] |
| 67 | public string? UniqueId { get; set; } |
| 68 | |
| 69 | /// <summary> |
| 70 | /// Type of the file. |
| 71 | /// </summary> |
| 72 | [JsonPropertyName("fileType")] |
| 73 | public string? FileType { get; set; } |
| 74 | } |
| 75 | |