| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. See License.txt in the project root for license information. |
| | 3 | | // |
| | 4 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 5 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 6 | | // regenerated. |
| | 7 | |
|
| | 8 | | // |
| | 9 | | // This file was autogenerated by a tool. |
| | 10 | | // Do not modify it. |
| | 11 | | // |
| | 12 | |
|
| | 13 | | namespace Microsoft.Azure.Batch |
| | 14 | | { |
| | 15 | | using Models = Microsoft.Azure.Batch.Protocol.Models; |
| | 16 | | using System; |
| | 17 | | using System.Collections.Generic; |
| | 18 | | using System.Linq; |
| | 19 | |
|
| | 20 | | /// <summary> |
| | 21 | | /// Result for a single task added as part of a collection of tasks. |
| | 22 | | /// </summary> |
| | 23 | | public partial class AddTaskResult : IPropertyMetadata |
| | 24 | | { |
| | 25 | | #region Constructors |
| | 26 | |
|
| 0 | 27 | | internal AddTaskResult(Models.TaskAddResult protocolObject) |
| | 28 | | { |
| 0 | 29 | | this.Error = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.Error, o => new BatchError(o).Freeze |
| 0 | 30 | | this.ETag = protocolObject.ETag; |
| 0 | 31 | | this.LastModified = protocolObject.LastModified; |
| 0 | 32 | | this.Location = protocolObject.Location; |
| 0 | 33 | | this.Status = UtilitiesInternal.MapEnum<Models.TaskAddStatus, Common.AddTaskStatus>(protocolObject.Status); |
| 0 | 34 | | this.TaskId = protocolObject.TaskId; |
| 0 | 35 | | } |
| | 36 | |
|
| | 37 | | #endregion Constructors |
| | 38 | |
|
| | 39 | | #region AddTaskResult |
| | 40 | |
|
| | 41 | | /// <summary> |
| | 42 | | /// Gets the error caught while attempting to add the task. |
| | 43 | | /// </summary> |
| 0 | 44 | | public BatchError Error { get; } |
| | 45 | |
|
| | 46 | | /// <summary> |
| | 47 | | /// Gets an ETag associated with a successfully added task. |
| | 48 | | /// </summary> |
| 0 | 49 | | public string ETag { get; } |
| | 50 | |
|
| | 51 | | /// <summary> |
| | 52 | | /// Gets the last modified time associated with a successfully added task. |
| | 53 | | /// </summary> |
| 0 | 54 | | public DateTime? LastModified { get; } |
| | 55 | |
|
| | 56 | | /// <summary> |
| | 57 | | /// Gets the URL of a successfully added task. |
| | 58 | | /// </summary> |
| 0 | 59 | | public string Location { get; } |
| | 60 | |
|
| | 61 | | /// <summary> |
| | 62 | | /// Gets the status of the add task request. |
| | 63 | | /// </summary> |
| 0 | 64 | | public Common.AddTaskStatus Status { get; } |
| | 65 | |
|
| | 66 | | /// <summary> |
| | 67 | | /// Gets the id of the task which this result applies to. |
| | 68 | | /// </summary> |
| 0 | 69 | | public string TaskId { get; } |
| | 70 | |
|
| | 71 | | #endregion // AddTaskResult |
| | 72 | |
|
| | 73 | | #region IPropertyMetadata |
| | 74 | |
|
| | 75 | | bool IModifiable.HasBeenModified |
| | 76 | | { |
| | 77 | | //This class is compile time readonly so it cannot have been modified |
| 0 | 78 | | get { return false; } |
| | 79 | | } |
| | 80 | |
|
| | 81 | | bool IReadOnly.IsReadOnly |
| | 82 | | { |
| 0 | 83 | | get { return true; } |
| | 84 | | set |
| | 85 | | { |
| | 86 | | // This class is compile time readonly already |
| 0 | 87 | | } |
| | 88 | | } |
| | 89 | |
|
| | 90 | | #endregion // IPropertyMetadata |
| | 91 | | } |
| | 92 | | } |