1package batch
2
3// Copyright (c) Microsoft and contributors.  All rights reserved.
4//
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13//
14// See the License for the specific language governing permissions and
15// limitations under the License.
16//
17// Code generated by Microsoft (R) AutoRest Code Generator.
18// Changes may cause incorrect behavior and will be lost if the code is regenerated.
19
20import (
21	"github.com/Azure/go-autorest/autorest"
22	"github.com/Azure/go-autorest/autorest/date"
23	"github.com/Azure/go-autorest/autorest/to"
24	"io"
25	"net/http"
26)
27
28// AllocationState enumerates the values for allocation state.
29type AllocationState string
30
31const (
32	// Resizing ...
33	Resizing AllocationState = "resizing"
34	// Steady ...
35	Steady AllocationState = "steady"
36	// Stopping ...
37	Stopping AllocationState = "stopping"
38)
39
40// PossibleAllocationStateValues returns an array of possible values for the AllocationState const type.
41func PossibleAllocationStateValues() []AllocationState {
42	return []AllocationState{Resizing, Steady, Stopping}
43}
44
45// CertificateFormat enumerates the values for certificate format.
46type CertificateFormat string
47
48const (
49	// Cer ...
50	Cer CertificateFormat = "cer"
51	// Pfx ...
52	Pfx CertificateFormat = "pfx"
53	// Unmapped ...
54	Unmapped CertificateFormat = "unmapped"
55)
56
57// PossibleCertificateFormatValues returns an array of possible values for the CertificateFormat const type.
58func PossibleCertificateFormatValues() []CertificateFormat {
59	return []CertificateFormat{Cer, Pfx, Unmapped}
60}
61
62// CertificateState enumerates the values for certificate state.
63type CertificateState string
64
65const (
66	// Active ...
67	Active CertificateState = "active"
68	// Deletefailed ...
69	Deletefailed CertificateState = "deletefailed"
70	// Deleting ...
71	Deleting CertificateState = "deleting"
72)
73
74// PossibleCertificateStateValues returns an array of possible values for the CertificateState const type.
75func PossibleCertificateStateValues() []CertificateState {
76	return []CertificateState{Active, Deletefailed, Deleting}
77}
78
79// CertificateStoreLocation enumerates the values for certificate store location.
80type CertificateStoreLocation string
81
82const (
83	// CertificateStoreLocationCurrentuser ...
84	CertificateStoreLocationCurrentuser CertificateStoreLocation = "currentuser"
85	// CertificateStoreLocationLocalmachine ...
86	CertificateStoreLocationLocalmachine CertificateStoreLocation = "localmachine"
87	// CertificateStoreLocationUnmapped ...
88	CertificateStoreLocationUnmapped CertificateStoreLocation = "unmapped"
89)
90
91// PossibleCertificateStoreLocationValues returns an array of possible values for the CertificateStoreLocation const type.
92func PossibleCertificateStoreLocationValues() []CertificateStoreLocation {
93	return []CertificateStoreLocation{CertificateStoreLocationCurrentuser, CertificateStoreLocationLocalmachine, CertificateStoreLocationUnmapped}
94}
95
96// CertificateVisibility enumerates the values for certificate visibility.
97type CertificateVisibility string
98
99const (
100	// CertificateVisibilityRemoteuser ...
101	CertificateVisibilityRemoteuser CertificateVisibility = "remoteuser"
102	// CertificateVisibilityStarttask ...
103	CertificateVisibilityStarttask CertificateVisibility = "starttask"
104	// CertificateVisibilityTask ...
105	CertificateVisibilityTask CertificateVisibility = "task"
106	// CertificateVisibilityUnmapped ...
107	CertificateVisibilityUnmapped CertificateVisibility = "unmapped"
108)
109
110// PossibleCertificateVisibilityValues returns an array of possible values for the CertificateVisibility const type.
111func PossibleCertificateVisibilityValues() []CertificateVisibility {
112	return []CertificateVisibility{CertificateVisibilityRemoteuser, CertificateVisibilityStarttask, CertificateVisibilityTask, CertificateVisibilityUnmapped}
113}
114
115// ComputeNodeDeallocationOption enumerates the values for compute node deallocation option.
116type ComputeNodeDeallocationOption string
117
118const (
119	// Requeue ...
120	Requeue ComputeNodeDeallocationOption = "requeue"
121	// Retaineddata ...
122	Retaineddata ComputeNodeDeallocationOption = "retaineddata"
123	// Taskcompletion ...
124	Taskcompletion ComputeNodeDeallocationOption = "taskcompletion"
125	// Terminate ...
126	Terminate ComputeNodeDeallocationOption = "terminate"
127)
128
129// PossibleComputeNodeDeallocationOptionValues returns an array of possible values for the ComputeNodeDeallocationOption const type.
130func PossibleComputeNodeDeallocationOptionValues() []ComputeNodeDeallocationOption {
131	return []ComputeNodeDeallocationOption{Requeue, Retaineddata, Taskcompletion, Terminate}
132}
133
134// ComputeNodeFillType enumerates the values for compute node fill type.
135type ComputeNodeFillType string
136
137const (
138	// ComputeNodeFillTypePack ...
139	ComputeNodeFillTypePack ComputeNodeFillType = "pack"
140	// ComputeNodeFillTypeSpread ...
141	ComputeNodeFillTypeSpread ComputeNodeFillType = "spread"
142	// ComputeNodeFillTypeUnmapped ...
143	ComputeNodeFillTypeUnmapped ComputeNodeFillType = "unmapped"
144)
145
146// PossibleComputeNodeFillTypeValues returns an array of possible values for the ComputeNodeFillType const type.
147func PossibleComputeNodeFillTypeValues() []ComputeNodeFillType {
148	return []ComputeNodeFillType{ComputeNodeFillTypePack, ComputeNodeFillTypeSpread, ComputeNodeFillTypeUnmapped}
149}
150
151// ComputeNodeRebootOption enumerates the values for compute node reboot option.
152type ComputeNodeRebootOption string
153
154const (
155	// ComputeNodeRebootOptionRequeue ...
156	ComputeNodeRebootOptionRequeue ComputeNodeRebootOption = "requeue"
157	// ComputeNodeRebootOptionRetaineddata ...
158	ComputeNodeRebootOptionRetaineddata ComputeNodeRebootOption = "retaineddata"
159	// ComputeNodeRebootOptionTaskcompletion ...
160	ComputeNodeRebootOptionTaskcompletion ComputeNodeRebootOption = "taskcompletion"
161	// ComputeNodeRebootOptionTerminate ...
162	ComputeNodeRebootOptionTerminate ComputeNodeRebootOption = "terminate"
163)
164
165// PossibleComputeNodeRebootOptionValues returns an array of possible values for the ComputeNodeRebootOption const type.
166func PossibleComputeNodeRebootOptionValues() []ComputeNodeRebootOption {
167	return []ComputeNodeRebootOption{ComputeNodeRebootOptionRequeue, ComputeNodeRebootOptionRetaineddata, ComputeNodeRebootOptionTaskcompletion, ComputeNodeRebootOptionTerminate}
168}
169
170// ComputeNodeReimageOption enumerates the values for compute node reimage option.
171type ComputeNodeReimageOption string
172
173const (
174	// ComputeNodeReimageOptionRequeue ...
175	ComputeNodeReimageOptionRequeue ComputeNodeReimageOption = "requeue"
176	// ComputeNodeReimageOptionRetaineddata ...
177	ComputeNodeReimageOptionRetaineddata ComputeNodeReimageOption = "retaineddata"
178	// ComputeNodeReimageOptionTaskcompletion ...
179	ComputeNodeReimageOptionTaskcompletion ComputeNodeReimageOption = "taskcompletion"
180	// ComputeNodeReimageOptionTerminate ...
181	ComputeNodeReimageOptionTerminate ComputeNodeReimageOption = "terminate"
182)
183
184// PossibleComputeNodeReimageOptionValues returns an array of possible values for the ComputeNodeReimageOption const type.
185func PossibleComputeNodeReimageOptionValues() []ComputeNodeReimageOption {
186	return []ComputeNodeReimageOption{ComputeNodeReimageOptionRequeue, ComputeNodeReimageOptionRetaineddata, ComputeNodeReimageOptionTaskcompletion, ComputeNodeReimageOptionTerminate}
187}
188
189// ComputeNodeState enumerates the values for compute node state.
190type ComputeNodeState string
191
192const (
193	// Creating ...
194	Creating ComputeNodeState = "creating"
195	// Idle ...
196	Idle ComputeNodeState = "idle"
197	// Leavingpool ...
198	Leavingpool ComputeNodeState = "leavingpool"
199	// Offline ...
200	Offline ComputeNodeState = "offline"
201	// Rebooting ...
202	Rebooting ComputeNodeState = "rebooting"
203	// Reimaging ...
204	Reimaging ComputeNodeState = "reimaging"
205	// Running ...
206	Running ComputeNodeState = "running"
207	// Starting ...
208	Starting ComputeNodeState = "starting"
209	// Starttaskfailed ...
210	Starttaskfailed ComputeNodeState = "starttaskfailed"
211	// Unknown ...
212	Unknown ComputeNodeState = "unknown"
213	// Unusable ...
214	Unusable ComputeNodeState = "unusable"
215	// Waitingforstarttask ...
216	Waitingforstarttask ComputeNodeState = "waitingforstarttask"
217)
218
219// PossibleComputeNodeStateValues returns an array of possible values for the ComputeNodeState const type.
220func PossibleComputeNodeStateValues() []ComputeNodeState {
221	return []ComputeNodeState{Creating, Idle, Leavingpool, Offline, Rebooting, Reimaging, Running, Starting, Starttaskfailed, Unknown, Unusable, Waitingforstarttask}
222}
223
224// DisableComputeNodeSchedulingOption enumerates the values for disable compute node scheduling option.
225type DisableComputeNodeSchedulingOption string
226
227const (
228	// DisableComputeNodeSchedulingOptionRequeue ...
229	DisableComputeNodeSchedulingOptionRequeue DisableComputeNodeSchedulingOption = "requeue"
230	// DisableComputeNodeSchedulingOptionTaskcompletion ...
231	DisableComputeNodeSchedulingOptionTaskcompletion DisableComputeNodeSchedulingOption = "taskcompletion"
232	// DisableComputeNodeSchedulingOptionTerminate ...
233	DisableComputeNodeSchedulingOptionTerminate DisableComputeNodeSchedulingOption = "terminate"
234)
235
236// PossibleDisableComputeNodeSchedulingOptionValues returns an array of possible values for the DisableComputeNodeSchedulingOption const type.
237func PossibleDisableComputeNodeSchedulingOptionValues() []DisableComputeNodeSchedulingOption {
238	return []DisableComputeNodeSchedulingOption{DisableComputeNodeSchedulingOptionRequeue, DisableComputeNodeSchedulingOptionTaskcompletion, DisableComputeNodeSchedulingOptionTerminate}
239}
240
241// DisableJobOption enumerates the values for disable job option.
242type DisableJobOption string
243
244const (
245	// DisableJobOptionRequeue ...
246	DisableJobOptionRequeue DisableJobOption = "requeue"
247	// DisableJobOptionTerminate ...
248	DisableJobOptionTerminate DisableJobOption = "terminate"
249	// DisableJobOptionWait ...
250	DisableJobOptionWait DisableJobOption = "wait"
251)
252
253// PossibleDisableJobOptionValues returns an array of possible values for the DisableJobOption const type.
254func PossibleDisableJobOptionValues() []DisableJobOption {
255	return []DisableJobOption{DisableJobOptionRequeue, DisableJobOptionTerminate, DisableJobOptionWait}
256}
257
258// JobAction enumerates the values for job action.
259type JobAction string
260
261const (
262	// JobActionDisable ...
263	JobActionDisable JobAction = "disable"
264	// JobActionNone ...
265	JobActionNone JobAction = "none"
266	// JobActionTerminate ...
267	JobActionTerminate JobAction = "terminate"
268)
269
270// PossibleJobActionValues returns an array of possible values for the JobAction const type.
271func PossibleJobActionValues() []JobAction {
272	return []JobAction{JobActionDisable, JobActionNone, JobActionTerminate}
273}
274
275// JobPreparationTaskState enumerates the values for job preparation task state.
276type JobPreparationTaskState string
277
278const (
279	// JobPreparationTaskStateCompleted ...
280	JobPreparationTaskStateCompleted JobPreparationTaskState = "completed"
281	// JobPreparationTaskStateRunning ...
282	JobPreparationTaskStateRunning JobPreparationTaskState = "running"
283)
284
285// PossibleJobPreparationTaskStateValues returns an array of possible values for the JobPreparationTaskState const type.
286func PossibleJobPreparationTaskStateValues() []JobPreparationTaskState {
287	return []JobPreparationTaskState{JobPreparationTaskStateCompleted, JobPreparationTaskStateRunning}
288}
289
290// JobReleaseTaskState enumerates the values for job release task state.
291type JobReleaseTaskState string
292
293const (
294	// JobReleaseTaskStateCompleted ...
295	JobReleaseTaskStateCompleted JobReleaseTaskState = "completed"
296	// JobReleaseTaskStateRunning ...
297	JobReleaseTaskStateRunning JobReleaseTaskState = "running"
298)
299
300// PossibleJobReleaseTaskStateValues returns an array of possible values for the JobReleaseTaskState const type.
301func PossibleJobReleaseTaskStateValues() []JobReleaseTaskState {
302	return []JobReleaseTaskState{JobReleaseTaskStateCompleted, JobReleaseTaskStateRunning}
303}
304
305// JobScheduleState enumerates the values for job schedule state.
306type JobScheduleState string
307
308const (
309	// JobScheduleStateActive ...
310	JobScheduleStateActive JobScheduleState = "active"
311	// JobScheduleStateCompleted ...
312	JobScheduleStateCompleted JobScheduleState = "completed"
313	// JobScheduleStateDeleting ...
314	JobScheduleStateDeleting JobScheduleState = "deleting"
315	// JobScheduleStateDisabled ...
316	JobScheduleStateDisabled JobScheduleState = "disabled"
317	// JobScheduleStateTerminating ...
318	JobScheduleStateTerminating JobScheduleState = "terminating"
319)
320
321// PossibleJobScheduleStateValues returns an array of possible values for the JobScheduleState const type.
322func PossibleJobScheduleStateValues() []JobScheduleState {
323	return []JobScheduleState{JobScheduleStateActive, JobScheduleStateCompleted, JobScheduleStateDeleting, JobScheduleStateDisabled, JobScheduleStateTerminating}
324}
325
326// JobState enumerates the values for job state.
327type JobState string
328
329const (
330	// JobStateActive ...
331	JobStateActive JobState = "active"
332	// JobStateCompleted ...
333	JobStateCompleted JobState = "completed"
334	// JobStateDeleting ...
335	JobStateDeleting JobState = "deleting"
336	// JobStateDisabled ...
337	JobStateDisabled JobState = "disabled"
338	// JobStateDisabling ...
339	JobStateDisabling JobState = "disabling"
340	// JobStateEnabling ...
341	JobStateEnabling JobState = "enabling"
342	// JobStateTerminating ...
343	JobStateTerminating JobState = "terminating"
344)
345
346// PossibleJobStateValues returns an array of possible values for the JobState const type.
347func PossibleJobStateValues() []JobState {
348	return []JobState{JobStateActive, JobStateCompleted, JobStateDeleting, JobStateDisabled, JobStateDisabling, JobStateEnabling, JobStateTerminating}
349}
350
351// OnAllTasksComplete enumerates the values for on all tasks complete.
352type OnAllTasksComplete string
353
354const (
355	// NoAction ...
356	NoAction OnAllTasksComplete = "noAction"
357	// TerminateJob ...
358	TerminateJob OnAllTasksComplete = "terminateJob"
359)
360
361// PossibleOnAllTasksCompleteValues returns an array of possible values for the OnAllTasksComplete const type.
362func PossibleOnAllTasksCompleteValues() []OnAllTasksComplete {
363	return []OnAllTasksComplete{NoAction, TerminateJob}
364}
365
366// OnTaskFailure enumerates the values for on task failure.
367type OnTaskFailure string
368
369const (
370	// OnTaskFailureNoAction ...
371	OnTaskFailureNoAction OnTaskFailure = "noAction"
372	// OnTaskFailurePerformExitOptionsJobAction ...
373	OnTaskFailurePerformExitOptionsJobAction OnTaskFailure = "performExitOptionsJobAction"
374)
375
376// PossibleOnTaskFailureValues returns an array of possible values for the OnTaskFailure const type.
377func PossibleOnTaskFailureValues() []OnTaskFailure {
378	return []OnTaskFailure{OnTaskFailureNoAction, OnTaskFailurePerformExitOptionsJobAction}
379}
380
381// OSType enumerates the values for os type.
382type OSType string
383
384const (
385	// OSTypeLinux ...
386	OSTypeLinux OSType = "linux"
387	// OSTypeUnmapped ...
388	OSTypeUnmapped OSType = "unmapped"
389	// OSTypeWindows ...
390	OSTypeWindows OSType = "windows"
391)
392
393// PossibleOSTypeValues returns an array of possible values for the OSType const type.
394func PossibleOSTypeValues() []OSType {
395	return []OSType{OSTypeLinux, OSTypeUnmapped, OSTypeWindows}
396}
397
398// PoolLifetimeOption enumerates the values for pool lifetime option.
399type PoolLifetimeOption string
400
401const (
402	// PoolLifetimeOptionJob ...
403	PoolLifetimeOptionJob PoolLifetimeOption = "job"
404	// PoolLifetimeOptionJobschedule ...
405	PoolLifetimeOptionJobschedule PoolLifetimeOption = "jobschedule"
406	// PoolLifetimeOptionUnmapped ...
407	PoolLifetimeOptionUnmapped PoolLifetimeOption = "unmapped"
408)
409
410// PossiblePoolLifetimeOptionValues returns an array of possible values for the PoolLifetimeOption const type.
411func PossiblePoolLifetimeOptionValues() []PoolLifetimeOption {
412	return []PoolLifetimeOption{PoolLifetimeOptionJob, PoolLifetimeOptionJobschedule, PoolLifetimeOptionUnmapped}
413}
414
415// PoolState enumerates the values for pool state.
416type PoolState string
417
418const (
419	// PoolStateActive ...
420	PoolStateActive PoolState = "active"
421	// PoolStateDeleting ...
422	PoolStateDeleting PoolState = "deleting"
423	// PoolStateUpgrading ...
424	PoolStateUpgrading PoolState = "upgrading"
425)
426
427// PossiblePoolStateValues returns an array of possible values for the PoolState const type.
428func PossiblePoolStateValues() []PoolState {
429	return []PoolState{PoolStateActive, PoolStateDeleting, PoolStateUpgrading}
430}
431
432// SchedulingErrorCategory enumerates the values for scheduling error category.
433type SchedulingErrorCategory string
434
435const (
436	// SchedulingErrorCategoryServererror ...
437	SchedulingErrorCategoryServererror SchedulingErrorCategory = "servererror"
438	// SchedulingErrorCategoryUnmapped ...
439	SchedulingErrorCategoryUnmapped SchedulingErrorCategory = "unmapped"
440	// SchedulingErrorCategoryUsererror ...
441	SchedulingErrorCategoryUsererror SchedulingErrorCategory = "usererror"
442)
443
444// PossibleSchedulingErrorCategoryValues returns an array of possible values for the SchedulingErrorCategory const type.
445func PossibleSchedulingErrorCategoryValues() []SchedulingErrorCategory {
446	return []SchedulingErrorCategory{SchedulingErrorCategoryServererror, SchedulingErrorCategoryUnmapped, SchedulingErrorCategoryUsererror}
447}
448
449// SchedulingState enumerates the values for scheduling state.
450type SchedulingState string
451
452const (
453	// Disabled ...
454	Disabled SchedulingState = "disabled"
455	// Enabled ...
456	Enabled SchedulingState = "enabled"
457)
458
459// PossibleSchedulingStateValues returns an array of possible values for the SchedulingState const type.
460func PossibleSchedulingStateValues() []SchedulingState {
461	return []SchedulingState{Disabled, Enabled}
462}
463
464// StartTaskState enumerates the values for start task state.
465type StartTaskState string
466
467const (
468	// StartTaskStateCompleted ...
469	StartTaskStateCompleted StartTaskState = "completed"
470	// StartTaskStateRunning ...
471	StartTaskStateRunning StartTaskState = "running"
472)
473
474// PossibleStartTaskStateValues returns an array of possible values for the StartTaskState const type.
475func PossibleStartTaskStateValues() []StartTaskState {
476	return []StartTaskState{StartTaskStateCompleted, StartTaskStateRunning}
477}
478
479// TaskAddStatus enumerates the values for task add status.
480type TaskAddStatus string
481
482const (
483	// TaskAddStatusClienterror ...
484	TaskAddStatusClienterror TaskAddStatus = "clienterror"
485	// TaskAddStatusServererror ...
486	TaskAddStatusServererror TaskAddStatus = "servererror"
487	// TaskAddStatusSuccess ...
488	TaskAddStatusSuccess TaskAddStatus = "success"
489	// TaskAddStatusUnmapped ...
490	TaskAddStatusUnmapped TaskAddStatus = "unmapped"
491)
492
493// PossibleTaskAddStatusValues returns an array of possible values for the TaskAddStatus const type.
494func PossibleTaskAddStatusValues() []TaskAddStatus {
495	return []TaskAddStatus{TaskAddStatusClienterror, TaskAddStatusServererror, TaskAddStatusSuccess, TaskAddStatusUnmapped}
496}
497
498// TaskState enumerates the values for task state.
499type TaskState string
500
501const (
502	// TaskStateActive ...
503	TaskStateActive TaskState = "active"
504	// TaskStateCompleted ...
505	TaskStateCompleted TaskState = "completed"
506	// TaskStatePreparing ...
507	TaskStatePreparing TaskState = "preparing"
508	// TaskStateRunning ...
509	TaskStateRunning TaskState = "running"
510)
511
512// PossibleTaskStateValues returns an array of possible values for the TaskState const type.
513func PossibleTaskStateValues() []TaskState {
514	return []TaskState{TaskStateActive, TaskStateCompleted, TaskStatePreparing, TaskStateRunning}
515}
516
517// AccountListNodeAgentSkusResult ...
518type AccountListNodeAgentSkusResult struct {
519	autorest.Response `json:"-"`
520	Value             *[]NodeAgentSku `json:"value,omitempty"`
521	OdataNextLink     *string         `json:"odata.nextLink,omitempty"`
522}
523
524// AccountListNodeAgentSkusResultIterator provides access to a complete listing of NodeAgentSku values.
525type AccountListNodeAgentSkusResultIterator struct {
526	i    int
527	page AccountListNodeAgentSkusResultPage
528}
529
530// Next advances to the next value.  If there was an error making
531// the request the iterator does not advance and the error is returned.
532func (iter *AccountListNodeAgentSkusResultIterator) Next() error {
533	iter.i++
534	if iter.i < len(iter.page.Values()) {
535		return nil
536	}
537	err := iter.page.Next()
538	if err != nil {
539		iter.i--
540		return err
541	}
542	iter.i = 0
543	return nil
544}
545
546// NotDone returns true if the enumeration should be started or is not yet complete.
547func (iter AccountListNodeAgentSkusResultIterator) NotDone() bool {
548	return iter.page.NotDone() && iter.i < len(iter.page.Values())
549}
550
551// Response returns the raw server response from the last page request.
552func (iter AccountListNodeAgentSkusResultIterator) Response() AccountListNodeAgentSkusResult {
553	return iter.page.Response()
554}
555
556// Value returns the current value or a zero-initialized value if the
557// iterator has advanced beyond the end of the collection.
558func (iter AccountListNodeAgentSkusResultIterator) Value() NodeAgentSku {
559	if !iter.page.NotDone() {
560		return NodeAgentSku{}
561	}
562	return iter.page.Values()[iter.i]
563}
564
565// IsEmpty returns true if the ListResult contains no values.
566func (alnasr AccountListNodeAgentSkusResult) IsEmpty() bool {
567	return alnasr.Value == nil || len(*alnasr.Value) == 0
568}
569
570// accountListNodeAgentSkusResultPreparer prepares a request to retrieve the next set of results.
571// It returns nil if no more results exist.
572func (alnasr AccountListNodeAgentSkusResult) accountListNodeAgentSkusResultPreparer() (*http.Request, error) {
573	if alnasr.OdataNextLink == nil || len(to.String(alnasr.OdataNextLink)) < 1 {
574		return nil, nil
575	}
576	return autorest.Prepare(&http.Request{},
577		autorest.AsJSON(),
578		autorest.AsGet(),
579		autorest.WithBaseURL(to.String(alnasr.OdataNextLink)))
580}
581
582// AccountListNodeAgentSkusResultPage contains a page of NodeAgentSku values.
583type AccountListNodeAgentSkusResultPage struct {
584	fn     func(AccountListNodeAgentSkusResult) (AccountListNodeAgentSkusResult, error)
585	alnasr AccountListNodeAgentSkusResult
586}
587
588// Next advances to the next page of values.  If there was an error making
589// the request the page does not advance and the error is returned.
590func (page *AccountListNodeAgentSkusResultPage) Next() error {
591	next, err := page.fn(page.alnasr)
592	if err != nil {
593		return err
594	}
595	page.alnasr = next
596	return nil
597}
598
599// NotDone returns true if the page enumeration should be started or is not yet complete.
600func (page AccountListNodeAgentSkusResultPage) NotDone() bool {
601	return !page.alnasr.IsEmpty()
602}
603
604// Response returns the raw server response from the last page request.
605func (page AccountListNodeAgentSkusResultPage) Response() AccountListNodeAgentSkusResult {
606	return page.alnasr
607}
608
609// Values returns the slice of values for the current page or nil if there are no values.
610func (page AccountListNodeAgentSkusResultPage) Values() []NodeAgentSku {
611	if page.alnasr.IsEmpty() {
612		return nil
613	}
614	return *page.alnasr.Value
615}
616
617// AffinityInformation ...
618type AffinityInformation struct {
619	// AffinityID - You can pass the affinityId of a compute node or task to indicate that this task needs to be placed close to the node or task.
620	AffinityID *string `json:"affinityId,omitempty"`
621}
622
623// ApplicationListResult ...
624type ApplicationListResult struct {
625	autorest.Response `json:"-"`
626	Value             *[]ApplicationSummary `json:"value,omitempty"`
627	OdataNextLink     *string               `json:"odata.nextLink,omitempty"`
628}
629
630// ApplicationListResultIterator provides access to a complete listing of ApplicationSummary values.
631type ApplicationListResultIterator struct {
632	i    int
633	page ApplicationListResultPage
634}
635
636// Next advances to the next value.  If there was an error making
637// the request the iterator does not advance and the error is returned.
638func (iter *ApplicationListResultIterator) Next() error {
639	iter.i++
640	if iter.i < len(iter.page.Values()) {
641		return nil
642	}
643	err := iter.page.Next()
644	if err != nil {
645		iter.i--
646		return err
647	}
648	iter.i = 0
649	return nil
650}
651
652// NotDone returns true if the enumeration should be started or is not yet complete.
653func (iter ApplicationListResultIterator) NotDone() bool {
654	return iter.page.NotDone() && iter.i < len(iter.page.Values())
655}
656
657// Response returns the raw server response from the last page request.
658func (iter ApplicationListResultIterator) Response() ApplicationListResult {
659	return iter.page.Response()
660}
661
662// Value returns the current value or a zero-initialized value if the
663// iterator has advanced beyond the end of the collection.
664func (iter ApplicationListResultIterator) Value() ApplicationSummary {
665	if !iter.page.NotDone() {
666		return ApplicationSummary{}
667	}
668	return iter.page.Values()[iter.i]
669}
670
671// IsEmpty returns true if the ListResult contains no values.
672func (alr ApplicationListResult) IsEmpty() bool {
673	return alr.Value == nil || len(*alr.Value) == 0
674}
675
676// applicationListResultPreparer prepares a request to retrieve the next set of results.
677// It returns nil if no more results exist.
678func (alr ApplicationListResult) applicationListResultPreparer() (*http.Request, error) {
679	if alr.OdataNextLink == nil || len(to.String(alr.OdataNextLink)) < 1 {
680		return nil, nil
681	}
682	return autorest.Prepare(&http.Request{},
683		autorest.AsJSON(),
684		autorest.AsGet(),
685		autorest.WithBaseURL(to.String(alr.OdataNextLink)))
686}
687
688// ApplicationListResultPage contains a page of ApplicationSummary values.
689type ApplicationListResultPage struct {
690	fn  func(ApplicationListResult) (ApplicationListResult, error)
691	alr ApplicationListResult
692}
693
694// Next advances to the next page of values.  If there was an error making
695// the request the page does not advance and the error is returned.
696func (page *ApplicationListResultPage) Next() error {
697	next, err := page.fn(page.alr)
698	if err != nil {
699		return err
700	}
701	page.alr = next
702	return nil
703}
704
705// NotDone returns true if the page enumeration should be started or is not yet complete.
706func (page ApplicationListResultPage) NotDone() bool {
707	return !page.alr.IsEmpty()
708}
709
710// Response returns the raw server response from the last page request.
711func (page ApplicationListResultPage) Response() ApplicationListResult {
712	return page.alr
713}
714
715// Values returns the slice of values for the current page or nil if there are no values.
716func (page ApplicationListResultPage) Values() []ApplicationSummary {
717	if page.alr.IsEmpty() {
718		return nil
719	}
720	return *page.alr.Value
721}
722
723// ApplicationPackageReference ...
724type ApplicationPackageReference struct {
725	ApplicationID *string `json:"applicationId,omitempty"`
726	// Version - If this is omitted, and no default version is specified for this application, the request fails with the error code InvalidApplicationPackageReferences. If you are calling the REST API directly, the HTTP status code is 409.
727	Version *string `json:"version,omitempty"`
728}
729
730// ApplicationSummary ...
731type ApplicationSummary struct {
732	autorest.Response `json:"-"`
733	ID                *string   `json:"id,omitempty"`
734	DisplayName       *string   `json:"displayName,omitempty"`
735	Versions          *[]string `json:"versions,omitempty"`
736}
737
738// AutoPoolSpecification ...
739type AutoPoolSpecification struct {
740	// AutoPoolIDPrefix - The Batch service assigns each auto pool a unique identifier on creation. To distinguish between pools created for different purposes, you can specify this element to add a prefix to the id that is assigned. The prefix can be up to 20 characters long.
741	AutoPoolIDPrefix *string `json:"autoPoolIdPrefix,omitempty"`
742	// PoolLifetimeOption - When the pool lifetime scope is jobschedule level, the Batch service keeps track of the last autopool created for the jobschedule, and deletes that pool when the jobschedule completes. Batch will also delete this pool if the user updates the auto pool specification in a way that changes this lifetime. Possible values include: 'PoolLifetimeOptionJobschedule', 'PoolLifetimeOptionJob', 'PoolLifetimeOptionUnmapped'
743	PoolLifetimeOption PoolLifetimeOption `json:"poolLifetimeOption,omitempty"`
744	// KeepAlive - If false, the Batch service deletes the pool once its lifetime (as determined by the poolLifetimeOption setting) expires; that is, when the job or job schedule completes. If true, the Batch service does not delete the pool automatically. It is up to the user to delete auto pools created with this option.
745	KeepAlive *bool              `json:"keepAlive,omitempty"`
746	Pool      *PoolSpecification `json:"pool,omitempty"`
747}
748
749// AutoScaleRun ...
750type AutoScaleRun struct {
751	autorest.Response `json:"-"`
752	Timestamp         *date.Time `json:"timestamp,omitempty"`
753	// Results - Each variable value is returned in the form $variable=value, and variables are separated by semicolons.
754	Results *string            `json:"results,omitempty"`
755	Error   *AutoScaleRunError `json:"error,omitempty"`
756}
757
758// AutoScaleRunError ...
759type AutoScaleRunError struct {
760	Code    *string          `json:"code,omitempty"`
761	Message *string          `json:"message,omitempty"`
762	Values  *[]NameValuePair `json:"values,omitempty"`
763}
764
765// Certificate a certificate that can be installed on compute nodes and can be used to authenticate operations on
766// the machine.
767type Certificate struct {
768	autorest.Response   `json:"-"`
769	Thumbprint          *string `json:"thumbprint,omitempty"`
770	ThumbprintAlgorithm *string `json:"thumbprintAlgorithm,omitempty"`
771	URL                 *string `json:"url,omitempty"`
772	// State - Possible values include: 'Active', 'Deleting', 'Deletefailed'
773	State               CertificateState `json:"state,omitempty"`
774	StateTransitionTime *date.Time       `json:"stateTransitionTime,omitempty"`
775	// PreviousState - This property is not set if the certificate is in its initial Active state. Possible values include: 'Active', 'Deleting', 'Deletefailed'
776	PreviousState CertificateState `json:"previousState,omitempty"`
777	// PreviousStateTransitionTime - This property is not set if the certificate is in its initial Active state.
778	PreviousStateTransitionTime *date.Time `json:"previousStateTransitionTime,omitempty"`
779	PublicData                  *string    `json:"publicData,omitempty"`
780	// DeleteCertificateError - This property is set only if the certificate is in the DeleteFailed state.
781	DeleteCertificateError *DeleteCertificateError `json:"deleteCertificateError,omitempty"`
782}
783
784// CertificateAddParameter ...
785type CertificateAddParameter struct {
786	Thumbprint          *string `json:"thumbprint,omitempty"`
787	ThumbprintAlgorithm *string `json:"thumbprintAlgorithm,omitempty"`
788	Data                *string `json:"data,omitempty"`
789	// CertificateFormat - Possible values include: 'Pfx', 'Cer', 'Unmapped'
790	CertificateFormat CertificateFormat `json:"certificateFormat,omitempty"`
791	// Password - This is required if the certificate format is pfx. It should be omitted if the certificate format is cer.
792	Password *string `json:"password,omitempty"`
793}
794
795// CertificateListResult ...
796type CertificateListResult struct {
797	autorest.Response `json:"-"`
798	Value             *[]Certificate `json:"value,omitempty"`
799	OdataNextLink     *string        `json:"odata.nextLink,omitempty"`
800}
801
802// CertificateListResultIterator provides access to a complete listing of Certificate values.
803type CertificateListResultIterator struct {
804	i    int
805	page CertificateListResultPage
806}
807
808// Next advances to the next value.  If there was an error making
809// the request the iterator does not advance and the error is returned.
810func (iter *CertificateListResultIterator) Next() error {
811	iter.i++
812	if iter.i < len(iter.page.Values()) {
813		return nil
814	}
815	err := iter.page.Next()
816	if err != nil {
817		iter.i--
818		return err
819	}
820	iter.i = 0
821	return nil
822}
823
824// NotDone returns true if the enumeration should be started or is not yet complete.
825func (iter CertificateListResultIterator) NotDone() bool {
826	return iter.page.NotDone() && iter.i < len(iter.page.Values())
827}
828
829// Response returns the raw server response from the last page request.
830func (iter CertificateListResultIterator) Response() CertificateListResult {
831	return iter.page.Response()
832}
833
834// Value returns the current value or a zero-initialized value if the
835// iterator has advanced beyond the end of the collection.
836func (iter CertificateListResultIterator) Value() Certificate {
837	if !iter.page.NotDone() {
838		return Certificate{}
839	}
840	return iter.page.Values()[iter.i]
841}
842
843// IsEmpty returns true if the ListResult contains no values.
844func (clr CertificateListResult) IsEmpty() bool {
845	return clr.Value == nil || len(*clr.Value) == 0
846}
847
848// certificateListResultPreparer prepares a request to retrieve the next set of results.
849// It returns nil if no more results exist.
850func (clr CertificateListResult) certificateListResultPreparer() (*http.Request, error) {
851	if clr.OdataNextLink == nil || len(to.String(clr.OdataNextLink)) < 1 {
852		return nil, nil
853	}
854	return autorest.Prepare(&http.Request{},
855		autorest.AsJSON(),
856		autorest.AsGet(),
857		autorest.WithBaseURL(to.String(clr.OdataNextLink)))
858}
859
860// CertificateListResultPage contains a page of Certificate values.
861type CertificateListResultPage struct {
862	fn  func(CertificateListResult) (CertificateListResult, error)
863	clr CertificateListResult
864}
865
866// Next advances to the next page of values.  If there was an error making
867// the request the page does not advance and the error is returned.
868func (page *CertificateListResultPage) Next() error {
869	next, err := page.fn(page.clr)
870	if err != nil {
871		return err
872	}
873	page.clr = next
874	return nil
875}
876
877// NotDone returns true if the page enumeration should be started or is not yet complete.
878func (page CertificateListResultPage) NotDone() bool {
879	return !page.clr.IsEmpty()
880}
881
882// Response returns the raw server response from the last page request.
883func (page CertificateListResultPage) Response() CertificateListResult {
884	return page.clr
885}
886
887// Values returns the slice of values for the current page or nil if there are no values.
888func (page CertificateListResultPage) Values() []Certificate {
889	if page.clr.IsEmpty() {
890		return nil
891	}
892	return *page.clr.Value
893}
894
895// CertificateReference ...
896type CertificateReference struct {
897	Thumbprint          *string `json:"thumbprint,omitempty"`
898	ThumbprintAlgorithm *string `json:"thumbprintAlgorithm,omitempty"`
899	// StoreLocation - The default value is CurrentUser. This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of remoteuser, a certs directory is created in the user's home directory (e.g., /home/<user-name>/certs) where certificates are placed. Possible values include: 'CertificateStoreLocationCurrentuser', 'CertificateStoreLocationLocalmachine', 'CertificateStoreLocationUnmapped'
900	StoreLocation CertificateStoreLocation `json:"storeLocation,omitempty"`
901	// StoreName - The default value is My. This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference).
902	StoreName *string `json:"storeName,omitempty"`
903	// Visibility - The default is all accounts.
904	Visibility *[]CertificateVisibility `json:"visibility,omitempty"`
905}
906
907// CloudJob ...
908type CloudJob struct {
909	autorest.Response `json:"-"`
910	// ID - The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. It is common to use a GUID for the id.
911	ID                   *string `json:"id,omitempty"`
912	DisplayName          *string `json:"displayName,omitempty"`
913	UsesTaskDependencies *bool   `json:"usesTaskDependencies,omitempty"`
914	URL                  *string `json:"url,omitempty"`
915	// ETag - This is an opaque string. You can use it to detect whether the job has changed between requests. In particular, you can be pass the ETag when updating a job to specify that your changes should take effect only if nobody else has modified the job in the meantime.
916	ETag *string `json:"eTag,omitempty"`
917	// LastModified - This is the last time at which the job level data, such as the job state or priority, changed. It does not factor in task-level changes such as adding new tasks or tasks changing state.
918	LastModified *date.Time `json:"lastModified,omitempty"`
919	CreationTime *date.Time `json:"creationTime,omitempty"`
920	// State - Possible values include: 'JobStateActive', 'JobStateDisabling', 'JobStateDisabled', 'JobStateEnabling', 'JobStateTerminating', 'JobStateCompleted', 'JobStateDeleting'
921	State               JobState   `json:"state,omitempty"`
922	StateTransitionTime *date.Time `json:"stateTransitionTime,omitempty"`
923	// PreviousState - This property is not set if the job is in its initial Active state. Possible values include: 'JobStateActive', 'JobStateDisabling', 'JobStateDisabled', 'JobStateEnabling', 'JobStateTerminating', 'JobStateCompleted', 'JobStateDeleting'
924	PreviousState JobState `json:"previousState,omitempty"`
925	// PreviousStateTransitionTime - This property is not set if the job is in its initial Active state.
926	PreviousStateTransitionTime *date.Time `json:"previousStateTransitionTime,omitempty"`
927	// Priority - Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0.
928	Priority       *int32          `json:"priority,omitempty"`
929	Constraints    *JobConstraints `json:"constraints,omitempty"`
930	JobManagerTask *JobManagerTask `json:"jobManagerTask,omitempty"`
931	// JobPreparationTask - The Job Preparation task is a special task run on each node before any other task of the job.
932	JobPreparationTask *JobPreparationTask `json:"jobPreparationTask,omitempty"`
933	// JobReleaseTask - The Job Release task is a special task run at the end of the job on each node that has run any other task of the job.
934	JobReleaseTask            *JobReleaseTask       `json:"jobReleaseTask,omitempty"`
935	CommonEnvironmentSettings *[]EnvironmentSetting `json:"commonEnvironmentSettings,omitempty"`
936	PoolInfo                  *PoolInformation      `json:"poolInfo,omitempty"`
937	// OnAllTasksComplete - Permitted values are: noaction – do nothing. The job remains active unless terminated or disabled by some other means. terminatejob – terminate the job. The job's terminateReason is set to 'AllTasksComplete'. The default is noaction. Possible values include: 'NoAction', 'TerminateJob'
938	OnAllTasksComplete OnAllTasksComplete `json:"onAllTasksComplete,omitempty"`
939	// OnTaskFailure - Permitted values are: noaction – do nothing. performexitoptionsjobaction – take the action associated with the task exit condition in the task's exitConditions collection. (This may still result in no action being taken, if that is what the task specifies.) The default is noaction. Possible values include: 'OnTaskFailureNoAction', 'OnTaskFailurePerformExitOptionsJobAction'
940	OnTaskFailure OnTaskFailure `json:"onTaskFailure,omitempty"`
941	// Metadata - The Batch service does not assign any meaning to metadata; it is solely for the use of user code.
942	Metadata      *[]MetadataItem          `json:"metadata,omitempty"`
943	ExecutionInfo *JobExecutionInformation `json:"executionInfo,omitempty"`
944	Stats         *JobStatistics           `json:"stats,omitempty"`
945}
946
947// CloudJobListPreparationAndReleaseTaskStatusResult ...
948type CloudJobListPreparationAndReleaseTaskStatusResult struct {
949	autorest.Response `json:"-"`
950	Value             *[]JobPreparationAndReleaseTaskExecutionInformation `json:"value,omitempty"`
951	OdataNextLink     *string                                             `json:"odata.nextLink,omitempty"`
952}
953
954// CloudJobListPreparationAndReleaseTaskStatusResultIterator provides access to a complete listing of
955// JobPreparationAndReleaseTaskExecutionInformation values.
956type CloudJobListPreparationAndReleaseTaskStatusResultIterator struct {
957	i    int
958	page CloudJobListPreparationAndReleaseTaskStatusResultPage
959}
960
961// Next advances to the next value.  If there was an error making
962// the request the iterator does not advance and the error is returned.
963func (iter *CloudJobListPreparationAndReleaseTaskStatusResultIterator) Next() error {
964	iter.i++
965	if iter.i < len(iter.page.Values()) {
966		return nil
967	}
968	err := iter.page.Next()
969	if err != nil {
970		iter.i--
971		return err
972	}
973	iter.i = 0
974	return nil
975}
976
977// NotDone returns true if the enumeration should be started or is not yet complete.
978func (iter CloudJobListPreparationAndReleaseTaskStatusResultIterator) NotDone() bool {
979	return iter.page.NotDone() && iter.i < len(iter.page.Values())
980}
981
982// Response returns the raw server response from the last page request.
983func (iter CloudJobListPreparationAndReleaseTaskStatusResultIterator) Response() CloudJobListPreparationAndReleaseTaskStatusResult {
984	return iter.page.Response()
985}
986
987// Value returns the current value or a zero-initialized value if the
988// iterator has advanced beyond the end of the collection.
989func (iter CloudJobListPreparationAndReleaseTaskStatusResultIterator) Value() JobPreparationAndReleaseTaskExecutionInformation {
990	if !iter.page.NotDone() {
991		return JobPreparationAndReleaseTaskExecutionInformation{}
992	}
993	return iter.page.Values()[iter.i]
994}
995
996// IsEmpty returns true if the ListResult contains no values.
997func (cjlpartsr CloudJobListPreparationAndReleaseTaskStatusResult) IsEmpty() bool {
998	return cjlpartsr.Value == nil || len(*cjlpartsr.Value) == 0
999}
1000
1001// cloudJobListPreparationAndReleaseTaskStatusResultPreparer prepares a request to retrieve the next set of results.
1002// It returns nil if no more results exist.
1003func (cjlpartsr CloudJobListPreparationAndReleaseTaskStatusResult) cloudJobListPreparationAndReleaseTaskStatusResultPreparer() (*http.Request, error) {
1004	if cjlpartsr.OdataNextLink == nil || len(to.String(cjlpartsr.OdataNextLink)) < 1 {
1005		return nil, nil
1006	}
1007	return autorest.Prepare(&http.Request{},
1008		autorest.AsJSON(),
1009		autorest.AsGet(),
1010		autorest.WithBaseURL(to.String(cjlpartsr.OdataNextLink)))
1011}
1012
1013// CloudJobListPreparationAndReleaseTaskStatusResultPage contains a page of
1014// JobPreparationAndReleaseTaskExecutionInformation values.
1015type CloudJobListPreparationAndReleaseTaskStatusResultPage struct {
1016	fn        func(CloudJobListPreparationAndReleaseTaskStatusResult) (CloudJobListPreparationAndReleaseTaskStatusResult, error)
1017	cjlpartsr CloudJobListPreparationAndReleaseTaskStatusResult
1018}
1019
1020// Next advances to the next page of values.  If there was an error making
1021// the request the page does not advance and the error is returned.
1022func (page *CloudJobListPreparationAndReleaseTaskStatusResultPage) Next() error {
1023	next, err := page.fn(page.cjlpartsr)
1024	if err != nil {
1025		return err
1026	}
1027	page.cjlpartsr = next
1028	return nil
1029}
1030
1031// NotDone returns true if the page enumeration should be started or is not yet complete.
1032func (page CloudJobListPreparationAndReleaseTaskStatusResultPage) NotDone() bool {
1033	return !page.cjlpartsr.IsEmpty()
1034}
1035
1036// Response returns the raw server response from the last page request.
1037func (page CloudJobListPreparationAndReleaseTaskStatusResultPage) Response() CloudJobListPreparationAndReleaseTaskStatusResult {
1038	return page.cjlpartsr
1039}
1040
1041// Values returns the slice of values for the current page or nil if there are no values.
1042func (page CloudJobListPreparationAndReleaseTaskStatusResultPage) Values() []JobPreparationAndReleaseTaskExecutionInformation {
1043	if page.cjlpartsr.IsEmpty() {
1044		return nil
1045	}
1046	return *page.cjlpartsr.Value
1047}
1048
1049// CloudJobListResult ...
1050type CloudJobListResult struct {
1051	autorest.Response `json:"-"`
1052	Value             *[]CloudJob `json:"value,omitempty"`
1053	OdataNextLink     *string     `json:"odata.nextLink,omitempty"`
1054}
1055
1056// CloudJobListResultIterator provides access to a complete listing of CloudJob values.
1057type CloudJobListResultIterator struct {
1058	i    int
1059	page CloudJobListResultPage
1060}
1061
1062// Next advances to the next value.  If there was an error making
1063// the request the iterator does not advance and the error is returned.
1064func (iter *CloudJobListResultIterator) Next() error {
1065	iter.i++
1066	if iter.i < len(iter.page.Values()) {
1067		return nil
1068	}
1069	err := iter.page.Next()
1070	if err != nil {
1071		iter.i--
1072		return err
1073	}
1074	iter.i = 0
1075	return nil
1076}
1077
1078// NotDone returns true if the enumeration should be started or is not yet complete.
1079func (iter CloudJobListResultIterator) NotDone() bool {
1080	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1081}
1082
1083// Response returns the raw server response from the last page request.
1084func (iter CloudJobListResultIterator) Response() CloudJobListResult {
1085	return iter.page.Response()
1086}
1087
1088// Value returns the current value or a zero-initialized value if the
1089// iterator has advanced beyond the end of the collection.
1090func (iter CloudJobListResultIterator) Value() CloudJob {
1091	if !iter.page.NotDone() {
1092		return CloudJob{}
1093	}
1094	return iter.page.Values()[iter.i]
1095}
1096
1097// IsEmpty returns true if the ListResult contains no values.
1098func (cjlr CloudJobListResult) IsEmpty() bool {
1099	return cjlr.Value == nil || len(*cjlr.Value) == 0
1100}
1101
1102// cloudJobListResultPreparer prepares a request to retrieve the next set of results.
1103// It returns nil if no more results exist.
1104func (cjlr CloudJobListResult) cloudJobListResultPreparer() (*http.Request, error) {
1105	if cjlr.OdataNextLink == nil || len(to.String(cjlr.OdataNextLink)) < 1 {
1106		return nil, nil
1107	}
1108	return autorest.Prepare(&http.Request{},
1109		autorest.AsJSON(),
1110		autorest.AsGet(),
1111		autorest.WithBaseURL(to.String(cjlr.OdataNextLink)))
1112}
1113
1114// CloudJobListResultPage contains a page of CloudJob values.
1115type CloudJobListResultPage struct {
1116	fn   func(CloudJobListResult) (CloudJobListResult, error)
1117	cjlr CloudJobListResult
1118}
1119
1120// Next advances to the next page of values.  If there was an error making
1121// the request the page does not advance and the error is returned.
1122func (page *CloudJobListResultPage) Next() error {
1123	next, err := page.fn(page.cjlr)
1124	if err != nil {
1125		return err
1126	}
1127	page.cjlr = next
1128	return nil
1129}
1130
1131// NotDone returns true if the page enumeration should be started or is not yet complete.
1132func (page CloudJobListResultPage) NotDone() bool {
1133	return !page.cjlr.IsEmpty()
1134}
1135
1136// Response returns the raw server response from the last page request.
1137func (page CloudJobListResultPage) Response() CloudJobListResult {
1138	return page.cjlr
1139}
1140
1141// Values returns the slice of values for the current page or nil if there are no values.
1142func (page CloudJobListResultPage) Values() []CloudJob {
1143	if page.cjlr.IsEmpty() {
1144		return nil
1145	}
1146	return *page.cjlr.Value
1147}
1148
1149// CloudJobSchedule ...
1150type CloudJobSchedule struct {
1151	autorest.Response `json:"-"`
1152	// ID - It is common to use a GUID for the id.
1153	ID          *string `json:"id,omitempty"`
1154	DisplayName *string `json:"displayName,omitempty"`
1155	URL         *string `json:"url,omitempty"`
1156	// ETag - This is an opaque string. You can use it to detect whether the job schedule has changed between requests. In particular, you can be pass the ETag with an Update Job Schedule request to specify that your changes should take effect only if nobody else has modified the schedule in the meantime.
1157	ETag *string `json:"eTag,omitempty"`
1158	// LastModified - This is the last time at which the schedule level data, such as the job specification or recurrence information, changed. It does not factor in job-level changes such as new jobs being created or jobs changing state.
1159	LastModified *date.Time `json:"lastModified,omitempty"`
1160	CreationTime *date.Time `json:"creationTime,omitempty"`
1161	// State - Possible values include: 'JobScheduleStateActive', 'JobScheduleStateCompleted', 'JobScheduleStateDisabled', 'JobScheduleStateTerminating', 'JobScheduleStateDeleting'
1162	State               JobScheduleState `json:"state,omitempty"`
1163	StateTransitionTime *date.Time       `json:"stateTransitionTime,omitempty"`
1164	// PreviousState - This property is not present if the job schedule is in its initial active state. Possible values include: 'JobScheduleStateActive', 'JobScheduleStateCompleted', 'JobScheduleStateDisabled', 'JobScheduleStateTerminating', 'JobScheduleStateDeleting'
1165	PreviousState JobScheduleState `json:"previousState,omitempty"`
1166	// PreviousStateTransitionTime - This property is not present if the job schedule is in its initial active state.
1167	PreviousStateTransitionTime *date.Time                       `json:"previousStateTransitionTime,omitempty"`
1168	Schedule                    *Schedule                        `json:"schedule,omitempty"`
1169	JobSpecification            *JobSpecification                `json:"jobSpecification,omitempty"`
1170	ExecutionInfo               *JobScheduleExecutionInformation `json:"executionInfo,omitempty"`
1171	// Metadata - The Batch service does not assign any meaning to metadata; it is solely for the use of user code.
1172	Metadata *[]MetadataItem        `json:"metadata,omitempty"`
1173	Stats    *JobScheduleStatistics `json:"stats,omitempty"`
1174}
1175
1176// CloudJobScheduleListResult ...
1177type CloudJobScheduleListResult struct {
1178	autorest.Response `json:"-"`
1179	Value             *[]CloudJobSchedule `json:"value,omitempty"`
1180	OdataNextLink     *string             `json:"odata.nextLink,omitempty"`
1181}
1182
1183// CloudJobScheduleListResultIterator provides access to a complete listing of CloudJobSchedule values.
1184type CloudJobScheduleListResultIterator struct {
1185	i    int
1186	page CloudJobScheduleListResultPage
1187}
1188
1189// Next advances to the next value.  If there was an error making
1190// the request the iterator does not advance and the error is returned.
1191func (iter *CloudJobScheduleListResultIterator) Next() error {
1192	iter.i++
1193	if iter.i < len(iter.page.Values()) {
1194		return nil
1195	}
1196	err := iter.page.Next()
1197	if err != nil {
1198		iter.i--
1199		return err
1200	}
1201	iter.i = 0
1202	return nil
1203}
1204
1205// NotDone returns true if the enumeration should be started or is not yet complete.
1206func (iter CloudJobScheduleListResultIterator) NotDone() bool {
1207	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1208}
1209
1210// Response returns the raw server response from the last page request.
1211func (iter CloudJobScheduleListResultIterator) Response() CloudJobScheduleListResult {
1212	return iter.page.Response()
1213}
1214
1215// Value returns the current value or a zero-initialized value if the
1216// iterator has advanced beyond the end of the collection.
1217func (iter CloudJobScheduleListResultIterator) Value() CloudJobSchedule {
1218	if !iter.page.NotDone() {
1219		return CloudJobSchedule{}
1220	}
1221	return iter.page.Values()[iter.i]
1222}
1223
1224// IsEmpty returns true if the ListResult contains no values.
1225func (cjslr CloudJobScheduleListResult) IsEmpty() bool {
1226	return cjslr.Value == nil || len(*cjslr.Value) == 0
1227}
1228
1229// cloudJobScheduleListResultPreparer prepares a request to retrieve the next set of results.
1230// It returns nil if no more results exist.
1231func (cjslr CloudJobScheduleListResult) cloudJobScheduleListResultPreparer() (*http.Request, error) {
1232	if cjslr.OdataNextLink == nil || len(to.String(cjslr.OdataNextLink)) < 1 {
1233		return nil, nil
1234	}
1235	return autorest.Prepare(&http.Request{},
1236		autorest.AsJSON(),
1237		autorest.AsGet(),
1238		autorest.WithBaseURL(to.String(cjslr.OdataNextLink)))
1239}
1240
1241// CloudJobScheduleListResultPage contains a page of CloudJobSchedule values.
1242type CloudJobScheduleListResultPage struct {
1243	fn    func(CloudJobScheduleListResult) (CloudJobScheduleListResult, error)
1244	cjslr CloudJobScheduleListResult
1245}
1246
1247// Next advances to the next page of values.  If there was an error making
1248// the request the page does not advance and the error is returned.
1249func (page *CloudJobScheduleListResultPage) Next() error {
1250	next, err := page.fn(page.cjslr)
1251	if err != nil {
1252		return err
1253	}
1254	page.cjslr = next
1255	return nil
1256}
1257
1258// NotDone returns true if the page enumeration should be started or is not yet complete.
1259func (page CloudJobScheduleListResultPage) NotDone() bool {
1260	return !page.cjslr.IsEmpty()
1261}
1262
1263// Response returns the raw server response from the last page request.
1264func (page CloudJobScheduleListResultPage) Response() CloudJobScheduleListResult {
1265	return page.cjslr
1266}
1267
1268// Values returns the slice of values for the current page or nil if there are no values.
1269func (page CloudJobScheduleListResultPage) Values() []CloudJobSchedule {
1270	if page.cjslr.IsEmpty() {
1271		return nil
1272	}
1273	return *page.cjslr.Value
1274}
1275
1276// CloudPool ...
1277type CloudPool struct {
1278	autorest.Response `json:"-"`
1279	// ID - The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. It is common to use a GUID for the id.
1280	ID *string `json:"id,omitempty"`
1281	// DisplayName - The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
1282	DisplayName *string `json:"displayName,omitempty"`
1283	URL         *string `json:"url,omitempty"`
1284	// ETag - This is an opaque string. You can use it to detect whether the pool has changed between requests. In particular, you can be pass the ETag when updating a pool to specify that your changes should take effect only if nobody else has modified the pool in the meantime.
1285	ETag *string `json:"eTag,omitempty"`
1286	// LastModified - This is the last time at which the pool level data, such as the targetDedicated or enableAutoscale settings, changed. It does not factor in node-level changes such as a compute node changing state.
1287	LastModified *date.Time `json:"lastModified,omitempty"`
1288	CreationTime *date.Time `json:"creationTime,omitempty"`
1289	// State - Possible values are: active – The pool is available to run tasks subject to the availability of compute nodes. deleting – The user has requested that the pool be deleted, but the delete operation has not yet completed. upgrading – The user has requested that the operating system of the pool's nodes be upgraded, but the upgrade operation has not yet completed (that is, some nodes in the pool have not yet been upgraded). While upgrading, the pool may be able to run tasks (with reduced capacity) but this is not guaranteed. Possible values include: 'PoolStateActive', 'PoolStateDeleting', 'PoolStateUpgrading'
1290	State               PoolState  `json:"state,omitempty"`
1291	StateTransitionTime *date.Time `json:"stateTransitionTime,omitempty"`
1292	// AllocationState - Possible values are: steady – The pool is not resizing. There are no changes to the number of nodes in the pool in progress. A pool enters this state when it is created and when no operations are being performed on the pool to change the number of dedicated nodes. resizing - The pool is resizing; that is, compute nodes are being added to or removed from the pool. stopping - The pool was resizing, but the user has requested that the resize be stopped, but the stop request has not yet been completed. Possible values include: 'Steady', 'Resizing', 'Stopping'
1293	AllocationState               AllocationState `json:"allocationState,omitempty"`
1294	AllocationStateTransitionTime *date.Time      `json:"allocationStateTransitionTime,omitempty"`
1295	// VMSize - For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall. For information about available VM sizes for pools using images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series).
1296	VMSize *string `json:"vmSize,omitempty"`
1297	// CloudServiceConfiguration - This property and virtualMachineConfiguration are mutually exclusive and one of the properties must be specified.
1298	CloudServiceConfiguration *CloudServiceConfiguration `json:"cloudServiceConfiguration,omitempty"`
1299	// VirtualMachineConfiguration - This property and cloudServiceConfiguration are mutually exclusive and one of the properties must be specified.
1300	VirtualMachineConfiguration *VirtualMachineConfiguration `json:"virtualMachineConfiguration,omitempty"`
1301	// ResizeTimeout - This is the timeout for the most recent resize operation. (The initial sizing when the pool is created counts as a resize.) The default value is 15 minutes.
1302	ResizeTimeout *string `json:"resizeTimeout,omitempty"`
1303	// ResizeError - This property is set only if an error occurred during the last pool resize, and only when the pool allocationState is Steady.
1304	ResizeError      *ResizeError `json:"resizeError,omitempty"`
1305	CurrentDedicated *int32       `json:"currentDedicated,omitempty"`
1306	// TargetDedicated - This property is not set if enableAutoScale is true. It is required if enableAutoScale is false.
1307	TargetDedicated *int32 `json:"targetDedicated,omitempty"`
1308	// EnableAutoScale - If true, the autoScaleFormula property must be set. If false, the targetDedicated property must be set.
1309	EnableAutoScale *bool `json:"enableAutoScale,omitempty"`
1310	// AutoScaleFormula - This property is set only if the pool automatically scales, i.e. enableAutoScale is true.
1311	AutoScaleFormula *string `json:"autoScaleFormula,omitempty"`
1312	// AutoScaleEvaluationInterval - This property is set only if the pool automatically scales, i.e. enableAutoScale is true.
1313	AutoScaleEvaluationInterval *string `json:"autoScaleEvaluationInterval,omitempty"`
1314	// AutoScaleRun - This property is set only if the pool automatically scales, i.e. enableAutoScale is true.
1315	AutoScaleRun *AutoScaleRun `json:"autoScaleRun,omitempty"`
1316	// EnableInterNodeCommunication - This imposes restrictions on which nodes can be assigned to the pool. Specifying this value can reduce the chance of the requested number of nodes to be allocated in the pool.
1317	EnableInterNodeCommunication *bool                 `json:"enableInterNodeCommunication,omitempty"`
1318	NetworkConfiguration         *NetworkConfiguration `json:"networkConfiguration,omitempty"`
1319	StartTask                    *StartTask            `json:"startTask,omitempty"`
1320	// CertificateReferences - For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of remoteuser, a certs directory is created in the user's home directory (e.g., /home/<user-name>/certs) where certificates are placed.
1321	CertificateReferences        *[]CertificateReference        `json:"certificateReferences,omitempty"`
1322	ApplicationPackageReferences *[]ApplicationPackageReference `json:"applicationPackageReferences,omitempty"`
1323	MaxTasksPerNode              *int32                         `json:"maxTasksPerNode,omitempty"`
1324	TaskSchedulingPolicy         *TaskSchedulingPolicy          `json:"taskSchedulingPolicy,omitempty"`
1325	Metadata                     *[]MetadataItem                `json:"metadata,omitempty"`
1326	Stats                        *PoolStatistics                `json:"stats,omitempty"`
1327}
1328
1329// CloudPoolListResult ...
1330type CloudPoolListResult struct {
1331	autorest.Response `json:"-"`
1332	Value             *[]CloudPool `json:"value,omitempty"`
1333	OdataNextLink     *string      `json:"odata.nextLink,omitempty"`
1334}
1335
1336// CloudPoolListResultIterator provides access to a complete listing of CloudPool values.
1337type CloudPoolListResultIterator struct {
1338	i    int
1339	page CloudPoolListResultPage
1340}
1341
1342// Next advances to the next value.  If there was an error making
1343// the request the iterator does not advance and the error is returned.
1344func (iter *CloudPoolListResultIterator) Next() error {
1345	iter.i++
1346	if iter.i < len(iter.page.Values()) {
1347		return nil
1348	}
1349	err := iter.page.Next()
1350	if err != nil {
1351		iter.i--
1352		return err
1353	}
1354	iter.i = 0
1355	return nil
1356}
1357
1358// NotDone returns true if the enumeration should be started or is not yet complete.
1359func (iter CloudPoolListResultIterator) NotDone() bool {
1360	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1361}
1362
1363// Response returns the raw server response from the last page request.
1364func (iter CloudPoolListResultIterator) Response() CloudPoolListResult {
1365	return iter.page.Response()
1366}
1367
1368// Value returns the current value or a zero-initialized value if the
1369// iterator has advanced beyond the end of the collection.
1370func (iter CloudPoolListResultIterator) Value() CloudPool {
1371	if !iter.page.NotDone() {
1372		return CloudPool{}
1373	}
1374	return iter.page.Values()[iter.i]
1375}
1376
1377// IsEmpty returns true if the ListResult contains no values.
1378func (cplr CloudPoolListResult) IsEmpty() bool {
1379	return cplr.Value == nil || len(*cplr.Value) == 0
1380}
1381
1382// cloudPoolListResultPreparer prepares a request to retrieve the next set of results.
1383// It returns nil if no more results exist.
1384func (cplr CloudPoolListResult) cloudPoolListResultPreparer() (*http.Request, error) {
1385	if cplr.OdataNextLink == nil || len(to.String(cplr.OdataNextLink)) < 1 {
1386		return nil, nil
1387	}
1388	return autorest.Prepare(&http.Request{},
1389		autorest.AsJSON(),
1390		autorest.AsGet(),
1391		autorest.WithBaseURL(to.String(cplr.OdataNextLink)))
1392}
1393
1394// CloudPoolListResultPage contains a page of CloudPool values.
1395type CloudPoolListResultPage struct {
1396	fn   func(CloudPoolListResult) (CloudPoolListResult, error)
1397	cplr CloudPoolListResult
1398}
1399
1400// Next advances to the next page of values.  If there was an error making
1401// the request the page does not advance and the error is returned.
1402func (page *CloudPoolListResultPage) Next() error {
1403	next, err := page.fn(page.cplr)
1404	if err != nil {
1405		return err
1406	}
1407	page.cplr = next
1408	return nil
1409}
1410
1411// NotDone returns true if the page enumeration should be started or is not yet complete.
1412func (page CloudPoolListResultPage) NotDone() bool {
1413	return !page.cplr.IsEmpty()
1414}
1415
1416// Response returns the raw server response from the last page request.
1417func (page CloudPoolListResultPage) Response() CloudPoolListResult {
1418	return page.cplr
1419}
1420
1421// Values returns the slice of values for the current page or nil if there are no values.
1422func (page CloudPoolListResultPage) Values() []CloudPool {
1423	if page.cplr.IsEmpty() {
1424		return nil
1425	}
1426	return *page.cplr.Value
1427}
1428
1429// CloudServiceConfiguration ...
1430type CloudServiceConfiguration struct {
1431	// OsFamily - Possible values are: 2 – OS Family 2, equivalent to Windows Server 2008 R2 SP1. 3 – OS Family 3, equivalent to Windows Server 2012. 4 – OS Family 4, equivalent to Windows Server 2012 R2. For more information, see Azure Guest OS Releases (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases).
1432	OsFamily *string `json:"osFamily,omitempty"`
1433	// TargetOSVersion - The default value is * which specifies the latest operating system version for the specified OS family.
1434	TargetOSVersion *string `json:"targetOSVersion,omitempty"`
1435	// CurrentOSVersion - This may differ from targetOSVersion if the pool state is Upgrading. In this case some virtual machines may be on the targetOSVersion and some may be on the currentOSVersion during the upgrade process. Once all virtual machines have upgraded, currentOSVersion is updated to be the same as targetOSVersion.
1436	CurrentOSVersion *string `json:"currentOSVersion,omitempty"`
1437}
1438
1439// CloudTask ...
1440type CloudTask struct {
1441	autorest.Response `json:"-"`
1442	// ID - The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters.
1443	ID *string `json:"id,omitempty"`
1444	// DisplayName - The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
1445	DisplayName *string `json:"displayName,omitempty"`
1446	URL         *string `json:"url,omitempty"`
1447	// ETag - This is an opaque string. You can use it to detect whether the task has changed between requests. In particular, you can be pass the ETag when updating a task to specify that your changes should take effect only if nobody else has modified the task in the meantime.
1448	ETag         *string    `json:"eTag,omitempty"`
1449	LastModified *date.Time `json:"lastModified,omitempty"`
1450	CreationTime *date.Time `json:"creationTime,omitempty"`
1451	// ExitConditions - How the Batch service should respond when the task completes.
1452	ExitConditions *ExitConditions `json:"exitConditions,omitempty"`
1453	// State - Possible values include: 'TaskStateActive', 'TaskStatePreparing', 'TaskStateRunning', 'TaskStateCompleted'
1454	State               TaskState  `json:"state,omitempty"`
1455	StateTransitionTime *date.Time `json:"stateTransitionTime,omitempty"`
1456	// PreviousState - This property is not set if the task is in its initial Active state. Possible values include: 'TaskStateActive', 'TaskStatePreparing', 'TaskStateRunning', 'TaskStateCompleted'
1457	PreviousState TaskState `json:"previousState,omitempty"`
1458	// PreviousStateTransitionTime - This property is not set if the task is in its initial Active state.
1459	PreviousStateTransitionTime *date.Time `json:"previousStateTransitionTime,omitempty"`
1460	// CommandLine - For multi-instance tasks, the command line is executed as the primary task, after the primary task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux.
1461	CommandLine *string `json:"commandLine,omitempty"`
1462	// ResourceFiles - For multi-instance tasks, the resource files will only be downloaded to the compute node on which the primary task is executed.
1463	ResourceFiles         *[]ResourceFile           `json:"resourceFiles,omitempty"`
1464	EnvironmentSettings   *[]EnvironmentSetting     `json:"environmentSettings,omitempty"`
1465	AffinityInfo          *AffinityInformation      `json:"affinityInfo,omitempty"`
1466	Constraints           *TaskConstraints          `json:"constraints,omitempty"`
1467	RunElevated           *bool                     `json:"runElevated,omitempty"`
1468	ExecutionInfo         *TaskExecutionInformation `json:"executionInfo,omitempty"`
1469	NodeInfo              *ComputeNodeInformation   `json:"nodeInfo,omitempty"`
1470	MultiInstanceSettings *MultiInstanceSettings    `json:"multiInstanceSettings,omitempty"`
1471	Stats                 *TaskStatistics           `json:"stats,omitempty"`
1472	// DependsOn - The task will not be scheduled until all depended-on tasks have completed successfully. (If any depended-on tasks fail and exhaust their retry counts, the task will never be scheduled.)
1473	DependsOn                    *TaskDependencies              `json:"dependsOn,omitempty"`
1474	ApplicationPackageReferences *[]ApplicationPackageReference `json:"applicationPackageReferences,omitempty"`
1475}
1476
1477// CloudTaskListResult ...
1478type CloudTaskListResult struct {
1479	autorest.Response `json:"-"`
1480	Value             *[]CloudTask `json:"value,omitempty"`
1481	OdataNextLink     *string      `json:"odata.nextLink,omitempty"`
1482}
1483
1484// CloudTaskListResultIterator provides access to a complete listing of CloudTask values.
1485type CloudTaskListResultIterator struct {
1486	i    int
1487	page CloudTaskListResultPage
1488}
1489
1490// Next advances to the next value.  If there was an error making
1491// the request the iterator does not advance and the error is returned.
1492func (iter *CloudTaskListResultIterator) Next() error {
1493	iter.i++
1494	if iter.i < len(iter.page.Values()) {
1495		return nil
1496	}
1497	err := iter.page.Next()
1498	if err != nil {
1499		iter.i--
1500		return err
1501	}
1502	iter.i = 0
1503	return nil
1504}
1505
1506// NotDone returns true if the enumeration should be started or is not yet complete.
1507func (iter CloudTaskListResultIterator) NotDone() bool {
1508	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1509}
1510
1511// Response returns the raw server response from the last page request.
1512func (iter CloudTaskListResultIterator) Response() CloudTaskListResult {
1513	return iter.page.Response()
1514}
1515
1516// Value returns the current value or a zero-initialized value if the
1517// iterator has advanced beyond the end of the collection.
1518func (iter CloudTaskListResultIterator) Value() CloudTask {
1519	if !iter.page.NotDone() {
1520		return CloudTask{}
1521	}
1522	return iter.page.Values()[iter.i]
1523}
1524
1525// IsEmpty returns true if the ListResult contains no values.
1526func (ctlr CloudTaskListResult) IsEmpty() bool {
1527	return ctlr.Value == nil || len(*ctlr.Value) == 0
1528}
1529
1530// cloudTaskListResultPreparer prepares a request to retrieve the next set of results.
1531// It returns nil if no more results exist.
1532func (ctlr CloudTaskListResult) cloudTaskListResultPreparer() (*http.Request, error) {
1533	if ctlr.OdataNextLink == nil || len(to.String(ctlr.OdataNextLink)) < 1 {
1534		return nil, nil
1535	}
1536	return autorest.Prepare(&http.Request{},
1537		autorest.AsJSON(),
1538		autorest.AsGet(),
1539		autorest.WithBaseURL(to.String(ctlr.OdataNextLink)))
1540}
1541
1542// CloudTaskListResultPage contains a page of CloudTask values.
1543type CloudTaskListResultPage struct {
1544	fn   func(CloudTaskListResult) (CloudTaskListResult, error)
1545	ctlr CloudTaskListResult
1546}
1547
1548// Next advances to the next page of values.  If there was an error making
1549// the request the page does not advance and the error is returned.
1550func (page *CloudTaskListResultPage) Next() error {
1551	next, err := page.fn(page.ctlr)
1552	if err != nil {
1553		return err
1554	}
1555	page.ctlr = next
1556	return nil
1557}
1558
1559// NotDone returns true if the page enumeration should be started or is not yet complete.
1560func (page CloudTaskListResultPage) NotDone() bool {
1561	return !page.ctlr.IsEmpty()
1562}
1563
1564// Response returns the raw server response from the last page request.
1565func (page CloudTaskListResultPage) Response() CloudTaskListResult {
1566	return page.ctlr
1567}
1568
1569// Values returns the slice of values for the current page or nil if there are no values.
1570func (page CloudTaskListResultPage) Values() []CloudTask {
1571	if page.ctlr.IsEmpty() {
1572		return nil
1573	}
1574	return *page.ctlr.Value
1575}
1576
1577// CloudTaskListSubtasksResult ...
1578type CloudTaskListSubtasksResult struct {
1579	autorest.Response `json:"-"`
1580	Value             *[]SubtaskInformation `json:"value,omitempty"`
1581}
1582
1583// ComputeNode ...
1584type ComputeNode struct {
1585	autorest.Response `json:"-"`
1586	// ID - Every node that is added to a pool is assigned a unique ID. Whenever a node is removed from a pool, all of its local files are deleted, and the ID is reclaimed and could be reused for new nodes.
1587	ID  *string `json:"id,omitempty"`
1588	URL *string `json:"url,omitempty"`
1589	// State - Possible values include: 'Idle', 'Rebooting', 'Reimaging', 'Running', 'Unusable', 'Creating', 'Starting', 'Waitingforstarttask', 'Starttaskfailed', 'Unknown', 'Leavingpool', 'Offline'
1590	State ComputeNodeState `json:"state,omitempty"`
1591	// SchedulingState - Possible values are: enabled – Tasks can be scheduled on the node. disabled – No new tasks will be scheduled on the node. Tasks already running on the node may still run to completion. All nodes start with scheduling enabled. Possible values include: 'Enabled', 'Disabled'
1592	SchedulingState     SchedulingState `json:"schedulingState,omitempty"`
1593	StateTransitionTime *date.Time      `json:"stateTransitionTime,omitempty"`
1594	// LastBootTime - This property may not be present if the node state is unusable.
1595	LastBootTime   *date.Time `json:"lastBootTime,omitempty"`
1596	AllocationTime *date.Time `json:"allocationTime,omitempty"`
1597	// IPAddress - Every node that is added to a pool is assigned a unique IP address. Whenever a node is removed from a pool, all of its local files are deleted, and the IP address is reclaimed and could be reused for new nodes.
1598	IPAddress  *string `json:"ipAddress,omitempty"`
1599	AffinityID *string `json:"affinityId,omitempty"`
1600	// VMSize - For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall. For information about available VM sizes for pools using images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series).
1601	VMSize              *string               `json:"vmSize,omitempty"`
1602	TotalTasksRun       *int32                `json:"totalTasksRun,omitempty"`
1603	RunningTasksCount   *int32                `json:"runningTasksCount,omitempty"`
1604	TotalTasksSucceeded *int32                `json:"totalTasksSucceeded,omitempty"`
1605	RecentTasks         *[]TaskInformation    `json:"recentTasks,omitempty"`
1606	StartTask           *StartTask            `json:"startTask,omitempty"`
1607	StartTaskInfo       *StartTaskInformation `json:"startTaskInfo,omitempty"`
1608	// CertificateReferences - For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of remoteuser, a certs directory is created in the user's home directory (e.g., /home/<user-name>/certs) where certificates are placed.
1609	CertificateReferences *[]CertificateReference `json:"certificateReferences,omitempty"`
1610	Errors                *[]ComputeNodeError     `json:"errors,omitempty"`
1611}
1612
1613// ComputeNodeError ...
1614type ComputeNodeError struct {
1615	Code         *string          `json:"code,omitempty"`
1616	Message      *string          `json:"message,omitempty"`
1617	ErrorDetails *[]NameValuePair `json:"errorDetails,omitempty"`
1618}
1619
1620// ComputeNodeGetRemoteLoginSettingsResult ...
1621type ComputeNodeGetRemoteLoginSettingsResult struct {
1622	autorest.Response    `json:"-"`
1623	RemoteLoginIPAddress *string `json:"remoteLoginIPAddress,omitempty"`
1624	RemoteLoginPort      *int32  `json:"remoteLoginPort,omitempty"`
1625}
1626
1627// ComputeNodeInformation ...
1628type ComputeNodeInformation struct {
1629	AffinityID           *string `json:"affinityId,omitempty"`
1630	NodeURL              *string `json:"nodeUrl,omitempty"`
1631	PoolID               *string `json:"poolId,omitempty"`
1632	NodeID               *string `json:"nodeId,omitempty"`
1633	TaskRootDirectory    *string `json:"taskRootDirectory,omitempty"`
1634	TaskRootDirectoryURL *string `json:"taskRootDirectoryUrl,omitempty"`
1635}
1636
1637// ComputeNodeListResult ...
1638type ComputeNodeListResult struct {
1639	autorest.Response `json:"-"`
1640	Value             *[]ComputeNode `json:"value,omitempty"`
1641	OdataNextLink     *string        `json:"odata.nextLink,omitempty"`
1642}
1643
1644// ComputeNodeListResultIterator provides access to a complete listing of ComputeNode values.
1645type ComputeNodeListResultIterator struct {
1646	i    int
1647	page ComputeNodeListResultPage
1648}
1649
1650// Next advances to the next value.  If there was an error making
1651// the request the iterator does not advance and the error is returned.
1652func (iter *ComputeNodeListResultIterator) Next() error {
1653	iter.i++
1654	if iter.i < len(iter.page.Values()) {
1655		return nil
1656	}
1657	err := iter.page.Next()
1658	if err != nil {
1659		iter.i--
1660		return err
1661	}
1662	iter.i = 0
1663	return nil
1664}
1665
1666// NotDone returns true if the enumeration should be started or is not yet complete.
1667func (iter ComputeNodeListResultIterator) NotDone() bool {
1668	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1669}
1670
1671// Response returns the raw server response from the last page request.
1672func (iter ComputeNodeListResultIterator) Response() ComputeNodeListResult {
1673	return iter.page.Response()
1674}
1675
1676// Value returns the current value or a zero-initialized value if the
1677// iterator has advanced beyond the end of the collection.
1678func (iter ComputeNodeListResultIterator) Value() ComputeNode {
1679	if !iter.page.NotDone() {
1680		return ComputeNode{}
1681	}
1682	return iter.page.Values()[iter.i]
1683}
1684
1685// IsEmpty returns true if the ListResult contains no values.
1686func (cnlr ComputeNodeListResult) IsEmpty() bool {
1687	return cnlr.Value == nil || len(*cnlr.Value) == 0
1688}
1689
1690// computeNodeListResultPreparer prepares a request to retrieve the next set of results.
1691// It returns nil if no more results exist.
1692func (cnlr ComputeNodeListResult) computeNodeListResultPreparer() (*http.Request, error) {
1693	if cnlr.OdataNextLink == nil || len(to.String(cnlr.OdataNextLink)) < 1 {
1694		return nil, nil
1695	}
1696	return autorest.Prepare(&http.Request{},
1697		autorest.AsJSON(),
1698		autorest.AsGet(),
1699		autorest.WithBaseURL(to.String(cnlr.OdataNextLink)))
1700}
1701
1702// ComputeNodeListResultPage contains a page of ComputeNode values.
1703type ComputeNodeListResultPage struct {
1704	fn   func(ComputeNodeListResult) (ComputeNodeListResult, error)
1705	cnlr ComputeNodeListResult
1706}
1707
1708// Next advances to the next page of values.  If there was an error making
1709// the request the page does not advance and the error is returned.
1710func (page *ComputeNodeListResultPage) Next() error {
1711	next, err := page.fn(page.cnlr)
1712	if err != nil {
1713		return err
1714	}
1715	page.cnlr = next
1716	return nil
1717}
1718
1719// NotDone returns true if the page enumeration should be started or is not yet complete.
1720func (page ComputeNodeListResultPage) NotDone() bool {
1721	return !page.cnlr.IsEmpty()
1722}
1723
1724// Response returns the raw server response from the last page request.
1725func (page ComputeNodeListResultPage) Response() ComputeNodeListResult {
1726	return page.cnlr
1727}
1728
1729// Values returns the slice of values for the current page or nil if there are no values.
1730func (page ComputeNodeListResultPage) Values() []ComputeNode {
1731	if page.cnlr.IsEmpty() {
1732		return nil
1733	}
1734	return *page.cnlr.Value
1735}
1736
1737// ComputeNodeUser ...
1738type ComputeNodeUser struct {
1739	Name *string `json:"name,omitempty"`
1740	// IsAdmin - The default value is false.
1741	IsAdmin *bool `json:"isAdmin,omitempty"`
1742	// ExpiryTime - If omitted, the default is 1 day from the current time. For Linux compute nodes, the expiryTime has a precision up to a day.
1743	ExpiryTime *date.Time `json:"expiryTime,omitempty"`
1744	// Password - The password is required for Windows nodes (those created with 'cloudServiceConfiguration', or created with 'virtualMachineConfiguration' using a Windows image reference). For Linux compute nodes, the password can optionally be specified along with the sshPublicKey property.
1745	Password *string `json:"password,omitempty"`
1746	// SSHPublicKey - The public key should be compatible with OpenSSH encoding and should be base 64 encoded. This property can be specified only for Linux nodes. If this is specified for a Windows node, then the Batch service rejects the request; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).
1747	SSHPublicKey *string `json:"sshPublicKey,omitempty"`
1748}
1749
1750// DeleteCertificateError ...
1751type DeleteCertificateError struct {
1752	Code    *string `json:"code,omitempty"`
1753	Message *string `json:"message,omitempty"`
1754	// Values - This list includes details such as the active pools and nodes referencing this certificate. However, if a large number of resources reference the certificate, the list contains only about the first hundred.
1755	Values *[]NameValuePair `json:"values,omitempty"`
1756}
1757
1758// EnvironmentSetting ...
1759type EnvironmentSetting struct {
1760	Name  *string `json:"name,omitempty"`
1761	Value *string `json:"value,omitempty"`
1762}
1763
1764// Error ...
1765type Error struct {
1766	Code    *string        `json:"code,omitempty"`
1767	Message *ErrorMessage  `json:"message,omitempty"`
1768	Values  *[]ErrorDetail `json:"values,omitempty"`
1769}
1770
1771// ErrorDetail ...
1772type ErrorDetail struct {
1773	Key   *string `json:"key,omitempty"`
1774	Value *string `json:"value,omitempty"`
1775}
1776
1777// ErrorMessage ...
1778type ErrorMessage struct {
1779	Lang  *string `json:"lang,omitempty"`
1780	Value *string `json:"value,omitempty"`
1781}
1782
1783// ExitCodeMapping ...
1784type ExitCodeMapping struct {
1785	Code        *int32       `json:"code,omitempty"`
1786	ExitOptions *ExitOptions `json:"exitOptions,omitempty"`
1787}
1788
1789// ExitCodeRangeMapping ...
1790type ExitCodeRangeMapping struct {
1791	Start       *int32       `json:"start,omitempty"`
1792	End         *int32       `json:"end,omitempty"`
1793	ExitOptions *ExitOptions `json:"exitOptions,omitempty"`
1794}
1795
1796// ExitConditions ...
1797type ExitConditions struct {
1798	ExitCodes       *[]ExitCodeMapping      `json:"exitCodes,omitempty"`
1799	ExitCodeRanges  *[]ExitCodeRangeMapping `json:"exitCodeRanges,omitempty"`
1800	SchedulingError *ExitOptions            `json:"schedulingError,omitempty"`
1801	// Default - Note that the default condition does not include exit code 0. If you want non-default behaviour on exit code 0, you must list it explicitly using the exitCodes or exitCodeRanges collection.
1802	Default *ExitOptions `json:"default,omitempty"`
1803}
1804
1805// ExitOptions ...
1806type ExitOptions struct {
1807	// JobAction - The default is none for exit code 0 and terminate for all other exit conditions. It is an error to specify this if the job's onTaskFailed is noaction. The add task request fails with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). Possible values include: 'JobActionNone', 'JobActionDisable', 'JobActionTerminate'
1808	JobAction JobAction `json:"jobAction,omitempty"`
1809}
1810
1811// FileProperties ...
1812type FileProperties struct {
1813	// CreationTime - The creation time is not returned for files on Linux compute nodes.
1814	CreationTime  *date.Time `json:"creationTime,omitempty"`
1815	LastModified  *date.Time `json:"lastModified,omitempty"`
1816	ContentLength *int64     `json:"contentLength,omitempty"`
1817	ContentType   *string    `json:"contentType,omitempty"`
1818	// FileMode - The file mode is returned only for files on Linux compute nodes.
1819	FileMode *string `json:"fileMode,omitempty"`
1820}
1821
1822// ImageReference ...
1823type ImageReference struct {
1824	// Publisher - For example, Canonical or MicrosoftWindowsServer.
1825	Publisher *string `json:"publisher,omitempty"`
1826	// Offer - For example, UbuntuServer or WindowsServer.
1827	Offer *string `json:"offer,omitempty"`
1828	// Sku - For example, 14.04.0-LTS or 2012-R2-Datacenter.
1829	Sku *string `json:"sku,omitempty"`
1830	// Version - A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'.
1831	Version *string `json:"version,omitempty"`
1832}
1833
1834// JobAddParameter ...
1835type JobAddParameter struct {
1836	// ID - The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. It is common to use a GUID for the id.
1837	ID *string `json:"id,omitempty"`
1838	// DisplayName - The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
1839	DisplayName *string `json:"displayName,omitempty"`
1840	// Priority -  Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0.
1841	Priority *int32 `json:"priority,omitempty"`
1842	// Constraints - The execution constraints for the job.
1843	Constraints *JobConstraints `json:"constraints,omitempty"`
1844	// JobManagerTask - If the job does not specify a Job Manager task, the user must explicitly add tasks to the job. If the job does specify a Job Manager task, the Batch service creates the Job Manager task when the job is created, and will try to schedule the Job Manager task before scheduling other tasks in the job. The Job Manager task's typical purpose is to control and/or monitor job execution, for example by deciding what additional tasks to run, determining when the work is complete, etc. (However, a Job Manager task is not restricted to these activities – it is a fully-fledged task in the system and perform whatever actions are required for the job.) For example, a Job Manager task might download a file specified as a parameter, analyze the contents of that file and submit additional tasks based on those contents.
1845	JobManagerTask *JobManagerTask `json:"jobManagerTask,omitempty"`
1846	// JobPreparationTask - If a job has a Job Preparation task, the Batch service will run the Job Preparation task on a compute node before starting any tasks of that job on that compute node.
1847	JobPreparationTask *JobPreparationTask `json:"jobPreparationTask,omitempty"`
1848	// JobReleaseTask - A Job Release task cannot be specified without also specifying a Job Preparation task for the job. The Batch service runs the Job Release task on the compute nodes that have run the Job Preparation task. The primary purpose of the Job Release task is to undo changes to compute nodes made by the Job Preparation task. Example activities include deleting local files, or shutting down services that were started as part of job preparation.
1849	JobReleaseTask            *JobReleaseTask       `json:"jobReleaseTask,omitempty"`
1850	CommonEnvironmentSettings *[]EnvironmentSetting `json:"commonEnvironmentSettings,omitempty"`
1851	PoolInfo                  *PoolInformation      `json:"poolInfo,omitempty"`
1852	// OnAllTasksComplete - Note that if a job contains no tasks, then all tasks are considered complete. This option is therefore most commonly used with a job manager task; if you want to use automatic job termination without a job manager, you should initially set onAllTasksComplete to noaction and update the job properties to set onAllTasksComplete to terminatejob once you have finished adding tasks. Permitted values are: noaction – do nothing. The job remains active unless terminated or disabled by some other means. terminatejob – terminate the job. The job’s terminateReason is set to 'AllTasksComplete'. The default is noaction. Possible values include: 'NoAction', 'TerminateJob'
1853	OnAllTasksComplete OnAllTasksComplete `json:"onAllTasksComplete,omitempty"`
1854	// OnTaskFailure - Permitted values are: noaction – do nothing. performexitoptionsjobaction – take the action associated with the task exit condition in the task's exitConditions collection. (This may still result in no action being taken, if that is what the task specifies.) The default is noaction. Possible values include: 'OnTaskFailureNoAction', 'OnTaskFailurePerformExitOptionsJobAction'
1855	OnTaskFailure OnTaskFailure `json:"onTaskFailure,omitempty"`
1856	// Metadata - The Batch service does not assign any meaning to metadata; it is solely for the use of user code.
1857	Metadata             *[]MetadataItem `json:"metadata,omitempty"`
1858	UsesTaskDependencies *bool           `json:"usesTaskDependencies,omitempty"`
1859}
1860
1861// JobConstraints ...
1862type JobConstraints struct {
1863	// MaxWallClockTime - If the job does not complete within the time limit, the Batch service terminates it and any tasks that are still running. In this case, the termination reason will be MaxWallClockTimeExpiry. If this property is not specified, there is no time limit on how long the job may run.
1864	MaxWallClockTime *string `json:"maxWallClockTime,omitempty"`
1865	// MaxTaskRetryCount - Note that this value specifically controls the number of retries. The Batch service will try each task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries a task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry tasks. If the maximum retry count is -1, the Batch service retries tasks without limit. The default value is 0 (no retries).
1866	MaxTaskRetryCount *int32 `json:"maxTaskRetryCount,omitempty"`
1867}
1868
1869// JobDisableParameter ...
1870type JobDisableParameter struct {
1871	// DisableTasks - Possible values are: requeue – Terminate running tasks and requeue them. The tasks will run again when the job is enabled. terminate – Terminate running tasks. The tasks will not run again. wait – Allow currently running tasks to complete. Possible values include: 'DisableJobOptionRequeue', 'DisableJobOptionTerminate', 'DisableJobOptionWait'
1872	DisableTasks DisableJobOption `json:"disableTasks,omitempty"`
1873}
1874
1875// JobExecutionInformation ...
1876type JobExecutionInformation struct {
1877	// StartTime - This is the time at which the job was created.
1878	StartTime *date.Time `json:"startTime,omitempty"`
1879	// EndTime - This property is set only if the job is in the completed state.
1880	EndTime *date.Time `json:"endTime,omitempty"`
1881	// PoolID - This element contains the actual pool where the job is assigned. When you get job details from the service, they also contain a poolInfo element, which contains the pool configuration data from when the job was added or updated. That poolInfo element may also contain a poolId element. If it does, the two IDs are the same. If it does not, it means the job ran on an auto pool, and this property contains the id of that auto pool.
1882	PoolID *string `json:"poolId,omitempty"`
1883	// SchedulingError - This property is not set if there was no error starting the job.
1884	SchedulingError *JobSchedulingError `json:"schedulingError,omitempty"`
1885	// TerminateReason - This property is set only if the job is in the completed state. If the Batch service terminates the job, it sets the reason as follows: JMComplete – the Job Manager task completed, and killJobOnCompletion was set to true. MaxWallClockTimeExpiry – the job reached its maxWallClockTime constraint. TerminateJobSchedule – the job ran as part of a schedule, and the schedule terminated. AllTasksComplete – the job's onAllTasksComplete attribute is set to terminatejob, and all tasks in the job are complete. TaskFailed – the job's onTaskFailure attribute is set to performexitoptionsjobaction, and a task in the job failed with an exit condition that specified a jobAction of terminatejob. Any other string is a user-defined reason specified in a call to the 'Terminate a job' operation.
1886	TerminateReason *string `json:"terminateReason,omitempty"`
1887}
1888
1889// JobManagerTask ...
1890type JobManagerTask struct {
1891	// ID - The id can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters.
1892	ID *string `json:"id,omitempty"`
1893	// DisplayName - It need not be unique and can contain any Unicode characters up to a maximum length of 1024.
1894	DisplayName *string `json:"displayName,omitempty"`
1895	// CommandLine - The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux.
1896	CommandLine *string `json:"commandLine,omitempty"`
1897	// ResourceFiles - Files listed under this element are located in the task's working directory.
1898	ResourceFiles       *[]ResourceFile       `json:"resourceFiles,omitempty"`
1899	EnvironmentSettings *[]EnvironmentSetting `json:"environmentSettings,omitempty"`
1900	Constraints         *TaskConstraints      `json:"constraints,omitempty"`
1901	// KillJobOnCompletion - If true, when the Job Manager task completes, the Batch service marks the job as complete. If any tasks are still running at this time (other than Job Release), those tasks are terminated. If false, the completion of the Job Manager task does not affect the job status. In this case, you should either use the onAllTasksComplete attribute to terminate the job, or have a client or user terminate the job explicitly. An example of this is if the Job Manager creates a set of tasks but then takes no further role in their execution. The default value is true. If you are using the onAllTasksComplete and onTaskFailure attributes to control job lifetime, and using the job manager task only to create the tasks for the job (not to monitor progress), then it is important to set killJobOnCompletion to false.
1902	KillJobOnCompletion *bool `json:"killJobOnCompletion,omitempty"`
1903	RunElevated         *bool `json:"runElevated,omitempty"`
1904	// RunExclusive - If true, no other tasks will run on the same compute node for as long as the Job Manager is running. If false, other tasks can run simultaneously with the Job Manager on a compute node. The Job Manager task counts normally against the node's concurrent task limit, so this is only relevant if the node allows multiple concurrent tasks. The default value is true.
1905	RunExclusive *bool `json:"runExclusive,omitempty"`
1906	// ApplicationPackageReferences - Application packages are downloaded and deployed to a shared directory, not the task directory. Therefore, if a referenced package is already on the compute node, and is up to date, then it is not re-downloaded; the existing copy on the compute node is used. If a referenced application package cannot be installed, for example because the package has been deleted or because download failed, the task fails with a scheduling error. This property is currently not supported on jobs running on pools created using the virtualMachineConfiguration (IaaS) property. If a task specifying applicationPackageReferences runs on such a pool, it fails with a scheduling error with code TaskSchedulingConstraintFailed.
1907	ApplicationPackageReferences *[]ApplicationPackageReference `json:"applicationPackageReferences,omitempty"`
1908}
1909
1910// JobPatchParameter ...
1911type JobPatchParameter struct {
1912	// Priority - Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. If omitted, the priority of the job is left unchanged.
1913	Priority *int32 `json:"priority,omitempty"`
1914	// OnAllTasksComplete - If omitted, the completion behavior is left unchanged. You may not change the value from terminatejob to noaction – that is, once you have engaged automatic job termination, you cannot turn it off again. If you try to do this, the request fails with an 'invalid property value' error response; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). Possible values include: 'NoAction', 'TerminateJob'
1915	OnAllTasksComplete OnAllTasksComplete `json:"onAllTasksComplete,omitempty"`
1916	// Constraints - If omitted, the existing execution constraints are left unchanged.
1917	Constraints *JobConstraints `json:"constraints,omitempty"`
1918	// PoolInfo - You may change the pool for a job only when the job is disabled. The Patch Job call will fail if you include the poolInfo element and the job is not disabled. If you specify an autoPoolSpecification specification in the poolInfo, only the keepAlive property can be updated, and then only if the auto pool has a poolLifetimeOption of job. If omitted, the job continues to run on its current pool.
1919	PoolInfo *PoolInformation `json:"poolInfo,omitempty"`
1920	// Metadata - If omitted, the existing job metadata is left unchanged.
1921	Metadata *[]MetadataItem `json:"metadata,omitempty"`
1922}
1923
1924// JobPreparationAndReleaseTaskExecutionInformation ...
1925type JobPreparationAndReleaseTaskExecutionInformation struct {
1926	PoolID                          *string                                 `json:"poolId,omitempty"`
1927	NodeID                          *string                                 `json:"nodeId,omitempty"`
1928	NodeURL                         *string                                 `json:"nodeUrl,omitempty"`
1929	JobPreparationTaskExecutionInfo *JobPreparationTaskExecutionInformation `json:"jobPreparationTaskExecutionInfo,omitempty"`
1930	// JobReleaseTaskExecutionInfo - This property is set only if the Job Release task has run on the node.
1931	JobReleaseTaskExecutionInfo *JobReleaseTaskExecutionInformation `json:"jobReleaseTaskExecutionInfo,omitempty"`
1932}
1933
1934// JobPreparationTask ...
1935type JobPreparationTask struct {
1936	// ID - The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. If you do not specify this property, the Batch service assigns a default value of 'jobpreparation'. No other task in the job can have the same id as the Job Preparation task. If you try to submit a task with the same id, the Batch service rejects the request with error code TaskIdSameAsJobPreparationTask; if you are calling the REST API directly, the HTTP status code is 409 (Conflict).
1937	ID *string `json:"id,omitempty"`
1938	// CommandLine - The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux.
1939	CommandLine *string `json:"commandLine,omitempty"`
1940	// ResourceFiles - Files listed under this element are located in the task's working directory.
1941	ResourceFiles       *[]ResourceFile       `json:"resourceFiles,omitempty"`
1942	EnvironmentSettings *[]EnvironmentSetting `json:"environmentSettings,omitempty"`
1943	Constraints         *TaskConstraints      `json:"constraints,omitempty"`
1944	// WaitForSuccess - If true and the Job Preparation task fails on a compute node, the Batch service retries the Job Preparation task up to its maximum retry count (as specified in the constraints element). If the task has still not completed successfully after all retries, then the Batch service will not schedule tasks of the job to the compute node. The compute node remains active and eligible to run tasks of other jobs. If false, the Batch service will not wait for the Job Preparation task to complete. In this case, other tasks of the job can start executing on the compute node while the Job Preparation task is still running; and even if the Job Preparation task fails, new tasks will continue to be scheduled on the node. The default value is true.
1945	WaitForSuccess *bool `json:"waitForSuccess,omitempty"`
1946	RunElevated    *bool `json:"runElevated,omitempty"`
1947	// RerunOnNodeRebootAfterSuccess - The Job Preparation task is always rerun if a compute node is reimaged, or if the Job Preparation task did not complete (e.g. because the reboot occurred while the task was running). Therefore, you should always write a Job Preparation task to be idempotent and to behave correctly if run multiple times. The default value is true.
1948	RerunOnNodeRebootAfterSuccess *bool `json:"rerunOnNodeRebootAfterSuccess,omitempty"`
1949}
1950
1951// JobPreparationTaskExecutionInformation ...
1952type JobPreparationTaskExecutionInformation struct {
1953	// StartTime - Note that every time the task is restarted, this value is updated.
1954	StartTime *date.Time `json:"startTime,omitempty"`
1955	// EndTime - This property is set only if the task is in the Completed state.
1956	EndTime *date.Time `json:"endTime,omitempty"`
1957	// State - Possible values are: running – the task is currently running (including retrying). completed – the task has exited with exit code 0, or the task has exhausted its retry limit, or the Batch service was unable to start the task due to scheduling errors. Possible values include: 'JobPreparationTaskStateRunning', 'JobPreparationTaskStateCompleted'
1958	State                JobPreparationTaskState `json:"state,omitempty"`
1959	TaskRootDirectory    *string                 `json:"taskRootDirectory,omitempty"`
1960	TaskRootDirectoryURL *string                 `json:"taskRootDirectoryUrl,omitempty"`
1961	// ExitCode - This parameter is returned only if the task is in the completed state. The exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. Note that the exit code may also be generated by the compute node operating system, such as when a process is forcibly terminated.
1962	ExitCode        *int32               `json:"exitCode,omitempty"`
1963	SchedulingError *TaskSchedulingError `json:"schedulingError,omitempty"`
1964	RetryCount      *int32               `json:"retryCount,omitempty"`
1965	// LastRetryTime - This property is set only if the task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the task has been restarted for reasons other than retry; for example, if the compute node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not.
1966	LastRetryTime *date.Time `json:"lastRetryTime,omitempty"`
1967}
1968
1969// JobReleaseTask ...
1970type JobReleaseTask struct {
1971	// ID - The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. If you do not specify this property, the Batch service assigns a default value of 'jobrelease'. No other task in the job can have the same id as the Job Release task. If you try to submit a task with the same id, the Batch service rejects the request with error code TaskIdSameAsJobReleaseTask; if you are calling the REST API directly, the HTTP status code is 409 (Conflict).
1972	ID *string `json:"id,omitempty"`
1973	// CommandLine - The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux.
1974	CommandLine *string `json:"commandLine,omitempty"`
1975	// ResourceFiles - Files listed under this element are located in the task's working directory.
1976	ResourceFiles       *[]ResourceFile       `json:"resourceFiles,omitempty"`
1977	EnvironmentSettings *[]EnvironmentSetting `json:"environmentSettings,omitempty"`
1978	MaxWallClockTime    *string               `json:"maxWallClockTime,omitempty"`
1979	// RetentionTime - The default is infinite, i.e. the task directory will be retained until the compute node is removed or reimaged.
1980	RetentionTime *string `json:"retentionTime,omitempty"`
1981	// RunElevated - The default value is false.
1982	RunElevated *bool `json:"runElevated,omitempty"`
1983}
1984
1985// JobReleaseTaskExecutionInformation ...
1986type JobReleaseTaskExecutionInformation struct {
1987	StartTime *date.Time `json:"startTime,omitempty"`
1988	// EndTime - This property is set only if the task is in the Completed state.
1989	EndTime *date.Time `json:"endTime,omitempty"`
1990	// State - Possible values are: running – the task is currently running (including retrying). completed – the task has exited, or the Batch service was unable to start the task due to scheduling errors. Possible values include: 'JobReleaseTaskStateRunning', 'JobReleaseTaskStateCompleted'
1991	State                JobReleaseTaskState `json:"state,omitempty"`
1992	TaskRootDirectory    *string             `json:"taskRootDirectory,omitempty"`
1993	TaskRootDirectoryURL *string             `json:"taskRootDirectoryUrl,omitempty"`
1994	// ExitCode - This parameter is returned only if the task is in the completed state. The exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. Note that the exit code may also be generated by the compute node operating system, such as when a process is forcibly terminated.
1995	ExitCode        *int32               `json:"exitCode,omitempty"`
1996	SchedulingError *TaskSchedulingError `json:"schedulingError,omitempty"`
1997}
1998
1999// JobScheduleAddParameter ...
2000type JobScheduleAddParameter struct {
2001	// ID - The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The id is case-preserving and case-insensitive (that is, you may not have two ids within an account that differ only by case).
2002	ID *string `json:"id,omitempty"`
2003	// DisplayName - The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
2004	DisplayName      *string           `json:"displayName,omitempty"`
2005	Schedule         *Schedule         `json:"schedule,omitempty"`
2006	JobSpecification *JobSpecification `json:"jobSpecification,omitempty"`
2007	// Metadata - The Batch service does not assign any meaning to metadata; it is solely for the use of user code.
2008	Metadata *[]MetadataItem `json:"metadata,omitempty"`
2009}
2010
2011// JobScheduleExecutionInformation ...
2012type JobScheduleExecutionInformation struct {
2013	// NextRunTime - This property is meaningful only if the schedule is in the active state when the time comes around. For example, if the schedule is disabled, no job will be created at nextRunTime unless the job is enabled before then.
2014	NextRunTime *date.Time `json:"nextRunTime,omitempty"`
2015	// RecentJob - This property is present only if the at least one job has run under the schedule.
2016	RecentJob *RecentJob `json:"recentJob,omitempty"`
2017	// EndTime - This property is set only if the job schedule is in the completed state.
2018	EndTime *date.Time `json:"endTime,omitempty"`
2019}
2020
2021// JobSchedulePatchParameter ...
2022type JobSchedulePatchParameter struct {
2023	// Schedule - If you do not specify this element, the existing schedule is left unchanged.
2024	Schedule *Schedule `json:"schedule,omitempty"`
2025	// JobSpecification - Updates affect only jobs that are started after the update has taken place. Any currently active job continues with the older specification.
2026	JobSpecification *JobSpecification `json:"jobSpecification,omitempty"`
2027	// Metadata - If you do not specify this element, existing metadata is left unchanged.
2028	Metadata *[]MetadataItem `json:"metadata,omitempty"`
2029}
2030
2031// JobScheduleStatistics ...
2032type JobScheduleStatistics struct {
2033	URL            *string    `json:"url,omitempty"`
2034	StartTime      *date.Time `json:"startTime,omitempty"`
2035	LastUpdateTime *date.Time `json:"lastUpdateTime,omitempty"`
2036	UserCPUTime    *string    `json:"userCPUTime,omitempty"`
2037	KernelCPUTime  *string    `json:"kernelCPUTime,omitempty"`
2038	// WallClockTime - The wall clock time is the elapsed time from when the task started running on a compute node to when it finished (or to the last time the statistics were updated, if the task had not finished by then). If a task was retried, this includes the wall clock time of all the task retries.
2039	WallClockTime     *string  `json:"wallClockTime,omitempty"`
2040	ReadIOps          *int64   `json:"readIOps,omitempty"`
2041	WriteIOps         *int64   `json:"writeIOps,omitempty"`
2042	ReadIOGiB         *float64 `json:"readIOGiB,omitempty"`
2043	WriteIOGiB        *float64 `json:"writeIOGiB,omitempty"`
2044	NumSucceededTasks *int64   `json:"numSucceededTasks,omitempty"`
2045	NumFailedTasks    *int64   `json:"numFailedTasks,omitempty"`
2046	NumTaskRetries    *int64   `json:"numTaskRetries,omitempty"`
2047	// WaitTime - This value is only reported in the account lifetime statistics; it is not included in the job statistics.
2048	WaitTime *string `json:"waitTime,omitempty"`
2049}
2050
2051// JobScheduleUpdateParameter ...
2052type JobScheduleUpdateParameter struct {
2053	// Schedule - If you do not specify this element, it is equivalent to passing the default schedule: that is, a single job scheduled to run immediately.
2054	Schedule *Schedule `json:"schedule,omitempty"`
2055	// JobSpecification - Updates affect only jobs that are started after the update has taken place. Any currently active job continues with the older specification.
2056	JobSpecification *JobSpecification `json:"jobSpecification,omitempty"`
2057	// Metadata - If you do not specify this element, it takes the default value of an empty list; in effect, any existing metadata is deleted.
2058	Metadata *[]MetadataItem `json:"metadata,omitempty"`
2059}
2060
2061// JobSchedulingError ...
2062type JobSchedulingError struct {
2063	// Category - Possible values include: 'SchedulingErrorCategoryUsererror', 'SchedulingErrorCategoryServererror', 'SchedulingErrorCategoryUnmapped'
2064	Category SchedulingErrorCategory `json:"category,omitempty"`
2065	Code     *string                 `json:"code,omitempty"`
2066	Message  *string                 `json:"message,omitempty"`
2067	Details  *[]NameValuePair        `json:"details,omitempty"`
2068}
2069
2070// JobSpecification ...
2071type JobSpecification struct {
2072	// Priority - Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0. This priority is used as the default for all jobs under the job schedule. You can update a job's priority after it has been created using by using the update job API.
2073	Priority *int32 `json:"priority,omitempty"`
2074	// DisplayName - The name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
2075	DisplayName          *string `json:"displayName,omitempty"`
2076	UsesTaskDependencies *bool   `json:"usesTaskDependencies,omitempty"`
2077	// OnAllTasksComplete - Note that if a job contains no tasks, then all tasks are considered complete. This option is therefore most commonly used with a job manager task; if you want to use automatic job termination without a job manager, you should initially set onAllTasksComplete to noaction and update the job properties to set onAllTasksComplete to terminatejob once you have finished adding tasks. The default is noaction. Possible values include: 'NoAction', 'TerminateJob'
2078	OnAllTasksComplete OnAllTasksComplete `json:"onAllTasksComplete,omitempty"`
2079	// OnTaskFailure - The default is noaction. Possible values include: 'OnTaskFailureNoAction', 'OnTaskFailurePerformExitOptionsJobAction'
2080	OnTaskFailure OnTaskFailure   `json:"onTaskFailure,omitempty"`
2081	Constraints   *JobConstraints `json:"constraints,omitempty"`
2082	// JobManagerTask - If the job does not specify a Job Manager task, the user must explicitly add tasks to the job using the Task API. If the job does specify a Job Manager task, the Batch service creates the Job Manager task when the job is created, and will try to schedule the Job Manager task before scheduling other tasks in the job.
2083	JobManagerTask *JobManagerTask `json:"jobManagerTask,omitempty"`
2084	// JobPreparationTask - If a job has a Job Preparation task, the Batch service will run the Job Preparation task on a compute node before starting any tasks of that job on that compute node.
2085	JobPreparationTask *JobPreparationTask `json:"jobPreparationTask,omitempty"`
2086	// JobReleaseTask - The primary purpose of the Job Release task is to undo changes to compute nodes made by the Job Preparation task. Example activities include deleting local files, or shutting down services that were started as part of job preparation. A Job Release task cannot be specified without also specifying a Job Preparation task for the job. The Batch service runs the Job Release task on the compute nodes that have run the Job Preparation task.
2087	JobReleaseTask *JobReleaseTask `json:"jobReleaseTask,omitempty"`
2088	// CommonEnvironmentSettings - Individual tasks can override an environment setting specified here by specifying the same setting name with a different value.
2089	CommonEnvironmentSettings *[]EnvironmentSetting `json:"commonEnvironmentSettings,omitempty"`
2090	PoolInfo                  *PoolInformation      `json:"poolInfo,omitempty"`
2091	// Metadata - The Batch service does not assign any meaning to metadata; it is solely for the use of user code.
2092	Metadata *[]MetadataItem `json:"metadata,omitempty"`
2093}
2094
2095// JobStatistics ...
2096type JobStatistics struct {
2097	autorest.Response `json:"-"`
2098	URL               *string    `json:"url,omitempty"`
2099	StartTime         *date.Time `json:"startTime,omitempty"`
2100	LastUpdateTime    *date.Time `json:"lastUpdateTime,omitempty"`
2101	UserCPUTime       *string    `json:"userCPUTime,omitempty"`
2102	KernelCPUTime     *string    `json:"kernelCPUTime,omitempty"`
2103	WallClockTime     *string    `json:"wallClockTime,omitempty"`
2104	ReadIOps          *int64     `json:"readIOps,omitempty"`
2105	WriteIOps         *int64     `json:"writeIOps,omitempty"`
2106	ReadIOGiB         *float64   `json:"readIOGiB,omitempty"`
2107	WriteIOGiB        *float64   `json:"writeIOGiB,omitempty"`
2108	// NumSucceededTasks - A task completes successfully if it returns exit code 0.
2109	NumSucceededTasks *int64 `json:"numSucceededTasks,omitempty"`
2110	// NumFailedTasks - A task fails if it exhausts its maximum retry count without returning exit code 0.
2111	NumFailedTasks *int64 `json:"numFailedTasks,omitempty"`
2112	NumTaskRetries *int64 `json:"numTaskRetries,omitempty"`
2113	// WaitTime - The wait time for a task is defined as the elapsed time between the creation of the task and the start of task execution. (If the task is retried due to failures, the wait time is the time to the most recent task execution.) This value is only reported in the account lifetime statistics; it is not included in the job statistics.
2114	WaitTime *string `json:"waitTime,omitempty"`
2115}
2116
2117// JobTerminateParameter ...
2118type JobTerminateParameter struct {
2119	TerminateReason *string `json:"terminateReason,omitempty"`
2120}
2121
2122// JobUpdateParameter ...
2123type JobUpdateParameter struct {
2124	// Priority - Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. If omitted, it is set to the default value 0.
2125	Priority *int32 `json:"priority,omitempty"`
2126	// Constraints - If omitted, the constraints are cleared.
2127	Constraints *JobConstraints `json:"constraints,omitempty"`
2128	// PoolInfo - You may change the pool for a job only when the job is disabled. The Update Job call will fail if you include the poolInfo element and the job is not disabled. If you specify an autoPoolSpecification specification in the poolInfo, only the keepAlive property can be updated, and then only if the auto pool has a poolLifetimeOption of job.
2129	PoolInfo *PoolInformation `json:"poolInfo,omitempty"`
2130	// Metadata - If omitted, it takes the default value of an empty list; in effect, any existing metadata is deleted.
2131	Metadata *[]MetadataItem `json:"metadata,omitempty"`
2132	// OnAllTasksComplete - If omitted, the completion behavior is set to noaction. If the current value is terminatejob, this is an error because a job's completion behavior may not be changed from terminatejob to noaction. Possible values include: 'NoAction', 'TerminateJob'
2133	OnAllTasksComplete OnAllTasksComplete `json:"onAllTasksComplete,omitempty"`
2134}
2135
2136// MetadataItem the Batch service does not assign any meaning to this metadata; it is solely for the use of user
2137// code.
2138type MetadataItem struct {
2139	Name  *string `json:"name,omitempty"`
2140	Value *string `json:"value,omitempty"`
2141}
2142
2143// MultiInstanceSettings multi-instance tasks are commonly used to support MPI tasks.
2144type MultiInstanceSettings struct {
2145	NumberOfInstances *int32 `json:"numberOfInstances,omitempty"`
2146	// CoordinationCommandLine - A typical coordination command line launches a background service and verifies that the service is ready to process inter-node messages.
2147	CoordinationCommandLine *string `json:"coordinationCommandLine,omitempty"`
2148	// CommonResourceFiles - The difference between common resource files and task resource files is that common resource files are downloaded for all subtasks including the primary, whereas task resource files are downloaded only for the primary.
2149	CommonResourceFiles *[]ResourceFile `json:"commonResourceFiles,omitempty"`
2150}
2151
2152// NameValuePair ...
2153type NameValuePair struct {
2154	Name  *string `json:"name,omitempty"`
2155	Value *string `json:"value,omitempty"`
2156}
2157
2158// NetworkConfiguration the network configuration for a pool.
2159type NetworkConfiguration struct {
2160	// SubnetID - The virtual network must be in the same region and subscription as the Azure Batch account. The specified subnet should have enough free IP addresses to accommodate the number of nodes in the pool. If the subnet doesn't have enough free IP addresses, the pool will partially allocate compute nodes, and a resize error will occur. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet. The specified subnet must allow communication from the Azure Batch service to be able to schedule tasks on the compute nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the compute nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the compute nodes to unusable. This property can only be specified for pools created with a cloudServiceConfiguration.
2161	SubnetID *string `json:"subnetId,omitempty"`
2162}
2163
2164// NodeAgentSku the Batch node agent is a program that runs on each node in the pool, and provides the
2165// command-and-control interface between the node and the Batch service. There are different implementations of the
2166// node agent, known as SKUs, for different operating systems.
2167type NodeAgentSku struct {
2168	ID *string `json:"id,omitempty"`
2169	// VerifiedImageReferences - This collection is not exhaustive (the node agent may be compatible with other images).
2170	VerifiedImageReferences *[]ImageReference `json:"verifiedImageReferences,omitempty"`
2171	// OsType - Possible values include: 'OSTypeLinux', 'OSTypeWindows', 'OSTypeUnmapped'
2172	OsType OSType `json:"osType,omitempty"`
2173}
2174
2175// NodeDisableSchedulingParameter ...
2176type NodeDisableSchedulingParameter struct {
2177	// NodeDisableSchedulingOption - The default value is requeue. Possible values include: 'DisableComputeNodeSchedulingOptionRequeue', 'DisableComputeNodeSchedulingOptionTerminate', 'DisableComputeNodeSchedulingOptionTaskcompletion'
2178	NodeDisableSchedulingOption DisableComputeNodeSchedulingOption `json:"nodeDisableSchedulingOption,omitempty"`
2179}
2180
2181// NodeFile ...
2182type NodeFile struct {
2183	Name        *string         `json:"name,omitempty"`
2184	URL         *string         `json:"url,omitempty"`
2185	IsDirectory *bool           `json:"isDirectory,omitempty"`
2186	Properties  *FileProperties `json:"properties,omitempty"`
2187}
2188
2189// NodeFileListResult ...
2190type NodeFileListResult struct {
2191	autorest.Response `json:"-"`
2192	Value             *[]NodeFile `json:"value,omitempty"`
2193	OdataNextLink     *string     `json:"odata.nextLink,omitempty"`
2194}
2195
2196// NodeFileListResultIterator provides access to a complete listing of NodeFile values.
2197type NodeFileListResultIterator struct {
2198	i    int
2199	page NodeFileListResultPage
2200}
2201
2202// Next advances to the next value.  If there was an error making
2203// the request the iterator does not advance and the error is returned.
2204func (iter *NodeFileListResultIterator) Next() error {
2205	iter.i++
2206	if iter.i < len(iter.page.Values()) {
2207		return nil
2208	}
2209	err := iter.page.Next()
2210	if err != nil {
2211		iter.i--
2212		return err
2213	}
2214	iter.i = 0
2215	return nil
2216}
2217
2218// NotDone returns true if the enumeration should be started or is not yet complete.
2219func (iter NodeFileListResultIterator) NotDone() bool {
2220	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2221}
2222
2223// Response returns the raw server response from the last page request.
2224func (iter NodeFileListResultIterator) Response() NodeFileListResult {
2225	return iter.page.Response()
2226}
2227
2228// Value returns the current value or a zero-initialized value if the
2229// iterator has advanced beyond the end of the collection.
2230func (iter NodeFileListResultIterator) Value() NodeFile {
2231	if !iter.page.NotDone() {
2232		return NodeFile{}
2233	}
2234	return iter.page.Values()[iter.i]
2235}
2236
2237// IsEmpty returns true if the ListResult contains no values.
2238func (nflr NodeFileListResult) IsEmpty() bool {
2239	return nflr.Value == nil || len(*nflr.Value) == 0
2240}
2241
2242// nodeFileListResultPreparer prepares a request to retrieve the next set of results.
2243// It returns nil if no more results exist.
2244func (nflr NodeFileListResult) nodeFileListResultPreparer() (*http.Request, error) {
2245	if nflr.OdataNextLink == nil || len(to.String(nflr.OdataNextLink)) < 1 {
2246		return nil, nil
2247	}
2248	return autorest.Prepare(&http.Request{},
2249		autorest.AsJSON(),
2250		autorest.AsGet(),
2251		autorest.WithBaseURL(to.String(nflr.OdataNextLink)))
2252}
2253
2254// NodeFileListResultPage contains a page of NodeFile values.
2255type NodeFileListResultPage struct {
2256	fn   func(NodeFileListResult) (NodeFileListResult, error)
2257	nflr NodeFileListResult
2258}
2259
2260// Next advances to the next page of values.  If there was an error making
2261// the request the page does not advance and the error is returned.
2262func (page *NodeFileListResultPage) Next() error {
2263	next, err := page.fn(page.nflr)
2264	if err != nil {
2265		return err
2266	}
2267	page.nflr = next
2268	return nil
2269}
2270
2271// NotDone returns true if the page enumeration should be started or is not yet complete.
2272func (page NodeFileListResultPage) NotDone() bool {
2273	return !page.nflr.IsEmpty()
2274}
2275
2276// Response returns the raw server response from the last page request.
2277func (page NodeFileListResultPage) Response() NodeFileListResult {
2278	return page.nflr
2279}
2280
2281// Values returns the slice of values for the current page or nil if there are no values.
2282func (page NodeFileListResultPage) Values() []NodeFile {
2283	if page.nflr.IsEmpty() {
2284		return nil
2285	}
2286	return *page.nflr.Value
2287}
2288
2289// NodeRebootParameter ...
2290type NodeRebootParameter struct {
2291	// NodeRebootOption - The default value is requeue. Possible values include: 'ComputeNodeRebootOptionRequeue', 'ComputeNodeRebootOptionTerminate', 'ComputeNodeRebootOptionTaskcompletion', 'ComputeNodeRebootOptionRetaineddata'
2292	NodeRebootOption ComputeNodeRebootOption `json:"nodeRebootOption,omitempty"`
2293}
2294
2295// NodeReimageParameter ...
2296type NodeReimageParameter struct {
2297	// NodeReimageOption - The default value is requeue. Possible values include: 'ComputeNodeReimageOptionRequeue', 'ComputeNodeReimageOptionTerminate', 'ComputeNodeReimageOptionTaskcompletion', 'ComputeNodeReimageOptionRetaineddata'
2298	NodeReimageOption ComputeNodeReimageOption `json:"nodeReimageOption,omitempty"`
2299}
2300
2301// NodeRemoveParameter ...
2302type NodeRemoveParameter struct {
2303	NodeList *[]string `json:"nodeList,omitempty"`
2304	// ResizeTimeout - The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).
2305	ResizeTimeout *string `json:"resizeTimeout,omitempty"`
2306	// NodeDeallocationOption - The default value is requeue. Possible values include: 'Requeue', 'Terminate', 'Taskcompletion', 'Retaineddata'
2307	NodeDeallocationOption ComputeNodeDeallocationOption `json:"nodeDeallocationOption,omitempty"`
2308}
2309
2310// NodeUpdateUserParameter ...
2311type NodeUpdateUserParameter struct {
2312	// Password - The password is required for Windows nodes (those created with 'cloudServiceConfiguration', or created with 'virtualMachineConfiguration' using a Windows image reference). For Linux compute nodes, the password can optionally be specified along with the sshPublicKey property. If omitted, any existing password is removed.
2313	Password *string `json:"password,omitempty"`
2314	// ExpiryTime - If omitted, the default is 1 day from the current time. For Linux compute nodes, the expiryTime has a precision up to a day.
2315	ExpiryTime *date.Time `json:"expiryTime,omitempty"`
2316	// SSHPublicKey - The public key should be compatible with OpenSSH encoding and should be base 64 encoded. This property can be specified only for Linux nodes. If this is specified for a Windows node, then the Batch service rejects the request; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). If omitted, any existing SSH public key is removed.
2317	SSHPublicKey *string `json:"sshPublicKey,omitempty"`
2318}
2319
2320// PoolAddParameter ...
2321type PoolAddParameter struct {
2322	// ID - The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two pool IDs within an account that differ only by case).
2323	ID *string `json:"id,omitempty"`
2324	// DisplayName - The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
2325	DisplayName *string `json:"displayName,omitempty"`
2326	// VMSize - For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall. For information about available VM sizes for pools using images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series).
2327	VMSize *string `json:"vmSize,omitempty"`
2328	// CloudServiceConfiguration - This property and virtualMachineConfiguration are mutually exclusive and one of the properties must be specified.
2329	CloudServiceConfiguration *CloudServiceConfiguration `json:"cloudServiceConfiguration,omitempty"`
2330	// VirtualMachineConfiguration - This property and cloudServiceConfiguration are mutually exclusive and one of the properties must be specified.
2331	VirtualMachineConfiguration *VirtualMachineConfiguration `json:"virtualMachineConfiguration,omitempty"`
2332	// ResizeTimeout - This timeout applies only to manual scaling; it has no effect when enableAutoScale is set to true. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).
2333	ResizeTimeout *string `json:"resizeTimeout,omitempty"`
2334	// TargetDedicated - This property must have the default value if enableAutoScale is true. It is required if enableAutoScale is false.
2335	TargetDedicated *int32 `json:"targetDedicated,omitempty"`
2336	// EnableAutoScale - If true, the autoScaleFormula property must be set. If false, the targetDedicated property must be set. The default value is false.
2337	EnableAutoScale *bool `json:"enableAutoScale,omitempty"`
2338	// AutoScaleFormula - This property must not be specified if enableAutoScale is set to false. It is required if enableAutoScale is set to true. The formula is checked for validity before the pool is created. If the formula is not valid, the Batch service rejects the request with detailed error information. For more information about specifying this formula, see 'Automatically scale compute nodes in an Azure Batch pool' (https://azure.microsoft.com/documentation/articles/batch-automatic-scaling/).
2339	AutoScaleFormula *string `json:"autoScaleFormula,omitempty"`
2340	// AutoScaleEvaluationInterval - The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).
2341	AutoScaleEvaluationInterval *string `json:"autoScaleEvaluationInterval,omitempty"`
2342	// EnableInterNodeCommunication - Enabling inter-node communication limits the maximum size of the pool due to deployment restrictions on the nodes of the pool. This may result in the pool not reaching its desired size. The default value is false.
2343	EnableInterNodeCommunication *bool                 `json:"enableInterNodeCommunication,omitempty"`
2344	NetworkConfiguration         *NetworkConfiguration `json:"networkConfiguration,omitempty"`
2345	// StartTask - The task runs when the node is added to the pool or when the node is restarted.
2346	StartTask *StartTask `json:"startTask,omitempty"`
2347	// CertificateReferences - For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of remoteuser, a certs directory is created in the user's home directory (e.g., /home/<user-name>/certs) where certificates are placed.
2348	CertificateReferences *[]CertificateReference `json:"certificateReferences,omitempty"`
2349	// ApplicationPackageReferences - This property is currently not supported on pools created using the virtualMachineConfiguration (IaaS) property.
2350	ApplicationPackageReferences *[]ApplicationPackageReference `json:"applicationPackageReferences,omitempty"`
2351	// MaxTasksPerNode - The default value is 1. The maximum value of this setting depends on the size of the compute nodes in the pool (the vmSize setting).
2352	MaxTasksPerNode      *int32                `json:"maxTasksPerNode,omitempty"`
2353	TaskSchedulingPolicy *TaskSchedulingPolicy `json:"taskSchedulingPolicy,omitempty"`
2354	// Metadata - The Batch service does not assign any meaning to metadata; it is solely for the use of user code.
2355	Metadata *[]MetadataItem `json:"metadata,omitempty"`
2356}
2357
2358// PoolEnableAutoScaleParameter ...
2359type PoolEnableAutoScaleParameter struct {
2360	// AutoScaleFormula - The formula is checked for validity before it is applied to the pool. If the formula is not valid, the Batch service rejects the request with detailed error information. For more information about specifying this formula, see Automatically scale compute nodes in an Azure Batch pool (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling).
2361	AutoScaleFormula *string `json:"autoScaleFormula,omitempty"`
2362	// AutoScaleEvaluationInterval - The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). If you specify a new interval, then the existing autoscale evaluation schedule will be stopped and a new autoscale evaluation schedule will be started, with its starting time being the time when this request was issued.
2363	AutoScaleEvaluationInterval *string `json:"autoScaleEvaluationInterval,omitempty"`
2364}
2365
2366// PoolEvaluateAutoScaleParameter ...
2367type PoolEvaluateAutoScaleParameter struct {
2368	// AutoScaleFormula - The formula is validated and its results calculated, but it is not applied to the pool. To apply the formula to the pool, 'Enable automatic scaling on a pool'. For more information about specifying this formula, see Automatically scale compute nodes in an Azure Batch pool (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling).
2369	AutoScaleFormula *string `json:"autoScaleFormula,omitempty"`
2370}
2371
2372// PoolInformation ...
2373type PoolInformation struct {
2374	// PoolID - You must ensure that the pool referenced by this property exists. If the pool does not exist at the time the Batch service tries to schedule a job, no tasks for the job will run until you create a pool with that id. Note that the Batch service will not reject the job request; it will simply not run tasks until the pool exists. You must specify either the pool ID or the auto pool specification, but not both.
2375	PoolID *string `json:"poolId,omitempty"`
2376	// AutoPoolSpecification - If auto pool creation fails, the Batch service moves the job to a completed state, and the pool creation error is set in the job's scheduling error property. The Batch service manages the lifetime (both creation and, unless keepAlive is specified, deletion) of the auto pool. Any user actions that affect the lifetime of the auto pool while the job is active will result in unexpected behavior. You must specify either the pool ID or the auto pool specification, but not both.
2377	AutoPoolSpecification *AutoPoolSpecification `json:"autoPoolSpecification,omitempty"`
2378}
2379
2380// PoolListPoolUsageMetricsResult ...
2381type PoolListPoolUsageMetricsResult struct {
2382	autorest.Response `json:"-"`
2383	Value             *[]PoolUsageMetrics `json:"value,omitempty"`
2384	OdataNextLink     *string             `json:"odata.nextLink,omitempty"`
2385}
2386
2387// PoolListPoolUsageMetricsResultIterator provides access to a complete listing of PoolUsageMetrics values.
2388type PoolListPoolUsageMetricsResultIterator struct {
2389	i    int
2390	page PoolListPoolUsageMetricsResultPage
2391}
2392
2393// Next advances to the next value.  If there was an error making
2394// the request the iterator does not advance and the error is returned.
2395func (iter *PoolListPoolUsageMetricsResultIterator) Next() error {
2396	iter.i++
2397	if iter.i < len(iter.page.Values()) {
2398		return nil
2399	}
2400	err := iter.page.Next()
2401	if err != nil {
2402		iter.i--
2403		return err
2404	}
2405	iter.i = 0
2406	return nil
2407}
2408
2409// NotDone returns true if the enumeration should be started or is not yet complete.
2410func (iter PoolListPoolUsageMetricsResultIterator) NotDone() bool {
2411	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2412}
2413
2414// Response returns the raw server response from the last page request.
2415func (iter PoolListPoolUsageMetricsResultIterator) Response() PoolListPoolUsageMetricsResult {
2416	return iter.page.Response()
2417}
2418
2419// Value returns the current value or a zero-initialized value if the
2420// iterator has advanced beyond the end of the collection.
2421func (iter PoolListPoolUsageMetricsResultIterator) Value() PoolUsageMetrics {
2422	if !iter.page.NotDone() {
2423		return PoolUsageMetrics{}
2424	}
2425	return iter.page.Values()[iter.i]
2426}
2427
2428// IsEmpty returns true if the ListResult contains no values.
2429func (plpumr PoolListPoolUsageMetricsResult) IsEmpty() bool {
2430	return plpumr.Value == nil || len(*plpumr.Value) == 0
2431}
2432
2433// poolListPoolUsageMetricsResultPreparer prepares a request to retrieve the next set of results.
2434// It returns nil if no more results exist.
2435func (plpumr PoolListPoolUsageMetricsResult) poolListPoolUsageMetricsResultPreparer() (*http.Request, error) {
2436	if plpumr.OdataNextLink == nil || len(to.String(plpumr.OdataNextLink)) < 1 {
2437		return nil, nil
2438	}
2439	return autorest.Prepare(&http.Request{},
2440		autorest.AsJSON(),
2441		autorest.AsGet(),
2442		autorest.WithBaseURL(to.String(plpumr.OdataNextLink)))
2443}
2444
2445// PoolListPoolUsageMetricsResultPage contains a page of PoolUsageMetrics values.
2446type PoolListPoolUsageMetricsResultPage struct {
2447	fn     func(PoolListPoolUsageMetricsResult) (PoolListPoolUsageMetricsResult, error)
2448	plpumr PoolListPoolUsageMetricsResult
2449}
2450
2451// Next advances to the next page of values.  If there was an error making
2452// the request the page does not advance and the error is returned.
2453func (page *PoolListPoolUsageMetricsResultPage) Next() error {
2454	next, err := page.fn(page.plpumr)
2455	if err != nil {
2456		return err
2457	}
2458	page.plpumr = next
2459	return nil
2460}
2461
2462// NotDone returns true if the page enumeration should be started or is not yet complete.
2463func (page PoolListPoolUsageMetricsResultPage) NotDone() bool {
2464	return !page.plpumr.IsEmpty()
2465}
2466
2467// Response returns the raw server response from the last page request.
2468func (page PoolListPoolUsageMetricsResultPage) Response() PoolListPoolUsageMetricsResult {
2469	return page.plpumr
2470}
2471
2472// Values returns the slice of values for the current page or nil if there are no values.
2473func (page PoolListPoolUsageMetricsResultPage) Values() []PoolUsageMetrics {
2474	if page.plpumr.IsEmpty() {
2475		return nil
2476	}
2477	return *page.plpumr.Value
2478}
2479
2480// PoolPatchParameter ...
2481type PoolPatchParameter struct {
2482	// StartTask - If omitted, any existing start task is left unchanged.
2483	StartTask *StartTask `json:"startTask,omitempty"`
2484	// CertificateReferences - If omitted, any existing certificate references are left unchanged. For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of remoteuser, a certs directory is created in the user's home directory (e.g., /home/<user-name>/certs) where certificates are placed.
2485	CertificateReferences *[]CertificateReference `json:"certificateReferences,omitempty"`
2486	// ApplicationPackageReferences - Changes to application package references affect all new compute nodes joining the pool, but do not affect compute nodes that are already in the pool until they are rebooted or reimaged. If this element is present, it replaces any existing application package references. If you specify an empty collection, then all application package references are removed from the pool. If omitted, any existing application package references are left unchanged.
2487	ApplicationPackageReferences *[]ApplicationPackageReference `json:"applicationPackageReferences,omitempty"`
2488	// Metadata - If this element is present, it replaces any existing metadata configured on the pool. If you specify an empty collection, any metadata is removed from the pool. If omitted, any existing metadata is left unchanged.
2489	Metadata *[]MetadataItem `json:"metadata,omitempty"`
2490}
2491
2492// PoolResizeParameter ...
2493type PoolResizeParameter struct {
2494	TargetDedicated *int32 `json:"targetDedicated,omitempty"`
2495	// ResizeTimeout - The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).
2496	ResizeTimeout *string `json:"resizeTimeout,omitempty"`
2497	// NodeDeallocationOption - The default value is requeue. Possible values include: 'Requeue', 'Terminate', 'Taskcompletion', 'Retaineddata'
2498	NodeDeallocationOption ComputeNodeDeallocationOption `json:"nodeDeallocationOption,omitempty"`
2499}
2500
2501// PoolSpecification ...
2502type PoolSpecification struct {
2503	// DisplayName - The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
2504	DisplayName *string `json:"displayName,omitempty"`
2505	// VMSize - For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall. For information about available VM sizes for pools using images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series).
2506	VMSize *string `json:"vmSize,omitempty"`
2507	// CloudServiceConfiguration - This property must be specified if the pool needs to be created with Azure PaaS VMs. This property and virtualMachineConfiguration are mutually exclusive and one of the properties must be specified. If neither is specified then the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).
2508	CloudServiceConfiguration *CloudServiceConfiguration `json:"cloudServiceConfiguration,omitempty"`
2509	// VirtualMachineConfiguration - This property must be specified if the pool needs to be created with Azure IaaS VMs. This property and cloudServiceConfiguration are mutually exclusive and one of the properties must be specified. If neither is specified then the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).
2510	VirtualMachineConfiguration *VirtualMachineConfiguration `json:"virtualMachineConfiguration,omitempty"`
2511	// MaxTasksPerNode - The default value is 1. The maximum value of this setting depends on the size of the compute nodes in the pool (the vmSize setting).
2512	MaxTasksPerNode *int32 `json:"maxTasksPerNode,omitempty"`
2513	// TaskSchedulingPolicy - How tasks are distributed among compute nodes in the pool.
2514	TaskSchedulingPolicy *TaskSchedulingPolicy `json:"taskSchedulingPolicy,omitempty"`
2515	// ResizeTimeout - This timeout applies only to manual scaling; it has no effect when enableAutoScale is set to true. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service rejects the request with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).
2516	ResizeTimeout *string `json:"resizeTimeout,omitempty"`
2517	// TargetDedicated - This property must not be specified if enableAutoScale is set to true. It is required if enableAutoScale is set to false.
2518	TargetDedicated *int32 `json:"targetDedicated,omitempty"`
2519	// EnableAutoScale - If false, the targetDedicated element is required. If true, the autoScaleFormula element is required. The pool automatically resizes according to the formula. The default value is false.
2520	EnableAutoScale *bool `json:"enableAutoScale,omitempty"`
2521	// AutoScaleFormula - This property must not be specified if enableAutoScale is set to false. It is required if enableAutoScale is set to true. The formula is checked for validity before the pool is created. If the formula is not valid, the Batch service rejects the request with detailed error information.
2522	AutoScaleFormula *string `json:"autoScaleFormula,omitempty"`
2523	// AutoScaleEvaluationInterval - The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).
2524	AutoScaleEvaluationInterval *string `json:"autoScaleEvaluationInterval,omitempty"`
2525	// EnableInterNodeCommunication - Enabling inter-node communication limits the maximum size of the pool due to deployment restrictions on the nodes of the pool. This may result in the pool not reaching its desired size. The default value is false.
2526	EnableInterNodeCommunication *bool                 `json:"enableInterNodeCommunication,omitempty"`
2527	NetworkConfiguration         *NetworkConfiguration `json:"networkConfiguration,omitempty"`
2528	StartTask                    *StartTask            `json:"startTask,omitempty"`
2529	// CertificateReferences - For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of remoteuser, a certs directory is created in the user's home directory (e.g., /home/<user-name>/certs) where certificates are placed.
2530	CertificateReferences *[]CertificateReference `json:"certificateReferences,omitempty"`
2531	// ApplicationPackageReferences - This property is currently not supported on auto pools created with the virtualMachineConfiguration (IaaS) property.
2532	ApplicationPackageReferences *[]ApplicationPackageReference `json:"applicationPackageReferences,omitempty"`
2533	// Metadata - The Batch service does not assign any meaning to metadata; it is solely for the use of user code.
2534	Metadata *[]MetadataItem `json:"metadata,omitempty"`
2535}
2536
2537// PoolStatistics ...
2538type PoolStatistics struct {
2539	autorest.Response `json:"-"`
2540	URL               *string             `json:"url,omitempty"`
2541	StartTime         *date.Time          `json:"startTime,omitempty"`
2542	LastUpdateTime    *date.Time          `json:"lastUpdateTime,omitempty"`
2543	UsageStats        *UsageStatistics    `json:"usageStats,omitempty"`
2544	ResourceStats     *ResourceStatistics `json:"resourceStats,omitempty"`
2545}
2546
2547// PoolUpdatePropertiesParameter ...
2548type PoolUpdatePropertiesParameter struct {
2549	// StartTask - If this element is present, it overwrites any existing start task. If omitted, any existing start task is removed from the pool.
2550	StartTask *StartTask `json:"startTask,omitempty"`
2551	// CertificateReferences - If you specify an empty collection, any existing certificate references are removed from the pool. For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of remoteuser, a certs directory is created in the user's home directory (e.g., /home/<user-name>/certs) where certificates are placed.
2552	CertificateReferences *[]CertificateReference `json:"certificateReferences,omitempty"`
2553	// ApplicationPackageReferences - Changes to application package references affect all new compute nodes joining the pool, but do not affect compute nodes that are already in the pool until they are rebooted or reimaged. The list replaces any existing application package references. If omitted, or if you specify an empty collection, any existing application packages references are removed from the pool.
2554	ApplicationPackageReferences *[]ApplicationPackageReference `json:"applicationPackageReferences,omitempty"`
2555	// Metadata - This list replaces any existing metadata configured on the pool. If omitted, or if you specify an empty collection, any existing metadata is removed from the pool.
2556	Metadata *[]MetadataItem `json:"metadata,omitempty"`
2557}
2558
2559// PoolUpgradeOSParameter ...
2560type PoolUpgradeOSParameter struct {
2561	TargetOSVersion *string `json:"targetOSVersion,omitempty"`
2562}
2563
2564// PoolUsageMetrics ...
2565type PoolUsageMetrics struct {
2566	PoolID    *string    `json:"poolId,omitempty"`
2567	StartTime *date.Time `json:"startTime,omitempty"`
2568	EndTime   *date.Time `json:"endTime,omitempty"`
2569	// VMSize - For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall. For information about available VM sizes for pools using images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series).
2570	VMSize         *string  `json:"vmSize,omitempty"`
2571	TotalCoreHours *float64 `json:"totalCoreHours,omitempty"`
2572	DataIngressGiB *float64 `json:"dataIngressGiB,omitempty"`
2573	DataEgressGiB  *float64 `json:"dataEgressGiB,omitempty"`
2574}
2575
2576// ReadCloser ...
2577type ReadCloser struct {
2578	autorest.Response `json:"-"`
2579	Value             *io.ReadCloser `json:"value,omitempty"`
2580}
2581
2582// RecentJob ...
2583type RecentJob struct {
2584	ID  *string `json:"id,omitempty"`
2585	URL *string `json:"url,omitempty"`
2586}
2587
2588// ResizeError ...
2589type ResizeError struct {
2590	Code    *string          `json:"code,omitempty"`
2591	Message *string          `json:"message,omitempty"`
2592	Values  *[]NameValuePair `json:"values,omitempty"`
2593}
2594
2595// ResourceFile ...
2596type ResourceFile struct {
2597	// BlobSource - This URL must be readable using anonymous access; that is, the Batch service does not present any credentials when downloading the blob. There are two ways to get such a URL for a blob in Azure storage: include a Shared Access Signature (SAS) granting read permissions on the blob, or set the ACL for the blob or its container to allow public access.
2598	BlobSource *string `json:"blobSource,omitempty"`
2599	FilePath   *string `json:"filePath,omitempty"`
2600	// FileMode - This property applies only to files being downloaded to Linux compute nodes. It will be ignored if it is specified for a resourceFile which will be downloaded to a Windows node. If this property is not specified for a Linux node, then a default value of 0770 is applied to the file.
2601	FileMode *string `json:"fileMode,omitempty"`
2602}
2603
2604// ResourceStatistics ...
2605type ResourceStatistics struct {
2606	StartTime        *date.Time `json:"startTime,omitempty"`
2607	LastUpdateTime   *date.Time `json:"lastUpdateTime,omitempty"`
2608	AvgCPUPercentage *float64   `json:"avgCPUPercentage,omitempty"`
2609	AvgMemoryGiB     *float64   `json:"avgMemoryGiB,omitempty"`
2610	PeakMemoryGiB    *float64   `json:"peakMemoryGiB,omitempty"`
2611	AvgDiskGiB       *float64   `json:"avgDiskGiB,omitempty"`
2612	PeakDiskGiB      *float64   `json:"peakDiskGiB,omitempty"`
2613	DiskReadIOps     *int64     `json:"diskReadIOps,omitempty"`
2614	DiskWriteIOps    *int64     `json:"diskWriteIOps,omitempty"`
2615	DiskReadGiB      *float64   `json:"diskReadGiB,omitempty"`
2616	DiskWriteGiB     *float64   `json:"diskWriteGiB,omitempty"`
2617	NetworkReadGiB   *float64   `json:"networkReadGiB,omitempty"`
2618	NetworkWriteGiB  *float64   `json:"networkWriteGiB,omitempty"`
2619}
2620
2621// Schedule ...
2622type Schedule struct {
2623	// DoNotRunUntil - If you do not specify a doNotRunUntil time, the schedule becomes ready to create jobs immediately.
2624	DoNotRunUntil *date.Time `json:"doNotRunUntil,omitempty"`
2625	// DoNotRunAfter - If you do not specify a doNotRunAfter time, and you are creating a recurring job schedule, the job schedule will remain active until you explicitly terminate it.
2626	DoNotRunAfter *date.Time `json:"doNotRunAfter,omitempty"`
2627	// StartWindow - If a job is not created within the startWindow interval, then the 'opportunity' is lost; no job will be created until the next recurrence of the schedule. If the schedule is recurring, and the startWindow is longer than the recurrence interval, then this is equivalent to an infinite startWindow, because the job that is 'due' in one recurrenceInterval is not carried forward into the next recurrence interval. The default is infinite. The minimum value is 1 minute. If you specify a lower value, the Batch service rejects the schedule with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).
2628	StartWindow *string `json:"startWindow,omitempty"`
2629	// RecurrenceInterval - Because a job schedule can have at most one active job under it at any given time, if it is time to create a new job under a job schedule, but the previous job is still running, the Batch service will not create the new job until the previous job finishes. If the previous job does not finish within the startWindow period of the new recurrenceInterval, then no new job will be scheduled for that interval. For recurring jobs, you should normally specify a jobManagerTask in the jobSpecification. If you do not use jobManagerTask, you will need an external process to monitor when jobs are created, add tasks to the jobs and terminate the jobs ready for the next recurrence. The default is that the schedule does not recur: one job is created, within the startWindow after the doNotRunUntil time, and the schedule is complete as soon as that job finishes. The minimum value is 1 minute. If you specify a lower value, the Batch service rejects the schedule with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).
2630	RecurrenceInterval *string `json:"recurrenceInterval,omitempty"`
2631}
2632
2633// StartTask ...
2634type StartTask struct {
2635	// CommandLine - The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux.
2636	CommandLine         *string               `json:"commandLine,omitempty"`
2637	ResourceFiles       *[]ResourceFile       `json:"resourceFiles,omitempty"`
2638	EnvironmentSettings *[]EnvironmentSetting `json:"environmentSettings,omitempty"`
2639	RunElevated         *bool                 `json:"runElevated,omitempty"`
2640	// MaxTaskRetryCount - The Batch service retries a task if its exit code is nonzero. Note that this value specifically controls the number of retries. The Batch service will try the task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries the task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry the task. If the maximum retry count is -1, the Batch service retries the task without limit.
2641	MaxTaskRetryCount *int32 `json:"maxTaskRetryCount,omitempty"`
2642	// WaitForSuccess - If true and the start task fails on a compute node, the Batch service retries the start task up to its maximum retry count (maxTaskRetryCount). If the task has still not completed successfully after all retries, then the Batch service marks the compute node unusable, and will not schedule tasks to it. This condition can be detected via the node state and scheduling error detail. If false, the Batch service will not wait for the start task to complete. In this case, other tasks can start executing on the compute node while the start task is still running; and even if the start task fails, new tasks will continue to be scheduled on the node. The default is false.
2643	WaitForSuccess *bool `json:"waitForSuccess,omitempty"`
2644}
2645
2646// StartTaskInformation ...
2647type StartTaskInformation struct {
2648	// State - Possible values are: running – The start task is currently running. completed – The start task has exited with exit code 0, or the start task has failed and the retry limit has reached, or the start task process did not run due to scheduling errors. Possible values include: 'StartTaskStateRunning', 'StartTaskStateCompleted'
2649	State StartTaskState `json:"state,omitempty"`
2650	// StartTime - This value is reset every time the task is restarted or retried (that is, this is the most recent time at which the start task started running).
2651	StartTime *date.Time `json:"startTime,omitempty"`
2652	// EndTime - This is the end time of the most recent run of the start task, if that run has completed (even if that run failed and a retry is pending). This element is not present if the start task is currently running.
2653	EndTime *date.Time `json:"endTime,omitempty"`
2654	// ExitCode - This property is set only if the start task is in the completed state. In general, the exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. However, if the Batch service terminates the start task (due to timeout, or user termination via the API) you may see an operating system-defined exit code.
2655	ExitCode        *int32               `json:"exitCode,omitempty"`
2656	SchedulingError *TaskSchedulingError `json:"schedulingError,omitempty"`
2657	// RetryCount - The task is retried if it exits with a nonzero exit code, up to the specified MaxTaskRetryCount.
2658	RetryCount *int32 `json:"retryCount,omitempty"`
2659	// LastRetryTime - This element is present only if the task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the task has been restarted for reasons other than retry; for example, if the compute node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not.
2660	LastRetryTime *date.Time `json:"lastRetryTime,omitempty"`
2661}
2662
2663// SubtaskInformation ...
2664type SubtaskInformation struct {
2665	ID        *int32                  `json:"id,omitempty"`
2666	NodeInfo  *ComputeNodeInformation `json:"nodeInfo,omitempty"`
2667	StartTime *date.Time              `json:"startTime,omitempty"`
2668	// EndTime - This property is set only if the subtask is in the Completed state.
2669	EndTime *date.Time `json:"endTime,omitempty"`
2670	// ExitCode - This property is set only if the subtask is in the completed state. In general, the exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. However, if the Batch service terminates the subtask (due to timeout, or user termination via the API) you may see an operating system-defined exit code.
2671	ExitCode        *int32               `json:"exitCode,omitempty"`
2672	SchedulingError *TaskSchedulingError `json:"schedulingError,omitempty"`
2673	// State - Possible values include: 'TaskStateActive', 'TaskStatePreparing', 'TaskStateRunning', 'TaskStateCompleted'
2674	State               TaskState  `json:"state,omitempty"`
2675	StateTransitionTime *date.Time `json:"stateTransitionTime,omitempty"`
2676	// PreviousState - This property is not set if the subtask is in its initial running state. Possible values include: 'TaskStateActive', 'TaskStatePreparing', 'TaskStateRunning', 'TaskStateCompleted'
2677	PreviousState TaskState `json:"previousState,omitempty"`
2678	// PreviousStateTransitionTime - This property is not set if the subtask is in its initial running state.
2679	PreviousStateTransitionTime *date.Time `json:"previousStateTransitionTime,omitempty"`
2680}
2681
2682// TaskAddCollectionParameter ...
2683type TaskAddCollectionParameter struct {
2684	Value *[]TaskAddParameter `json:"value,omitempty"`
2685}
2686
2687// TaskAddCollectionResult ...
2688type TaskAddCollectionResult struct {
2689	autorest.Response `json:"-"`
2690	Value             *[]TaskAddResult `json:"value,omitempty"`
2691}
2692
2693// TaskAddParameter ...
2694type TaskAddParameter struct {
2695	// ID - The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within a job that differ only by case).
2696	ID *string `json:"id,omitempty"`
2697	// DisplayName - The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
2698	DisplayName *string `json:"displayName,omitempty"`
2699	// CommandLine - For multi-instance tasks, the command line is executed as the primary task, after the primary task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux.
2700	CommandLine *string `json:"commandLine,omitempty"`
2701	// ExitConditions - How the Batch service should respond when the task completes.
2702	ExitConditions *ExitConditions `json:"exitConditions,omitempty"`
2703	// ResourceFiles - For multi-instance tasks, the resource files will only be downloaded to the compute node on which the primary task is executed.
2704	ResourceFiles       *[]ResourceFile       `json:"resourceFiles,omitempty"`
2705	EnvironmentSettings *[]EnvironmentSetting `json:"environmentSettings,omitempty"`
2706	AffinityInfo        *AffinityInformation  `json:"affinityInfo,omitempty"`
2707	// Constraints - If you do not specify constraints, the maxTaskRetryCount is the maxTaskRetryCount specified for the job, and the maxWallClockTime and retentionTime are infinite.
2708	Constraints *TaskConstraints `json:"constraints,omitempty"`
2709	// RunElevated - The default value is false.
2710	RunElevated           *bool                  `json:"runElevated,omitempty"`
2711	MultiInstanceSettings *MultiInstanceSettings `json:"multiInstanceSettings,omitempty"`
2712	// DependsOn - The task will not be scheduled until all depended-on tasks have completed successfully. (If any depended-on tasks fail and exhaust their retry counts, the task will never be scheduled.) If the job does not have usesTaskDependencies set to true, and this element is present, the request fails with error code TaskDependenciesNotSpecifiedOnJob.
2713	DependsOn                    *TaskDependencies              `json:"dependsOn,omitempty"`
2714	ApplicationPackageReferences *[]ApplicationPackageReference `json:"applicationPackageReferences,omitempty"`
2715}
2716
2717// TaskAddResult ...
2718type TaskAddResult struct {
2719	// Status - Possible values include: 'TaskAddStatusSuccess', 'TaskAddStatusClienterror', 'TaskAddStatusServererror', 'TaskAddStatusUnmapped'
2720	Status       TaskAddStatus `json:"status,omitempty"`
2721	TaskID       *string       `json:"taskId,omitempty"`
2722	ETag         *string       `json:"eTag,omitempty"`
2723	LastModified *date.Time    `json:"lastModified,omitempty"`
2724	Location     *string       `json:"location,omitempty"`
2725	Error        *Error        `json:"error,omitempty"`
2726}
2727
2728// TaskConstraints ...
2729type TaskConstraints struct {
2730	// MaxWallClockTime - If this is not specified, there is no time limit on how long the task may run.
2731	MaxWallClockTime *string `json:"maxWallClockTime,omitempty"`
2732	// RetentionTime - The default is infinite, i.e. the task directory will be retained until the compute node is removed or reimaged.
2733	RetentionTime *string `json:"retentionTime,omitempty"`
2734	// MaxTaskRetryCount - Note that this value specifically controls the number of retries. The Batch service will try the task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries the task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry the task. If the maximum retry count is -1, the Batch service retries the task without limit.
2735	MaxTaskRetryCount *int32 `json:"maxTaskRetryCount,omitempty"`
2736}
2737
2738// TaskDependencies ...
2739type TaskDependencies struct {
2740	TaskIds      *[]string      `json:"taskIds,omitempty"`
2741	TaskIDRanges *[]TaskIDRange `json:"taskIdRanges,omitempty"`
2742}
2743
2744// TaskExecutionInformation ...
2745type TaskExecutionInformation struct {
2746	// StartTime - 'Running' corresponds to the running state, so if the task specifies resource files or application packages, then the start time reflects the time at which the task started downloading or deploying these. If the task has been restarted or retried, this is the most recent time at which the task started running. This property is present only for tasks that are in the running or completed state.
2747	StartTime *date.Time `json:"startTime,omitempty"`
2748	// EndTime - This property is set only if the task is in the Completed state.
2749	EndTime *date.Time `json:"endTime,omitempty"`
2750	// ExitCode - This property is set only if the task is in the completed state. In general, the exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. However, if the Batch service terminates the task (due to timeout, or user termination via the API) you may see an operating system-defined exit code.
2751	ExitCode *int32 `json:"exitCode,omitempty"`
2752	// SchedulingError - This property is set only if the task is in the completed state.
2753	SchedulingError *TaskSchedulingError `json:"schedulingError,omitempty"`
2754	// RetryCount - The task is retried if it exits with a nonzero exit code, up to the specified maxTaskRetryCount.
2755	RetryCount *int32 `json:"retryCount,omitempty"`
2756	// LastRetryTime - This element is present only if the task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the task has been restarted for reasons other than retry; for example, if the compute node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not.
2757	LastRetryTime *date.Time `json:"lastRetryTime,omitempty"`
2758	// RequeueCount - When the user removes nodes from a pool (by resizing/shrinking the pool) or when the job is being disabled, the user can specify that running tasks on the nodes be requeued for execution. This count tracks how many times the task has been requeued for these reasons.
2759	RequeueCount *int32 `json:"requeueCount,omitempty"`
2760	// LastRequeueTime - This property is set only if the requeueCount is nonzero.
2761	LastRequeueTime *date.Time `json:"lastRequeueTime,omitempty"`
2762}
2763
2764// TaskIDRange the start and end of the range are inclusive. For example, if a range has start 9 and end 12, then
2765// it represents tasks '9', '10', '11' and '12'.
2766type TaskIDRange struct {
2767	Start *int32 `json:"start,omitempty"`
2768	End   *int32 `json:"end,omitempty"`
2769}
2770
2771// TaskInformation ...
2772type TaskInformation struct {
2773	TaskURL   *string `json:"taskUrl,omitempty"`
2774	JobID     *string `json:"jobId,omitempty"`
2775	TaskID    *string `json:"taskId,omitempty"`
2776	SubtaskID *int32  `json:"subtaskId,omitempty"`
2777	// TaskState - Possible values include: 'TaskStateActive', 'TaskStatePreparing', 'TaskStateRunning', 'TaskStateCompleted'
2778	TaskState     TaskState                 `json:"taskState,omitempty"`
2779	ExecutionInfo *TaskExecutionInformation `json:"executionInfo,omitempty"`
2780}
2781
2782// TaskSchedulingError ...
2783type TaskSchedulingError struct {
2784	// Category - Possible values include: 'SchedulingErrorCategoryUsererror', 'SchedulingErrorCategoryServererror', 'SchedulingErrorCategoryUnmapped'
2785	Category SchedulingErrorCategory `json:"category,omitempty"`
2786	Code     *string                 `json:"code,omitempty"`
2787	Message  *string                 `json:"message,omitempty"`
2788	Details  *[]NameValuePair        `json:"details,omitempty"`
2789}
2790
2791// TaskSchedulingPolicy ...
2792type TaskSchedulingPolicy struct {
2793	// NodeFillType - Possible values include: 'ComputeNodeFillTypeSpread', 'ComputeNodeFillTypePack', 'ComputeNodeFillTypeUnmapped'
2794	NodeFillType ComputeNodeFillType `json:"nodeFillType,omitempty"`
2795}
2796
2797// TaskStatistics ...
2798type TaskStatistics struct {
2799	URL            *string    `json:"url,omitempty"`
2800	StartTime      *date.Time `json:"startTime,omitempty"`
2801	LastUpdateTime *date.Time `json:"lastUpdateTime,omitempty"`
2802	UserCPUTime    *string    `json:"userCPUTime,omitempty"`
2803	KernelCPUTime  *string    `json:"kernelCPUTime,omitempty"`
2804	// WallClockTime - The wall clock time is the elapsed time from when the task started running on a compute node to when it finished (or to the last time the statistics were updated, if the task had not finished by then). If the task was retried, this includes the wall clock time of all the task retries.
2805	WallClockTime *string  `json:"wallClockTime,omitempty"`
2806	ReadIOps      *int64   `json:"readIOps,omitempty"`
2807	WriteIOps     *int64   `json:"writeIOps,omitempty"`
2808	ReadIOGiB     *float64 `json:"readIOGiB,omitempty"`
2809	WriteIOGiB    *float64 `json:"writeIOGiB,omitempty"`
2810	WaitTime      *string  `json:"waitTime,omitempty"`
2811}
2812
2813// TaskUpdateParameter ...
2814type TaskUpdateParameter struct {
2815	// Constraints - If omitted, the task is given the default constraints.
2816	Constraints *TaskConstraints `json:"constraints,omitempty"`
2817}
2818
2819// UsageStatistics ...
2820type UsageStatistics struct {
2821	StartTime         *date.Time `json:"startTime,omitempty"`
2822	LastUpdateTime    *date.Time `json:"lastUpdateTime,omitempty"`
2823	DedicatedCoreTime *string    `json:"dedicatedCoreTime,omitempty"`
2824}
2825
2826// VirtualMachineConfiguration ...
2827type VirtualMachineConfiguration struct {
2828	ImageReference *ImageReference `json:"imageReference,omitempty"`
2829	// NodeAgentSKUID - The Batch node agent is a program that runs on each node in the pool, and provides the command-and-control interface between the node and the Batch service. There are different implementations of the node agent, known as SKUs, for different operating systems. You must specify a node agent SKU which matches the selected image reference. To get the list of supported node agent SKUs along with their list of verified image references, see the 'List supported node agent SKUs' operation.
2830	NodeAgentSKUID *string `json:"nodeAgentSKUId,omitempty"`
2831	// WindowsConfiguration - This property must not be specified if the imageReference property specifies a Linux OS image.
2832	WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
2833}
2834
2835// WindowsConfiguration ...
2836type WindowsConfiguration struct {
2837	// EnableAutomaticUpdates - If omitted, the default value is true.
2838	EnableAutomaticUpdates *bool `json:"enableAutomaticUpdates,omitempty"`
2839}
2840