| | 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.Collections; |
| | 15 | | using System.Collections.Generic; |
| | 16 | | using System.Linq; |
| | 17 | |
|
| | 18 | | /// <summary> |
| | 19 | | /// Specifies how the Batch service should respond when the Task completes. |
| | 20 | | /// </summary> |
| | 21 | | public partial class ExitConditions |
| | 22 | | { |
| | 23 | | /// <summary> |
| | 24 | | /// Initializes a new instance of the ExitConditions class. |
| | 25 | | /// </summary> |
| 654 | 26 | | public ExitConditions() |
| | 27 | | { |
| | 28 | | CustomInit(); |
| 654 | 29 | | } |
| | 30 | |
|
| | 31 | | /// <summary> |
| | 32 | | /// Initializes a new instance of the ExitConditions class. |
| | 33 | | /// </summary> |
| | 34 | | /// <param name="exitCodes">A list of individual Task exit codes and |
| | 35 | | /// how the Batch service should respond to them.</param> |
| | 36 | | /// <param name="exitCodeRanges">A list of Task exit code ranges and |
| | 37 | | /// how the Batch service should respond to them.</param> |
| | 38 | | /// <param name="preProcessingError">How the Batch service should |
| | 39 | | /// respond if the Task fails to start due to an error.</param> |
| | 40 | | /// <param name="fileUploadError">How the Batch service should respond |
| | 41 | | /// if a file upload error occurs.</param> |
| | 42 | | /// <param name="defaultProperty">How the Batch service should respond |
| | 43 | | /// if the Task fails with an exit condition not covered by any of the |
| | 44 | | /// other properties.</param> |
| 0 | 45 | | public ExitConditions(IList<ExitCodeMapping> exitCodes = default(IList<ExitCodeMapping>), IList<ExitCodeRangeMap |
| | 46 | | { |
| 0 | 47 | | ExitCodes = exitCodes; |
| 0 | 48 | | ExitCodeRanges = exitCodeRanges; |
| 0 | 49 | | PreProcessingError = preProcessingError; |
| 0 | 50 | | FileUploadError = fileUploadError; |
| 0 | 51 | | DefaultProperty = defaultProperty; |
| | 52 | | CustomInit(); |
| 0 | 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 a list of individual Task exit codes and how the Batch |
| | 62 | | /// service should respond to them. |
| | 63 | | /// </summary> |
| | 64 | | [JsonProperty(PropertyName = "exitCodes")] |
| 1575 | 65 | | public IList<ExitCodeMapping> ExitCodes { get; set; } |
| | 66 | |
|
| | 67 | | /// <summary> |
| | 68 | | /// Gets or sets a list of Task exit code ranges and how the Batch |
| | 69 | | /// service should respond to them. |
| | 70 | | /// </summary> |
| | 71 | | [JsonProperty(PropertyName = "exitCodeRanges")] |
| 1564 | 72 | | public IList<ExitCodeRangeMapping> ExitCodeRanges { get; set; } |
| | 73 | |
|
| | 74 | | /// <summary> |
| | 75 | | /// Gets or sets how the Batch service should respond if the Task fails |
| | 76 | | /// to start due to an error. |
| | 77 | | /// </summary> |
| | 78 | | [JsonProperty(PropertyName = "preProcessingError")] |
| 1570 | 79 | | public ExitOptions PreProcessingError { get; set; } |
| | 80 | |
|
| | 81 | | /// <summary> |
| | 82 | | /// Gets or sets how the Batch service should respond if a file upload |
| | 83 | | /// error occurs. |
| | 84 | | /// </summary> |
| | 85 | | /// <remarks> |
| | 86 | | /// If the Task exited with an exit code that was specified via |
| | 87 | | /// exitCodes or exitCodeRanges, and then encountered a file upload |
| | 88 | | /// error, then the action specified by the exit code takes precedence. |
| | 89 | | /// </remarks> |
| | 90 | | [JsonProperty(PropertyName = "fileUploadError")] |
| 1566 | 91 | | public ExitOptions FileUploadError { get; set; } |
| | 92 | |
|
| | 93 | | /// <summary> |
| | 94 | | /// Gets or sets how the Batch service should respond if the Task fails |
| | 95 | | /// with an exit condition not covered by any of the other properties. |
| | 96 | | /// </summary> |
| | 97 | | /// <remarks> |
| | 98 | | /// This value is used if the Task exits with any nonzero exit code not |
| | 99 | | /// listed in the exitCodes or exitCodeRanges collection, with a |
| | 100 | | /// pre-processing error if the preProcessingError property is not |
| | 101 | | /// present, or with a file upload error if the fileUploadError |
| | 102 | | /// property is not present. If you want non-default behavior on exit |
| | 103 | | /// code 0, you must list it explicitly using the exitCodes or |
| | 104 | | /// exitCodeRanges collection. |
| | 105 | | /// </remarks> |
| | 106 | | [JsonProperty(PropertyName = "default")] |
| 1562 | 107 | | public ExitOptions DefaultProperty { get; set; } |
| | 108 | |
|
| | 109 | | } |
| | 110 | | } |