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	"context"
22	"encoding/json"
23	"github.com/Azure/go-autorest/autorest"
24	"github.com/Azure/go-autorest/autorest/date"
25	"github.com/Azure/go-autorest/autorest/to"
26	"github.com/Azure/go-autorest/tracing"
27	"io"
28	"net/http"
29)
30
31// The package's fully qualified name.
32const fqdn = "github.com/Azure/azure-sdk-for-go/services/batch/2018-03-01.6.1/batch"
33
34// AccountListNodeAgentSkusResult ...
35type AccountListNodeAgentSkusResult struct {
36	autorest.Response `json:"-"`
37	Value             *[]NodeAgentSku `json:"value,omitempty"`
38	OdataNextLink     *string         `json:"odata.nextLink,omitempty"`
39}
40
41// AccountListNodeAgentSkusResultIterator provides access to a complete listing of NodeAgentSku values.
42type AccountListNodeAgentSkusResultIterator struct {
43	i    int
44	page AccountListNodeAgentSkusResultPage
45}
46
47// NextWithContext advances to the next value.  If there was an error making
48// the request the iterator does not advance and the error is returned.
49func (iter *AccountListNodeAgentSkusResultIterator) NextWithContext(ctx context.Context) (err error) {
50	if tracing.IsEnabled() {
51		ctx = tracing.StartSpan(ctx, fqdn+"/AccountListNodeAgentSkusResultIterator.NextWithContext")
52		defer func() {
53			sc := -1
54			if iter.Response().Response.Response != nil {
55				sc = iter.Response().Response.Response.StatusCode
56			}
57			tracing.EndSpan(ctx, sc, err)
58		}()
59	}
60	iter.i++
61	if iter.i < len(iter.page.Values()) {
62		return nil
63	}
64	err = iter.page.NextWithContext(ctx)
65	if err != nil {
66		iter.i--
67		return err
68	}
69	iter.i = 0
70	return nil
71}
72
73// Next advances to the next value.  If there was an error making
74// the request the iterator does not advance and the error is returned.
75// Deprecated: Use NextWithContext() instead.
76func (iter *AccountListNodeAgentSkusResultIterator) Next() error {
77	return iter.NextWithContext(context.Background())
78}
79
80// NotDone returns true if the enumeration should be started or is not yet complete.
81func (iter AccountListNodeAgentSkusResultIterator) NotDone() bool {
82	return iter.page.NotDone() && iter.i < len(iter.page.Values())
83}
84
85// Response returns the raw server response from the last page request.
86func (iter AccountListNodeAgentSkusResultIterator) Response() AccountListNodeAgentSkusResult {
87	return iter.page.Response()
88}
89
90// Value returns the current value or a zero-initialized value if the
91// iterator has advanced beyond the end of the collection.
92func (iter AccountListNodeAgentSkusResultIterator) Value() NodeAgentSku {
93	if !iter.page.NotDone() {
94		return NodeAgentSku{}
95	}
96	return iter.page.Values()[iter.i]
97}
98
99// Creates a new instance of the AccountListNodeAgentSkusResultIterator type.
100func NewAccountListNodeAgentSkusResultIterator(page AccountListNodeAgentSkusResultPage) AccountListNodeAgentSkusResultIterator {
101	return AccountListNodeAgentSkusResultIterator{page: page}
102}
103
104// IsEmpty returns true if the ListResult contains no values.
105func (alnasr AccountListNodeAgentSkusResult) IsEmpty() bool {
106	return alnasr.Value == nil || len(*alnasr.Value) == 0
107}
108
109// hasNextLink returns true if the NextLink is not empty.
110func (alnasr AccountListNodeAgentSkusResult) hasNextLink() bool {
111	return alnasr.OdataNextLink != nil && len(*alnasr.OdataNextLink) != 0
112}
113
114// accountListNodeAgentSkusResultPreparer prepares a request to retrieve the next set of results.
115// It returns nil if no more results exist.
116func (alnasr AccountListNodeAgentSkusResult) accountListNodeAgentSkusResultPreparer(ctx context.Context) (*http.Request, error) {
117	if !alnasr.hasNextLink() {
118		return nil, nil
119	}
120	return autorest.Prepare((&http.Request{}).WithContext(ctx),
121		autorest.AsJSON(),
122		autorest.AsGet(),
123		autorest.WithBaseURL(to.String(alnasr.OdataNextLink)))
124}
125
126// AccountListNodeAgentSkusResultPage contains a page of NodeAgentSku values.
127type AccountListNodeAgentSkusResultPage struct {
128	fn     func(context.Context, AccountListNodeAgentSkusResult) (AccountListNodeAgentSkusResult, error)
129	alnasr AccountListNodeAgentSkusResult
130}
131
132// NextWithContext advances to the next page of values.  If there was an error making
133// the request the page does not advance and the error is returned.
134func (page *AccountListNodeAgentSkusResultPage) NextWithContext(ctx context.Context) (err error) {
135	if tracing.IsEnabled() {
136		ctx = tracing.StartSpan(ctx, fqdn+"/AccountListNodeAgentSkusResultPage.NextWithContext")
137		defer func() {
138			sc := -1
139			if page.Response().Response.Response != nil {
140				sc = page.Response().Response.Response.StatusCode
141			}
142			tracing.EndSpan(ctx, sc, err)
143		}()
144	}
145	for {
146		next, err := page.fn(ctx, page.alnasr)
147		if err != nil {
148			return err
149		}
150		page.alnasr = next
151		if !next.hasNextLink() || !next.IsEmpty() {
152			break
153		}
154	}
155	return nil
156}
157
158// Next advances to the next page of values.  If there was an error making
159// the request the page does not advance and the error is returned.
160// Deprecated: Use NextWithContext() instead.
161func (page *AccountListNodeAgentSkusResultPage) Next() error {
162	return page.NextWithContext(context.Background())
163}
164
165// NotDone returns true if the page enumeration should be started or is not yet complete.
166func (page AccountListNodeAgentSkusResultPage) NotDone() bool {
167	return !page.alnasr.IsEmpty()
168}
169
170// Response returns the raw server response from the last page request.
171func (page AccountListNodeAgentSkusResultPage) Response() AccountListNodeAgentSkusResult {
172	return page.alnasr
173}
174
175// Values returns the slice of values for the current page or nil if there are no values.
176func (page AccountListNodeAgentSkusResultPage) Values() []NodeAgentSku {
177	if page.alnasr.IsEmpty() {
178		return nil
179	}
180	return *page.alnasr.Value
181}
182
183// Creates a new instance of the AccountListNodeAgentSkusResultPage type.
184func NewAccountListNodeAgentSkusResultPage(cur AccountListNodeAgentSkusResult, getNextPage func(context.Context, AccountListNodeAgentSkusResult) (AccountListNodeAgentSkusResult, error)) AccountListNodeAgentSkusResultPage {
185	return AccountListNodeAgentSkusResultPage{
186		fn:     getNextPage,
187		alnasr: cur,
188	}
189}
190
191// AffinityInformation ...
192type AffinityInformation struct {
193	// AffinityID - You can pass the affinityId of a compute node to indicate that this task needs to run on that compute node. Note that this is just a soft affinity. If the target node is busy or unavailable at the time the task is scheduled, then the task will be scheduled elsewhere.
194	AffinityID *string `json:"affinityId,omitempty"`
195}
196
197// ApplicationListResult ...
198type ApplicationListResult struct {
199	autorest.Response `json:"-"`
200	Value             *[]ApplicationSummary `json:"value,omitempty"`
201	OdataNextLink     *string               `json:"odata.nextLink,omitempty"`
202}
203
204// ApplicationListResultIterator provides access to a complete listing of ApplicationSummary values.
205type ApplicationListResultIterator struct {
206	i    int
207	page ApplicationListResultPage
208}
209
210// NextWithContext advances to the next value.  If there was an error making
211// the request the iterator does not advance and the error is returned.
212func (iter *ApplicationListResultIterator) NextWithContext(ctx context.Context) (err error) {
213	if tracing.IsEnabled() {
214		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationListResultIterator.NextWithContext")
215		defer func() {
216			sc := -1
217			if iter.Response().Response.Response != nil {
218				sc = iter.Response().Response.Response.StatusCode
219			}
220			tracing.EndSpan(ctx, sc, err)
221		}()
222	}
223	iter.i++
224	if iter.i < len(iter.page.Values()) {
225		return nil
226	}
227	err = iter.page.NextWithContext(ctx)
228	if err != nil {
229		iter.i--
230		return err
231	}
232	iter.i = 0
233	return nil
234}
235
236// Next advances to the next value.  If there was an error making
237// the request the iterator does not advance and the error is returned.
238// Deprecated: Use NextWithContext() instead.
239func (iter *ApplicationListResultIterator) Next() error {
240	return iter.NextWithContext(context.Background())
241}
242
243// NotDone returns true if the enumeration should be started or is not yet complete.
244func (iter ApplicationListResultIterator) NotDone() bool {
245	return iter.page.NotDone() && iter.i < len(iter.page.Values())
246}
247
248// Response returns the raw server response from the last page request.
249func (iter ApplicationListResultIterator) Response() ApplicationListResult {
250	return iter.page.Response()
251}
252
253// Value returns the current value or a zero-initialized value if the
254// iterator has advanced beyond the end of the collection.
255func (iter ApplicationListResultIterator) Value() ApplicationSummary {
256	if !iter.page.NotDone() {
257		return ApplicationSummary{}
258	}
259	return iter.page.Values()[iter.i]
260}
261
262// Creates a new instance of the ApplicationListResultIterator type.
263func NewApplicationListResultIterator(page ApplicationListResultPage) ApplicationListResultIterator {
264	return ApplicationListResultIterator{page: page}
265}
266
267// IsEmpty returns true if the ListResult contains no values.
268func (alr ApplicationListResult) IsEmpty() bool {
269	return alr.Value == nil || len(*alr.Value) == 0
270}
271
272// hasNextLink returns true if the NextLink is not empty.
273func (alr ApplicationListResult) hasNextLink() bool {
274	return alr.OdataNextLink != nil && len(*alr.OdataNextLink) != 0
275}
276
277// applicationListResultPreparer prepares a request to retrieve the next set of results.
278// It returns nil if no more results exist.
279func (alr ApplicationListResult) applicationListResultPreparer(ctx context.Context) (*http.Request, error) {
280	if !alr.hasNextLink() {
281		return nil, nil
282	}
283	return autorest.Prepare((&http.Request{}).WithContext(ctx),
284		autorest.AsJSON(),
285		autorest.AsGet(),
286		autorest.WithBaseURL(to.String(alr.OdataNextLink)))
287}
288
289// ApplicationListResultPage contains a page of ApplicationSummary values.
290type ApplicationListResultPage struct {
291	fn  func(context.Context, ApplicationListResult) (ApplicationListResult, error)
292	alr ApplicationListResult
293}
294
295// NextWithContext advances to the next page of values.  If there was an error making
296// the request the page does not advance and the error is returned.
297func (page *ApplicationListResultPage) NextWithContext(ctx context.Context) (err error) {
298	if tracing.IsEnabled() {
299		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationListResultPage.NextWithContext")
300		defer func() {
301			sc := -1
302			if page.Response().Response.Response != nil {
303				sc = page.Response().Response.Response.StatusCode
304			}
305			tracing.EndSpan(ctx, sc, err)
306		}()
307	}
308	for {
309		next, err := page.fn(ctx, page.alr)
310		if err != nil {
311			return err
312		}
313		page.alr = next
314		if !next.hasNextLink() || !next.IsEmpty() {
315			break
316		}
317	}
318	return nil
319}
320
321// Next advances to the next page of values.  If there was an error making
322// the request the page does not advance and the error is returned.
323// Deprecated: Use NextWithContext() instead.
324func (page *ApplicationListResultPage) Next() error {
325	return page.NextWithContext(context.Background())
326}
327
328// NotDone returns true if the page enumeration should be started or is not yet complete.
329func (page ApplicationListResultPage) NotDone() bool {
330	return !page.alr.IsEmpty()
331}
332
333// Response returns the raw server response from the last page request.
334func (page ApplicationListResultPage) Response() ApplicationListResult {
335	return page.alr
336}
337
338// Values returns the slice of values for the current page or nil if there are no values.
339func (page ApplicationListResultPage) Values() []ApplicationSummary {
340	if page.alr.IsEmpty() {
341		return nil
342	}
343	return *page.alr.Value
344}
345
346// Creates a new instance of the ApplicationListResultPage type.
347func NewApplicationListResultPage(cur ApplicationListResult, getNextPage func(context.Context, ApplicationListResult) (ApplicationListResult, error)) ApplicationListResultPage {
348	return ApplicationListResultPage{
349		fn:  getNextPage,
350		alr: cur,
351	}
352}
353
354// ApplicationPackageReference ...
355type ApplicationPackageReference struct {
356	ApplicationID *string `json:"applicationId,omitempty"`
357	// Version - If this is omitted on a pool, and no default version is specified for this application, the request fails with the error code InvalidApplicationPackageReferences and HTTP status code 409. If this is omitted on a task, and no default version is specified for this application, the task fails with a pre-processing error.
358	Version *string `json:"version,omitempty"`
359}
360
361// ApplicationSummary ...
362type ApplicationSummary struct {
363	autorest.Response `json:"-"`
364	ID                *string   `json:"id,omitempty"`
365	DisplayName       *string   `json:"displayName,omitempty"`
366	Versions          *[]string `json:"versions,omitempty"`
367}
368
369// AuthenticationTokenSettings ...
370type AuthenticationTokenSettings struct {
371	// Access - The authentication token grants access to a limited set of Batch service operations. Currently the only supported value for the access property is 'job', which grants access to all operations related to the job which contains the task.
372	Access *[]AccessScope `json:"access,omitempty"`
373}
374
375// AutoPoolSpecification ...
376type AutoPoolSpecification struct {
377	// 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.
378	AutoPoolIDPrefix *string `json:"autoPoolIdPrefix,omitempty"`
379	// PoolLifetimeOption - Possible values include: 'PoolLifetimeOptionJobSchedule', 'PoolLifetimeOptionJob'
380	PoolLifetimeOption PoolLifetimeOption `json:"poolLifetimeOption,omitempty"`
381	// 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.
382	KeepAlive *bool              `json:"keepAlive,omitempty"`
383	Pool      *PoolSpecification `json:"pool,omitempty"`
384}
385
386// AutoScaleRun ...
387type AutoScaleRun struct {
388	autorest.Response `json:"-"`
389	Timestamp         *date.Time `json:"timestamp,omitempty"`
390	// Results - Each variable value is returned in the form $variable=value, and variables are separated by semicolons.
391	Results *string            `json:"results,omitempty"`
392	Error   *AutoScaleRunError `json:"error,omitempty"`
393}
394
395// AutoScaleRunError ...
396type AutoScaleRunError struct {
397	Code    *string          `json:"code,omitempty"`
398	Message *string          `json:"message,omitempty"`
399	Values  *[]NameValuePair `json:"values,omitempty"`
400}
401
402// AutoUserSpecification ...
403type AutoUserSpecification struct {
404	// Scope - The default value is task. Possible values include: 'Task', 'Pool'
405	Scope AutoUserScope `json:"scope,omitempty"`
406	// ElevationLevel - The default value is nonAdmin. Possible values include: 'NonAdmin', 'Admin'
407	ElevationLevel ElevationLevel `json:"elevationLevel,omitempty"`
408}
409
410// Certificate a certificate that can be installed on compute nodes and can be used to authenticate
411// operations on the machine.
412type Certificate struct {
413	autorest.Response   `json:"-"`
414	Thumbprint          *string `json:"thumbprint,omitempty"`
415	ThumbprintAlgorithm *string `json:"thumbprintAlgorithm,omitempty"`
416	URL                 *string `json:"url,omitempty"`
417	// State - Possible values include: 'Active', 'Deleting', 'DeleteFailed'
418	State               CertificateState `json:"state,omitempty"`
419	StateTransitionTime *date.Time       `json:"stateTransitionTime,omitempty"`
420	// PreviousState - This property is not set if the certificate is in its initial active state. Possible values include: 'Active', 'Deleting', 'DeleteFailed'
421	PreviousState CertificateState `json:"previousState,omitempty"`
422	// PreviousStateTransitionTime - This property is not set if the certificate is in its initial Active state.
423	PreviousStateTransitionTime *date.Time `json:"previousStateTransitionTime,omitempty"`
424	PublicData                  *string    `json:"publicData,omitempty"`
425	// DeleteCertificateError - This property is set only if the certificate is in the DeleteFailed state.
426	DeleteCertificateError *DeleteCertificateError `json:"deleteCertificateError,omitempty"`
427}
428
429// CertificateAddParameter ...
430type CertificateAddParameter struct {
431	Thumbprint          *string `json:"thumbprint,omitempty"`
432	ThumbprintAlgorithm *string `json:"thumbprintAlgorithm,omitempty"`
433	Data                *string `json:"data,omitempty"`
434	// CertificateFormat - Possible values include: 'Pfx', 'Cer'
435	CertificateFormat CertificateFormat `json:"certificateFormat,omitempty"`
436	// Password - This is required if the certificate format is pfx. It should be omitted if the certificate format is cer.
437	Password *string `json:"password,omitempty"`
438}
439
440// CertificateListResult ...
441type CertificateListResult struct {
442	autorest.Response `json:"-"`
443	Value             *[]Certificate `json:"value,omitempty"`
444	OdataNextLink     *string        `json:"odata.nextLink,omitempty"`
445}
446
447// CertificateListResultIterator provides access to a complete listing of Certificate values.
448type CertificateListResultIterator struct {
449	i    int
450	page CertificateListResultPage
451}
452
453// NextWithContext advances to the next value.  If there was an error making
454// the request the iterator does not advance and the error is returned.
455func (iter *CertificateListResultIterator) NextWithContext(ctx context.Context) (err error) {
456	if tracing.IsEnabled() {
457		ctx = tracing.StartSpan(ctx, fqdn+"/CertificateListResultIterator.NextWithContext")
458		defer func() {
459			sc := -1
460			if iter.Response().Response.Response != nil {
461				sc = iter.Response().Response.Response.StatusCode
462			}
463			tracing.EndSpan(ctx, sc, err)
464		}()
465	}
466	iter.i++
467	if iter.i < len(iter.page.Values()) {
468		return nil
469	}
470	err = iter.page.NextWithContext(ctx)
471	if err != nil {
472		iter.i--
473		return err
474	}
475	iter.i = 0
476	return nil
477}
478
479// Next advances to the next value.  If there was an error making
480// the request the iterator does not advance and the error is returned.
481// Deprecated: Use NextWithContext() instead.
482func (iter *CertificateListResultIterator) Next() error {
483	return iter.NextWithContext(context.Background())
484}
485
486// NotDone returns true if the enumeration should be started or is not yet complete.
487func (iter CertificateListResultIterator) NotDone() bool {
488	return iter.page.NotDone() && iter.i < len(iter.page.Values())
489}
490
491// Response returns the raw server response from the last page request.
492func (iter CertificateListResultIterator) Response() CertificateListResult {
493	return iter.page.Response()
494}
495
496// Value returns the current value or a zero-initialized value if the
497// iterator has advanced beyond the end of the collection.
498func (iter CertificateListResultIterator) Value() Certificate {
499	if !iter.page.NotDone() {
500		return Certificate{}
501	}
502	return iter.page.Values()[iter.i]
503}
504
505// Creates a new instance of the CertificateListResultIterator type.
506func NewCertificateListResultIterator(page CertificateListResultPage) CertificateListResultIterator {
507	return CertificateListResultIterator{page: page}
508}
509
510// IsEmpty returns true if the ListResult contains no values.
511func (clr CertificateListResult) IsEmpty() bool {
512	return clr.Value == nil || len(*clr.Value) == 0
513}
514
515// hasNextLink returns true if the NextLink is not empty.
516func (clr CertificateListResult) hasNextLink() bool {
517	return clr.OdataNextLink != nil && len(*clr.OdataNextLink) != 0
518}
519
520// certificateListResultPreparer prepares a request to retrieve the next set of results.
521// It returns nil if no more results exist.
522func (clr CertificateListResult) certificateListResultPreparer(ctx context.Context) (*http.Request, error) {
523	if !clr.hasNextLink() {
524		return nil, nil
525	}
526	return autorest.Prepare((&http.Request{}).WithContext(ctx),
527		autorest.AsJSON(),
528		autorest.AsGet(),
529		autorest.WithBaseURL(to.String(clr.OdataNextLink)))
530}
531
532// CertificateListResultPage contains a page of Certificate values.
533type CertificateListResultPage struct {
534	fn  func(context.Context, CertificateListResult) (CertificateListResult, error)
535	clr CertificateListResult
536}
537
538// NextWithContext advances to the next page of values.  If there was an error making
539// the request the page does not advance and the error is returned.
540func (page *CertificateListResultPage) NextWithContext(ctx context.Context) (err error) {
541	if tracing.IsEnabled() {
542		ctx = tracing.StartSpan(ctx, fqdn+"/CertificateListResultPage.NextWithContext")
543		defer func() {
544			sc := -1
545			if page.Response().Response.Response != nil {
546				sc = page.Response().Response.Response.StatusCode
547			}
548			tracing.EndSpan(ctx, sc, err)
549		}()
550	}
551	for {
552		next, err := page.fn(ctx, page.clr)
553		if err != nil {
554			return err
555		}
556		page.clr = next
557		if !next.hasNextLink() || !next.IsEmpty() {
558			break
559		}
560	}
561	return nil
562}
563
564// Next advances to the next page of values.  If there was an error making
565// the request the page does not advance and the error is returned.
566// Deprecated: Use NextWithContext() instead.
567func (page *CertificateListResultPage) Next() error {
568	return page.NextWithContext(context.Background())
569}
570
571// NotDone returns true if the page enumeration should be started or is not yet complete.
572func (page CertificateListResultPage) NotDone() bool {
573	return !page.clr.IsEmpty()
574}
575
576// Response returns the raw server response from the last page request.
577func (page CertificateListResultPage) Response() CertificateListResult {
578	return page.clr
579}
580
581// Values returns the slice of values for the current page or nil if there are no values.
582func (page CertificateListResultPage) Values() []Certificate {
583	if page.clr.IsEmpty() {
584		return nil
585	}
586	return *page.clr.Value
587}
588
589// Creates a new instance of the CertificateListResultPage type.
590func NewCertificateListResultPage(cur CertificateListResult, getNextPage func(context.Context, CertificateListResult) (CertificateListResult, error)) CertificateListResultPage {
591	return CertificateListResultPage{
592		fn:  getNextPage,
593		clr: cur,
594	}
595}
596
597// CertificateReference ...
598type CertificateReference struct {
599	Thumbprint          *string `json:"thumbprint,omitempty"`
600	ThumbprintAlgorithm *string `json:"thumbprintAlgorithm,omitempty"`
601	// 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) and certificates are placed in that directory. Possible values include: 'CurrentUser', 'LocalMachine'
602	StoreLocation CertificateStoreLocation `json:"storeLocation,omitempty"`
603	// StoreName - This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). Common store names include: My, Root, CA, Trust, Disallowed, TrustedPeople, TrustedPublisher, AuthRoot, AddressBook, but any custom store name can also be used. The default value is My.
604	StoreName *string `json:"storeName,omitempty"`
605	// Visibility - You can specify more than one visibility in this collection. The default is all accounts.
606	Visibility *[]CertificateVisibility `json:"visibility,omitempty"`
607}
608
609// CloudJob ...
610type CloudJob struct {
611	autorest.Response `json:"-"`
612	// ID - The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an account that differ only by case).
613	ID                   *string `json:"id,omitempty"`
614	DisplayName          *string `json:"displayName,omitempty"`
615	UsesTaskDependencies *bool   `json:"usesTaskDependencies,omitempty"`
616	URL                  *string `json:"url,omitempty"`
617	// 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.
618	ETag *string `json:"eTag,omitempty"`
619	// 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.
620	LastModified *date.Time `json:"lastModified,omitempty"`
621	CreationTime *date.Time `json:"creationTime,omitempty"`
622	// State - Possible values include: 'JobStateActive', 'JobStateDisabling', 'JobStateDisabled', 'JobStateEnabling', 'JobStateTerminating', 'JobStateCompleted', 'JobStateDeleting'
623	State               JobState   `json:"state,omitempty"`
624	StateTransitionTime *date.Time `json:"stateTransitionTime,omitempty"`
625	// 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'
626	PreviousState JobState `json:"previousState,omitempty"`
627	// PreviousStateTransitionTime - This property is not set if the job is in its initial Active state.
628	PreviousStateTransitionTime *date.Time `json:"previousStateTransitionTime,omitempty"`
629	// 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.
630	Priority       *int32          `json:"priority,omitempty"`
631	Constraints    *JobConstraints `json:"constraints,omitempty"`
632	JobManagerTask *JobManagerTask `json:"jobManagerTask,omitempty"`
633	// JobPreparationTask - The Job Preparation task is a special task run on each node before any other task of the job.
634	JobPreparationTask *JobPreparationTask `json:"jobPreparationTask,omitempty"`
635	// 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.
636	JobReleaseTask *JobReleaseTask `json:"jobReleaseTask,omitempty"`
637	// CommonEnvironmentSettings - Individual tasks can override an environment setting specified here by specifying the same setting name with a different value.
638	CommonEnvironmentSettings *[]EnvironmentSetting `json:"commonEnvironmentSettings,omitempty"`
639	PoolInfo                  *PoolInformation      `json:"poolInfo,omitempty"`
640	// OnAllTasksComplete - The default is noaction. Possible values include: 'NoAction', 'TerminateJob'
641	OnAllTasksComplete OnAllTasksComplete `json:"onAllTasksComplete,omitempty"`
642	// OnTaskFailure - A task is considered to have failed if has a failureInfo. A failureInfo is set if the task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the task, for example due to a resource file download error. The default is noaction. Possible values include: 'OnTaskFailureNoAction', 'OnTaskFailurePerformExitOptionsJobAction'
643	OnTaskFailure OnTaskFailure `json:"onTaskFailure,omitempty"`
644	// Metadata - The Batch service does not assign any meaning to metadata; it is solely for the use of user code.
645	Metadata      *[]MetadataItem          `json:"metadata,omitempty"`
646	ExecutionInfo *JobExecutionInformation `json:"executionInfo,omitempty"`
647	Stats         *JobStatistics           `json:"stats,omitempty"`
648}
649
650// CloudJobListPreparationAndReleaseTaskStatusResult ...
651type CloudJobListPreparationAndReleaseTaskStatusResult struct {
652	autorest.Response `json:"-"`
653	Value             *[]JobPreparationAndReleaseTaskExecutionInformation `json:"value,omitempty"`
654	OdataNextLink     *string                                             `json:"odata.nextLink,omitempty"`
655}
656
657// CloudJobListPreparationAndReleaseTaskStatusResultIterator provides access to a complete listing of
658// JobPreparationAndReleaseTaskExecutionInformation values.
659type CloudJobListPreparationAndReleaseTaskStatusResultIterator struct {
660	i    int
661	page CloudJobListPreparationAndReleaseTaskStatusResultPage
662}
663
664// NextWithContext advances to the next value.  If there was an error making
665// the request the iterator does not advance and the error is returned.
666func (iter *CloudJobListPreparationAndReleaseTaskStatusResultIterator) NextWithContext(ctx context.Context) (err error) {
667	if tracing.IsEnabled() {
668		ctx = tracing.StartSpan(ctx, fqdn+"/CloudJobListPreparationAndReleaseTaskStatusResultIterator.NextWithContext")
669		defer func() {
670			sc := -1
671			if iter.Response().Response.Response != nil {
672				sc = iter.Response().Response.Response.StatusCode
673			}
674			tracing.EndSpan(ctx, sc, err)
675		}()
676	}
677	iter.i++
678	if iter.i < len(iter.page.Values()) {
679		return nil
680	}
681	err = iter.page.NextWithContext(ctx)
682	if err != nil {
683		iter.i--
684		return err
685	}
686	iter.i = 0
687	return nil
688}
689
690// Next advances to the next value.  If there was an error making
691// the request the iterator does not advance and the error is returned.
692// Deprecated: Use NextWithContext() instead.
693func (iter *CloudJobListPreparationAndReleaseTaskStatusResultIterator) Next() error {
694	return iter.NextWithContext(context.Background())
695}
696
697// NotDone returns true if the enumeration should be started or is not yet complete.
698func (iter CloudJobListPreparationAndReleaseTaskStatusResultIterator) NotDone() bool {
699	return iter.page.NotDone() && iter.i < len(iter.page.Values())
700}
701
702// Response returns the raw server response from the last page request.
703func (iter CloudJobListPreparationAndReleaseTaskStatusResultIterator) Response() CloudJobListPreparationAndReleaseTaskStatusResult {
704	return iter.page.Response()
705}
706
707// Value returns the current value or a zero-initialized value if the
708// iterator has advanced beyond the end of the collection.
709func (iter CloudJobListPreparationAndReleaseTaskStatusResultIterator) Value() JobPreparationAndReleaseTaskExecutionInformation {
710	if !iter.page.NotDone() {
711		return JobPreparationAndReleaseTaskExecutionInformation{}
712	}
713	return iter.page.Values()[iter.i]
714}
715
716// Creates a new instance of the CloudJobListPreparationAndReleaseTaskStatusResultIterator type.
717func NewCloudJobListPreparationAndReleaseTaskStatusResultIterator(page CloudJobListPreparationAndReleaseTaskStatusResultPage) CloudJobListPreparationAndReleaseTaskStatusResultIterator {
718	return CloudJobListPreparationAndReleaseTaskStatusResultIterator{page: page}
719}
720
721// IsEmpty returns true if the ListResult contains no values.
722func (cjlpartsr CloudJobListPreparationAndReleaseTaskStatusResult) IsEmpty() bool {
723	return cjlpartsr.Value == nil || len(*cjlpartsr.Value) == 0
724}
725
726// hasNextLink returns true if the NextLink is not empty.
727func (cjlpartsr CloudJobListPreparationAndReleaseTaskStatusResult) hasNextLink() bool {
728	return cjlpartsr.OdataNextLink != nil && len(*cjlpartsr.OdataNextLink) != 0
729}
730
731// cloudJobListPreparationAndReleaseTaskStatusResultPreparer prepares a request to retrieve the next set of results.
732// It returns nil if no more results exist.
733func (cjlpartsr CloudJobListPreparationAndReleaseTaskStatusResult) cloudJobListPreparationAndReleaseTaskStatusResultPreparer(ctx context.Context) (*http.Request, error) {
734	if !cjlpartsr.hasNextLink() {
735		return nil, nil
736	}
737	return autorest.Prepare((&http.Request{}).WithContext(ctx),
738		autorest.AsJSON(),
739		autorest.AsGet(),
740		autorest.WithBaseURL(to.String(cjlpartsr.OdataNextLink)))
741}
742
743// CloudJobListPreparationAndReleaseTaskStatusResultPage contains a page of
744// JobPreparationAndReleaseTaskExecutionInformation values.
745type CloudJobListPreparationAndReleaseTaskStatusResultPage struct {
746	fn        func(context.Context, CloudJobListPreparationAndReleaseTaskStatusResult) (CloudJobListPreparationAndReleaseTaskStatusResult, error)
747	cjlpartsr CloudJobListPreparationAndReleaseTaskStatusResult
748}
749
750// NextWithContext advances to the next page of values.  If there was an error making
751// the request the page does not advance and the error is returned.
752func (page *CloudJobListPreparationAndReleaseTaskStatusResultPage) NextWithContext(ctx context.Context) (err error) {
753	if tracing.IsEnabled() {
754		ctx = tracing.StartSpan(ctx, fqdn+"/CloudJobListPreparationAndReleaseTaskStatusResultPage.NextWithContext")
755		defer func() {
756			sc := -1
757			if page.Response().Response.Response != nil {
758				sc = page.Response().Response.Response.StatusCode
759			}
760			tracing.EndSpan(ctx, sc, err)
761		}()
762	}
763	for {
764		next, err := page.fn(ctx, page.cjlpartsr)
765		if err != nil {
766			return err
767		}
768		page.cjlpartsr = next
769		if !next.hasNextLink() || !next.IsEmpty() {
770			break
771		}
772	}
773	return nil
774}
775
776// Next advances to the next page of values.  If there was an error making
777// the request the page does not advance and the error is returned.
778// Deprecated: Use NextWithContext() instead.
779func (page *CloudJobListPreparationAndReleaseTaskStatusResultPage) Next() error {
780	return page.NextWithContext(context.Background())
781}
782
783// NotDone returns true if the page enumeration should be started or is not yet complete.
784func (page CloudJobListPreparationAndReleaseTaskStatusResultPage) NotDone() bool {
785	return !page.cjlpartsr.IsEmpty()
786}
787
788// Response returns the raw server response from the last page request.
789func (page CloudJobListPreparationAndReleaseTaskStatusResultPage) Response() CloudJobListPreparationAndReleaseTaskStatusResult {
790	return page.cjlpartsr
791}
792
793// Values returns the slice of values for the current page or nil if there are no values.
794func (page CloudJobListPreparationAndReleaseTaskStatusResultPage) Values() []JobPreparationAndReleaseTaskExecutionInformation {
795	if page.cjlpartsr.IsEmpty() {
796		return nil
797	}
798	return *page.cjlpartsr.Value
799}
800
801// Creates a new instance of the CloudJobListPreparationAndReleaseTaskStatusResultPage type.
802func NewCloudJobListPreparationAndReleaseTaskStatusResultPage(cur CloudJobListPreparationAndReleaseTaskStatusResult, getNextPage func(context.Context, CloudJobListPreparationAndReleaseTaskStatusResult) (CloudJobListPreparationAndReleaseTaskStatusResult, error)) CloudJobListPreparationAndReleaseTaskStatusResultPage {
803	return CloudJobListPreparationAndReleaseTaskStatusResultPage{
804		fn:        getNextPage,
805		cjlpartsr: cur,
806	}
807}
808
809// CloudJobListResult ...
810type CloudJobListResult struct {
811	autorest.Response `json:"-"`
812	Value             *[]CloudJob `json:"value,omitempty"`
813	OdataNextLink     *string     `json:"odata.nextLink,omitempty"`
814}
815
816// CloudJobListResultIterator provides access to a complete listing of CloudJob values.
817type CloudJobListResultIterator struct {
818	i    int
819	page CloudJobListResultPage
820}
821
822// NextWithContext advances to the next value.  If there was an error making
823// the request the iterator does not advance and the error is returned.
824func (iter *CloudJobListResultIterator) NextWithContext(ctx context.Context) (err error) {
825	if tracing.IsEnabled() {
826		ctx = tracing.StartSpan(ctx, fqdn+"/CloudJobListResultIterator.NextWithContext")
827		defer func() {
828			sc := -1
829			if iter.Response().Response.Response != nil {
830				sc = iter.Response().Response.Response.StatusCode
831			}
832			tracing.EndSpan(ctx, sc, err)
833		}()
834	}
835	iter.i++
836	if iter.i < len(iter.page.Values()) {
837		return nil
838	}
839	err = iter.page.NextWithContext(ctx)
840	if err != nil {
841		iter.i--
842		return err
843	}
844	iter.i = 0
845	return nil
846}
847
848// Next advances to the next value.  If there was an error making
849// the request the iterator does not advance and the error is returned.
850// Deprecated: Use NextWithContext() instead.
851func (iter *CloudJobListResultIterator) Next() error {
852	return iter.NextWithContext(context.Background())
853}
854
855// NotDone returns true if the enumeration should be started or is not yet complete.
856func (iter CloudJobListResultIterator) NotDone() bool {
857	return iter.page.NotDone() && iter.i < len(iter.page.Values())
858}
859
860// Response returns the raw server response from the last page request.
861func (iter CloudJobListResultIterator) Response() CloudJobListResult {
862	return iter.page.Response()
863}
864
865// Value returns the current value or a zero-initialized value if the
866// iterator has advanced beyond the end of the collection.
867func (iter CloudJobListResultIterator) Value() CloudJob {
868	if !iter.page.NotDone() {
869		return CloudJob{}
870	}
871	return iter.page.Values()[iter.i]
872}
873
874// Creates a new instance of the CloudJobListResultIterator type.
875func NewCloudJobListResultIterator(page CloudJobListResultPage) CloudJobListResultIterator {
876	return CloudJobListResultIterator{page: page}
877}
878
879// IsEmpty returns true if the ListResult contains no values.
880func (cjlr CloudJobListResult) IsEmpty() bool {
881	return cjlr.Value == nil || len(*cjlr.Value) == 0
882}
883
884// hasNextLink returns true if the NextLink is not empty.
885func (cjlr CloudJobListResult) hasNextLink() bool {
886	return cjlr.OdataNextLink != nil && len(*cjlr.OdataNextLink) != 0
887}
888
889// cloudJobListResultPreparer prepares a request to retrieve the next set of results.
890// It returns nil if no more results exist.
891func (cjlr CloudJobListResult) cloudJobListResultPreparer(ctx context.Context) (*http.Request, error) {
892	if !cjlr.hasNextLink() {
893		return nil, nil
894	}
895	return autorest.Prepare((&http.Request{}).WithContext(ctx),
896		autorest.AsJSON(),
897		autorest.AsGet(),
898		autorest.WithBaseURL(to.String(cjlr.OdataNextLink)))
899}
900
901// CloudJobListResultPage contains a page of CloudJob values.
902type CloudJobListResultPage struct {
903	fn   func(context.Context, CloudJobListResult) (CloudJobListResult, error)
904	cjlr CloudJobListResult
905}
906
907// NextWithContext advances to the next page of values.  If there was an error making
908// the request the page does not advance and the error is returned.
909func (page *CloudJobListResultPage) NextWithContext(ctx context.Context) (err error) {
910	if tracing.IsEnabled() {
911		ctx = tracing.StartSpan(ctx, fqdn+"/CloudJobListResultPage.NextWithContext")
912		defer func() {
913			sc := -1
914			if page.Response().Response.Response != nil {
915				sc = page.Response().Response.Response.StatusCode
916			}
917			tracing.EndSpan(ctx, sc, err)
918		}()
919	}
920	for {
921		next, err := page.fn(ctx, page.cjlr)
922		if err != nil {
923			return err
924		}
925		page.cjlr = next
926		if !next.hasNextLink() || !next.IsEmpty() {
927			break
928		}
929	}
930	return nil
931}
932
933// Next advances to the next page of values.  If there was an error making
934// the request the page does not advance and the error is returned.
935// Deprecated: Use NextWithContext() instead.
936func (page *CloudJobListResultPage) Next() error {
937	return page.NextWithContext(context.Background())
938}
939
940// NotDone returns true if the page enumeration should be started or is not yet complete.
941func (page CloudJobListResultPage) NotDone() bool {
942	return !page.cjlr.IsEmpty()
943}
944
945// Response returns the raw server response from the last page request.
946func (page CloudJobListResultPage) Response() CloudJobListResult {
947	return page.cjlr
948}
949
950// Values returns the slice of values for the current page or nil if there are no values.
951func (page CloudJobListResultPage) Values() []CloudJob {
952	if page.cjlr.IsEmpty() {
953		return nil
954	}
955	return *page.cjlr.Value
956}
957
958// Creates a new instance of the CloudJobListResultPage type.
959func NewCloudJobListResultPage(cur CloudJobListResult, getNextPage func(context.Context, CloudJobListResult) (CloudJobListResult, error)) CloudJobListResultPage {
960	return CloudJobListResultPage{
961		fn:   getNextPage,
962		cjlr: cur,
963	}
964}
965
966// CloudJobSchedule ...
967type CloudJobSchedule struct {
968	autorest.Response `json:"-"`
969	ID                *string `json:"id,omitempty"`
970	DisplayName       *string `json:"displayName,omitempty"`
971	URL               *string `json:"url,omitempty"`
972	// 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.
973	ETag *string `json:"eTag,omitempty"`
974	// 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.
975	LastModified *date.Time `json:"lastModified,omitempty"`
976	CreationTime *date.Time `json:"creationTime,omitempty"`
977	// State - Possible values include: 'JobScheduleStateActive', 'JobScheduleStateCompleted', 'JobScheduleStateDisabled', 'JobScheduleStateTerminating', 'JobScheduleStateDeleting'
978	State               JobScheduleState `json:"state,omitempty"`
979	StateTransitionTime *date.Time       `json:"stateTransitionTime,omitempty"`
980	// PreviousState - This property is not present if the job schedule is in its initial active state. Possible values include: 'JobScheduleStateActive', 'JobScheduleStateCompleted', 'JobScheduleStateDisabled', 'JobScheduleStateTerminating', 'JobScheduleStateDeleting'
981	PreviousState JobScheduleState `json:"previousState,omitempty"`
982	// PreviousStateTransitionTime - This property is not present if the job schedule is in its initial active state.
983	PreviousStateTransitionTime *date.Time                       `json:"previousStateTransitionTime,omitempty"`
984	Schedule                    *Schedule                        `json:"schedule,omitempty"`
985	JobSpecification            *JobSpecification                `json:"jobSpecification,omitempty"`
986	ExecutionInfo               *JobScheduleExecutionInformation `json:"executionInfo,omitempty"`
987	// Metadata - The Batch service does not assign any meaning to metadata; it is solely for the use of user code.
988	Metadata *[]MetadataItem        `json:"metadata,omitempty"`
989	Stats    *JobScheduleStatistics `json:"stats,omitempty"`
990}
991
992// CloudJobScheduleListResult ...
993type CloudJobScheduleListResult struct {
994	autorest.Response `json:"-"`
995	Value             *[]CloudJobSchedule `json:"value,omitempty"`
996	OdataNextLink     *string             `json:"odata.nextLink,omitempty"`
997}
998
999// CloudJobScheduleListResultIterator provides access to a complete listing of CloudJobSchedule values.
1000type CloudJobScheduleListResultIterator struct {
1001	i    int
1002	page CloudJobScheduleListResultPage
1003}
1004
1005// NextWithContext advances to the next value.  If there was an error making
1006// the request the iterator does not advance and the error is returned.
1007func (iter *CloudJobScheduleListResultIterator) NextWithContext(ctx context.Context) (err error) {
1008	if tracing.IsEnabled() {
1009		ctx = tracing.StartSpan(ctx, fqdn+"/CloudJobScheduleListResultIterator.NextWithContext")
1010		defer func() {
1011			sc := -1
1012			if iter.Response().Response.Response != nil {
1013				sc = iter.Response().Response.Response.StatusCode
1014			}
1015			tracing.EndSpan(ctx, sc, err)
1016		}()
1017	}
1018	iter.i++
1019	if iter.i < len(iter.page.Values()) {
1020		return nil
1021	}
1022	err = iter.page.NextWithContext(ctx)
1023	if err != nil {
1024		iter.i--
1025		return err
1026	}
1027	iter.i = 0
1028	return nil
1029}
1030
1031// Next advances to the next value.  If there was an error making
1032// the request the iterator does not advance and the error is returned.
1033// Deprecated: Use NextWithContext() instead.
1034func (iter *CloudJobScheduleListResultIterator) Next() error {
1035	return iter.NextWithContext(context.Background())
1036}
1037
1038// NotDone returns true if the enumeration should be started or is not yet complete.
1039func (iter CloudJobScheduleListResultIterator) NotDone() bool {
1040	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1041}
1042
1043// Response returns the raw server response from the last page request.
1044func (iter CloudJobScheduleListResultIterator) Response() CloudJobScheduleListResult {
1045	return iter.page.Response()
1046}
1047
1048// Value returns the current value or a zero-initialized value if the
1049// iterator has advanced beyond the end of the collection.
1050func (iter CloudJobScheduleListResultIterator) Value() CloudJobSchedule {
1051	if !iter.page.NotDone() {
1052		return CloudJobSchedule{}
1053	}
1054	return iter.page.Values()[iter.i]
1055}
1056
1057// Creates a new instance of the CloudJobScheduleListResultIterator type.
1058func NewCloudJobScheduleListResultIterator(page CloudJobScheduleListResultPage) CloudJobScheduleListResultIterator {
1059	return CloudJobScheduleListResultIterator{page: page}
1060}
1061
1062// IsEmpty returns true if the ListResult contains no values.
1063func (cjslr CloudJobScheduleListResult) IsEmpty() bool {
1064	return cjslr.Value == nil || len(*cjslr.Value) == 0
1065}
1066
1067// hasNextLink returns true if the NextLink is not empty.
1068func (cjslr CloudJobScheduleListResult) hasNextLink() bool {
1069	return cjslr.OdataNextLink != nil && len(*cjslr.OdataNextLink) != 0
1070}
1071
1072// cloudJobScheduleListResultPreparer prepares a request to retrieve the next set of results.
1073// It returns nil if no more results exist.
1074func (cjslr CloudJobScheduleListResult) cloudJobScheduleListResultPreparer(ctx context.Context) (*http.Request, error) {
1075	if !cjslr.hasNextLink() {
1076		return nil, nil
1077	}
1078	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1079		autorest.AsJSON(),
1080		autorest.AsGet(),
1081		autorest.WithBaseURL(to.String(cjslr.OdataNextLink)))
1082}
1083
1084// CloudJobScheduleListResultPage contains a page of CloudJobSchedule values.
1085type CloudJobScheduleListResultPage struct {
1086	fn    func(context.Context, CloudJobScheduleListResult) (CloudJobScheduleListResult, error)
1087	cjslr CloudJobScheduleListResult
1088}
1089
1090// NextWithContext advances to the next page of values.  If there was an error making
1091// the request the page does not advance and the error is returned.
1092func (page *CloudJobScheduleListResultPage) NextWithContext(ctx context.Context) (err error) {
1093	if tracing.IsEnabled() {
1094		ctx = tracing.StartSpan(ctx, fqdn+"/CloudJobScheduleListResultPage.NextWithContext")
1095		defer func() {
1096			sc := -1
1097			if page.Response().Response.Response != nil {
1098				sc = page.Response().Response.Response.StatusCode
1099			}
1100			tracing.EndSpan(ctx, sc, err)
1101		}()
1102	}
1103	for {
1104		next, err := page.fn(ctx, page.cjslr)
1105		if err != nil {
1106			return err
1107		}
1108		page.cjslr = next
1109		if !next.hasNextLink() || !next.IsEmpty() {
1110			break
1111		}
1112	}
1113	return nil
1114}
1115
1116// Next advances to the next page of values.  If there was an error making
1117// the request the page does not advance and the error is returned.
1118// Deprecated: Use NextWithContext() instead.
1119func (page *CloudJobScheduleListResultPage) Next() error {
1120	return page.NextWithContext(context.Background())
1121}
1122
1123// NotDone returns true if the page enumeration should be started or is not yet complete.
1124func (page CloudJobScheduleListResultPage) NotDone() bool {
1125	return !page.cjslr.IsEmpty()
1126}
1127
1128// Response returns the raw server response from the last page request.
1129func (page CloudJobScheduleListResultPage) Response() CloudJobScheduleListResult {
1130	return page.cjslr
1131}
1132
1133// Values returns the slice of values for the current page or nil if there are no values.
1134func (page CloudJobScheduleListResultPage) Values() []CloudJobSchedule {
1135	if page.cjslr.IsEmpty() {
1136		return nil
1137	}
1138	return *page.cjslr.Value
1139}
1140
1141// Creates a new instance of the CloudJobScheduleListResultPage type.
1142func NewCloudJobScheduleListResultPage(cur CloudJobScheduleListResult, getNextPage func(context.Context, CloudJobScheduleListResult) (CloudJobScheduleListResult, error)) CloudJobScheduleListResultPage {
1143	return CloudJobScheduleListResultPage{
1144		fn:    getNextPage,
1145		cjslr: cur,
1146	}
1147}
1148
1149// CloudPool ...
1150type CloudPool struct {
1151	autorest.Response `json:"-"`
1152	// 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).
1153	ID *string `json:"id,omitempty"`
1154	// DisplayName - The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
1155	DisplayName *string `json:"displayName,omitempty"`
1156	URL         *string `json:"url,omitempty"`
1157	// 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.
1158	ETag *string `json:"eTag,omitempty"`
1159	// LastModified - This is the last time at which the pool level data, such as the targetDedicatedNodes or enableAutoscale settings, changed. It does not factor in node-level changes such as a compute node changing state.
1160	LastModified *date.Time `json:"lastModified,omitempty"`
1161	CreationTime *date.Time `json:"creationTime,omitempty"`
1162	// State - Possible values include: 'PoolStateActive', 'PoolStateDeleting', 'PoolStateUpgrading'
1163	State               PoolState  `json:"state,omitempty"`
1164	StateTransitionTime *date.Time `json:"stateTransitionTime,omitempty"`
1165	// AllocationState - Possible values include: 'Steady', 'Resizing', 'Stopping'
1166	AllocationState               AllocationState `json:"allocationState,omitempty"`
1167	AllocationStateTransitionTime *date.Time      `json:"allocationStateTransitionTime,omitempty"`
1168	// VMSize - For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall, A1V2 and A2V2. 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).
1169	VMSize *string `json:"vmSize,omitempty"`
1170	// CloudServiceConfiguration - This property and virtualMachineConfiguration are mutually exclusive and one of the properties must be specified. This property cannot be specified if the Batch account was created with its poolAllocationMode property set to 'UserSubscription'.
1171	CloudServiceConfiguration *CloudServiceConfiguration `json:"cloudServiceConfiguration,omitempty"`
1172	// VirtualMachineConfiguration - This property and cloudServiceConfiguration are mutually exclusive and one of the properties must be specified.
1173	VirtualMachineConfiguration *VirtualMachineConfiguration `json:"virtualMachineConfiguration,omitempty"`
1174	// 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.
1175	ResizeTimeout *string `json:"resizeTimeout,omitempty"`
1176	// ResizeErrors - This property is set only if one or more errors occurred during the last pool resize, and only when the pool allocationState is Steady.
1177	ResizeErrors          *[]ResizeError `json:"resizeErrors,omitempty"`
1178	CurrentDedicatedNodes *int32         `json:"currentDedicatedNodes,omitempty"`
1179	// CurrentLowPriorityNodes - Low-priority compute nodes which have been preempted are included in this count.
1180	CurrentLowPriorityNodes *int32 `json:"currentLowPriorityNodes,omitempty"`
1181	TargetDedicatedNodes    *int32 `json:"targetDedicatedNodes,omitempty"`
1182	TargetLowPriorityNodes  *int32 `json:"targetLowPriorityNodes,omitempty"`
1183	// EnableAutoScale - If false, at least one of targetDedicateNodes and targetLowPriorityNodes must be specified. If true, the autoScaleFormula property is required and the pool automatically resizes according to the formula. The default value is false.
1184	EnableAutoScale *bool `json:"enableAutoScale,omitempty"`
1185	// AutoScaleFormula - This property is set only if the pool automatically scales, i.e. enableAutoScale is true.
1186	AutoScaleFormula *string `json:"autoScaleFormula,omitempty"`
1187	// AutoScaleEvaluationInterval - This property is set only if the pool automatically scales, i.e. enableAutoScale is true.
1188	AutoScaleEvaluationInterval *string `json:"autoScaleEvaluationInterval,omitempty"`
1189	// AutoScaleRun - This property is set only if the pool automatically scales, i.e. enableAutoScale is true.
1190	AutoScaleRun *AutoScaleRun `json:"autoScaleRun,omitempty"`
1191	// 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.
1192	EnableInterNodeCommunication *bool                 `json:"enableInterNodeCommunication,omitempty"`
1193	NetworkConfiguration         *NetworkConfiguration `json:"networkConfiguration,omitempty"`
1194	StartTask                    *StartTask            `json:"startTask,omitempty"`
1195	// 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) and certificates are placed in that directory.
1196	CertificateReferences        *[]CertificateReference        `json:"certificateReferences,omitempty"`
1197	ApplicationPackageReferences *[]ApplicationPackageReference `json:"applicationPackageReferences,omitempty"`
1198	// ApplicationLicenses - The list of application licenses must be a subset of available Batch service application licenses. If a license is requested which is not supported, pool creation will fail.
1199	ApplicationLicenses  *[]string             `json:"applicationLicenses,omitempty"`
1200	MaxTasksPerNode      *int32                `json:"maxTasksPerNode,omitempty"`
1201	TaskSchedulingPolicy *TaskSchedulingPolicy `json:"taskSchedulingPolicy,omitempty"`
1202	UserAccounts         *[]UserAccount        `json:"userAccounts,omitempty"`
1203	Metadata             *[]MetadataItem       `json:"metadata,omitempty"`
1204	Stats                *PoolStatistics       `json:"stats,omitempty"`
1205}
1206
1207// CloudPoolListResult ...
1208type CloudPoolListResult struct {
1209	autorest.Response `json:"-"`
1210	Value             *[]CloudPool `json:"value,omitempty"`
1211	OdataNextLink     *string      `json:"odata.nextLink,omitempty"`
1212}
1213
1214// CloudPoolListResultIterator provides access to a complete listing of CloudPool values.
1215type CloudPoolListResultIterator struct {
1216	i    int
1217	page CloudPoolListResultPage
1218}
1219
1220// NextWithContext advances to the next value.  If there was an error making
1221// the request the iterator does not advance and the error is returned.
1222func (iter *CloudPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
1223	if tracing.IsEnabled() {
1224		ctx = tracing.StartSpan(ctx, fqdn+"/CloudPoolListResultIterator.NextWithContext")
1225		defer func() {
1226			sc := -1
1227			if iter.Response().Response.Response != nil {
1228				sc = iter.Response().Response.Response.StatusCode
1229			}
1230			tracing.EndSpan(ctx, sc, err)
1231		}()
1232	}
1233	iter.i++
1234	if iter.i < len(iter.page.Values()) {
1235		return nil
1236	}
1237	err = iter.page.NextWithContext(ctx)
1238	if err != nil {
1239		iter.i--
1240		return err
1241	}
1242	iter.i = 0
1243	return nil
1244}
1245
1246// Next advances to the next value.  If there was an error making
1247// the request the iterator does not advance and the error is returned.
1248// Deprecated: Use NextWithContext() instead.
1249func (iter *CloudPoolListResultIterator) Next() error {
1250	return iter.NextWithContext(context.Background())
1251}
1252
1253// NotDone returns true if the enumeration should be started or is not yet complete.
1254func (iter CloudPoolListResultIterator) NotDone() bool {
1255	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1256}
1257
1258// Response returns the raw server response from the last page request.
1259func (iter CloudPoolListResultIterator) Response() CloudPoolListResult {
1260	return iter.page.Response()
1261}
1262
1263// Value returns the current value or a zero-initialized value if the
1264// iterator has advanced beyond the end of the collection.
1265func (iter CloudPoolListResultIterator) Value() CloudPool {
1266	if !iter.page.NotDone() {
1267		return CloudPool{}
1268	}
1269	return iter.page.Values()[iter.i]
1270}
1271
1272// Creates a new instance of the CloudPoolListResultIterator type.
1273func NewCloudPoolListResultIterator(page CloudPoolListResultPage) CloudPoolListResultIterator {
1274	return CloudPoolListResultIterator{page: page}
1275}
1276
1277// IsEmpty returns true if the ListResult contains no values.
1278func (cplr CloudPoolListResult) IsEmpty() bool {
1279	return cplr.Value == nil || len(*cplr.Value) == 0
1280}
1281
1282// hasNextLink returns true if the NextLink is not empty.
1283func (cplr CloudPoolListResult) hasNextLink() bool {
1284	return cplr.OdataNextLink != nil && len(*cplr.OdataNextLink) != 0
1285}
1286
1287// cloudPoolListResultPreparer prepares a request to retrieve the next set of results.
1288// It returns nil if no more results exist.
1289func (cplr CloudPoolListResult) cloudPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
1290	if !cplr.hasNextLink() {
1291		return nil, nil
1292	}
1293	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1294		autorest.AsJSON(),
1295		autorest.AsGet(),
1296		autorest.WithBaseURL(to.String(cplr.OdataNextLink)))
1297}
1298
1299// CloudPoolListResultPage contains a page of CloudPool values.
1300type CloudPoolListResultPage struct {
1301	fn   func(context.Context, CloudPoolListResult) (CloudPoolListResult, error)
1302	cplr CloudPoolListResult
1303}
1304
1305// NextWithContext advances to the next page of values.  If there was an error making
1306// the request the page does not advance and the error is returned.
1307func (page *CloudPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
1308	if tracing.IsEnabled() {
1309		ctx = tracing.StartSpan(ctx, fqdn+"/CloudPoolListResultPage.NextWithContext")
1310		defer func() {
1311			sc := -1
1312			if page.Response().Response.Response != nil {
1313				sc = page.Response().Response.Response.StatusCode
1314			}
1315			tracing.EndSpan(ctx, sc, err)
1316		}()
1317	}
1318	for {
1319		next, err := page.fn(ctx, page.cplr)
1320		if err != nil {
1321			return err
1322		}
1323		page.cplr = next
1324		if !next.hasNextLink() || !next.IsEmpty() {
1325			break
1326		}
1327	}
1328	return nil
1329}
1330
1331// Next advances to the next page of values.  If there was an error making
1332// the request the page does not advance and the error is returned.
1333// Deprecated: Use NextWithContext() instead.
1334func (page *CloudPoolListResultPage) Next() error {
1335	return page.NextWithContext(context.Background())
1336}
1337
1338// NotDone returns true if the page enumeration should be started or is not yet complete.
1339func (page CloudPoolListResultPage) NotDone() bool {
1340	return !page.cplr.IsEmpty()
1341}
1342
1343// Response returns the raw server response from the last page request.
1344func (page CloudPoolListResultPage) Response() CloudPoolListResult {
1345	return page.cplr
1346}
1347
1348// Values returns the slice of values for the current page or nil if there are no values.
1349func (page CloudPoolListResultPage) Values() []CloudPool {
1350	if page.cplr.IsEmpty() {
1351		return nil
1352	}
1353	return *page.cplr.Value
1354}
1355
1356// Creates a new instance of the CloudPoolListResultPage type.
1357func NewCloudPoolListResultPage(cur CloudPoolListResult, getNextPage func(context.Context, CloudPoolListResult) (CloudPoolListResult, error)) CloudPoolListResultPage {
1358	return CloudPoolListResultPage{
1359		fn:   getNextPage,
1360		cplr: cur,
1361	}
1362}
1363
1364// CloudServiceConfiguration ...
1365type CloudServiceConfiguration struct {
1366	// 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. 5 - OS Family 5, equivalent to Windows Server 2016. For more information, see Azure Guest OS Releases (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases).
1367	OsFamily *string `json:"osFamily,omitempty"`
1368	// TargetOSVersion - The default value is * which specifies the latest operating system version for the specified OS family.
1369	TargetOSVersion *string `json:"targetOSVersion,omitempty"`
1370	// CurrentOSVersion - READ-ONLY; 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.
1371	CurrentOSVersion *string `json:"currentOSVersion,omitempty"`
1372}
1373
1374// MarshalJSON is the custom marshaler for CloudServiceConfiguration.
1375func (csc CloudServiceConfiguration) MarshalJSON() ([]byte, error) {
1376	objectMap := make(map[string]interface{})
1377	if csc.OsFamily != nil {
1378		objectMap["osFamily"] = csc.OsFamily
1379	}
1380	if csc.TargetOSVersion != nil {
1381		objectMap["targetOSVersion"] = csc.TargetOSVersion
1382	}
1383	return json.Marshal(objectMap)
1384}
1385
1386// CloudTask batch will retry tasks when a recovery operation is triggered on a compute node. Examples of
1387// recovery operations include (but are not limited to) when an unhealthy compute node is rebooted or a
1388// compute node disappeared due to host failure. Retries due to recovery operations are independent of and
1389// are not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal retry due
1390// to a recovery operation may occur. Because of this, all tasks should be idempotent. This means tasks
1391// need to tolerate being interrupted and restarted without causing any corruption or duplicate data. The
1392// best practice for long running tasks is to use some form of checkpointing.
1393type CloudTask struct {
1394	autorest.Response `json:"-"`
1395	// ID - The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters.
1396	ID *string `json:"id,omitempty"`
1397	// DisplayName - The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
1398	DisplayName *string `json:"displayName,omitempty"`
1399	URL         *string `json:"url,omitempty"`
1400	// 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.
1401	ETag         *string    `json:"eTag,omitempty"`
1402	LastModified *date.Time `json:"lastModified,omitempty"`
1403	CreationTime *date.Time `json:"creationTime,omitempty"`
1404	// ExitConditions - How the Batch service should respond when the task completes.
1405	ExitConditions *ExitConditions `json:"exitConditions,omitempty"`
1406	// State - Possible values include: 'TaskStateActive', 'TaskStatePreparing', 'TaskStateRunning', 'TaskStateCompleted'
1407	State               TaskState  `json:"state,omitempty"`
1408	StateTransitionTime *date.Time `json:"stateTransitionTime,omitempty"`
1409	// PreviousState - This property is not set if the task is in its initial Active state. Possible values include: 'TaskStateActive', 'TaskStatePreparing', 'TaskStateRunning', 'TaskStateCompleted'
1410	PreviousState TaskState `json:"previousState,omitempty"`
1411	// PreviousStateTransitionTime - This property is not set if the task is in its initial Active state.
1412	PreviousStateTransitionTime *date.Time `json:"previousStateTransitionTime,omitempty"`
1413	// 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. If the command line refers to file paths, it should use a relative path (relative to the task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables).
1414	CommandLine *string `json:"commandLine,omitempty"`
1415	// ContainerSettings - If the pool that will run this task has containerConfiguration set, this must be set as well. If the pool that will run this task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all task environment variables are mapped into the container, and the task command line is executed in the container.
1416	ContainerSettings *TaskContainerSettings `json:"containerSettings,omitempty"`
1417	// ResourceFiles - For multi-instance tasks, the resource files will only be downloaded to the compute node on which the primary task is executed. There is a maximum size for the list of resource files.  When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers.
1418	ResourceFiles *[]ResourceFile `json:"resourceFiles,omitempty"`
1419	// OutputFiles - For multi-instance tasks, the files will only be uploaded from the compute node on which the primary task is executed.
1420	OutputFiles         *[]OutputFile         `json:"outputFiles,omitempty"`
1421	EnvironmentSettings *[]EnvironmentSetting `json:"environmentSettings,omitempty"`
1422	AffinityInfo        *AffinityInformation  `json:"affinityInfo,omitempty"`
1423	Constraints         *TaskConstraints      `json:"constraints,omitempty"`
1424	// UserIdentity - If omitted, the task runs as a non-administrative user unique to the task.
1425	UserIdentity          *UserIdentity             `json:"userIdentity,omitempty"`
1426	ExecutionInfo         *TaskExecutionInformation `json:"executionInfo,omitempty"`
1427	NodeInfo              *ComputeNodeInformation   `json:"nodeInfo,omitempty"`
1428	MultiInstanceSettings *MultiInstanceSettings    `json:"multiInstanceSettings,omitempty"`
1429	Stats                 *TaskStatistics           `json:"stats,omitempty"`
1430	// DependsOn - This task will not be scheduled until all tasks that it depends on have completed successfully. If any of those tasks fail and exhaust their retry counts, this task will never be scheduled.
1431	DependsOn *TaskDependencies `json:"dependsOn,omitempty"`
1432	// ApplicationPackageReferences - Application packages are downloaded and deployed to a shared directory, not the task working 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.
1433	ApplicationPackageReferences *[]ApplicationPackageReference `json:"applicationPackageReferences,omitempty"`
1434	// AuthenticationTokenSettings - If this property is set, the Batch service provides the task with an authentication token which can be used to authenticate Batch service operations without requiring an account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the task can carry out using the token depend on the settings. For example, a task can request job permissions in order to add other tasks to the job, or check the status of the job or of other tasks under the job.
1435	AuthenticationTokenSettings *AuthenticationTokenSettings `json:"authenticationTokenSettings,omitempty"`
1436}
1437
1438// CloudTaskListResult ...
1439type CloudTaskListResult struct {
1440	autorest.Response `json:"-"`
1441	Value             *[]CloudTask `json:"value,omitempty"`
1442	OdataNextLink     *string      `json:"odata.nextLink,omitempty"`
1443}
1444
1445// CloudTaskListResultIterator provides access to a complete listing of CloudTask values.
1446type CloudTaskListResultIterator struct {
1447	i    int
1448	page CloudTaskListResultPage
1449}
1450
1451// NextWithContext advances to the next value.  If there was an error making
1452// the request the iterator does not advance and the error is returned.
1453func (iter *CloudTaskListResultIterator) NextWithContext(ctx context.Context) (err error) {
1454	if tracing.IsEnabled() {
1455		ctx = tracing.StartSpan(ctx, fqdn+"/CloudTaskListResultIterator.NextWithContext")
1456		defer func() {
1457			sc := -1
1458			if iter.Response().Response.Response != nil {
1459				sc = iter.Response().Response.Response.StatusCode
1460			}
1461			tracing.EndSpan(ctx, sc, err)
1462		}()
1463	}
1464	iter.i++
1465	if iter.i < len(iter.page.Values()) {
1466		return nil
1467	}
1468	err = iter.page.NextWithContext(ctx)
1469	if err != nil {
1470		iter.i--
1471		return err
1472	}
1473	iter.i = 0
1474	return nil
1475}
1476
1477// Next advances to the next value.  If there was an error making
1478// the request the iterator does not advance and the error is returned.
1479// Deprecated: Use NextWithContext() instead.
1480func (iter *CloudTaskListResultIterator) Next() error {
1481	return iter.NextWithContext(context.Background())
1482}
1483
1484// NotDone returns true if the enumeration should be started or is not yet complete.
1485func (iter CloudTaskListResultIterator) NotDone() bool {
1486	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1487}
1488
1489// Response returns the raw server response from the last page request.
1490func (iter CloudTaskListResultIterator) Response() CloudTaskListResult {
1491	return iter.page.Response()
1492}
1493
1494// Value returns the current value or a zero-initialized value if the
1495// iterator has advanced beyond the end of the collection.
1496func (iter CloudTaskListResultIterator) Value() CloudTask {
1497	if !iter.page.NotDone() {
1498		return CloudTask{}
1499	}
1500	return iter.page.Values()[iter.i]
1501}
1502
1503// Creates a new instance of the CloudTaskListResultIterator type.
1504func NewCloudTaskListResultIterator(page CloudTaskListResultPage) CloudTaskListResultIterator {
1505	return CloudTaskListResultIterator{page: page}
1506}
1507
1508// IsEmpty returns true if the ListResult contains no values.
1509func (ctlr CloudTaskListResult) IsEmpty() bool {
1510	return ctlr.Value == nil || len(*ctlr.Value) == 0
1511}
1512
1513// hasNextLink returns true if the NextLink is not empty.
1514func (ctlr CloudTaskListResult) hasNextLink() bool {
1515	return ctlr.OdataNextLink != nil && len(*ctlr.OdataNextLink) != 0
1516}
1517
1518// cloudTaskListResultPreparer prepares a request to retrieve the next set of results.
1519// It returns nil if no more results exist.
1520func (ctlr CloudTaskListResult) cloudTaskListResultPreparer(ctx context.Context) (*http.Request, error) {
1521	if !ctlr.hasNextLink() {
1522		return nil, nil
1523	}
1524	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1525		autorest.AsJSON(),
1526		autorest.AsGet(),
1527		autorest.WithBaseURL(to.String(ctlr.OdataNextLink)))
1528}
1529
1530// CloudTaskListResultPage contains a page of CloudTask values.
1531type CloudTaskListResultPage struct {
1532	fn   func(context.Context, CloudTaskListResult) (CloudTaskListResult, error)
1533	ctlr CloudTaskListResult
1534}
1535
1536// NextWithContext advances to the next page of values.  If there was an error making
1537// the request the page does not advance and the error is returned.
1538func (page *CloudTaskListResultPage) NextWithContext(ctx context.Context) (err error) {
1539	if tracing.IsEnabled() {
1540		ctx = tracing.StartSpan(ctx, fqdn+"/CloudTaskListResultPage.NextWithContext")
1541		defer func() {
1542			sc := -1
1543			if page.Response().Response.Response != nil {
1544				sc = page.Response().Response.Response.StatusCode
1545			}
1546			tracing.EndSpan(ctx, sc, err)
1547		}()
1548	}
1549	for {
1550		next, err := page.fn(ctx, page.ctlr)
1551		if err != nil {
1552			return err
1553		}
1554		page.ctlr = next
1555		if !next.hasNextLink() || !next.IsEmpty() {
1556			break
1557		}
1558	}
1559	return nil
1560}
1561
1562// Next advances to the next page of values.  If there was an error making
1563// the request the page does not advance and the error is returned.
1564// Deprecated: Use NextWithContext() instead.
1565func (page *CloudTaskListResultPage) Next() error {
1566	return page.NextWithContext(context.Background())
1567}
1568
1569// NotDone returns true if the page enumeration should be started or is not yet complete.
1570func (page CloudTaskListResultPage) NotDone() bool {
1571	return !page.ctlr.IsEmpty()
1572}
1573
1574// Response returns the raw server response from the last page request.
1575func (page CloudTaskListResultPage) Response() CloudTaskListResult {
1576	return page.ctlr
1577}
1578
1579// Values returns the slice of values for the current page or nil if there are no values.
1580func (page CloudTaskListResultPage) Values() []CloudTask {
1581	if page.ctlr.IsEmpty() {
1582		return nil
1583	}
1584	return *page.ctlr.Value
1585}
1586
1587// Creates a new instance of the CloudTaskListResultPage type.
1588func NewCloudTaskListResultPage(cur CloudTaskListResult, getNextPage func(context.Context, CloudTaskListResult) (CloudTaskListResult, error)) CloudTaskListResultPage {
1589	return CloudTaskListResultPage{
1590		fn:   getNextPage,
1591		ctlr: cur,
1592	}
1593}
1594
1595// CloudTaskListSubtasksResult ...
1596type CloudTaskListSubtasksResult struct {
1597	autorest.Response `json:"-"`
1598	Value             *[]SubtaskInformation `json:"value,omitempty"`
1599}
1600
1601// ComputeNode ...
1602type ComputeNode struct {
1603	autorest.Response `json:"-"`
1604	// 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.
1605	ID  *string `json:"id,omitempty"`
1606	URL *string `json:"url,omitempty"`
1607	// State - The low-priority node has been preempted. Tasks which were running on the node when it was preempted will be rescheduled when another node becomes available. Possible values include: 'Idle', 'Rebooting', 'Reimaging', 'Running', 'Unusable', 'Creating', 'Starting', 'WaitingForStartTask', 'StartTaskFailed', 'Unknown', 'LeavingPool', 'Offline', 'Preempted'
1608	State ComputeNodeState `json:"state,omitempty"`
1609	// SchedulingState - Possible values include: 'Enabled', 'Disabled'
1610	SchedulingState     SchedulingState `json:"schedulingState,omitempty"`
1611	StateTransitionTime *date.Time      `json:"stateTransitionTime,omitempty"`
1612	// LastBootTime - This property may not be present if the node state is unusable.
1613	LastBootTime   *date.Time `json:"lastBootTime,omitempty"`
1614	AllocationTime *date.Time `json:"allocationTime,omitempty"`
1615	// 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.
1616	IPAddress *string `json:"ipAddress,omitempty"`
1617	// AffinityID - Note that this is just a soft affinity. If the target node is busy or unavailable at the time the task is scheduled, then the task will be scheduled elsewhere.
1618	AffinityID *string `json:"affinityId,omitempty"`
1619	// VMSize - For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall, A1V2 and A2V2. 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).
1620	VMSize              *string `json:"vmSize,omitempty"`
1621	TotalTasksRun       *int32  `json:"totalTasksRun,omitempty"`
1622	RunningTasksCount   *int32  `json:"runningTasksCount,omitempty"`
1623	TotalTasksSucceeded *int32  `json:"totalTasksSucceeded,omitempty"`
1624	// RecentTasks - This property is present only if at least one task has run on this node since it was assigned to the pool.
1625	RecentTasks   *[]TaskInformation    `json:"recentTasks,omitempty"`
1626	StartTask     *StartTask            `json:"startTask,omitempty"`
1627	StartTaskInfo *StartTaskInformation `json:"startTaskInfo,omitempty"`
1628	// 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) and certificates are placed in that directory.
1629	CertificateReferences *[]CertificateReference           `json:"certificateReferences,omitempty"`
1630	Errors                *[]ComputeNodeError               `json:"errors,omitempty"`
1631	IsDedicated           *bool                             `json:"isDedicated,omitempty"`
1632	EndpointConfiguration *ComputeNodeEndpointConfiguration `json:"endpointConfiguration,omitempty"`
1633}
1634
1635// ComputeNodeEndpointConfiguration ...
1636type ComputeNodeEndpointConfiguration struct {
1637	InboundEndpoints *[]InboundEndpoint `json:"inboundEndpoints,omitempty"`
1638}
1639
1640// ComputeNodeError ...
1641type ComputeNodeError struct {
1642	Code         *string          `json:"code,omitempty"`
1643	Message      *string          `json:"message,omitempty"`
1644	ErrorDetails *[]NameValuePair `json:"errorDetails,omitempty"`
1645}
1646
1647// ComputeNodeGetRemoteLoginSettingsResult ...
1648type ComputeNodeGetRemoteLoginSettingsResult struct {
1649	autorest.Response    `json:"-"`
1650	RemoteLoginIPAddress *string `json:"remoteLoginIPAddress,omitempty"`
1651	RemoteLoginPort      *int32  `json:"remoteLoginPort,omitempty"`
1652}
1653
1654// ComputeNodeInformation ...
1655type ComputeNodeInformation struct {
1656	AffinityID           *string `json:"affinityId,omitempty"`
1657	NodeURL              *string `json:"nodeUrl,omitempty"`
1658	PoolID               *string `json:"poolId,omitempty"`
1659	NodeID               *string `json:"nodeId,omitempty"`
1660	TaskRootDirectory    *string `json:"taskRootDirectory,omitempty"`
1661	TaskRootDirectoryURL *string `json:"taskRootDirectoryUrl,omitempty"`
1662}
1663
1664// ComputeNodeListResult ...
1665type ComputeNodeListResult struct {
1666	autorest.Response `json:"-"`
1667	Value             *[]ComputeNode `json:"value,omitempty"`
1668	OdataNextLink     *string        `json:"odata.nextLink,omitempty"`
1669}
1670
1671// ComputeNodeListResultIterator provides access to a complete listing of ComputeNode values.
1672type ComputeNodeListResultIterator struct {
1673	i    int
1674	page ComputeNodeListResultPage
1675}
1676
1677// NextWithContext advances to the next value.  If there was an error making
1678// the request the iterator does not advance and the error is returned.
1679func (iter *ComputeNodeListResultIterator) NextWithContext(ctx context.Context) (err error) {
1680	if tracing.IsEnabled() {
1681		ctx = tracing.StartSpan(ctx, fqdn+"/ComputeNodeListResultIterator.NextWithContext")
1682		defer func() {
1683			sc := -1
1684			if iter.Response().Response.Response != nil {
1685				sc = iter.Response().Response.Response.StatusCode
1686			}
1687			tracing.EndSpan(ctx, sc, err)
1688		}()
1689	}
1690	iter.i++
1691	if iter.i < len(iter.page.Values()) {
1692		return nil
1693	}
1694	err = iter.page.NextWithContext(ctx)
1695	if err != nil {
1696		iter.i--
1697		return err
1698	}
1699	iter.i = 0
1700	return nil
1701}
1702
1703// Next advances to the next value.  If there was an error making
1704// the request the iterator does not advance and the error is returned.
1705// Deprecated: Use NextWithContext() instead.
1706func (iter *ComputeNodeListResultIterator) Next() error {
1707	return iter.NextWithContext(context.Background())
1708}
1709
1710// NotDone returns true if the enumeration should be started or is not yet complete.
1711func (iter ComputeNodeListResultIterator) NotDone() bool {
1712	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1713}
1714
1715// Response returns the raw server response from the last page request.
1716func (iter ComputeNodeListResultIterator) Response() ComputeNodeListResult {
1717	return iter.page.Response()
1718}
1719
1720// Value returns the current value or a zero-initialized value if the
1721// iterator has advanced beyond the end of the collection.
1722func (iter ComputeNodeListResultIterator) Value() ComputeNode {
1723	if !iter.page.NotDone() {
1724		return ComputeNode{}
1725	}
1726	return iter.page.Values()[iter.i]
1727}
1728
1729// Creates a new instance of the ComputeNodeListResultIterator type.
1730func NewComputeNodeListResultIterator(page ComputeNodeListResultPage) ComputeNodeListResultIterator {
1731	return ComputeNodeListResultIterator{page: page}
1732}
1733
1734// IsEmpty returns true if the ListResult contains no values.
1735func (cnlr ComputeNodeListResult) IsEmpty() bool {
1736	return cnlr.Value == nil || len(*cnlr.Value) == 0
1737}
1738
1739// hasNextLink returns true if the NextLink is not empty.
1740func (cnlr ComputeNodeListResult) hasNextLink() bool {
1741	return cnlr.OdataNextLink != nil && len(*cnlr.OdataNextLink) != 0
1742}
1743
1744// computeNodeListResultPreparer prepares a request to retrieve the next set of results.
1745// It returns nil if no more results exist.
1746func (cnlr ComputeNodeListResult) computeNodeListResultPreparer(ctx context.Context) (*http.Request, error) {
1747	if !cnlr.hasNextLink() {
1748		return nil, nil
1749	}
1750	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1751		autorest.AsJSON(),
1752		autorest.AsGet(),
1753		autorest.WithBaseURL(to.String(cnlr.OdataNextLink)))
1754}
1755
1756// ComputeNodeListResultPage contains a page of ComputeNode values.
1757type ComputeNodeListResultPage struct {
1758	fn   func(context.Context, ComputeNodeListResult) (ComputeNodeListResult, error)
1759	cnlr ComputeNodeListResult
1760}
1761
1762// NextWithContext advances to the next page of values.  If there was an error making
1763// the request the page does not advance and the error is returned.
1764func (page *ComputeNodeListResultPage) NextWithContext(ctx context.Context) (err error) {
1765	if tracing.IsEnabled() {
1766		ctx = tracing.StartSpan(ctx, fqdn+"/ComputeNodeListResultPage.NextWithContext")
1767		defer func() {
1768			sc := -1
1769			if page.Response().Response.Response != nil {
1770				sc = page.Response().Response.Response.StatusCode
1771			}
1772			tracing.EndSpan(ctx, sc, err)
1773		}()
1774	}
1775	for {
1776		next, err := page.fn(ctx, page.cnlr)
1777		if err != nil {
1778			return err
1779		}
1780		page.cnlr = next
1781		if !next.hasNextLink() || !next.IsEmpty() {
1782			break
1783		}
1784	}
1785	return nil
1786}
1787
1788// Next advances to the next page of values.  If there was an error making
1789// the request the page does not advance and the error is returned.
1790// Deprecated: Use NextWithContext() instead.
1791func (page *ComputeNodeListResultPage) Next() error {
1792	return page.NextWithContext(context.Background())
1793}
1794
1795// NotDone returns true if the page enumeration should be started or is not yet complete.
1796func (page ComputeNodeListResultPage) NotDone() bool {
1797	return !page.cnlr.IsEmpty()
1798}
1799
1800// Response returns the raw server response from the last page request.
1801func (page ComputeNodeListResultPage) Response() ComputeNodeListResult {
1802	return page.cnlr
1803}
1804
1805// Values returns the slice of values for the current page or nil if there are no values.
1806func (page ComputeNodeListResultPage) Values() []ComputeNode {
1807	if page.cnlr.IsEmpty() {
1808		return nil
1809	}
1810	return *page.cnlr.Value
1811}
1812
1813// Creates a new instance of the ComputeNodeListResultPage type.
1814func NewComputeNodeListResultPage(cur ComputeNodeListResult, getNextPage func(context.Context, ComputeNodeListResult) (ComputeNodeListResult, error)) ComputeNodeListResultPage {
1815	return ComputeNodeListResultPage{
1816		fn:   getNextPage,
1817		cnlr: cur,
1818	}
1819}
1820
1821// ComputeNodeUser ...
1822type ComputeNodeUser struct {
1823	Name *string `json:"name,omitempty"`
1824	// IsAdmin - The default value is false.
1825	IsAdmin *bool `json:"isAdmin,omitempty"`
1826	// 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.
1827	ExpiryTime *date.Time `json:"expiryTime,omitempty"`
1828	// 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.
1829	Password *string `json:"password,omitempty"`
1830	// 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).
1831	SSHPublicKey *string `json:"sshPublicKey,omitempty"`
1832}
1833
1834// ContainerConfiguration ...
1835type ContainerConfiguration struct {
1836	Type *string `json:"type,omitempty"`
1837	// ContainerImageNames - This is the full image reference, as would be specified to "docker pull". An image will be sourced from the default Docker registry unless the image is fully qualified with an alternative registry.
1838	ContainerImageNames *[]string `json:"containerImageNames,omitempty"`
1839	// ContainerRegistries - If any images must be downloaded from a private registry which requires credentials, then those credentials must be provided here.
1840	ContainerRegistries *[]ContainerRegistry `json:"containerRegistries,omitempty"`
1841}
1842
1843// ContainerRegistry ...
1844type ContainerRegistry struct {
1845	// RegistryServer - If omitted, the default is "docker.io".
1846	RegistryServer *string `json:"registryServer,omitempty"`
1847	UserName       *string `json:"username,omitempty"`
1848	Password       *string `json:"password,omitempty"`
1849}
1850
1851// DataDisk ...
1852type DataDisk struct {
1853	// Lun - The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct lun.
1854	Lun *int32 `json:"lun,omitempty"`
1855	// Caching - The default value for caching is none. For information about the caching options see: https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
1856	Caching    CachingType `json:"caching,omitempty"`
1857	DiskSizeGB *int32      `json:"diskSizeGB,omitempty"`
1858	// StorageAccountType - If omitted, the default is "standard_lrs". Possible values include: 'StandardLRS', 'PremiumLRS'
1859	StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
1860}
1861
1862// DeleteCertificateError ...
1863type DeleteCertificateError struct {
1864	Code    *string `json:"code,omitempty"`
1865	Message *string `json:"message,omitempty"`
1866	// 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.
1867	Values *[]NameValuePair `json:"values,omitempty"`
1868}
1869
1870// EnvironmentSetting ...
1871type EnvironmentSetting struct {
1872	Name  *string `json:"name,omitempty"`
1873	Value *string `json:"value,omitempty"`
1874}
1875
1876// Error ...
1877type Error struct {
1878	Code    *string        `json:"code,omitempty"`
1879	Message *ErrorMessage  `json:"message,omitempty"`
1880	Values  *[]ErrorDetail `json:"values,omitempty"`
1881}
1882
1883// ErrorDetail ...
1884type ErrorDetail struct {
1885	Key   *string `json:"key,omitempty"`
1886	Value *string `json:"value,omitempty"`
1887}
1888
1889// ErrorMessage ...
1890type ErrorMessage struct {
1891	Lang  *string `json:"lang,omitempty"`
1892	Value *string `json:"value,omitempty"`
1893}
1894
1895// ExitCodeMapping ...
1896type ExitCodeMapping struct {
1897	Code        *int32       `json:"code,omitempty"`
1898	ExitOptions *ExitOptions `json:"exitOptions,omitempty"`
1899}
1900
1901// ExitCodeRangeMapping ...
1902type ExitCodeRangeMapping struct {
1903	Start       *int32       `json:"start,omitempty"`
1904	End         *int32       `json:"end,omitempty"`
1905	ExitOptions *ExitOptions `json:"exitOptions,omitempty"`
1906}
1907
1908// ExitConditions ...
1909type ExitConditions struct {
1910	ExitCodes          *[]ExitCodeMapping      `json:"exitCodes,omitempty"`
1911	ExitCodeRanges     *[]ExitCodeRangeMapping `json:"exitCodeRanges,omitempty"`
1912	PreProcessingError *ExitOptions            `json:"preProcessingError,omitempty"`
1913	// FileUploadError - If the task exited with an exit code that was specified via exitCodes or exitCodeRanges, and then encountered a file upload error, then the action specified by the exit code takes precedence.
1914	FileUploadError *ExitOptions `json:"fileUploadError,omitempty"`
1915	// Default - This value is used if the task exits with any nonzero exit code not listed in the exitCodes or exitCodeRanges collection, with a pre-processing error if the preProcessingError property is not present, or with a file upload error if the fileUploadError property is not present. If you want non-default behavior on exit code 0, you must list it explicitly using the exitCodes or exitCodeRanges collection.
1916	Default *ExitOptions `json:"default,omitempty"`
1917}
1918
1919// ExitOptions ...
1920type ExitOptions struct {
1921	// JobAction - The default is none for exit code 0 and terminate for all other exit conditions. If the job's onTaskFailed property is noAction, then specifying this property returns an error and 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'
1922	JobAction JobAction `json:"jobAction,omitempty"`
1923	// DependencyAction - The default is 'satisfy' for exit code 0, and 'block' for all other exit conditions. If the job's usesTaskDependencies property is set to false, then specifying the dependencyAction property returns an error and 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: 'Satisfy', 'Block'
1924	DependencyAction DependencyAction `json:"dependencyAction,omitempty"`
1925}
1926
1927// FileProperties ...
1928type FileProperties struct {
1929	// CreationTime - The creation time is not returned for files on Linux compute nodes.
1930	CreationTime  *date.Time `json:"creationTime,omitempty"`
1931	LastModified  *date.Time `json:"lastModified,omitempty"`
1932	ContentLength *int64     `json:"contentLength,omitempty"`
1933	ContentType   *string    `json:"contentType,omitempty"`
1934	// FileMode - The file mode is returned only for files on Linux compute nodes.
1935	FileMode *string `json:"fileMode,omitempty"`
1936}
1937
1938// ImageReference ...
1939type ImageReference struct {
1940	// Publisher - For example, Canonical or MicrosoftWindowsServer.
1941	Publisher *string `json:"publisher,omitempty"`
1942	// Offer - For example, UbuntuServer or WindowsServer.
1943	Offer *string `json:"offer,omitempty"`
1944	// Sku - For example, 14.04.0-LTS or 2012-R2-Datacenter.
1945	Sku *string `json:"sku,omitempty"`
1946	// Version - A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'.
1947	Version *string `json:"version,omitempty"`
1948	// VirtualMachineImageID - This property is mutually exclusive with other ImageReference properties. The virtual machine image must be in the same region and subscription as the Azure Batch account. For information about the firewall settings for the Batch node agent to communicate with the Batch service see https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration.
1949	VirtualMachineImageID *string `json:"virtualMachineImageId,omitempty"`
1950}
1951
1952// InboundEndpoint ...
1953type InboundEndpoint struct {
1954	Name *string `json:"name,omitempty"`
1955	// Protocol - Possible values include: 'TCP', 'UDP'
1956	Protocol        InboundEndpointProtocol `json:"protocol,omitempty"`
1957	PublicIPAddress *string                 `json:"publicIPAddress,omitempty"`
1958	PublicFQDN      *string                 `json:"publicFQDN,omitempty"`
1959	FrontendPort    *int32                  `json:"frontendPort,omitempty"`
1960	BackendPort     *int32                  `json:"backendPort,omitempty"`
1961}
1962
1963// InboundNATPool ...
1964type InboundNATPool struct {
1965	// Name - The name must be unique within a Batch pool, can contain letters, numbers, underscores, periods, and hyphens. Names must start with a letter or number, must end with a letter, number, or underscore, and cannot exceed 77 characters.  If any invalid values are provided the request fails with HTTP status code 400.
1966	Name *string `json:"name,omitempty"`
1967	// Protocol - Possible values include: 'TCP', 'UDP'
1968	Protocol InboundEndpointProtocol `json:"protocol,omitempty"`
1969	// BackendPort - This must be unique within a Batch pool. Acceptable values are between 1 and 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400.
1970	BackendPort *int32 `json:"backendPort,omitempty"`
1971	// FrontendPortRangeStart - Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a pool must be distinct and cannot overlap. Each range must contain at least 40 ports. If any reserved or overlapping values are provided the request fails with HTTP status code 400.
1972	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
1973	// FrontendPortRangeEnd - Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges within a pool must be distinct and cannot overlap. Each range must contain at least 40 ports. If any reserved or overlapping values are provided the request fails with HTTP status code 400.
1974	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
1975	// NetworkSecurityGroupRules - The maximum number of rules that can be specified across all the endpoints on a Batch pool is 25. If no network security group rules are specified, a default rule will be created to allow inbound access to the specified backendPort. If the maximum number of network security group rules is exceeded the request fails with HTTP status code 400.
1976	NetworkSecurityGroupRules *[]NetworkSecurityGroupRule `json:"networkSecurityGroupRules,omitempty"`
1977}
1978
1979// JobAddParameter ...
1980type JobAddParameter struct {
1981	// 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).
1982	ID *string `json:"id,omitempty"`
1983	// DisplayName - The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
1984	DisplayName *string `json:"displayName,omitempty"`
1985	// 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.
1986	Priority *int32 `json:"priority,omitempty"`
1987	// Constraints - The execution constraints for the job.
1988	Constraints *JobConstraints `json:"constraints,omitempty"`
1989	// 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.
1990	JobManagerTask *JobManagerTask `json:"jobManagerTask,omitempty"`
1991	// 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.
1992	JobPreparationTask *JobPreparationTask `json:"jobPreparationTask,omitempty"`
1993	// 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.
1994	JobReleaseTask *JobReleaseTask `json:"jobReleaseTask,omitempty"`
1995	// CommonEnvironmentSettings - Individual tasks can override an environment setting specified here by specifying the same setting name with a different value.
1996	CommonEnvironmentSettings *[]EnvironmentSetting `json:"commonEnvironmentSettings,omitempty"`
1997	PoolInfo                  *PoolInformation      `json:"poolInfo,omitempty"`
1998	// 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'
1999	OnAllTasksComplete OnAllTasksComplete `json:"onAllTasksComplete,omitempty"`
2000	// OnTaskFailure - A task is considered to have failed if has a failureInfo. A failureInfo is set if the task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the task, for example due to a resource file download error. The default is noaction. Possible values include: 'OnTaskFailureNoAction', 'OnTaskFailurePerformExitOptionsJobAction'
2001	OnTaskFailure OnTaskFailure `json:"onTaskFailure,omitempty"`
2002	// Metadata - The Batch service does not assign any meaning to metadata; it is solely for the use of user code.
2003	Metadata             *[]MetadataItem `json:"metadata,omitempty"`
2004	UsesTaskDependencies *bool           `json:"usesTaskDependencies,omitempty"`
2005}
2006
2007// JobConstraints ...
2008type JobConstraints struct {
2009	// 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.
2010	MaxWallClockTime *string `json:"maxWallClockTime,omitempty"`
2011	// 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).
2012	MaxTaskRetryCount *int32 `json:"maxTaskRetryCount,omitempty"`
2013}
2014
2015// JobDisableParameter ...
2016type JobDisableParameter struct {
2017	// DisableTasks - Possible values include: 'DisableJobOptionRequeue', 'DisableJobOptionTerminate', 'DisableJobOptionWait'
2018	DisableTasks DisableJobOption `json:"disableTasks,omitempty"`
2019}
2020
2021// JobExecutionInformation ...
2022type JobExecutionInformation struct {
2023	// StartTime - This is the time at which the job was created.
2024	StartTime *date.Time `json:"startTime,omitempty"`
2025	// EndTime - This property is set only if the job is in the completed state.
2026	EndTime *date.Time `json:"endTime,omitempty"`
2027	// 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.
2028	PoolID *string `json:"poolId,omitempty"`
2029	// SchedulingError - This property is not set if there was no error starting the job.
2030	SchedulingError *JobSchedulingError `json:"schedulingError,omitempty"`
2031	// 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.
2032	TerminateReason *string `json:"terminateReason,omitempty"`
2033}
2034
2035// JobManagerTask the Job Manager task is automatically started when the job is created. The Batch service
2036// tries to schedule the Job Manager task before any other tasks in the job. When shrinking a pool, the
2037// Batch service tries to preserve compute nodes where Job Manager tasks are running for as long as
2038// possible (that is, nodes running 'normal' tasks are removed before nodes running Job Manager tasks).
2039// When a Job Manager task fails and needs to be restarted, the system tries to schedule it at the highest
2040// priority. If there are no idle nodes available, the system may terminate one of the running tasks in the
2041// pool and return it to the queue in order to make room for the Job Manager task to restart. Note that a
2042// Job Manager task in one job does not have priority over tasks in other jobs. Across jobs, only job level
2043// priorities are observed. For example, if a Job Manager in a priority 0 job needs to be restarted, it
2044// will not displace tasks of a priority 1 job. Batch will retry tasks when a recovery operation is
2045// triggered on a compute node. Examples of recovery operations include (but are not limited to) when an
2046// unhealthy compute node is rebooted or a compute node disappeared due to host failure. Retries due to
2047// recovery operations are independent of and are not counted against the maxTaskRetryCount. Even if the
2048// maxTaskRetryCount is 0, an internal retry due to a recovery operation may occur. Because of this, all
2049// tasks should be idempotent. This means tasks need to tolerate being interrupted and restarted without
2050// causing any corruption or duplicate data. The best practice for long running tasks is to use some form
2051// of checkpointing.
2052type JobManagerTask struct {
2053	// ID - The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters.
2054	ID *string `json:"id,omitempty"`
2055	// DisplayName - It need not be unique and can contain any Unicode characters up to a maximum length of 1024.
2056	DisplayName *string `json:"displayName,omitempty"`
2057	// 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. If the command line refers to file paths, it should use a relative path (relative to the task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables).
2058	CommandLine *string `json:"commandLine,omitempty"`
2059	// ContainerSettings - If the pool that will run this task has containerConfiguration set, this must be set as well. If the pool that will run this task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all task environment variables are mapped into the container, and the task command line is executed in the container.
2060	ContainerSettings *TaskContainerSettings `json:"containerSettings,omitempty"`
2061	// ResourceFiles - Files listed under this element are located in the task's working directory. There is a maximum size for the list of resource files.  When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers.
2062	ResourceFiles *[]ResourceFile `json:"resourceFiles,omitempty"`
2063	// OutputFiles - For multi-instance tasks, the files will only be uploaded from the compute node on which the primary task is executed.
2064	OutputFiles         *[]OutputFile         `json:"outputFiles,omitempty"`
2065	EnvironmentSettings *[]EnvironmentSetting `json:"environmentSettings,omitempty"`
2066	Constraints         *TaskConstraints      `json:"constraints,omitempty"`
2067	// 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.
2068	KillJobOnCompletion *bool `json:"killJobOnCompletion,omitempty"`
2069	// UserIdentity - If omitted, the task runs as a non-administrative user unique to the task.
2070	UserIdentity *UserIdentity `json:"userIdentity,omitempty"`
2071	// 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.
2072	RunExclusive *bool `json:"runExclusive,omitempty"`
2073	// ApplicationPackageReferences - Application packages are downloaded and deployed to a shared directory, not the task working 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.
2074	ApplicationPackageReferences *[]ApplicationPackageReference `json:"applicationPackageReferences,omitempty"`
2075	// AuthenticationTokenSettings - If this property is set, the Batch service provides the task with an authentication token which can be used to authenticate Batch service operations without requiring an account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the task can carry out using the token depend on the settings. For example, a task can request job permissions in order to add other tasks to the job, or check the status of the job or of other tasks under the job.
2076	AuthenticationTokenSettings *AuthenticationTokenSettings `json:"authenticationTokenSettings,omitempty"`
2077	// AllowLowPriorityNode - The default value is true.
2078	AllowLowPriorityNode *bool `json:"allowLowPriorityNode,omitempty"`
2079}
2080
2081// JobPatchParameter ...
2082type JobPatchParameter struct {
2083	// 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.
2084	Priority *int32 `json:"priority,omitempty"`
2085	// 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'
2086	OnAllTasksComplete OnAllTasksComplete `json:"onAllTasksComplete,omitempty"`
2087	// Constraints - If omitted, the existing execution constraints are left unchanged.
2088	Constraints *JobConstraints `json:"constraints,omitempty"`
2089	// 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.
2090	PoolInfo *PoolInformation `json:"poolInfo,omitempty"`
2091	// Metadata - If omitted, the existing job metadata is left unchanged.
2092	Metadata *[]MetadataItem `json:"metadata,omitempty"`
2093}
2094
2095// JobPreparationAndReleaseTaskExecutionInformation ...
2096type JobPreparationAndReleaseTaskExecutionInformation struct {
2097	PoolID                          *string                                 `json:"poolId,omitempty"`
2098	NodeID                          *string                                 `json:"nodeId,omitempty"`
2099	NodeURL                         *string                                 `json:"nodeUrl,omitempty"`
2100	JobPreparationTaskExecutionInfo *JobPreparationTaskExecutionInformation `json:"jobPreparationTaskExecutionInfo,omitempty"`
2101	// JobReleaseTaskExecutionInfo - This property is set only if the Job Release task has run on the node.
2102	JobReleaseTaskExecutionInfo *JobReleaseTaskExecutionInformation `json:"jobReleaseTaskExecutionInfo,omitempty"`
2103}
2104
2105// JobPreparationTask you can use Job Preparation to prepare a compute node to run tasks for the job.
2106// Activities commonly performed in Job Preparation include: Downloading common resource files used by all
2107// the tasks in the job. The Job Preparation task can download these common resource files to the shared
2108// location on the compute node. (AZ_BATCH_NODE_ROOT_DIR\shared), or starting a local service on the
2109// compute node so that all tasks of that job can communicate with it. If the Job Preparation task fails
2110// (that is, exhausts its retry count before exiting with exit code 0), Batch will not run tasks of this
2111// job on the compute node. The node remains ineligible to run tasks of this job until it is reimaged. The
2112// node remains active and can be used for other jobs. The Job Preparation task can run multiple times on
2113// the same compute node. Therefore, you should write the Job Preparation task to handle re-execution. If
2114// the compute node is rebooted, the Job Preparation task is run again on the node before scheduling any
2115// other task of the job, if rerunOnNodeRebootAfterSuccess is true or if the Job Preparation task did not
2116// previously complete. If the compute node is reimaged, the Job Preparation task is run again before
2117// scheduling any task of the job. Batch will retry tasks when a recovery operation is triggered on a
2118// compute node. Examples of recovery operations include (but are not limited to) when an unhealthy compute
2119// node is rebooted or a compute node disappeared due to host failure. Retries due to recovery operations
2120// are independent of and are not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount is
2121// 0, an internal retry due to a recovery operation may occur. Because of this, all tasks should be
2122// idempotent. This means tasks need to tolerate being interrupted and restarted without causing any
2123// corruption or duplicate data. The best practice for long running tasks is to use some form of
2124// checkpointing.
2125type JobPreparationTask struct {
2126	// 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).
2127	ID *string `json:"id,omitempty"`
2128	// 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. If the command line refers to file paths, it should use a relative path (relative to the task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables).
2129	CommandLine *string `json:"commandLine,omitempty"`
2130	// ContainerSettings - When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all task environment variables are mapped into the container, and the task command line is executed in the container.
2131	ContainerSettings *TaskContainerSettings `json:"containerSettings,omitempty"`
2132	// ResourceFiles - Files listed under this element are located in the task's working directory.  There is a maximum size for the list of resource files.  When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers.
2133	ResourceFiles       *[]ResourceFile       `json:"resourceFiles,omitempty"`
2134	EnvironmentSettings *[]EnvironmentSetting `json:"environmentSettings,omitempty"`
2135	Constraints         *TaskConstraints      `json:"constraints,omitempty"`
2136	// 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.
2137	WaitForSuccess *bool `json:"waitForSuccess,omitempty"`
2138	// UserIdentity - If omitted, the task runs as a non-administrative user unique to the task on Windows nodes, or a non-administrative user unique to the pool on Linux nodes.
2139	UserIdentity *UserIdentity `json:"userIdentity,omitempty"`
2140	// 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.
2141	RerunOnNodeRebootAfterSuccess *bool `json:"rerunOnNodeRebootAfterSuccess,omitempty"`
2142}
2143
2144// JobPreparationTaskExecutionInformation ...
2145type JobPreparationTaskExecutionInformation struct {
2146	// StartTime - If the task has been restarted or retried, this is the most recent time at which the task started running.
2147	StartTime *date.Time `json:"startTime,omitempty"`
2148	// EndTime - This property is set only if the task is in the Completed state.
2149	EndTime *date.Time `json:"endTime,omitempty"`
2150	// State - Possible values include: 'JobPreparationTaskStateRunning', 'JobPreparationTaskStateCompleted'
2151	State                JobPreparationTaskState `json:"state,omitempty"`
2152	TaskRootDirectory    *string                 `json:"taskRootDirectory,omitempty"`
2153	TaskRootDirectoryURL *string                 `json:"taskRootDirectoryUrl,omitempty"`
2154	// 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.
2155	ExitCode *int32 `json:"exitCode,omitempty"`
2156	// ContainerInfo - This property is set only if the task runs in a container context.
2157	ContainerInfo *TaskContainerExecutionInformation `json:"containerInfo,omitempty"`
2158	// FailureInfo - This property is set only if the task is in the completed state and encountered a failure.
2159	FailureInfo *TaskFailureInformation `json:"failureInfo,omitempty"`
2160	// RetryCount - Task application failures (non-zero exit code) are retried, pre-processing errors (the task could not be run) and file upload errors are not retried. The Batch service will retry the task up to the limit specified by the constraints.
2161	RetryCount *int32 `json:"retryCount,omitempty"`
2162	// 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.
2163	LastRetryTime *date.Time `json:"lastRetryTime,omitempty"`
2164	// Result - If the value is 'failed', then the details of the failure can be found in the failureInfo property. Possible values include: 'Success', 'Failure'
2165	Result TaskExecutionResult `json:"result,omitempty"`
2166}
2167
2168// JobReleaseTask the Job Release task runs when the job ends, because of one of the following: The user
2169// calls the Terminate Job API, or the Delete Job API while the job is still active, the job's maximum wall
2170// clock time constraint is reached, and the job is still active, or the job's Job Manager task completed,
2171// and the job is configured to terminate when the Job Manager completes. The Job Release task runs on each
2172// compute node where tasks of the job have run and the Job Preparation task ran and completed. If you
2173// reimage a compute node after it has run the Job Preparation task, and the job ends without any further
2174// tasks of the job running on that compute node (and hence the Job Preparation task does not re-run), then
2175// the Job Release task does not run on that node. If a compute node reboots while the Job Release task is
2176// still running, the Job Release task runs again when the compute node starts up. The job is not marked as
2177// complete until all Job Release tasks have completed. The Job Release task runs in the background. It
2178// does not occupy a scheduling slot; that is, it does not count towards the maxTasksPerNode limit
2179// specified on the pool.
2180type JobReleaseTask struct {
2181	// 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).
2182	ID *string `json:"id,omitempty"`
2183	// 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. If the command line refers to file paths, it should use a relative path (relative to the task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables).
2184	CommandLine *string `json:"commandLine,omitempty"`
2185	// ContainerSettings - When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all task environment variables are mapped into the container, and the task command line is executed in the container.
2186	ContainerSettings *TaskContainerSettings `json:"containerSettings,omitempty"`
2187	// ResourceFiles - Files listed under this element are located in the task's working directory.
2188	ResourceFiles       *[]ResourceFile       `json:"resourceFiles,omitempty"`
2189	EnvironmentSettings *[]EnvironmentSetting `json:"environmentSettings,omitempty"`
2190	MaxWallClockTime    *string               `json:"maxWallClockTime,omitempty"`
2191	// RetentionTime - The default is infinite, i.e. the task directory will be retained until the compute node is removed or reimaged.
2192	RetentionTime *string `json:"retentionTime,omitempty"`
2193	// UserIdentity - If omitted, the task runs as a non-administrative user unique to the task.
2194	UserIdentity *UserIdentity `json:"userIdentity,omitempty"`
2195}
2196
2197// JobReleaseTaskExecutionInformation ...
2198type JobReleaseTaskExecutionInformation struct {
2199	// StartTime - If the task has been restarted or retried, this is the most recent time at which the task started running.
2200	StartTime *date.Time `json:"startTime,omitempty"`
2201	// EndTime - This property is set only if the task is in the Completed state.
2202	EndTime *date.Time `json:"endTime,omitempty"`
2203	// State - Possible values include: 'JobReleaseTaskStateRunning', 'JobReleaseTaskStateCompleted'
2204	State                JobReleaseTaskState `json:"state,omitempty"`
2205	TaskRootDirectory    *string             `json:"taskRootDirectory,omitempty"`
2206	TaskRootDirectoryURL *string             `json:"taskRootDirectoryUrl,omitempty"`
2207	// 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.
2208	ExitCode *int32 `json:"exitCode,omitempty"`
2209	// ContainerInfo - This property is set only if the task runs in a container context.
2210	ContainerInfo *TaskContainerExecutionInformation `json:"containerInfo,omitempty"`
2211	// FailureInfo - This property is set only if the task is in the completed state and encountered a failure.
2212	FailureInfo *TaskFailureInformation `json:"failureInfo,omitempty"`
2213	// Result - If the value is 'failed', then the details of the failure can be found in the failureInfo property. Possible values include: 'Success', 'Failure'
2214	Result TaskExecutionResult `json:"result,omitempty"`
2215}
2216
2217// JobScheduleAddParameter ...
2218type JobScheduleAddParameter struct {
2219	// 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).
2220	ID *string `json:"id,omitempty"`
2221	// DisplayName - The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
2222	DisplayName      *string           `json:"displayName,omitempty"`
2223	Schedule         *Schedule         `json:"schedule,omitempty"`
2224	JobSpecification *JobSpecification `json:"jobSpecification,omitempty"`
2225	// Metadata - The Batch service does not assign any meaning to metadata; it is solely for the use of user code.
2226	Metadata *[]MetadataItem `json:"metadata,omitempty"`
2227}
2228
2229// JobScheduleExecutionInformation ...
2230type JobScheduleExecutionInformation struct {
2231	// 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.
2232	NextRunTime *date.Time `json:"nextRunTime,omitempty"`
2233	// RecentJob - This property is present only if the at least one job has run under the schedule.
2234	RecentJob *RecentJob `json:"recentJob,omitempty"`
2235	// EndTime - This property is set only if the job schedule is in the completed state.
2236	EndTime *date.Time `json:"endTime,omitempty"`
2237}
2238
2239// JobSchedulePatchParameter ...
2240type JobSchedulePatchParameter struct {
2241	// Schedule - If you do not specify this element, the existing schedule is left unchanged.
2242	Schedule *Schedule `json:"schedule,omitempty"`
2243	// JobSpecification - Updates affect only jobs that are started after the update has taken place. Any currently active job continues with the older specification.
2244	JobSpecification *JobSpecification `json:"jobSpecification,omitempty"`
2245	// Metadata - If you do not specify this element, existing metadata is left unchanged.
2246	Metadata *[]MetadataItem `json:"metadata,omitempty"`
2247}
2248
2249// JobScheduleStatistics ...
2250type JobScheduleStatistics struct {
2251	URL            *string    `json:"url,omitempty"`
2252	StartTime      *date.Time `json:"startTime,omitempty"`
2253	LastUpdateTime *date.Time `json:"lastUpdateTime,omitempty"`
2254	UserCPUTime    *string    `json:"userCPUTime,omitempty"`
2255	KernelCPUTime  *string    `json:"kernelCPUTime,omitempty"`
2256	// 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.
2257	WallClockTime     *string  `json:"wallClockTime,omitempty"`
2258	ReadIOps          *int64   `json:"readIOps,omitempty"`
2259	WriteIOps         *int64   `json:"writeIOps,omitempty"`
2260	ReadIOGiB         *float64 `json:"readIOGiB,omitempty"`
2261	WriteIOGiB        *float64 `json:"writeIOGiB,omitempty"`
2262	NumSucceededTasks *int64   `json:"numSucceededTasks,omitempty"`
2263	NumFailedTasks    *int64   `json:"numFailedTasks,omitempty"`
2264	NumTaskRetries    *int64   `json:"numTaskRetries,omitempty"`
2265	// WaitTime - This value is only reported in the account lifetime statistics; it is not included in the job statistics.
2266	WaitTime *string `json:"waitTime,omitempty"`
2267}
2268
2269// JobScheduleUpdateParameter ...
2270type JobScheduleUpdateParameter struct {
2271	// 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.
2272	Schedule *Schedule `json:"schedule,omitempty"`
2273	// JobSpecification - Updates affect only jobs that are started after the update has taken place. Any currently active job continues with the older specification.
2274	JobSpecification *JobSpecification `json:"jobSpecification,omitempty"`
2275	// Metadata - If you do not specify this element, it takes the default value of an empty list; in effect, any existing metadata is deleted.
2276	Metadata *[]MetadataItem `json:"metadata,omitempty"`
2277}
2278
2279// JobSchedulingError ...
2280type JobSchedulingError struct {
2281	// Category - Possible values include: 'UserError', 'ServerError'
2282	Category ErrorCategory    `json:"category,omitempty"`
2283	Code     *string          `json:"code,omitempty"`
2284	Message  *string          `json:"message,omitempty"`
2285	Details  *[]NameValuePair `json:"details,omitempty"`
2286}
2287
2288// JobSpecification ...
2289type JobSpecification struct {
2290	// 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.
2291	Priority *int32 `json:"priority,omitempty"`
2292	// DisplayName - The name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
2293	DisplayName          *string `json:"displayName,omitempty"`
2294	UsesTaskDependencies *bool   `json:"usesTaskDependencies,omitempty"`
2295	// 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'
2296	OnAllTasksComplete OnAllTasksComplete `json:"onAllTasksComplete,omitempty"`
2297	// OnTaskFailure - The default is noaction. Possible values include: 'OnTaskFailureNoAction', 'OnTaskFailurePerformExitOptionsJobAction'
2298	OnTaskFailure OnTaskFailure   `json:"onTaskFailure,omitempty"`
2299	Constraints   *JobConstraints `json:"constraints,omitempty"`
2300	// 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.
2301	JobManagerTask *JobManagerTask `json:"jobManagerTask,omitempty"`
2302	// 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.
2303	JobPreparationTask *JobPreparationTask `json:"jobPreparationTask,omitempty"`
2304	// 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.
2305	JobReleaseTask *JobReleaseTask `json:"jobReleaseTask,omitempty"`
2306	// CommonEnvironmentSettings - Individual tasks can override an environment setting specified here by specifying the same setting name with a different value.
2307	CommonEnvironmentSettings *[]EnvironmentSetting `json:"commonEnvironmentSettings,omitempty"`
2308	PoolInfo                  *PoolInformation      `json:"poolInfo,omitempty"`
2309	// Metadata - The Batch service does not assign any meaning to metadata; it is solely for the use of user code.
2310	Metadata *[]MetadataItem `json:"metadata,omitempty"`
2311}
2312
2313// JobStatistics ...
2314type JobStatistics struct {
2315	autorest.Response `json:"-"`
2316	URL               *string    `json:"url,omitempty"`
2317	StartTime         *date.Time `json:"startTime,omitempty"`
2318	LastUpdateTime    *date.Time `json:"lastUpdateTime,omitempty"`
2319	UserCPUTime       *string    `json:"userCPUTime,omitempty"`
2320	KernelCPUTime     *string    `json:"kernelCPUTime,omitempty"`
2321	// 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.
2322	WallClockTime *string  `json:"wallClockTime,omitempty"`
2323	ReadIOps      *int64   `json:"readIOps,omitempty"`
2324	WriteIOps     *int64   `json:"writeIOps,omitempty"`
2325	ReadIOGiB     *float64 `json:"readIOGiB,omitempty"`
2326	WriteIOGiB    *float64 `json:"writeIOGiB,omitempty"`
2327	// NumSucceededTasks - A task completes successfully if it returns exit code 0.
2328	NumSucceededTasks *int64 `json:"numSucceededTasks,omitempty"`
2329	// NumFailedTasks - A task fails if it exhausts its maximum retry count without returning exit code 0.
2330	NumFailedTasks *int64 `json:"numFailedTasks,omitempty"`
2331	NumTaskRetries *int64 `json:"numTaskRetries,omitempty"`
2332	// 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.
2333	WaitTime *string `json:"waitTime,omitempty"`
2334}
2335
2336// JobTerminateParameter ...
2337type JobTerminateParameter struct {
2338	TerminateReason *string `json:"terminateReason,omitempty"`
2339}
2340
2341// JobUpdateParameter ...
2342type JobUpdateParameter struct {
2343	// 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.
2344	Priority *int32 `json:"priority,omitempty"`
2345	// Constraints - If omitted, the constraints are cleared.
2346	Constraints *JobConstraints `json:"constraints,omitempty"`
2347	// 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.
2348	PoolInfo *PoolInformation `json:"poolInfo,omitempty"`
2349	// Metadata - If omitted, it takes the default value of an empty list; in effect, any existing metadata is deleted.
2350	Metadata *[]MetadataItem `json:"metadata,omitempty"`
2351	// 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. 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 and Batch returns status code 400 (Bad Request) and an 'invalid property value' error response. If you do not specify this element in a PUT request, it is equivalent to passing noaction. This is an error if the current value is terminatejob. Possible values include: 'NoAction', 'TerminateJob'
2352	OnAllTasksComplete OnAllTasksComplete `json:"onAllTasksComplete,omitempty"`
2353}
2354
2355// LinuxUserConfiguration ...
2356type LinuxUserConfiguration struct {
2357	// UID - The uid and gid properties must be specified together or not at all. If not specified the underlying operating system picks the uid.
2358	UID *int32 `json:"uid,omitempty"`
2359	// Gid - The uid and gid properties must be specified together or not at all. If not specified the underlying operating system picks the gid.
2360	Gid *int32 `json:"gid,omitempty"`
2361	// SSHPrivateKey - The private key must not be password protected. The private key is used to automatically configure asymmetric-key based authentication for SSH between nodes in a Linux pool when the pool's enableInterNodeCommunication property is true (it is ignored if enableInterNodeCommunication is false). It does this by placing the key pair into the user's .ssh directory. If not specified, password-less SSH is not configured between nodes (no modification of the user's .ssh directory is done).
2362	SSHPrivateKey *string `json:"sshPrivateKey,omitempty"`
2363}
2364
2365// MetadataItem the Batch service does not assign any meaning to this metadata; it is solely for the use of
2366// user code.
2367type MetadataItem struct {
2368	Name  *string `json:"name,omitempty"`
2369	Value *string `json:"value,omitempty"`
2370}
2371
2372// MultiInstanceSettings multi-instance tasks are commonly used to support MPI tasks.
2373type MultiInstanceSettings struct {
2374	// NumberOfInstances - If omitted, the default is 1.
2375	NumberOfInstances *int32 `json:"numberOfInstances,omitempty"`
2376	// CoordinationCommandLine - A typical coordination command line launches a background service and verifies that the service is ready to process inter-node messages.
2377	CoordinationCommandLine *string `json:"coordinationCommandLine,omitempty"`
2378	// 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. Also note that these resource files are not downloaded to the task working directory, but instead are downloaded to the task root directory (one directory above the working directory).  There is a maximum size for the list of resource files.  When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers.
2379	CommonResourceFiles *[]ResourceFile `json:"commonResourceFiles,omitempty"`
2380}
2381
2382// NameValuePair ...
2383type NameValuePair struct {
2384	Name  *string `json:"name,omitempty"`
2385	Value *string `json:"value,omitempty"`
2386}
2387
2388// NetworkConfiguration the network configuration for a pool.
2389type NetworkConfiguration struct {
2390	// 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. For pools created with virtualMachineConfiguration only ARM virtual networks ('Microsoft.Network/virtualNetworks') are supported, but for pools created with cloudServiceConfiguration both ARM and classic virtual networks are supported. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication. For pools created with a virtual machine configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. For pools created with a cloud service configuration, enable ports 10100, 20100, and 30100. Also enable outbound connections to Azure Storage on port 443. For more details see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration
2391	SubnetID *string `json:"subnetId,omitempty"`
2392	// EndpointConfiguration - Pool endpoint configuration is only supported on pools with the virtualMachineConfiguration property.
2393	EndpointConfiguration *PoolEndpointConfiguration `json:"endpointConfiguration,omitempty"`
2394}
2395
2396// NetworkSecurityGroupRule ...
2397type NetworkSecurityGroupRule struct {
2398	// Priority - Priorities within a pool must be unique and are evaluated in order of priority. The lower the number the higher the priority. For example, rules could be specified with order numbers of 150, 250, and 350. The rule with the order number of 150 takes precedence over the rule that has an order of 250. Allowed priorities are 150 to 3500. If any reserved or duplicate values are provided the request fails with HTTP status code 400.
2399	Priority *int32 `json:"priority,omitempty"`
2400	// Access - Possible values include: 'Allow', 'Deny'
2401	Access NetworkSecurityGroupRuleAccess `json:"access,omitempty"`
2402	// SourceAddressPrefix - Valid values are a single IP address (i.e. 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all addresses).  If any other values are provided the request fails with HTTP status code 400.
2403	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
2404}
2405
2406// NodeAgentSku the Batch node agent is a program that runs on each node in the pool, and provides the
2407// command-and-control interface between the node and the Batch service. There are different
2408// implementations of the node agent, known as SKUs, for different operating systems.
2409type NodeAgentSku struct {
2410	ID *string `json:"id,omitempty"`
2411	// VerifiedImageReferences - This collection is not exhaustive (the node agent may be compatible with other images).
2412	VerifiedImageReferences *[]ImageReference `json:"verifiedImageReferences,omitempty"`
2413	// OsType - Possible values include: 'Linux', 'Windows'
2414	OsType OSType `json:"osType,omitempty"`
2415}
2416
2417// NodeCounts ...
2418type NodeCounts struct {
2419	Creating            *int32 `json:"creating,omitempty"`
2420	Idle                *int32 `json:"idle,omitempty"`
2421	Offline             *int32 `json:"offline,omitempty"`
2422	Preempted           *int32 `json:"preempted,omitempty"`
2423	Rebooting           *int32 `json:"rebooting,omitempty"`
2424	Reimaging           *int32 `json:"reimaging,omitempty"`
2425	Running             *int32 `json:"running,omitempty"`
2426	Starting            *int32 `json:"starting,omitempty"`
2427	StartTaskFailed     *int32 `json:"startTaskFailed,omitempty"`
2428	LeavingPool         *int32 `json:"leavingPool,omitempty"`
2429	Unknown             *int32 `json:"unknown,omitempty"`
2430	Unusable            *int32 `json:"unusable,omitempty"`
2431	WaitingForStartTask *int32 `json:"waitingForStartTask,omitempty"`
2432	Total               *int32 `json:"total,omitempty"`
2433}
2434
2435// NodeDisableSchedulingParameter ...
2436type NodeDisableSchedulingParameter struct {
2437	// NodeDisableSchedulingOption - The default value is requeue. Possible values include: 'DisableComputeNodeSchedulingOptionRequeue', 'DisableComputeNodeSchedulingOptionTerminate', 'DisableComputeNodeSchedulingOptionTaskCompletion'
2438	NodeDisableSchedulingOption DisableComputeNodeSchedulingOption `json:"nodeDisableSchedulingOption,omitempty"`
2439}
2440
2441// NodeFile ...
2442type NodeFile struct {
2443	Name        *string         `json:"name,omitempty"`
2444	URL         *string         `json:"url,omitempty"`
2445	IsDirectory *bool           `json:"isDirectory,omitempty"`
2446	Properties  *FileProperties `json:"properties,omitempty"`
2447}
2448
2449// NodeFileListResult ...
2450type NodeFileListResult struct {
2451	autorest.Response `json:"-"`
2452	Value             *[]NodeFile `json:"value,omitempty"`
2453	OdataNextLink     *string     `json:"odata.nextLink,omitempty"`
2454}
2455
2456// NodeFileListResultIterator provides access to a complete listing of NodeFile values.
2457type NodeFileListResultIterator struct {
2458	i    int
2459	page NodeFileListResultPage
2460}
2461
2462// NextWithContext advances to the next value.  If there was an error making
2463// the request the iterator does not advance and the error is returned.
2464func (iter *NodeFileListResultIterator) NextWithContext(ctx context.Context) (err error) {
2465	if tracing.IsEnabled() {
2466		ctx = tracing.StartSpan(ctx, fqdn+"/NodeFileListResultIterator.NextWithContext")
2467		defer func() {
2468			sc := -1
2469			if iter.Response().Response.Response != nil {
2470				sc = iter.Response().Response.Response.StatusCode
2471			}
2472			tracing.EndSpan(ctx, sc, err)
2473		}()
2474	}
2475	iter.i++
2476	if iter.i < len(iter.page.Values()) {
2477		return nil
2478	}
2479	err = iter.page.NextWithContext(ctx)
2480	if err != nil {
2481		iter.i--
2482		return err
2483	}
2484	iter.i = 0
2485	return nil
2486}
2487
2488// Next advances to the next value.  If there was an error making
2489// the request the iterator does not advance and the error is returned.
2490// Deprecated: Use NextWithContext() instead.
2491func (iter *NodeFileListResultIterator) Next() error {
2492	return iter.NextWithContext(context.Background())
2493}
2494
2495// NotDone returns true if the enumeration should be started or is not yet complete.
2496func (iter NodeFileListResultIterator) NotDone() bool {
2497	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2498}
2499
2500// Response returns the raw server response from the last page request.
2501func (iter NodeFileListResultIterator) Response() NodeFileListResult {
2502	return iter.page.Response()
2503}
2504
2505// Value returns the current value or a zero-initialized value if the
2506// iterator has advanced beyond the end of the collection.
2507func (iter NodeFileListResultIterator) Value() NodeFile {
2508	if !iter.page.NotDone() {
2509		return NodeFile{}
2510	}
2511	return iter.page.Values()[iter.i]
2512}
2513
2514// Creates a new instance of the NodeFileListResultIterator type.
2515func NewNodeFileListResultIterator(page NodeFileListResultPage) NodeFileListResultIterator {
2516	return NodeFileListResultIterator{page: page}
2517}
2518
2519// IsEmpty returns true if the ListResult contains no values.
2520func (nflr NodeFileListResult) IsEmpty() bool {
2521	return nflr.Value == nil || len(*nflr.Value) == 0
2522}
2523
2524// hasNextLink returns true if the NextLink is not empty.
2525func (nflr NodeFileListResult) hasNextLink() bool {
2526	return nflr.OdataNextLink != nil && len(*nflr.OdataNextLink) != 0
2527}
2528
2529// nodeFileListResultPreparer prepares a request to retrieve the next set of results.
2530// It returns nil if no more results exist.
2531func (nflr NodeFileListResult) nodeFileListResultPreparer(ctx context.Context) (*http.Request, error) {
2532	if !nflr.hasNextLink() {
2533		return nil, nil
2534	}
2535	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2536		autorest.AsJSON(),
2537		autorest.AsGet(),
2538		autorest.WithBaseURL(to.String(nflr.OdataNextLink)))
2539}
2540
2541// NodeFileListResultPage contains a page of NodeFile values.
2542type NodeFileListResultPage struct {
2543	fn   func(context.Context, NodeFileListResult) (NodeFileListResult, error)
2544	nflr NodeFileListResult
2545}
2546
2547// NextWithContext advances to the next page of values.  If there was an error making
2548// the request the page does not advance and the error is returned.
2549func (page *NodeFileListResultPage) NextWithContext(ctx context.Context) (err error) {
2550	if tracing.IsEnabled() {
2551		ctx = tracing.StartSpan(ctx, fqdn+"/NodeFileListResultPage.NextWithContext")
2552		defer func() {
2553			sc := -1
2554			if page.Response().Response.Response != nil {
2555				sc = page.Response().Response.Response.StatusCode
2556			}
2557			tracing.EndSpan(ctx, sc, err)
2558		}()
2559	}
2560	for {
2561		next, err := page.fn(ctx, page.nflr)
2562		if err != nil {
2563			return err
2564		}
2565		page.nflr = next
2566		if !next.hasNextLink() || !next.IsEmpty() {
2567			break
2568		}
2569	}
2570	return nil
2571}
2572
2573// Next advances to the next page of values.  If there was an error making
2574// the request the page does not advance and the error is returned.
2575// Deprecated: Use NextWithContext() instead.
2576func (page *NodeFileListResultPage) Next() error {
2577	return page.NextWithContext(context.Background())
2578}
2579
2580// NotDone returns true if the page enumeration should be started or is not yet complete.
2581func (page NodeFileListResultPage) NotDone() bool {
2582	return !page.nflr.IsEmpty()
2583}
2584
2585// Response returns the raw server response from the last page request.
2586func (page NodeFileListResultPage) Response() NodeFileListResult {
2587	return page.nflr
2588}
2589
2590// Values returns the slice of values for the current page or nil if there are no values.
2591func (page NodeFileListResultPage) Values() []NodeFile {
2592	if page.nflr.IsEmpty() {
2593		return nil
2594	}
2595	return *page.nflr.Value
2596}
2597
2598// Creates a new instance of the NodeFileListResultPage type.
2599func NewNodeFileListResultPage(cur NodeFileListResult, getNextPage func(context.Context, NodeFileListResult) (NodeFileListResult, error)) NodeFileListResultPage {
2600	return NodeFileListResultPage{
2601		fn:   getNextPage,
2602		nflr: cur,
2603	}
2604}
2605
2606// NodeRebootParameter ...
2607type NodeRebootParameter struct {
2608	// NodeRebootOption - The default value is requeue. Possible values include: 'ComputeNodeRebootOptionRequeue', 'ComputeNodeRebootOptionTerminate', 'ComputeNodeRebootOptionTaskCompletion', 'ComputeNodeRebootOptionRetainedData'
2609	NodeRebootOption ComputeNodeRebootOption `json:"nodeRebootOption,omitempty"`
2610}
2611
2612// NodeReimageParameter ...
2613type NodeReimageParameter struct {
2614	// NodeReimageOption - The default value is requeue. Possible values include: 'ComputeNodeReimageOptionRequeue', 'ComputeNodeReimageOptionTerminate', 'ComputeNodeReimageOptionTaskCompletion', 'ComputeNodeReimageOptionRetainedData'
2615	NodeReimageOption ComputeNodeReimageOption `json:"nodeReimageOption,omitempty"`
2616}
2617
2618// NodeRemoveParameter ...
2619type NodeRemoveParameter struct {
2620	NodeList *[]string `json:"nodeList,omitempty"`
2621	// 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).
2622	ResizeTimeout *string `json:"resizeTimeout,omitempty"`
2623	// NodeDeallocationOption - The default value is requeue. Possible values include: 'Requeue', 'Terminate', 'TaskCompletion', 'RetainedData'
2624	NodeDeallocationOption ComputeNodeDeallocationOption `json:"nodeDeallocationOption,omitempty"`
2625}
2626
2627// NodeUpdateUserParameter ...
2628type NodeUpdateUserParameter struct {
2629	// 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.
2630	Password *string `json:"password,omitempty"`
2631	// 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.
2632	ExpiryTime *date.Time `json:"expiryTime,omitempty"`
2633	// 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.
2634	SSHPublicKey *string `json:"sshPublicKey,omitempty"`
2635}
2636
2637// OSDisk ...
2638type OSDisk struct {
2639	// Caching - The default value for caching is none. For information about the caching options see: https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
2640	Caching CachingType `json:"caching,omitempty"`
2641}
2642
2643// OutputFile ...
2644type OutputFile struct {
2645	// FilePattern - Both relative and absolute paths are supported. Relative paths are relative to the task working directory. The following wildcards are supported: * matches 0 or more characters (for example pattern abc* would match abc or abcdef), ** matches any directory, ? matches any single character, [abc] matches one character in the brackets, and [a-c] matches one character in the range. Brackets can include a negation to match any character not specified (for example [!abc] matches any character but a, b, or c). If a file name starts with "." it is ignored by default but may be matched by specifying it explicitly (for example *.gif will not match .a.gif, but .*.gif will). A simple example: **\*.txt matches any file that does not start in '.' and ends with .txt in the task working directory or any subdirectory. If the filename contains a wildcard character it can be escaped using brackets (for example abc[*] would match a file named abc*). Note that both \ and / are treated as directory separators on Windows, but only / is on Linux. Environment variables (%var% on Windows or $var on Linux) are expanded prior to the pattern being applied.
2646	FilePattern   *string                  `json:"filePattern,omitempty"`
2647	Destination   *OutputFileDestination   `json:"destination,omitempty"`
2648	UploadOptions *OutputFileUploadOptions `json:"uploadOptions,omitempty"`
2649}
2650
2651// OutputFileBlobContainerDestination ...
2652type OutputFileBlobContainerDestination struct {
2653	// Path - If filePattern refers to a specific file (i.e. contains no wildcards), then path is the name of the blob to which to upload that file. If filePattern contains one or more wildcards (and therefore may match multiple files), then path is the name of the blob virtual directory (which is prepended to each blob name) to which to upload the file(s). If omitted, file(s) are uploaded to the root of the container with a blob name matching their file name.
2654	Path *string `json:"path,omitempty"`
2655	// ContainerURL - The URL must include a Shared Access Signature (SAS) granting write permissions to the container.
2656	ContainerURL *string `json:"containerUrl,omitempty"`
2657}
2658
2659// OutputFileDestination ...
2660type OutputFileDestination struct {
2661	Container *OutputFileBlobContainerDestination `json:"container,omitempty"`
2662}
2663
2664// OutputFileUploadOptions ...
2665type OutputFileUploadOptions struct {
2666	// UploadCondition - The default is taskcompletion. Possible values include: 'OutputFileUploadConditionTaskSuccess', 'OutputFileUploadConditionTaskFailure', 'OutputFileUploadConditionTaskCompletion'
2667	UploadCondition OutputFileUploadCondition `json:"uploadCondition,omitempty"`
2668}
2669
2670// PoolAddParameter ...
2671type PoolAddParameter struct {
2672	// 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).
2673	ID *string `json:"id,omitempty"`
2674	// DisplayName - The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
2675	DisplayName *string `json:"displayName,omitempty"`
2676	// VMSize - For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall, A1V2 and A2V2. 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).
2677	VMSize *string `json:"vmSize,omitempty"`
2678	// CloudServiceConfiguration - This property and virtualMachineConfiguration are mutually exclusive and one of the properties must be specified. This property cannot be specified if the Batch account was created with its poolAllocationMode property set to 'UserSubscription'.
2679	CloudServiceConfiguration *CloudServiceConfiguration `json:"cloudServiceConfiguration,omitempty"`
2680	// VirtualMachineConfiguration - This property and cloudServiceConfiguration are mutually exclusive and one of the properties must be specified.
2681	VirtualMachineConfiguration *VirtualMachineConfiguration `json:"virtualMachineConfiguration,omitempty"`
2682	// 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).
2683	ResizeTimeout *string `json:"resizeTimeout,omitempty"`
2684	// TargetDedicatedNodes - This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both.
2685	TargetDedicatedNodes *int32 `json:"targetDedicatedNodes,omitempty"`
2686	// TargetLowPriorityNodes - This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both.
2687	TargetLowPriorityNodes *int32 `json:"targetLowPriorityNodes,omitempty"`
2688	// EnableAutoScale - If false, at least one of targetDedicateNodes and targetLowPriorityNodes must be specified. If true, the autoScaleFormula property is required and the pool automatically resizes according to the formula. The default value is false.
2689	EnableAutoScale *bool `json:"enableAutoScale,omitempty"`
2690	// 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/).
2691	AutoScaleFormula *string `json:"autoScaleFormula,omitempty"`
2692	// 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).
2693	AutoScaleEvaluationInterval *string `json:"autoScaleEvaluationInterval,omitempty"`
2694	// 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.
2695	EnableInterNodeCommunication *bool                 `json:"enableInterNodeCommunication,omitempty"`
2696	NetworkConfiguration         *NetworkConfiguration `json:"networkConfiguration,omitempty"`
2697	// StartTask - The task runs when the node is added to the pool or when the node is restarted.
2698	StartTask *StartTask `json:"startTask,omitempty"`
2699	// 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) and certificates are placed in that directory.
2700	CertificateReferences        *[]CertificateReference        `json:"certificateReferences,omitempty"`
2701	ApplicationPackageReferences *[]ApplicationPackageReference `json:"applicationPackageReferences,omitempty"`
2702	// ApplicationLicenses - The list of application licenses must be a subset of available Batch service application licenses. If a license is requested which is not supported, pool creation will fail.
2703	ApplicationLicenses *[]string `json:"applicationLicenses,omitempty"`
2704	// 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).
2705	MaxTasksPerNode      *int32                `json:"maxTasksPerNode,omitempty"`
2706	TaskSchedulingPolicy *TaskSchedulingPolicy `json:"taskSchedulingPolicy,omitempty"`
2707	UserAccounts         *[]UserAccount        `json:"userAccounts,omitempty"`
2708	// Metadata - The Batch service does not assign any meaning to metadata; it is solely for the use of user code.
2709	Metadata *[]MetadataItem `json:"metadata,omitempty"`
2710}
2711
2712// PoolEnableAutoScaleParameter ...
2713type PoolEnableAutoScaleParameter struct {
2714	// 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).
2715	AutoScaleFormula *string `json:"autoScaleFormula,omitempty"`
2716	// 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.
2717	AutoScaleEvaluationInterval *string `json:"autoScaleEvaluationInterval,omitempty"`
2718}
2719
2720// PoolEndpointConfiguration ...
2721type PoolEndpointConfiguration struct {
2722	// InboundNATPools - The maximum number of inbound NAT pools per Batch pool is 5. If the maximum number of inbound NAT pools is exceeded the request fails with HTTP status code 400.
2723	InboundNATPools *[]InboundNATPool `json:"inboundNATPools,omitempty"`
2724}
2725
2726// PoolEvaluateAutoScaleParameter ...
2727type PoolEvaluateAutoScaleParameter struct {
2728	// 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).
2729	AutoScaleFormula *string `json:"autoScaleFormula,omitempty"`
2730}
2731
2732// PoolInformation ...
2733type PoolInformation struct {
2734	// 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.
2735	PoolID *string `json:"poolId,omitempty"`
2736	// 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.
2737	AutoPoolSpecification *AutoPoolSpecification `json:"autoPoolSpecification,omitempty"`
2738}
2739
2740// PoolListUsageMetricsResult ...
2741type PoolListUsageMetricsResult struct {
2742	autorest.Response `json:"-"`
2743	Value             *[]PoolUsageMetrics `json:"value,omitempty"`
2744	OdataNextLink     *string             `json:"odata.nextLink,omitempty"`
2745}
2746
2747// PoolListUsageMetricsResultIterator provides access to a complete listing of PoolUsageMetrics values.
2748type PoolListUsageMetricsResultIterator struct {
2749	i    int
2750	page PoolListUsageMetricsResultPage
2751}
2752
2753// NextWithContext advances to the next value.  If there was an error making
2754// the request the iterator does not advance and the error is returned.
2755func (iter *PoolListUsageMetricsResultIterator) NextWithContext(ctx context.Context) (err error) {
2756	if tracing.IsEnabled() {
2757		ctx = tracing.StartSpan(ctx, fqdn+"/PoolListUsageMetricsResultIterator.NextWithContext")
2758		defer func() {
2759			sc := -1
2760			if iter.Response().Response.Response != nil {
2761				sc = iter.Response().Response.Response.StatusCode
2762			}
2763			tracing.EndSpan(ctx, sc, err)
2764		}()
2765	}
2766	iter.i++
2767	if iter.i < len(iter.page.Values()) {
2768		return nil
2769	}
2770	err = iter.page.NextWithContext(ctx)
2771	if err != nil {
2772		iter.i--
2773		return err
2774	}
2775	iter.i = 0
2776	return nil
2777}
2778
2779// Next advances to the next value.  If there was an error making
2780// the request the iterator does not advance and the error is returned.
2781// Deprecated: Use NextWithContext() instead.
2782func (iter *PoolListUsageMetricsResultIterator) Next() error {
2783	return iter.NextWithContext(context.Background())
2784}
2785
2786// NotDone returns true if the enumeration should be started or is not yet complete.
2787func (iter PoolListUsageMetricsResultIterator) NotDone() bool {
2788	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2789}
2790
2791// Response returns the raw server response from the last page request.
2792func (iter PoolListUsageMetricsResultIterator) Response() PoolListUsageMetricsResult {
2793	return iter.page.Response()
2794}
2795
2796// Value returns the current value or a zero-initialized value if the
2797// iterator has advanced beyond the end of the collection.
2798func (iter PoolListUsageMetricsResultIterator) Value() PoolUsageMetrics {
2799	if !iter.page.NotDone() {
2800		return PoolUsageMetrics{}
2801	}
2802	return iter.page.Values()[iter.i]
2803}
2804
2805// Creates a new instance of the PoolListUsageMetricsResultIterator type.
2806func NewPoolListUsageMetricsResultIterator(page PoolListUsageMetricsResultPage) PoolListUsageMetricsResultIterator {
2807	return PoolListUsageMetricsResultIterator{page: page}
2808}
2809
2810// IsEmpty returns true if the ListResult contains no values.
2811func (plumr PoolListUsageMetricsResult) IsEmpty() bool {
2812	return plumr.Value == nil || len(*plumr.Value) == 0
2813}
2814
2815// hasNextLink returns true if the NextLink is not empty.
2816func (plumr PoolListUsageMetricsResult) hasNextLink() bool {
2817	return plumr.OdataNextLink != nil && len(*plumr.OdataNextLink) != 0
2818}
2819
2820// poolListUsageMetricsResultPreparer prepares a request to retrieve the next set of results.
2821// It returns nil if no more results exist.
2822func (plumr PoolListUsageMetricsResult) poolListUsageMetricsResultPreparer(ctx context.Context) (*http.Request, error) {
2823	if !plumr.hasNextLink() {
2824		return nil, nil
2825	}
2826	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2827		autorest.AsJSON(),
2828		autorest.AsGet(),
2829		autorest.WithBaseURL(to.String(plumr.OdataNextLink)))
2830}
2831
2832// PoolListUsageMetricsResultPage contains a page of PoolUsageMetrics values.
2833type PoolListUsageMetricsResultPage struct {
2834	fn    func(context.Context, PoolListUsageMetricsResult) (PoolListUsageMetricsResult, error)
2835	plumr PoolListUsageMetricsResult
2836}
2837
2838// NextWithContext advances to the next page of values.  If there was an error making
2839// the request the page does not advance and the error is returned.
2840func (page *PoolListUsageMetricsResultPage) NextWithContext(ctx context.Context) (err error) {
2841	if tracing.IsEnabled() {
2842		ctx = tracing.StartSpan(ctx, fqdn+"/PoolListUsageMetricsResultPage.NextWithContext")
2843		defer func() {
2844			sc := -1
2845			if page.Response().Response.Response != nil {
2846				sc = page.Response().Response.Response.StatusCode
2847			}
2848			tracing.EndSpan(ctx, sc, err)
2849		}()
2850	}
2851	for {
2852		next, err := page.fn(ctx, page.plumr)
2853		if err != nil {
2854			return err
2855		}
2856		page.plumr = next
2857		if !next.hasNextLink() || !next.IsEmpty() {
2858			break
2859		}
2860	}
2861	return nil
2862}
2863
2864// Next advances to the next page of values.  If there was an error making
2865// the request the page does not advance and the error is returned.
2866// Deprecated: Use NextWithContext() instead.
2867func (page *PoolListUsageMetricsResultPage) Next() error {
2868	return page.NextWithContext(context.Background())
2869}
2870
2871// NotDone returns true if the page enumeration should be started or is not yet complete.
2872func (page PoolListUsageMetricsResultPage) NotDone() bool {
2873	return !page.plumr.IsEmpty()
2874}
2875
2876// Response returns the raw server response from the last page request.
2877func (page PoolListUsageMetricsResultPage) Response() PoolListUsageMetricsResult {
2878	return page.plumr
2879}
2880
2881// Values returns the slice of values for the current page or nil if there are no values.
2882func (page PoolListUsageMetricsResultPage) Values() []PoolUsageMetrics {
2883	if page.plumr.IsEmpty() {
2884		return nil
2885	}
2886	return *page.plumr.Value
2887}
2888
2889// Creates a new instance of the PoolListUsageMetricsResultPage type.
2890func NewPoolListUsageMetricsResultPage(cur PoolListUsageMetricsResult, getNextPage func(context.Context, PoolListUsageMetricsResult) (PoolListUsageMetricsResult, error)) PoolListUsageMetricsResultPage {
2891	return PoolListUsageMetricsResultPage{
2892		fn:    getNextPage,
2893		plumr: cur,
2894	}
2895}
2896
2897// PoolNodeCounts ...
2898type PoolNodeCounts struct {
2899	PoolID      *string     `json:"poolId,omitempty"`
2900	Dedicated   *NodeCounts `json:"dedicated,omitempty"`
2901	LowPriority *NodeCounts `json:"lowPriority,omitempty"`
2902}
2903
2904// PoolNodeCountsListResult ...
2905type PoolNodeCountsListResult struct {
2906	autorest.Response `json:"-"`
2907	// Value - A list of node counts by pool.
2908	Value         *[]PoolNodeCounts `json:"value,omitempty"`
2909	OdataNextLink *string           `json:"odata.nextLink,omitempty"`
2910}
2911
2912// PoolNodeCountsListResultIterator provides access to a complete listing of PoolNodeCounts values.
2913type PoolNodeCountsListResultIterator struct {
2914	i    int
2915	page PoolNodeCountsListResultPage
2916}
2917
2918// NextWithContext advances to the next value.  If there was an error making
2919// the request the iterator does not advance and the error is returned.
2920func (iter *PoolNodeCountsListResultIterator) NextWithContext(ctx context.Context) (err error) {
2921	if tracing.IsEnabled() {
2922		ctx = tracing.StartSpan(ctx, fqdn+"/PoolNodeCountsListResultIterator.NextWithContext")
2923		defer func() {
2924			sc := -1
2925			if iter.Response().Response.Response != nil {
2926				sc = iter.Response().Response.Response.StatusCode
2927			}
2928			tracing.EndSpan(ctx, sc, err)
2929		}()
2930	}
2931	iter.i++
2932	if iter.i < len(iter.page.Values()) {
2933		return nil
2934	}
2935	err = iter.page.NextWithContext(ctx)
2936	if err != nil {
2937		iter.i--
2938		return err
2939	}
2940	iter.i = 0
2941	return nil
2942}
2943
2944// Next advances to the next value.  If there was an error making
2945// the request the iterator does not advance and the error is returned.
2946// Deprecated: Use NextWithContext() instead.
2947func (iter *PoolNodeCountsListResultIterator) Next() error {
2948	return iter.NextWithContext(context.Background())
2949}
2950
2951// NotDone returns true if the enumeration should be started or is not yet complete.
2952func (iter PoolNodeCountsListResultIterator) NotDone() bool {
2953	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2954}
2955
2956// Response returns the raw server response from the last page request.
2957func (iter PoolNodeCountsListResultIterator) Response() PoolNodeCountsListResult {
2958	return iter.page.Response()
2959}
2960
2961// Value returns the current value or a zero-initialized value if the
2962// iterator has advanced beyond the end of the collection.
2963func (iter PoolNodeCountsListResultIterator) Value() PoolNodeCounts {
2964	if !iter.page.NotDone() {
2965		return PoolNodeCounts{}
2966	}
2967	return iter.page.Values()[iter.i]
2968}
2969
2970// Creates a new instance of the PoolNodeCountsListResultIterator type.
2971func NewPoolNodeCountsListResultIterator(page PoolNodeCountsListResultPage) PoolNodeCountsListResultIterator {
2972	return PoolNodeCountsListResultIterator{page: page}
2973}
2974
2975// IsEmpty returns true if the ListResult contains no values.
2976func (pnclr PoolNodeCountsListResult) IsEmpty() bool {
2977	return pnclr.Value == nil || len(*pnclr.Value) == 0
2978}
2979
2980// hasNextLink returns true if the NextLink is not empty.
2981func (pnclr PoolNodeCountsListResult) hasNextLink() bool {
2982	return pnclr.OdataNextLink != nil && len(*pnclr.OdataNextLink) != 0
2983}
2984
2985// poolNodeCountsListResultPreparer prepares a request to retrieve the next set of results.
2986// It returns nil if no more results exist.
2987func (pnclr PoolNodeCountsListResult) poolNodeCountsListResultPreparer(ctx context.Context) (*http.Request, error) {
2988	if !pnclr.hasNextLink() {
2989		return nil, nil
2990	}
2991	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2992		autorest.AsJSON(),
2993		autorest.AsGet(),
2994		autorest.WithBaseURL(to.String(pnclr.OdataNextLink)))
2995}
2996
2997// PoolNodeCountsListResultPage contains a page of PoolNodeCounts values.
2998type PoolNodeCountsListResultPage struct {
2999	fn    func(context.Context, PoolNodeCountsListResult) (PoolNodeCountsListResult, error)
3000	pnclr PoolNodeCountsListResult
3001}
3002
3003// NextWithContext advances to the next page of values.  If there was an error making
3004// the request the page does not advance and the error is returned.
3005func (page *PoolNodeCountsListResultPage) NextWithContext(ctx context.Context) (err error) {
3006	if tracing.IsEnabled() {
3007		ctx = tracing.StartSpan(ctx, fqdn+"/PoolNodeCountsListResultPage.NextWithContext")
3008		defer func() {
3009			sc := -1
3010			if page.Response().Response.Response != nil {
3011				sc = page.Response().Response.Response.StatusCode
3012			}
3013			tracing.EndSpan(ctx, sc, err)
3014		}()
3015	}
3016	for {
3017		next, err := page.fn(ctx, page.pnclr)
3018		if err != nil {
3019			return err
3020		}
3021		page.pnclr = next
3022		if !next.hasNextLink() || !next.IsEmpty() {
3023			break
3024		}
3025	}
3026	return nil
3027}
3028
3029// Next advances to the next page of values.  If there was an error making
3030// the request the page does not advance and the error is returned.
3031// Deprecated: Use NextWithContext() instead.
3032func (page *PoolNodeCountsListResultPage) Next() error {
3033	return page.NextWithContext(context.Background())
3034}
3035
3036// NotDone returns true if the page enumeration should be started or is not yet complete.
3037func (page PoolNodeCountsListResultPage) NotDone() bool {
3038	return !page.pnclr.IsEmpty()
3039}
3040
3041// Response returns the raw server response from the last page request.
3042func (page PoolNodeCountsListResultPage) Response() PoolNodeCountsListResult {
3043	return page.pnclr
3044}
3045
3046// Values returns the slice of values for the current page or nil if there are no values.
3047func (page PoolNodeCountsListResultPage) Values() []PoolNodeCounts {
3048	if page.pnclr.IsEmpty() {
3049		return nil
3050	}
3051	return *page.pnclr.Value
3052}
3053
3054// Creates a new instance of the PoolNodeCountsListResultPage type.
3055func NewPoolNodeCountsListResultPage(cur PoolNodeCountsListResult, getNextPage func(context.Context, PoolNodeCountsListResult) (PoolNodeCountsListResult, error)) PoolNodeCountsListResultPage {
3056	return PoolNodeCountsListResultPage{
3057		fn:    getNextPage,
3058		pnclr: cur,
3059	}
3060}
3061
3062// PoolPatchParameter ...
3063type PoolPatchParameter struct {
3064	// StartTask - If this element is present, it overwrites any existing start task. If omitted, any existing start task is left unchanged.
3065	StartTask *StartTask `json:"startTask,omitempty"`
3066	// CertificateReferences - If this element is present, it replaces any existing certificate references configured on the pool. 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) and certificates are placed in that directory.
3067	CertificateReferences *[]CertificateReference `json:"certificateReferences,omitempty"`
3068	// 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.
3069	ApplicationPackageReferences *[]ApplicationPackageReference `json:"applicationPackageReferences,omitempty"`
3070	// 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.
3071	Metadata *[]MetadataItem `json:"metadata,omitempty"`
3072}
3073
3074// PoolResizeParameter ...
3075type PoolResizeParameter struct {
3076	TargetDedicatedNodes   *int32 `json:"targetDedicatedNodes,omitempty"`
3077	TargetLowPriorityNodes *int32 `json:"targetLowPriorityNodes,omitempty"`
3078	// 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).
3079	ResizeTimeout *string `json:"resizeTimeout,omitempty"`
3080	// NodeDeallocationOption - The default value is requeue. Possible values include: 'Requeue', 'Terminate', 'TaskCompletion', 'RetainedData'
3081	NodeDeallocationOption ComputeNodeDeallocationOption `json:"nodeDeallocationOption,omitempty"`
3082}
3083
3084// PoolSpecification ...
3085type PoolSpecification struct {
3086	// DisplayName - The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
3087	DisplayName *string `json:"displayName,omitempty"`
3088	// VMSize - For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall, A1V2 and A2V2. 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).
3089	VMSize *string `json:"vmSize,omitempty"`
3090	// 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). This property cannot be specified if the Batch account was created with its poolAllocationMode property set to 'UserSubscription'.
3091	CloudServiceConfiguration *CloudServiceConfiguration `json:"cloudServiceConfiguration,omitempty"`
3092	// 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).
3093	VirtualMachineConfiguration *VirtualMachineConfiguration `json:"virtualMachineConfiguration,omitempty"`
3094	// 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).
3095	MaxTasksPerNode      *int32                `json:"maxTasksPerNode,omitempty"`
3096	TaskSchedulingPolicy *TaskSchedulingPolicy `json:"taskSchedulingPolicy,omitempty"`
3097	// 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).
3098	ResizeTimeout *string `json:"resizeTimeout,omitempty"`
3099	// TargetDedicatedNodes - This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both.
3100	TargetDedicatedNodes *int32 `json:"targetDedicatedNodes,omitempty"`
3101	// TargetLowPriorityNodes - This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both.
3102	TargetLowPriorityNodes *int32 `json:"targetLowPriorityNodes,omitempty"`
3103	// EnableAutoScale - If false, at least one of targetDedicateNodes and targetLowPriorityNodes must be specified. If true, the autoScaleFormula element is required. The pool automatically resizes according to the formula. The default value is false.
3104	EnableAutoScale *bool `json:"enableAutoScale,omitempty"`
3105	// 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.
3106	AutoScaleFormula *string `json:"autoScaleFormula,omitempty"`
3107	// 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).
3108	AutoScaleEvaluationInterval *string `json:"autoScaleEvaluationInterval,omitempty"`
3109	// 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.
3110	EnableInterNodeCommunication *bool                 `json:"enableInterNodeCommunication,omitempty"`
3111	NetworkConfiguration         *NetworkConfiguration `json:"networkConfiguration,omitempty"`
3112	StartTask                    *StartTask            `json:"startTask,omitempty"`
3113	// 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) and certificates are placed in that directory.
3114	CertificateReferences        *[]CertificateReference        `json:"certificateReferences,omitempty"`
3115	ApplicationPackageReferences *[]ApplicationPackageReference `json:"applicationPackageReferences,omitempty"`
3116	// ApplicationLicenses - The list of application licenses must be a subset of available Batch service application licenses. If a license is requested which is not supported, pool creation will fail.
3117	ApplicationLicenses *[]string      `json:"applicationLicenses,omitempty"`
3118	UserAccounts        *[]UserAccount `json:"userAccounts,omitempty"`
3119	// Metadata - The Batch service does not assign any meaning to metadata; it is solely for the use of user code.
3120	Metadata *[]MetadataItem `json:"metadata,omitempty"`
3121}
3122
3123// PoolStatistics ...
3124type PoolStatistics struct {
3125	autorest.Response `json:"-"`
3126	URL               *string             `json:"url,omitempty"`
3127	StartTime         *date.Time          `json:"startTime,omitempty"`
3128	LastUpdateTime    *date.Time          `json:"lastUpdateTime,omitempty"`
3129	UsageStats        *UsageStatistics    `json:"usageStats,omitempty"`
3130	ResourceStats     *ResourceStatistics `json:"resourceStats,omitempty"`
3131}
3132
3133// PoolUpdatePropertiesParameter ...
3134type PoolUpdatePropertiesParameter struct {
3135	// StartTask - If this element is present, it overwrites any existing start task. If omitted, any existing start task is removed from the pool.
3136	StartTask *StartTask `json:"startTask,omitempty"`
3137	// CertificateReferences - This list replaces any existing certificate references configured on the pool. 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) and certificates are placed in that directory.
3138	CertificateReferences *[]CertificateReference `json:"certificateReferences,omitempty"`
3139	// ApplicationPackageReferences - The list replaces any existing application package references on the pool. 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 omitted, or if you specify an empty collection, any existing application packages references are removed from the pool.
3140	ApplicationPackageReferences *[]ApplicationPackageReference `json:"applicationPackageReferences,omitempty"`
3141	// 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.
3142	Metadata *[]MetadataItem `json:"metadata,omitempty"`
3143}
3144
3145// PoolUpgradeOSParameter ...
3146type PoolUpgradeOSParameter struct {
3147	TargetOSVersion *string `json:"targetOSVersion,omitempty"`
3148}
3149
3150// PoolUsageMetrics ...
3151type PoolUsageMetrics struct {
3152	PoolID    *string    `json:"poolId,omitempty"`
3153	StartTime *date.Time `json:"startTime,omitempty"`
3154	EndTime   *date.Time `json:"endTime,omitempty"`
3155	// VMSize - For information about available sizes of virtual machines in pools, see Choose a VM size for compute nodes in an Azure Batch pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). Batch supports all Cloud Services VM sizes except ExtraSmall, STANDARD_A1_V2 and STANDARD_A2_V2. 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).
3156	VMSize         *string  `json:"vmSize,omitempty"`
3157	TotalCoreHours *float64 `json:"totalCoreHours,omitempty"`
3158	DataIngressGiB *float64 `json:"dataIngressGiB,omitempty"`
3159	DataEgressGiB  *float64 `json:"dataEgressGiB,omitempty"`
3160}
3161
3162// ReadCloser ...
3163type ReadCloser struct {
3164	autorest.Response `json:"-"`
3165	Value             *io.ReadCloser `json:"value,omitempty"`
3166}
3167
3168// RecentJob ...
3169type RecentJob struct {
3170	ID  *string `json:"id,omitempty"`
3171	URL *string `json:"url,omitempty"`
3172}
3173
3174// ResizeError ...
3175type ResizeError struct {
3176	Code    *string          `json:"code,omitempty"`
3177	Message *string          `json:"message,omitempty"`
3178	Values  *[]NameValuePair `json:"values,omitempty"`
3179}
3180
3181// ResourceFile ...
3182type ResourceFile struct {
3183	// 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.
3184	BlobSource *string `json:"blobSource,omitempty"`
3185	FilePath   *string `json:"filePath,omitempty"`
3186	// 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.
3187	FileMode *string `json:"fileMode,omitempty"`
3188}
3189
3190// ResourceStatistics ...
3191type ResourceStatistics struct {
3192	StartTime        *date.Time `json:"startTime,omitempty"`
3193	LastUpdateTime   *date.Time `json:"lastUpdateTime,omitempty"`
3194	AvgCPUPercentage *float64   `json:"avgCPUPercentage,omitempty"`
3195	AvgMemoryGiB     *float64   `json:"avgMemoryGiB,omitempty"`
3196	PeakMemoryGiB    *float64   `json:"peakMemoryGiB,omitempty"`
3197	AvgDiskGiB       *float64   `json:"avgDiskGiB,omitempty"`
3198	PeakDiskGiB      *float64   `json:"peakDiskGiB,omitempty"`
3199	DiskReadIOps     *int64     `json:"diskReadIOps,omitempty"`
3200	DiskWriteIOps    *int64     `json:"diskWriteIOps,omitempty"`
3201	DiskReadGiB      *float64   `json:"diskReadGiB,omitempty"`
3202	DiskWriteGiB     *float64   `json:"diskWriteGiB,omitempty"`
3203	NetworkReadGiB   *float64   `json:"networkReadGiB,omitempty"`
3204	NetworkWriteGiB  *float64   `json:"networkWriteGiB,omitempty"`
3205}
3206
3207// Schedule ...
3208type Schedule struct {
3209	// DoNotRunUntil - If you do not specify a doNotRunUntil time, the schedule becomes ready to create jobs immediately.
3210	DoNotRunUntil *date.Time `json:"doNotRunUntil,omitempty"`
3211	// 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.
3212	DoNotRunAfter *date.Time `json:"doNotRunAfter,omitempty"`
3213	// 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).
3214	StartWindow *string `json:"startWindow,omitempty"`
3215	// 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).
3216	RecurrenceInterval *string `json:"recurrenceInterval,omitempty"`
3217}
3218
3219// StartTask batch will retry tasks when a recovery operation is triggered on a compute node. Examples of
3220// recovery operations include (but are not limited to) when an unhealthy compute node is rebooted or a
3221// compute node disappeared due to host failure. Retries due to recovery operations are independent of and
3222// are not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal retry due
3223// to a recovery operation may occur. Because of this, all tasks should be idempotent. This means tasks
3224// need to tolerate being interrupted and restarted without causing any corruption or duplicate data. The
3225// best practice for long running tasks is to use some form of checkpointing.
3226type StartTask struct {
3227	// 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. If the command line refers to file paths, it should use a relative path (relative to the task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables).
3228	CommandLine *string `json:"commandLine,omitempty"`
3229	// ContainerSettings - When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all task environment variables are mapped into the container, and the task command line is executed in the container.
3230	ContainerSettings *TaskContainerSettings `json:"containerSettings,omitempty"`
3231	// ResourceFiles - Files listed under this element are located in the task's working directory.
3232	ResourceFiles       *[]ResourceFile       `json:"resourceFiles,omitempty"`
3233	EnvironmentSettings *[]EnvironmentSetting `json:"environmentSettings,omitempty"`
3234	// UserIdentity - If omitted, the task runs as a non-administrative user unique to the task.
3235	UserIdentity *UserIdentity `json:"userIdentity,omitempty"`
3236	// 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.
3237	MaxTaskRetryCount *int32 `json:"maxTaskRetryCount,omitempty"`
3238	// 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 failure info details. 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.
3239	WaitForSuccess *bool `json:"waitForSuccess,omitempty"`
3240}
3241
3242// StartTaskInformation ...
3243type StartTaskInformation struct {
3244	// State - Possible values include: 'StartTaskStateRunning', 'StartTaskStateCompleted'
3245	State StartTaskState `json:"state,omitempty"`
3246	// 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).
3247	StartTime *date.Time `json:"startTime,omitempty"`
3248	// 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.
3249	EndTime *date.Time `json:"endTime,omitempty"`
3250	// 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.
3251	ExitCode *int32 `json:"exitCode,omitempty"`
3252	// ContainerInfo - This property is set only if the task runs in a container context.
3253	ContainerInfo *TaskContainerExecutionInformation `json:"containerInfo,omitempty"`
3254	// FailureInfo - This property is set only if the task is in the completed state and encountered a failure.
3255	FailureInfo *TaskFailureInformation `json:"failureInfo,omitempty"`
3256	// RetryCount - Task application failures (non-zero exit code) are retried, pre-processing errors (the task could not be run) and file upload errors are not retried. The Batch service will retry the task up to the limit specified by the constraints.
3257	RetryCount *int32 `json:"retryCount,omitempty"`
3258	// 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.
3259	LastRetryTime *date.Time `json:"lastRetryTime,omitempty"`
3260	// Result - If the value is 'failed', then the details of the failure can be found in the failureInfo property. Possible values include: 'Success', 'Failure'
3261	Result TaskExecutionResult `json:"result,omitempty"`
3262}
3263
3264// SubtaskInformation ...
3265type SubtaskInformation struct {
3266	ID        *int32                  `json:"id,omitempty"`
3267	NodeInfo  *ComputeNodeInformation `json:"nodeInfo,omitempty"`
3268	StartTime *date.Time              `json:"startTime,omitempty"`
3269	// EndTime - This property is set only if the subtask is in the Completed state.
3270	EndTime *date.Time `json:"endTime,omitempty"`
3271	// 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.
3272	ExitCode *int32 `json:"exitCode,omitempty"`
3273	// ContainerInfo - This property is set only if the task runs in a container context.
3274	ContainerInfo *TaskContainerExecutionInformation `json:"containerInfo,omitempty"`
3275	// FailureInfo - This property is set only if the task is in the completed state and encountered a failure.
3276	FailureInfo *TaskFailureInformation `json:"failureInfo,omitempty"`
3277	// State - Possible values include: 'SubtaskStatePreparing', 'SubtaskStateRunning', 'SubtaskStateCompleted'
3278	State               SubtaskState `json:"state,omitempty"`
3279	StateTransitionTime *date.Time   `json:"stateTransitionTime,omitempty"`
3280	// PreviousState - This property is not set if the subtask is in its initial running state. Possible values include: 'SubtaskStatePreparing', 'SubtaskStateRunning', 'SubtaskStateCompleted'
3281	PreviousState SubtaskState `json:"previousState,omitempty"`
3282	// PreviousStateTransitionTime - This property is not set if the subtask is in its initial running state.
3283	PreviousStateTransitionTime *date.Time `json:"previousStateTransitionTime,omitempty"`
3284	// Result - If the value is 'failed', then the details of the failure can be found in the failureInfo property. Possible values include: 'Success', 'Failure'
3285	Result TaskExecutionResult `json:"result,omitempty"`
3286}
3287
3288// TaskAddCollectionParameter ...
3289type TaskAddCollectionParameter struct {
3290	// Value - The total serialized size of this collection must be less than 1MB. If it is greater than 1MB (for example if each task has 100's of resource files or environment variables), the request will fail with code 'RequestBodyTooLarge' and should be retried again with fewer tasks.
3291	Value *[]TaskAddParameter `json:"value,omitempty"`
3292}
3293
3294// TaskAddCollectionResult ...
3295type TaskAddCollectionResult struct {
3296	autorest.Response `json:"-"`
3297	Value             *[]TaskAddResult `json:"value,omitempty"`
3298}
3299
3300// TaskAddParameter batch will retry tasks when a recovery operation is triggered on a compute node.
3301// Examples of recovery operations include (but are not limited to) when an unhealthy compute node is
3302// rebooted or a compute node disappeared due to host failure. Retries due to recovery operations are
3303// independent of and are not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an
3304// internal retry due to a recovery operation may occur. Because of this, all tasks should be idempotent.
3305// This means tasks need to tolerate being interrupted and restarted without causing any corruption or
3306// duplicate data. The best practice for long running tasks is to use some form of checkpointing.
3307type TaskAddParameter struct {
3308	// 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).
3309	ID *string `json:"id,omitempty"`
3310	// DisplayName - The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
3311	DisplayName *string `json:"displayName,omitempty"`
3312	// 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. If the command line refers to file paths, it should use a relative path (relative to the task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables).
3313	CommandLine *string `json:"commandLine,omitempty"`
3314	// ContainerSettings - If the pool that will run this task has containerConfiguration set, this must be set as well. If the pool that will run this task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all task environment variables are mapped into the container, and the task command line is executed in the container.
3315	ContainerSettings *TaskContainerSettings `json:"containerSettings,omitempty"`
3316	// ExitConditions - How the Batch service should respond when the task completes.
3317	ExitConditions *ExitConditions `json:"exitConditions,omitempty"`
3318	// ResourceFiles - For multi-instance tasks, the resource files will only be downloaded to the compute node on which the primary task is executed. There is a maximum size for the list of resource files.  When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers.
3319	ResourceFiles *[]ResourceFile `json:"resourceFiles,omitempty"`
3320	// OutputFiles - For multi-instance tasks, the files will only be uploaded from the compute node on which the primary task is executed.
3321	OutputFiles         *[]OutputFile         `json:"outputFiles,omitempty"`
3322	EnvironmentSettings *[]EnvironmentSetting `json:"environmentSettings,omitempty"`
3323	AffinityInfo        *AffinityInformation  `json:"affinityInfo,omitempty"`
3324	// Constraints - If you do not specify constraints, the maxTaskRetryCount is the maxTaskRetryCount specified for the job, and the maxWallClockTime and retentionTime are infinite.
3325	Constraints *TaskConstraints `json:"constraints,omitempty"`
3326	// UserIdentity - If omitted, the task runs as a non-administrative user unique to the task.
3327	UserIdentity          *UserIdentity          `json:"userIdentity,omitempty"`
3328	MultiInstanceSettings *MultiInstanceSettings `json:"multiInstanceSettings,omitempty"`
3329	// DependsOn - This task will not be scheduled until all tasks that it depends on have completed successfully. If any of those tasks fail and exhaust their retry counts, this 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.
3330	DependsOn *TaskDependencies `json:"dependsOn,omitempty"`
3331	// ApplicationPackageReferences - Application packages are downloaded and deployed to a shared directory, not the task working 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.
3332	ApplicationPackageReferences *[]ApplicationPackageReference `json:"applicationPackageReferences,omitempty"`
3333	// AuthenticationTokenSettings - If this property is set, the Batch service provides the task with an authentication token which can be used to authenticate Batch service operations without requiring an account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the task can carry out using the token depend on the settings. For example, a task can request job permissions in order to add other tasks to the job, or check the status of the job or of other tasks under the job.
3334	AuthenticationTokenSettings *AuthenticationTokenSettings `json:"authenticationTokenSettings,omitempty"`
3335}
3336
3337// TaskAddResult ...
3338type TaskAddResult struct {
3339	// Status - Possible values include: 'TaskAddStatusSuccess', 'TaskAddStatusClientError', 'TaskAddStatusServerError'
3340	Status TaskAddStatus `json:"status,omitempty"`
3341	TaskID *string       `json:"taskId,omitempty"`
3342	// ETag - You can use this to detect whether the task has changed between requests. In particular, you can be pass the ETag with an Update Task request to specify that your changes should take effect only if nobody else has modified the job in the meantime.
3343	ETag         *string    `json:"eTag,omitempty"`
3344	LastModified *date.Time `json:"lastModified,omitempty"`
3345	Location     *string    `json:"location,omitempty"`
3346	Error        *Error     `json:"error,omitempty"`
3347}
3348
3349// TaskConstraints ...
3350type TaskConstraints struct {
3351	// MaxWallClockTime - If this is not specified, there is no time limit on how long the task may run.
3352	MaxWallClockTime *string `json:"maxWallClockTime,omitempty"`
3353	// RetentionTime - The default is infinite, i.e. the task directory will be retained until the compute node is removed or reimaged.
3354	RetentionTime *string `json:"retentionTime,omitempty"`
3355	// MaxTaskRetryCount - Note that this value specifically controls the number of retries for the task executable due to a nonzero exit code. 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 after the first attempt. If the maximum retry count is -1, the Batch service retries the task without limit. Resource files and application packages are only downloaded again if the task is retried on a new compute node.
3356	MaxTaskRetryCount *int32 `json:"maxTaskRetryCount,omitempty"`
3357}
3358
3359// TaskContainerExecutionInformation ...
3360type TaskContainerExecutionInformation struct {
3361	ContainerID *string `json:"containerId,omitempty"`
3362	// State - This is the state of the container according to the Docker service. It is equivalent to the status field returned by "docker inspect".
3363	State *string `json:"state,omitempty"`
3364	// Error - This is the detailed error string from the Docker service, if available. It is equivalent to the error field returned by "docker inspect".
3365	Error *string `json:"error,omitempty"`
3366}
3367
3368// TaskContainerSettings ...
3369type TaskContainerSettings struct {
3370	// ContainerRunOptions - These additional options are supplied as arguments to the "docker create" command, in addition to those controlled by the Batch Service.
3371	ContainerRunOptions *string `json:"containerRunOptions,omitempty"`
3372	// ImageName - This is the full image reference, as would be specified to "docker pull". If no tag is provided as part of the image name, the tag ":latest" is used as a default.
3373	ImageName *string `json:"imageName,omitempty"`
3374	// Registry - This setting can be omitted if was already provided at pool creation.
3375	Registry *ContainerRegistry `json:"registry,omitempty"`
3376}
3377
3378// TaskCounts ...
3379type TaskCounts struct {
3380	autorest.Response `json:"-"`
3381	Active            *int32 `json:"active,omitempty"`
3382	Running           *int32 `json:"running,omitempty"`
3383	Completed         *int32 `json:"completed,omitempty"`
3384	Succeeded         *int32 `json:"succeeded,omitempty"`
3385	Failed            *int32 `json:"failed,omitempty"`
3386	// ValidationStatus - Possible values include: 'Validated', 'Unvalidated'
3387	ValidationStatus TaskCountValidationStatus `json:"validationStatus,omitempty"`
3388}
3389
3390// TaskDependencies ...
3391type TaskDependencies struct {
3392	// TaskIds - The taskIds collection is limited to 64000 characters total (i.e. the combined length of all task IDs). If the taskIds collection exceeds the maximum length, the Add Task request fails with error code TaskDependencyListTooLong. In this case consider using task ID ranges instead.
3393	TaskIds      *[]string      `json:"taskIds,omitempty"`
3394	TaskIDRanges *[]TaskIDRange `json:"taskIdRanges,omitempty"`
3395}
3396
3397// TaskExecutionInformation ...
3398type TaskExecutionInformation struct {
3399	// 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.
3400	StartTime *date.Time `json:"startTime,omitempty"`
3401	// EndTime - This property is set only if the task is in the Completed state.
3402	EndTime *date.Time `json:"endTime,omitempty"`
3403	// 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.
3404	ExitCode *int32 `json:"exitCode,omitempty"`
3405	// ContainerInfo - This property is set only if the task runs in a container context.
3406	ContainerInfo *TaskContainerExecutionInformation `json:"containerInfo,omitempty"`
3407	// FailureInfo - This property is set only if the task is in the completed state and encountered a failure.
3408	FailureInfo *TaskFailureInformation `json:"failureInfo,omitempty"`
3409	// RetryCount - Task application failures (non-zero exit code) are retried, pre-processing errors (the task could not be run) and file upload errors are not retried. The Batch service will retry the task up to the limit specified by the constraints.
3410	RetryCount *int32 `json:"retryCount,omitempty"`
3411	// 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.
3412	LastRetryTime *date.Time `json:"lastRetryTime,omitempty"`
3413	// 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.
3414	RequeueCount *int32 `json:"requeueCount,omitempty"`
3415	// LastRequeueTime - This property is set only if the requeueCount is nonzero.
3416	LastRequeueTime *date.Time `json:"lastRequeueTime,omitempty"`
3417	// Result - If the value is 'failed', then the details of the failure can be found in the failureInfo property. Possible values include: 'Success', 'Failure'
3418	Result TaskExecutionResult `json:"result,omitempty"`
3419}
3420
3421// TaskFailureInformation ...
3422type TaskFailureInformation struct {
3423	// Category - Possible values include: 'UserError', 'ServerError'
3424	Category ErrorCategory    `json:"category,omitempty"`
3425	Code     *string          `json:"code,omitempty"`
3426	Message  *string          `json:"message,omitempty"`
3427	Details  *[]NameValuePair `json:"details,omitempty"`
3428}
3429
3430// TaskIDRange the start and end of the range are inclusive. For example, if a range has start 9 and end
3431// 12, then it represents tasks '9', '10', '11' and '12'.
3432type TaskIDRange struct {
3433	Start *int32 `json:"start,omitempty"`
3434	End   *int32 `json:"end,omitempty"`
3435}
3436
3437// TaskInformation ...
3438type TaskInformation struct {
3439	TaskURL   *string `json:"taskUrl,omitempty"`
3440	JobID     *string `json:"jobId,omitempty"`
3441	TaskID    *string `json:"taskId,omitempty"`
3442	SubtaskID *int32  `json:"subtaskId,omitempty"`
3443	// TaskState - Possible values include: 'TaskStateActive', 'TaskStatePreparing', 'TaskStateRunning', 'TaskStateCompleted'
3444	TaskState     TaskState                 `json:"taskState,omitempty"`
3445	ExecutionInfo *TaskExecutionInformation `json:"executionInfo,omitempty"`
3446}
3447
3448// TaskSchedulingPolicy ...
3449type TaskSchedulingPolicy struct {
3450	// NodeFillType - Possible values include: 'Spread', 'Pack'
3451	NodeFillType ComputeNodeFillType `json:"nodeFillType,omitempty"`
3452}
3453
3454// TaskStatistics ...
3455type TaskStatistics struct {
3456	URL            *string    `json:"url,omitempty"`
3457	StartTime      *date.Time `json:"startTime,omitempty"`
3458	LastUpdateTime *date.Time `json:"lastUpdateTime,omitempty"`
3459	UserCPUTime    *string    `json:"userCPUTime,omitempty"`
3460	KernelCPUTime  *string    `json:"kernelCPUTime,omitempty"`
3461	// 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.
3462	WallClockTime *string  `json:"wallClockTime,omitempty"`
3463	ReadIOps      *int64   `json:"readIOps,omitempty"`
3464	WriteIOps     *int64   `json:"writeIOps,omitempty"`
3465	ReadIOGiB     *float64 `json:"readIOGiB,omitempty"`
3466	WriteIOGiB    *float64 `json:"writeIOGiB,omitempty"`
3467	WaitTime      *string  `json:"waitTime,omitempty"`
3468}
3469
3470// TaskUpdateParameter ...
3471type TaskUpdateParameter struct {
3472	// Constraints - If omitted, the task is given the default constraints. For multi-instance tasks, updating the retention time applies only to the primary task and not subtasks.
3473	Constraints *TaskConstraints `json:"constraints,omitempty"`
3474}
3475
3476// UploadBatchServiceLogsConfiguration ...
3477type UploadBatchServiceLogsConfiguration struct {
3478	// ContainerURL - The URL must include a Shared Access Signature (SAS) granting write permissions to the container. The SAS duration must allow enough time for the upload to finish. The start time for SAS is optional and recommended to not be specified.
3479	ContainerURL *string `json:"containerUrl,omitempty"`
3480	// StartTime - Any log file containing a log message in the time range will be uploaded. This means that the operation might retrieve more logs than have been requested since the entire log file is always uploaded, but the operation should not retrieve fewer logs than have been requested.
3481	StartTime *date.Time `json:"startTime,omitempty"`
3482	// EndTime - Any log file containing a log message in the time range will be uploaded. This means that the operation might retrieve more logs than have been requested since the entire log file is always uploaded, but the operation should not retrieve fewer logs than have been requested. If omitted, the default is to upload all logs available after the startTime.
3483	EndTime *date.Time `json:"endTime,omitempty"`
3484}
3485
3486// UploadBatchServiceLogsResult ...
3487type UploadBatchServiceLogsResult struct {
3488	autorest.Response `json:"-"`
3489	// VirtualDirectoryName - The virtual directory name is part of the blob name for each log file uploaded, and it is built based poolId, nodeId and a unique identifier.
3490	VirtualDirectoryName  *string `json:"virtualDirectoryName,omitempty"`
3491	NumberOfFilesUploaded *int32  `json:"numberOfFilesUploaded,omitempty"`
3492}
3493
3494// UsageStatistics ...
3495type UsageStatistics struct {
3496	StartTime         *date.Time `json:"startTime,omitempty"`
3497	LastUpdateTime    *date.Time `json:"lastUpdateTime,omitempty"`
3498	DedicatedCoreTime *string    `json:"dedicatedCoreTime,omitempty"`
3499}
3500
3501// UserAccount ...
3502type UserAccount struct {
3503	Name     *string `json:"name,omitempty"`
3504	Password *string `json:"password,omitempty"`
3505	// ElevationLevel - nonAdmin - The auto user is a standard user without elevated access. admin - The auto user is a user with elevated access and operates with full Administrator permissions. The default value is nonAdmin. Possible values include: 'NonAdmin', 'Admin'
3506	ElevationLevel ElevationLevel `json:"elevationLevel,omitempty"`
3507	// LinuxUserConfiguration - This property is ignored if specified on a Windows pool. If not specified, the user is created with the default options.
3508	LinuxUserConfiguration *LinuxUserConfiguration `json:"linuxUserConfiguration,omitempty"`
3509}
3510
3511// UserIdentity specify either the userName or autoUser property, but not both. On
3512// CloudServiceConfiguration pools, this user is logged in with the INTERACTIVE flag. On Windows
3513// VirtualMachineConfiguration pools, this user is logged in with the BATCH flag.
3514type UserIdentity struct {
3515	// UserName - The userName and autoUser properties are mutually exclusive; you must specify one but not both.
3516	UserName *string `json:"username,omitempty"`
3517	// AutoUser - The userName and autoUser properties are mutually exclusive; you must specify one but not both.
3518	AutoUser *AutoUserSpecification `json:"autoUser,omitempty"`
3519}
3520
3521// VirtualMachineConfiguration ...
3522type VirtualMachineConfiguration struct {
3523	ImageReference *ImageReference `json:"imageReference,omitempty"`
3524	OsDisk         *OSDisk         `json:"osDisk,omitempty"`
3525	// 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.
3526	NodeAgentSKUID *string `json:"nodeAgentSKUId,omitempty"`
3527	// WindowsConfiguration - This property must not be specified if the imageReference or osDisk property specifies a Linux OS image.
3528	WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
3529	// DataDisks - This property must be specified if the compute nodes in the pool need to have empty data disks attached to them. This cannot be updated. Each node gets its own disk (the disk is not a file share). Existing disks cannot be attached, each attached disk is empty. When the node is removed from the pool, the disk and all data associated with it is also deleted. The disk is not formatted after being attached, it must be formatted before use - for more information see https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux and https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine.
3530	DataDisks *[]DataDisk `json:"dataDisks,omitempty"`
3531	// LicenseType - This only applies to images that contain the Windows operating system, and should only be used when you hold valid on-premises licenses for the nodes which will be deployed. If omitted, no on-premises licensing discount is applied. Values are:
3532	//  Windows_Server - The on-premises license is for Windows Server.
3533	//  Windows_Client - The on-premises license is for Windows Client.
3534	LicenseType *string `json:"licenseType,omitempty"`
3535	// ContainerConfiguration - If specified, setup is performed on each node in the pool to allow tasks to run in containers. All regular tasks and job manager tasks run on this pool must specify the containerSettings property, and all other tasks may specify it.
3536	ContainerConfiguration *ContainerConfiguration `json:"containerConfiguration,omitempty"`
3537}
3538
3539// WindowsConfiguration ...
3540type WindowsConfiguration struct {
3541	// EnableAutomaticUpdates - If omitted, the default value is true.
3542	EnableAutomaticUpdates *bool `json:"enableAutomaticUpdates,omitempty"`
3543}
3544