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