| | 1 | | // <auto-generated> |
| | 2 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 3 | | // Licensed under the MIT License. See License.txt in the project root for |
| | 4 | | // license information. |
| | 5 | | // |
| | 6 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 7 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 8 | | // regenerated. |
| | 9 | | // </auto-generated> |
| | 10 | |
|
| | 11 | | namespace Microsoft.Azure.CognitiveServices.Vision.Face.Models |
| | 12 | | { |
| | 13 | | using Newtonsoft.Json; |
| | 14 | | using System.Linq; |
| | 15 | |
|
| | 16 | | /// <summary> |
| | 17 | | /// Operation status object. Operation refers to the asynchronous backend |
| | 18 | | /// task including taking a snapshot and applying a snapshot. |
| | 19 | | /// </summary> |
| | 20 | | public partial class OperationStatus |
| | 21 | | { |
| | 22 | | /// <summary> |
| | 23 | | /// Initializes a new instance of the OperationStatus class. |
| | 24 | | /// </summary> |
| 32 | 25 | | public OperationStatus() |
| | 26 | | { |
| | 27 | | CustomInit(); |
| 32 | 28 | | } |
| | 29 | |
|
| | 30 | | /// <summary> |
| | 31 | | /// Initializes a new instance of the OperationStatus class. |
| | 32 | | /// </summary> |
| | 33 | | /// <param name="status">Operation status: notstarted, running, |
| | 34 | | /// succeeded, failed. If the operation is requested and waiting to |
| | 35 | | /// perform, the status is notstarted. If the operation is ongoing in |
| | 36 | | /// backend, the status is running. Status succeeded means the |
| | 37 | | /// operation is completed successfully, specifically for snapshot |
| | 38 | | /// taking operation, it illustrates the snapshot is well taken and |
| | 39 | | /// ready to apply, and for snapshot applying operation, it presents |
| | 40 | | /// the target object has finished creating by the snapshot and ready |
| | 41 | | /// to be used. Status failed is often caused by editing the source |
| | 42 | | /// object while taking the snapshot or editing the target object while |
| | 43 | | /// applying the snapshot before completion, see the field "message" to |
| | 44 | | /// check the failure reason. Possible values include: 'notstarted', |
| | 45 | | /// 'running', 'succeeded', 'failed'</param> |
| | 46 | | /// <param name="createdTime">A combined UTC date and time string that |
| | 47 | | /// describes the time when the operation (take or apply a snapshot) is |
| | 48 | | /// requested. E.g. 2018-12-25T11:41:02.2331413Z.</param> |
| | 49 | | /// <param name="lastActionTime">A combined UTC date and time string |
| | 50 | | /// that describes the last time the operation (take or apply a |
| | 51 | | /// snapshot) is actively migrating data. The lastActionTime will keep |
| | 52 | | /// increasing until the operation finishes. E.g. |
| | 53 | | /// 2018-12-25T11:51:27.8705696Z.</param> |
| | 54 | | /// <param name="resourceLocation">When the operation succeeds |
| | 55 | | /// successfully, for snapshot taking operation the snapshot id will be |
| | 56 | | /// included in this field, and for snapshot applying operation, the |
| | 57 | | /// path to get the target object will be returned in this |
| | 58 | | /// field.</param> |
| | 59 | | /// <param name="message">Show failure message when operation fails |
| | 60 | | /// (omitted when operation succeeds).</param> |
| 0 | 61 | | public OperationStatus(OperationStatusType status, System.DateTime createdTime, System.DateTime? lastActionTime |
| | 62 | | { |
| 0 | 63 | | Status = status; |
| 0 | 64 | | CreatedTime = createdTime; |
| 0 | 65 | | LastActionTime = lastActionTime; |
| 0 | 66 | | ResourceLocation = resourceLocation; |
| 0 | 67 | | Message = message; |
| | 68 | | CustomInit(); |
| 0 | 69 | | } |
| | 70 | |
|
| | 71 | | /// <summary> |
| | 72 | | /// An initialization method that performs custom operations like setting defaults |
| | 73 | | /// </summary> |
| | 74 | | partial void CustomInit(); |
| | 75 | |
|
| | 76 | | /// <summary> |
| | 77 | | /// Gets or sets operation status: notstarted, running, succeeded, |
| | 78 | | /// failed. If the operation is requested and waiting to perform, the |
| | 79 | | /// status is notstarted. If the operation is ongoing in backend, the |
| | 80 | | /// status is running. Status succeeded means the operation is |
| | 81 | | /// completed successfully, specifically for snapshot taking operation, |
| | 82 | | /// it illustrates the snapshot is well taken and ready to apply, and |
| | 83 | | /// for snapshot applying operation, it presents the target object has |
| | 84 | | /// finished creating by the snapshot and ready to be used. Status |
| | 85 | | /// failed is often caused by editing the source object while taking |
| | 86 | | /// the snapshot or editing the target object while applying the |
| | 87 | | /// snapshot before completion, see the field "message" to check the |
| | 88 | | /// failure reason. Possible values include: 'notstarted', 'running', |
| | 89 | | /// 'succeeded', 'failed' |
| | 90 | | /// </summary> |
| | 91 | | [JsonProperty(PropertyName = "status")] |
| 128 | 92 | | public OperationStatusType Status { get; set; } |
| | 93 | |
|
| | 94 | | /// <summary> |
| | 95 | | /// Gets or sets a combined UTC date and time string that describes the |
| | 96 | | /// time when the operation (take or apply a snapshot) is requested. |
| | 97 | | /// E.g. 2018-12-25T11:41:02.2331413Z. |
| | 98 | | /// </summary> |
| | 99 | | [JsonProperty(PropertyName = "createdTime")] |
| 0 | 100 | | public System.DateTime CreatedTime { get; set; } |
| | 101 | |
|
| | 102 | | /// <summary> |
| | 103 | | /// Gets or sets a combined UTC date and time string that describes the |
| | 104 | | /// last time the operation (take or apply a snapshot) is actively |
| | 105 | | /// migrating data. The lastActionTime will keep increasing until the |
| | 106 | | /// operation finishes. E.g. 2018-12-25T11:51:27.8705696Z. |
| | 107 | | /// </summary> |
| | 108 | | [JsonProperty(PropertyName = "lastActionTime")] |
| 0 | 109 | | public System.DateTime? LastActionTime { get; set; } |
| | 110 | |
|
| | 111 | | /// <summary> |
| | 112 | | /// Gets or sets when the operation succeeds successfully, for snapshot |
| | 113 | | /// taking operation the snapshot id will be included in this field, |
| | 114 | | /// and for snapshot applying operation, the path to get the target |
| | 115 | | /// object will be returned in this field. |
| | 116 | | /// </summary> |
| | 117 | | [JsonProperty(PropertyName = "resourceLocation")] |
| 32 | 118 | | public string ResourceLocation { get; set; } |
| | 119 | |
|
| | 120 | | /// <summary> |
| | 121 | | /// Gets or sets show failure message when operation fails (omitted |
| | 122 | | /// when operation succeeds). |
| | 123 | | /// </summary> |
| | 124 | | [JsonProperty(PropertyName = "message")] |
| 0 | 125 | | public string Message { get; set; } |
| | 126 | |
|
| | 127 | | /// <summary> |
| | 128 | | /// Validate the object. |
| | 129 | | /// </summary> |
| | 130 | | /// <exception cref="Rest.ValidationException"> |
| | 131 | | /// Thrown if validation fails |
| | 132 | | /// </exception> |
| | 133 | | public virtual void Validate() |
| | 134 | | { |
| 0 | 135 | | } |
| | 136 | | } |
| | 137 | | } |