| | 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.Batch.Protocol.Models |
| | 12 | | { |
| | 13 | | using Newtonsoft.Json; |
| | 14 | | using System.Linq; |
| | 15 | |
|
| | 16 | | /// <summary> |
| | 17 | | /// Result for a single Task added as part of an add Task collection |
| | 18 | | /// operation. |
| | 19 | | /// </summary> |
| | 20 | | public partial class TaskAddResult |
| | 21 | | { |
| | 22 | | /// <summary> |
| | 23 | | /// Initializes a new instance of the TaskAddResult class. |
| | 24 | | /// </summary> |
| 1 | 25 | | public TaskAddResult() |
| | 26 | | { |
| | 27 | | CustomInit(); |
| 1 | 28 | | } |
| | 29 | |
|
| | 30 | | /// <summary> |
| | 31 | | /// Initializes a new instance of the TaskAddResult class. |
| | 32 | | /// </summary> |
| | 33 | | /// <param name="status">The status of the add Task request.</param> |
| | 34 | | /// <param name="taskId">The ID of the Task for which this is the |
| | 35 | | /// result.</param> |
| | 36 | | /// <param name="eTag">The ETag of the Task, if the Task was |
| | 37 | | /// successfully added.</param> |
| | 38 | | /// <param name="lastModified">The last modified time of the |
| | 39 | | /// Task.</param> |
| | 40 | | /// <param name="location">The URL of the Task, if the Task was |
| | 41 | | /// successfully added.</param> |
| | 42 | | /// <param name="error">The error encountered while attempting to add |
| | 43 | | /// the Task.</param> |
| 2 | 44 | | public TaskAddResult(TaskAddStatus status, string taskId, string eTag = default(string), System.DateTime? lastMo |
| | 45 | | { |
| 2 | 46 | | Status = status; |
| 2 | 47 | | TaskId = taskId; |
| 2 | 48 | | ETag = eTag; |
| 2 | 49 | | LastModified = lastModified; |
| 2 | 50 | | Location = location; |
| 2 | 51 | | Error = error; |
| | 52 | | CustomInit(); |
| 2 | 53 | | } |
| | 54 | |
|
| | 55 | | /// <summary> |
| | 56 | | /// An initialization method that performs custom operations like setting defaults |
| | 57 | | /// </summary> |
| | 58 | | partial void CustomInit(); |
| | 59 | |
|
| | 60 | | /// <summary> |
| | 61 | | /// Gets or sets the status of the add Task request. |
| | 62 | | /// </summary> |
| | 63 | | /// <remarks> |
| | 64 | | /// Possible values include: 'success', 'clientError', 'serverError' |
| | 65 | | /// </remarks> |
| | 66 | | [JsonProperty(PropertyName = "status")] |
| 5 | 67 | | public TaskAddStatus Status { get; set; } |
| | 68 | |
|
| | 69 | | /// <summary> |
| | 70 | | /// Gets or sets the ID of the Task for which this is the result. |
| | 71 | | /// </summary> |
| | 72 | | [JsonProperty(PropertyName = "taskId")] |
| 8 | 73 | | public string TaskId { get; set; } |
| | 74 | |
|
| | 75 | | /// <summary> |
| | 76 | | /// Gets or sets the ETag of the Task, if the Task was successfully |
| | 77 | | /// added. |
| | 78 | | /// </summary> |
| | 79 | | /// <remarks> |
| | 80 | | /// You can use this to detect whether the Task has changed between |
| | 81 | | /// requests. In particular, you can be pass the ETag with an Update |
| | 82 | | /// Task request to specify that your changes should take effect only |
| | 83 | | /// if nobody else has modified the Job in the meantime. |
| | 84 | | /// </remarks> |
| | 85 | | [JsonProperty(PropertyName = "eTag")] |
| 5 | 86 | | public string ETag { get; set; } |
| | 87 | |
|
| | 88 | | /// <summary> |
| | 89 | | /// Gets or sets the last modified time of the Task. |
| | 90 | | /// </summary> |
| | 91 | | [JsonProperty(PropertyName = "lastModified")] |
| 5 | 92 | | public System.DateTime? LastModified { get; set; } |
| | 93 | |
|
| | 94 | | /// <summary> |
| | 95 | | /// Gets or sets the URL of the Task, if the Task was successfully |
| | 96 | | /// added. |
| | 97 | | /// </summary> |
| | 98 | | [JsonProperty(PropertyName = "location")] |
| 5 | 99 | | public string Location { get; set; } |
| | 100 | |
|
| | 101 | | /// <summary> |
| | 102 | | /// Gets or sets the error encountered while attempting to add the |
| | 103 | | /// Task. |
| | 104 | | /// </summary> |
| | 105 | | [JsonProperty(PropertyName = "error")] |
| 5 | 106 | | public BatchError Error { get; set; } |
| | 107 | |
|
| | 108 | | } |
| | 109 | | } |