| | 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 | | /// The schedule according to which Jobs will be created |
| | 18 | | /// </summary> |
| | 19 | | public partial class Schedule |
| | 20 | | { |
| | 21 | | /// <summary> |
| | 22 | | /// Initializes a new instance of the Schedule class. |
| | 23 | | /// </summary> |
| 662 | 24 | | public Schedule() |
| | 25 | | { |
| | 26 | | CustomInit(); |
| 662 | 27 | | } |
| | 28 | |
|
| | 29 | | /// <summary> |
| | 30 | | /// Initializes a new instance of the Schedule class. |
| | 31 | | /// </summary> |
| | 32 | | /// <param name="doNotRunUntil">The earliest time at which any Job may |
| | 33 | | /// be created under this Job Schedule.</param> |
| | 34 | | /// <param name="doNotRunAfter">A time after which no Job will be |
| | 35 | | /// created under this Job Schedule. The schedule will move to the |
| | 36 | | /// completed state as soon as this deadline is past and there is no |
| | 37 | | /// active Job under this Job Schedule.</param> |
| | 38 | | /// <param name="startWindow">The time interval, starting from the time |
| | 39 | | /// at which the schedule indicates a Job should be created, within |
| | 40 | | /// which a Job must be created.</param> |
| | 41 | | /// <param name="recurrenceInterval">The time interval between the |
| | 42 | | /// start times of two successive Jobs under the Job Schedule. A Job |
| | 43 | | /// Schedule can have at most one active Job under it at any given |
| | 44 | | /// time.</param> |
| 2 | 45 | | public Schedule(System.DateTime? doNotRunUntil = default(System.DateTime?), System.DateTime? doNotRunAfter = def |
| | 46 | | { |
| 2 | 47 | | DoNotRunUntil = doNotRunUntil; |
| 2 | 48 | | DoNotRunAfter = doNotRunAfter; |
| 2 | 49 | | StartWindow = startWindow; |
| 2 | 50 | | RecurrenceInterval = recurrenceInterval; |
| | 51 | | CustomInit(); |
| 2 | 52 | | } |
| | 53 | |
|
| | 54 | | /// <summary> |
| | 55 | | /// An initialization method that performs custom operations like setting defaults |
| | 56 | | /// </summary> |
| | 57 | | partial void CustomInit(); |
| | 58 | |
|
| | 59 | | /// <summary> |
| | 60 | | /// Gets or sets the earliest time at which any Job may be created |
| | 61 | | /// under this Job Schedule. |
| | 62 | | /// </summary> |
| | 63 | | /// <remarks> |
| | 64 | | /// If you do not specify a doNotRunUntil time, the schedule becomes |
| | 65 | | /// ready to create Jobs immediately. |
| | 66 | | /// </remarks> |
| | 67 | | [JsonProperty(PropertyName = "doNotRunUntil")] |
| 1589 | 68 | | public System.DateTime? DoNotRunUntil { get; set; } |
| | 69 | |
|
| | 70 | | /// <summary> |
| | 71 | | /// Gets or sets a time after which no Job will be created under this |
| | 72 | | /// Job Schedule. The schedule will move to the completed state as soon |
| | 73 | | /// as this deadline is past and there is no active Job under this Job |
| | 74 | | /// Schedule. |
| | 75 | | /// </summary> |
| | 76 | | /// <remarks> |
| | 77 | | /// If you do not specify a doNotRunAfter time, and you are creating a |
| | 78 | | /// recurring Job Schedule, the Job Schedule will remain active until |
| | 79 | | /// you explicitly terminate it. |
| | 80 | | /// </remarks> |
| | 81 | | [JsonProperty(PropertyName = "doNotRunAfter")] |
| 1600 | 82 | | public System.DateTime? DoNotRunAfter { get; set; } |
| | 83 | |
|
| | 84 | | /// <summary> |
| | 85 | | /// Gets or sets the time interval, starting from the time at which the |
| | 86 | | /// schedule indicates a Job should be created, within which a Job must |
| | 87 | | /// be created. |
| | 88 | | /// </summary> |
| | 89 | | /// <remarks> |
| | 90 | | /// If a Job is not created within the startWindow interval, then the |
| | 91 | | /// 'opportunity' is lost; no Job will be created until the next |
| | 92 | | /// recurrence of the schedule. If the schedule is recurring, and the |
| | 93 | | /// startWindow is longer than the recurrence interval, then this is |
| | 94 | | /// equivalent to an infinite startWindow, because the Job that is |
| | 95 | | /// 'due' in one recurrenceInterval is not carried forward into the |
| | 96 | | /// next recurrence interval. The default is infinite. The minimum |
| | 97 | | /// value is 1 minute. If you specify a lower value, the Batch service |
| | 98 | | /// rejects the schedule with an error; if you are calling the REST API |
| | 99 | | /// directly, the HTTP status code is 400 (Bad Request). |
| | 100 | | /// </remarks> |
| | 101 | | [JsonProperty(PropertyName = "startWindow")] |
| 1581 | 102 | | public System.TimeSpan? StartWindow { get; set; } |
| | 103 | |
|
| | 104 | | /// <summary> |
| | 105 | | /// Gets or sets the time interval between the start times of two |
| | 106 | | /// successive Jobs under the Job Schedule. A Job Schedule can have at |
| | 107 | | /// most one active Job under it at any given time. |
| | 108 | | /// </summary> |
| | 109 | | /// <remarks> |
| | 110 | | /// Because a Job Schedule can have at most one active Job under it at |
| | 111 | | /// any given time, if it is time to create a new Job under a Job |
| | 112 | | /// Schedule, but the previous Job is still running, the Batch service |
| | 113 | | /// will not create the new Job until the previous Job finishes. If the |
| | 114 | | /// previous Job does not finish within the startWindow period of the |
| | 115 | | /// new recurrenceInterval, then no new Job will be scheduled for that |
| | 116 | | /// interval. For recurring Jobs, you should normally specify a |
| | 117 | | /// jobManagerTask in the jobSpecification. If you do not use |
| | 118 | | /// jobManagerTask, you will need an external process to monitor when |
| | 119 | | /// Jobs are created, add Tasks to the Jobs and terminate the Jobs |
| | 120 | | /// ready for the next recurrence. The default is that the schedule |
| | 121 | | /// does not recur: one Job is created, within the startWindow after |
| | 122 | | /// the doNotRunUntil time, and the schedule is complete as soon as |
| | 123 | | /// that Job finishes. The minimum value is 1 minute. If you specify a |
| | 124 | | /// lower value, the Batch service rejects the schedule with an error; |
| | 125 | | /// if you are calling the REST API directly, the HTTP status code is |
| | 126 | | /// 400 (Bad Request). |
| | 127 | | /// </remarks> |
| | 128 | | [JsonProperty(PropertyName = "recurrenceInterval")] |
| 1587 | 129 | | public System.TimeSpan? RecurrenceInterval { get; set; } |
| | 130 | |
|
| | 131 | | } |
| | 132 | | } |