| | | 1 | | using System.Text.Json.Serialization; |
| | | 2 | | |
| | | 3 | | namespace Elsa.Workflows.Models; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// Represents a shape of a variable that can be serialized. |
| | | 7 | | /// </summary> |
| | | 8 | | public class VariableModel |
| | | 9 | | { |
| | | 10 | | /// <summary> |
| | | 11 | | /// Initializes a new instance of the <see cref="VariableModel"/> class. |
| | | 12 | | /// </summary> |
| | | 13 | | [JsonConstructor] |
| | 339 | 14 | | public VariableModel() |
| | | 15 | | { |
| | 339 | 16 | | } |
| | | 17 | | |
| | | 18 | | /// <summary> |
| | | 19 | | /// Initializes a new instance of the <see cref="VariableModel"/> class. |
| | | 20 | | /// </summary> |
| | 188 | 21 | | public VariableModel(string id, string name, string typeName, string? value, string? storageDriverTypeName) |
| | | 22 | | { |
| | 188 | 23 | | Id = id; |
| | 188 | 24 | | Name = name; |
| | 188 | 25 | | TypeName = typeName; |
| | 188 | 26 | | Value = value; |
| | 188 | 27 | | StorageDriverTypeName = storageDriverTypeName; |
| | 188 | 28 | | } |
| | | 29 | | |
| | | 30 | | /// <summary> |
| | | 31 | | /// Gets or sets the ID of the variable. |
| | | 32 | | /// </summary> |
| | 1054 | 33 | | public string Id { get; set; } = default!; |
| | | 34 | | |
| | | 35 | | /// <summary> |
| | | 36 | | /// Gets or sets the name of the variable. |
| | | 37 | | /// </summary> |
| | 1054 | 38 | | public string Name { get; set; } = default!; |
| | | 39 | | |
| | | 40 | | /// <summary> |
| | | 41 | | /// Gets or sets the type name of the variable. |
| | | 42 | | /// </summary> |
| | 1393 | 43 | | public string TypeName { get; set; } = default!; |
| | | 44 | | |
| | | 45 | | /// <summary> |
| | | 46 | | /// Gets or sets the value of the variable. |
| | | 47 | | /// </summary> |
| | 912 | 48 | | public string? Value { get; set; } |
| | | 49 | | |
| | | 50 | | /// <summary> |
| | | 51 | | /// Gets or sets the storage driver type name of the variable. |
| | | 52 | | /// </summary> |
| | 1335 | 53 | | public string? StorageDriverTypeName { get; set; } |
| | | 54 | | } |