| | | 1 | | namespace Elsa.Api.Client.Resources.WorkflowDefinitions.Models; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// Represents a workflow variable. |
| | | 5 | | /// </summary> |
| | | 6 | | public class Variable |
| | | 7 | | { |
| | | 8 | | /// <summary> |
| | | 9 | | /// The ID of the variable. |
| | | 10 | | /// </summary> |
| | 0 | 11 | | public string Id { get; set; } = null!; |
| | | 12 | | |
| | | 13 | | /// <summary> |
| | | 14 | | /// The name of the variable. |
| | | 15 | | /// </summary> |
| | 0 | 16 | | public string Name { get; set; } = null!; |
| | | 17 | | |
| | | 18 | | /// <summary> |
| | | 19 | | /// The type name of the variable. |
| | | 20 | | /// </summary> |
| | 0 | 21 | | public string TypeName { get; set; } = null!; |
| | | 22 | | |
| | | 23 | | /// <summary> |
| | | 24 | | /// Indicates whether the variable is an array. |
| | | 25 | | /// </summary> |
| | 0 | 26 | | public bool IsArray { get; set; } |
| | | 27 | | |
| | | 28 | | /// <summary> |
| | | 29 | | /// The default value of the variable. |
| | | 30 | | /// </summary> |
| | 0 | 31 | | public object? Value { get; set; } |
| | | 32 | | |
| | | 33 | | /// <summary> |
| | | 34 | | /// The storage driver type to use for persistence. |
| | | 35 | | /// </summary> |
| | 0 | 36 | | public string? StorageDriverTypeName { get; set; } |
| | | 37 | | |
| | | 38 | | /// <summary> |
| | | 39 | | /// The type name of the variable, including the array indicator. |
| | | 40 | | /// </summary> |
| | 0 | 41 | | public string GetTypeDisplayName() => IsArray ? $"{TypeName}[]" : TypeName; |
| | | 42 | | } |