| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | using System.Text.Json.Serialization; |
| | 5 | |
|
| | 6 | | namespace Azure.DigitalTwins.Core.Serialization |
| | 7 | | { |
| | 8 | | /// <summary> |
| | 9 | | /// An optional, helper class for deserializing a digital twin. |
| | 10 | | /// The ModelProperties dictionary on <see cref="ComponentMetadata"/>. |
| | 11 | | /// </summary> |
| | 12 | | /// <remarks> |
| | 13 | | /// <para> |
| | 14 | | /// A writable property is one that the service may request a change for from the device. |
| | 15 | | /// </para> |
| | 16 | | /// <para> |
| | 17 | | /// For more samples, see <see href="https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/digitaltwins/Azure.D |
| | 18 | | /// </para> |
| | 19 | | /// </remarks> |
| | 20 | | public class WritableProperty |
| | 21 | | { |
| | 22 | | /// <summary> |
| | 23 | | /// The desired value. |
| | 24 | | /// </summary> |
| | 25 | | [JsonPropertyName("desiredValue")] |
| 0 | 26 | | public object DesiredValue { get; set; } |
| | 27 | |
|
| | 28 | | /// <summary> |
| | 29 | | /// The version of the property with the specified desired value. |
| | 30 | | /// </summary> |
| | 31 | | [JsonPropertyName("desiredVersion")] |
| 0 | 32 | | public int DesiredVersion { get; set; } |
| | 33 | |
|
| | 34 | | /// <summary> |
| | 35 | | /// The version of the reported property value. |
| | 36 | | /// </summary> |
| | 37 | | [JsonPropertyName("ackVersion")] |
| 0 | 38 | | public int AckVersion { get; set; } |
| | 39 | |
|
| | 40 | | /// <summary> |
| | 41 | | /// The response code of the property update request, usually an HTTP Status Code (e.g. 200). |
| | 42 | | /// </summary> |
| | 43 | | [JsonPropertyName("ackCode")] |
| 0 | 44 | | public int AckCode { get; set; } |
| | 45 | |
|
| | 46 | | /// <summary> |
| | 47 | | /// The message response of the property update request. |
| | 48 | | /// </summary> |
| | 49 | | [JsonPropertyName("ackDescription")] |
| 0 | 50 | | public string AckDescription { get; set; } |
| | 51 | | } |
| | 52 | | } |