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	"encoding/json"
12	"github.com/Azure/go-autorest/autorest"
13	"github.com/Azure/go-autorest/autorest/azure"
14	"github.com/Azure/go-autorest/autorest/date"
15	"github.com/Azure/go-autorest/autorest/to"
16	"github.com/Azure/go-autorest/tracing"
17	"net/http"
18)
19
20// The package's fully qualified name.
21const fqdn = "github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2021-06-01/batch"
22
23// Account contains information about an Azure Batch account.
24type Account struct {
25	autorest.Response `json:"-"`
26	// AccountProperties - The properties associated with the account.
27	*AccountProperties `json:"properties,omitempty"`
28	// Identity - The identity of the Batch account.
29	Identity *AccountIdentity `json:"identity,omitempty"`
30	// ID - READ-ONLY; The ID of the resource.
31	ID *string `json:"id,omitempty"`
32	// Name - READ-ONLY; The name of the resource.
33	Name *string `json:"name,omitempty"`
34	// Type - READ-ONLY; The type of the resource.
35	Type *string `json:"type,omitempty"`
36	// Location - READ-ONLY; The location of the resource.
37	Location *string `json:"location,omitempty"`
38	// Tags - READ-ONLY; The tags of the resource.
39	Tags map[string]*string `json:"tags"`
40}
41
42// MarshalJSON is the custom marshaler for Account.
43func (a Account) MarshalJSON() ([]byte, error) {
44	objectMap := make(map[string]interface{})
45	if a.AccountProperties != nil {
46		objectMap["properties"] = a.AccountProperties
47	}
48	if a.Identity != nil {
49		objectMap["identity"] = a.Identity
50	}
51	return json.Marshal(objectMap)
52}
53
54// UnmarshalJSON is the custom unmarshaler for Account struct.
55func (a *Account) UnmarshalJSON(body []byte) error {
56	var m map[string]*json.RawMessage
57	err := json.Unmarshal(body, &m)
58	if err != nil {
59		return err
60	}
61	for k, v := range m {
62		switch k {
63		case "properties":
64			if v != nil {
65				var accountProperties AccountProperties
66				err = json.Unmarshal(*v, &accountProperties)
67				if err != nil {
68					return err
69				}
70				a.AccountProperties = &accountProperties
71			}
72		case "identity":
73			if v != nil {
74				var identity AccountIdentity
75				err = json.Unmarshal(*v, &identity)
76				if err != nil {
77					return err
78				}
79				a.Identity = &identity
80			}
81		case "id":
82			if v != nil {
83				var ID string
84				err = json.Unmarshal(*v, &ID)
85				if err != nil {
86					return err
87				}
88				a.ID = &ID
89			}
90		case "name":
91			if v != nil {
92				var name string
93				err = json.Unmarshal(*v, &name)
94				if err != nil {
95					return err
96				}
97				a.Name = &name
98			}
99		case "type":
100			if v != nil {
101				var typeVar string
102				err = json.Unmarshal(*v, &typeVar)
103				if err != nil {
104					return err
105				}
106				a.Type = &typeVar
107			}
108		case "location":
109			if v != nil {
110				var location string
111				err = json.Unmarshal(*v, &location)
112				if err != nil {
113					return err
114				}
115				a.Location = &location
116			}
117		case "tags":
118			if v != nil {
119				var tags map[string]*string
120				err = json.Unmarshal(*v, &tags)
121				if err != nil {
122					return err
123				}
124				a.Tags = tags
125			}
126		}
127	}
128
129	return nil
130}
131
132// AccountCreateFuture an abstraction for monitoring and retrieving the results of a long-running
133// operation.
134type AccountCreateFuture struct {
135	azure.FutureAPI
136	// Result returns the result of the asynchronous operation.
137	// If the operation has not completed it will return an error.
138	Result func(AccountClient) (Account, error)
139}
140
141// UnmarshalJSON is the custom unmarshaller for CreateFuture.
142func (future *AccountCreateFuture) UnmarshalJSON(body []byte) error {
143	var azFuture azure.Future
144	if err := json.Unmarshal(body, &azFuture); err != nil {
145		return err
146	}
147	future.FutureAPI = &azFuture
148	future.Result = future.result
149	return nil
150}
151
152// result is the default implementation for AccountCreateFuture.Result.
153func (future *AccountCreateFuture) result(client AccountClient) (a Account, err error) {
154	var done bool
155	done, err = future.DoneWithContext(context.Background(), client)
156	if err != nil {
157		err = autorest.NewErrorWithError(err, "batch.AccountCreateFuture", "Result", future.Response(), "Polling failure")
158		return
159	}
160	if !done {
161		a.Response.Response = future.Response()
162		err = azure.NewAsyncOpIncompleteError("batch.AccountCreateFuture")
163		return
164	}
165	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
166	if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent {
167		a, err = client.CreateResponder(a.Response.Response)
168		if err != nil {
169			err = autorest.NewErrorWithError(err, "batch.AccountCreateFuture", "Result", a.Response.Response, "Failure responding to request")
170		}
171	}
172	return
173}
174
175// AccountCreateParameters parameters supplied to the Create operation.
176type AccountCreateParameters struct {
177	// Location - The region in which to create the account.
178	Location *string `json:"location,omitempty"`
179	// Tags - The user-specified tags associated with the account.
180	Tags map[string]*string `json:"tags"`
181	// AccountCreateProperties - The properties of the Batch account.
182	*AccountCreateProperties `json:"properties,omitempty"`
183	// Identity - The identity of the Batch account.
184	Identity *AccountIdentity `json:"identity,omitempty"`
185}
186
187// MarshalJSON is the custom marshaler for AccountCreateParameters.
188func (acp AccountCreateParameters) MarshalJSON() ([]byte, error) {
189	objectMap := make(map[string]interface{})
190	if acp.Location != nil {
191		objectMap["location"] = acp.Location
192	}
193	if acp.Tags != nil {
194		objectMap["tags"] = acp.Tags
195	}
196	if acp.AccountCreateProperties != nil {
197		objectMap["properties"] = acp.AccountCreateProperties
198	}
199	if acp.Identity != nil {
200		objectMap["identity"] = acp.Identity
201	}
202	return json.Marshal(objectMap)
203}
204
205// UnmarshalJSON is the custom unmarshaler for AccountCreateParameters struct.
206func (acp *AccountCreateParameters) UnmarshalJSON(body []byte) error {
207	var m map[string]*json.RawMessage
208	err := json.Unmarshal(body, &m)
209	if err != nil {
210		return err
211	}
212	for k, v := range m {
213		switch k {
214		case "location":
215			if v != nil {
216				var location string
217				err = json.Unmarshal(*v, &location)
218				if err != nil {
219					return err
220				}
221				acp.Location = &location
222			}
223		case "tags":
224			if v != nil {
225				var tags map[string]*string
226				err = json.Unmarshal(*v, &tags)
227				if err != nil {
228					return err
229				}
230				acp.Tags = tags
231			}
232		case "properties":
233			if v != nil {
234				var accountCreateProperties AccountCreateProperties
235				err = json.Unmarshal(*v, &accountCreateProperties)
236				if err != nil {
237					return err
238				}
239				acp.AccountCreateProperties = &accountCreateProperties
240			}
241		case "identity":
242			if v != nil {
243				var identity AccountIdentity
244				err = json.Unmarshal(*v, &identity)
245				if err != nil {
246					return err
247				}
248				acp.Identity = &identity
249			}
250		}
251	}
252
253	return nil
254}
255
256// AccountCreateProperties the properties of a Batch account.
257type AccountCreateProperties struct {
258	// AutoStorage - The properties related to the auto-storage account.
259	AutoStorage *AutoStorageBaseProperties `json:"autoStorage,omitempty"`
260	// PoolAllocationMode - The pool allocation mode also affects how clients may authenticate to the Batch Service API. If the mode is BatchService, clients may authenticate using access keys or Azure Active Directory. If the mode is UserSubscription, clients must use Azure Active Directory. The default is BatchService. Possible values include: 'PoolAllocationModeBatchService', 'PoolAllocationModeUserSubscription'
261	PoolAllocationMode PoolAllocationMode `json:"poolAllocationMode,omitempty"`
262	// KeyVaultReference - A reference to the Azure key vault associated with the Batch account.
263	KeyVaultReference *KeyVaultReference `json:"keyVaultReference,omitempty"`
264	// PublicNetworkAccess - If not specified, the default value is 'enabled'. Possible values include: 'PublicNetworkAccessTypeEnabled', 'PublicNetworkAccessTypeDisabled'
265	PublicNetworkAccess PublicNetworkAccessType `json:"publicNetworkAccess,omitempty"`
266	// Encryption - Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used instead.
267	Encryption *EncryptionProperties `json:"encryption,omitempty"`
268	// AllowedAuthenticationModes - List of allowed authentication modes for the Batch account that can be used to authenticate with the data plane. This does not affect authentication with the control plane.
269	AllowedAuthenticationModes *[]AuthenticationMode `json:"allowedAuthenticationModes,omitempty"`
270}
271
272// AccountDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
273// operation.
274type AccountDeleteFuture struct {
275	azure.FutureAPI
276	// Result returns the result of the asynchronous operation.
277	// If the operation has not completed it will return an error.
278	Result func(AccountClient) (autorest.Response, error)
279}
280
281// UnmarshalJSON is the custom unmarshaller for CreateFuture.
282func (future *AccountDeleteFuture) UnmarshalJSON(body []byte) error {
283	var azFuture azure.Future
284	if err := json.Unmarshal(body, &azFuture); err != nil {
285		return err
286	}
287	future.FutureAPI = &azFuture
288	future.Result = future.result
289	return nil
290}
291
292// result is the default implementation for AccountDeleteFuture.Result.
293func (future *AccountDeleteFuture) result(client AccountClient) (ar autorest.Response, err error) {
294	var done bool
295	done, err = future.DoneWithContext(context.Background(), client)
296	if err != nil {
297		err = autorest.NewErrorWithError(err, "batch.AccountDeleteFuture", "Result", future.Response(), "Polling failure")
298		return
299	}
300	if !done {
301		ar.Response = future.Response()
302		err = azure.NewAsyncOpIncompleteError("batch.AccountDeleteFuture")
303		return
304	}
305	ar.Response = future.Response()
306	return
307}
308
309// AccountIdentity the identity of the Batch account, if configured. This is used when the user specifies
310// 'Microsoft.KeyVault' as their Batch account encryption configuration or when `ManagedIdentity` is
311// selected as the auto-storage authentication mode.
312type AccountIdentity struct {
313	// PrincipalID - READ-ONLY; The principal id of the Batch account. This property will only be provided for a system assigned identity.
314	PrincipalID *string `json:"principalId,omitempty"`
315	// TenantID - READ-ONLY; The tenant id associated with the Batch account. This property will only be provided for a system assigned identity.
316	TenantID *string `json:"tenantId,omitempty"`
317	// Type - The type of identity used for the Batch account. Possible values include: 'ResourceIdentityTypeSystemAssigned', 'ResourceIdentityTypeUserAssigned', 'ResourceIdentityTypeNone'
318	Type ResourceIdentityType `json:"type,omitempty"`
319	// UserAssignedIdentities - The list of user identities associated with the Batch account.
320	UserAssignedIdentities map[string]*UserAssignedIdentities `json:"userAssignedIdentities"`
321}
322
323// MarshalJSON is the custom marshaler for AccountIdentity.
324func (ai AccountIdentity) MarshalJSON() ([]byte, error) {
325	objectMap := make(map[string]interface{})
326	if ai.Type != "" {
327		objectMap["type"] = ai.Type
328	}
329	if ai.UserAssignedIdentities != nil {
330		objectMap["userAssignedIdentities"] = ai.UserAssignedIdentities
331	}
332	return json.Marshal(objectMap)
333}
334
335// AccountKeys a set of Azure Batch account keys.
336type AccountKeys struct {
337	autorest.Response `json:"-"`
338	// AccountName - READ-ONLY; The Batch account name.
339	AccountName *string `json:"accountName,omitempty"`
340	// Primary - READ-ONLY; The primary key associated with the account.
341	Primary *string `json:"primary,omitempty"`
342	// Secondary - READ-ONLY; The secondary key associated with the account.
343	Secondary *string `json:"secondary,omitempty"`
344}
345
346// MarshalJSON is the custom marshaler for AccountKeys.
347func (ak AccountKeys) MarshalJSON() ([]byte, error) {
348	objectMap := make(map[string]interface{})
349	return json.Marshal(objectMap)
350}
351
352// AccountListResult values returned by the List operation.
353type AccountListResult struct {
354	autorest.Response `json:"-"`
355	// Value - The collection of Batch accounts returned by the listing operation.
356	Value *[]Account `json:"value,omitempty"`
357	// NextLink - The continuation token.
358	NextLink *string `json:"nextLink,omitempty"`
359}
360
361// AccountListResultIterator provides access to a complete listing of Account values.
362type AccountListResultIterator struct {
363	i    int
364	page AccountListResultPage
365}
366
367// NextWithContext advances to the next value.  If there was an error making
368// the request the iterator does not advance and the error is returned.
369func (iter *AccountListResultIterator) NextWithContext(ctx context.Context) (err error) {
370	if tracing.IsEnabled() {
371		ctx = tracing.StartSpan(ctx, fqdn+"/AccountListResultIterator.NextWithContext")
372		defer func() {
373			sc := -1
374			if iter.Response().Response.Response != nil {
375				sc = iter.Response().Response.Response.StatusCode
376			}
377			tracing.EndSpan(ctx, sc, err)
378		}()
379	}
380	iter.i++
381	if iter.i < len(iter.page.Values()) {
382		return nil
383	}
384	err = iter.page.NextWithContext(ctx)
385	if err != nil {
386		iter.i--
387		return err
388	}
389	iter.i = 0
390	return nil
391}
392
393// Next advances to the next value.  If there was an error making
394// the request the iterator does not advance and the error is returned.
395// Deprecated: Use NextWithContext() instead.
396func (iter *AccountListResultIterator) Next() error {
397	return iter.NextWithContext(context.Background())
398}
399
400// NotDone returns true if the enumeration should be started or is not yet complete.
401func (iter AccountListResultIterator) NotDone() bool {
402	return iter.page.NotDone() && iter.i < len(iter.page.Values())
403}
404
405// Response returns the raw server response from the last page request.
406func (iter AccountListResultIterator) Response() AccountListResult {
407	return iter.page.Response()
408}
409
410// Value returns the current value or a zero-initialized value if the
411// iterator has advanced beyond the end of the collection.
412func (iter AccountListResultIterator) Value() Account {
413	if !iter.page.NotDone() {
414		return Account{}
415	}
416	return iter.page.Values()[iter.i]
417}
418
419// Creates a new instance of the AccountListResultIterator type.
420func NewAccountListResultIterator(page AccountListResultPage) AccountListResultIterator {
421	return AccountListResultIterator{page: page}
422}
423
424// IsEmpty returns true if the ListResult contains no values.
425func (alr AccountListResult) IsEmpty() bool {
426	return alr.Value == nil || len(*alr.Value) == 0
427}
428
429// hasNextLink returns true if the NextLink is not empty.
430func (alr AccountListResult) hasNextLink() bool {
431	return alr.NextLink != nil && len(*alr.NextLink) != 0
432}
433
434// accountListResultPreparer prepares a request to retrieve the next set of results.
435// It returns nil if no more results exist.
436func (alr AccountListResult) accountListResultPreparer(ctx context.Context) (*http.Request, error) {
437	if !alr.hasNextLink() {
438		return nil, nil
439	}
440	return autorest.Prepare((&http.Request{}).WithContext(ctx),
441		autorest.AsJSON(),
442		autorest.AsGet(),
443		autorest.WithBaseURL(to.String(alr.NextLink)))
444}
445
446// AccountListResultPage contains a page of Account values.
447type AccountListResultPage struct {
448	fn  func(context.Context, AccountListResult) (AccountListResult, error)
449	alr AccountListResult
450}
451
452// NextWithContext advances to the next page of values.  If there was an error making
453// the request the page does not advance and the error is returned.
454func (page *AccountListResultPage) NextWithContext(ctx context.Context) (err error) {
455	if tracing.IsEnabled() {
456		ctx = tracing.StartSpan(ctx, fqdn+"/AccountListResultPage.NextWithContext")
457		defer func() {
458			sc := -1
459			if page.Response().Response.Response != nil {
460				sc = page.Response().Response.Response.StatusCode
461			}
462			tracing.EndSpan(ctx, sc, err)
463		}()
464	}
465	for {
466		next, err := page.fn(ctx, page.alr)
467		if err != nil {
468			return err
469		}
470		page.alr = next
471		if !next.hasNextLink() || !next.IsEmpty() {
472			break
473		}
474	}
475	return nil
476}
477
478// Next advances to the next page of values.  If there was an error making
479// the request the page does not advance and the error is returned.
480// Deprecated: Use NextWithContext() instead.
481func (page *AccountListResultPage) Next() error {
482	return page.NextWithContext(context.Background())
483}
484
485// NotDone returns true if the page enumeration should be started or is not yet complete.
486func (page AccountListResultPage) NotDone() bool {
487	return !page.alr.IsEmpty()
488}
489
490// Response returns the raw server response from the last page request.
491func (page AccountListResultPage) Response() AccountListResult {
492	return page.alr
493}
494
495// Values returns the slice of values for the current page or nil if there are no values.
496func (page AccountListResultPage) Values() []Account {
497	if page.alr.IsEmpty() {
498		return nil
499	}
500	return *page.alr.Value
501}
502
503// Creates a new instance of the AccountListResultPage type.
504func NewAccountListResultPage(cur AccountListResult, getNextPage func(context.Context, AccountListResult) (AccountListResult, error)) AccountListResultPage {
505	return AccountListResultPage{
506		fn:  getNextPage,
507		alr: cur,
508	}
509}
510
511// AccountProperties account specific properties.
512type AccountProperties struct {
513	// AccountEndpoint - READ-ONLY; The account endpoint used to interact with the Batch service.
514	AccountEndpoint *string `json:"accountEndpoint,omitempty"`
515	// ProvisioningState - READ-ONLY; The provisioned state of the resource. Possible values include: 'ProvisioningStateInvalid', 'ProvisioningStateCreating', 'ProvisioningStateDeleting', 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCancelled'
516	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
517	// PoolAllocationMode - READ-ONLY; Possible values include: 'PoolAllocationModeBatchService', 'PoolAllocationModeUserSubscription'
518	PoolAllocationMode PoolAllocationMode `json:"poolAllocationMode,omitempty"`
519	// KeyVaultReference - READ-ONLY
520	KeyVaultReference *KeyVaultReference `json:"keyVaultReference,omitempty"`
521	// PublicNetworkAccess - READ-ONLY; If not specified, the default value is 'enabled'. Possible values include: 'PublicNetworkAccessTypeEnabled', 'PublicNetworkAccessTypeDisabled'
522	PublicNetworkAccess PublicNetworkAccessType `json:"publicNetworkAccess,omitempty"`
523	// PrivateEndpointConnections - READ-ONLY; List of private endpoint connections associated with the Batch account
524	PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
525	// AutoStorage - READ-ONLY
526	AutoStorage *AutoStorageProperties `json:"autoStorage,omitempty"`
527	// Encryption - READ-ONLY; Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used instead.
528	Encryption *EncryptionProperties `json:"encryption,omitempty"`
529	// DedicatedCoreQuota - READ-ONLY; For accounts with PoolAllocationMode set to UserSubscription, quota is managed on the subscription so this value is not returned.
530	DedicatedCoreQuota *int32 `json:"dedicatedCoreQuota,omitempty"`
531	// LowPriorityCoreQuota - READ-ONLY; For accounts with PoolAllocationMode set to UserSubscription, quota is managed on the subscription so this value is not returned.
532	LowPriorityCoreQuota *int32 `json:"lowPriorityCoreQuota,omitempty"`
533	// DedicatedCoreQuotaPerVMFamily - READ-ONLY; A list of the dedicated core quota per Virtual Machine family for the Batch account. For accounts with PoolAllocationMode set to UserSubscription, quota is managed on the subscription so this value is not returned.
534	DedicatedCoreQuotaPerVMFamily *[]VirtualMachineFamilyCoreQuota `json:"dedicatedCoreQuotaPerVMFamily,omitempty"`
535	// DedicatedCoreQuotaPerVMFamilyEnforced - READ-ONLY; Batch is transitioning its core quota system for dedicated cores to be enforced per Virtual Machine family. During this transitional phase, the dedicated core quota per Virtual Machine family may not yet be enforced. If this flag is false, dedicated core quota is enforced via the old dedicatedCoreQuota property on the account and does not consider Virtual Machine family. If this flag is true, dedicated core quota is enforced via the dedicatedCoreQuotaPerVMFamily property on the account, and the old dedicatedCoreQuota does not apply.
536	DedicatedCoreQuotaPerVMFamilyEnforced *bool `json:"dedicatedCoreQuotaPerVMFamilyEnforced,omitempty"`
537	// PoolQuota - READ-ONLY
538	PoolQuota *int32 `json:"poolQuota,omitempty"`
539	// ActiveJobAndJobScheduleQuota - READ-ONLY
540	ActiveJobAndJobScheduleQuota *int32 `json:"activeJobAndJobScheduleQuota,omitempty"`
541	// AllowedAuthenticationModes - READ-ONLY; List of allowed authentication modes for the Batch account that can be used to authenticate with the data plane. This does not affect authentication with the control plane.
542	AllowedAuthenticationModes *[]AuthenticationMode `json:"allowedAuthenticationModes,omitempty"`
543}
544
545// MarshalJSON is the custom marshaler for AccountProperties.
546func (ap AccountProperties) MarshalJSON() ([]byte, error) {
547	objectMap := make(map[string]interface{})
548	return json.Marshal(objectMap)
549}
550
551// AccountRegenerateKeyParameters parameters supplied to the RegenerateKey operation.
552type AccountRegenerateKeyParameters struct {
553	// KeyName - The type of account key to regenerate. Possible values include: 'AccountKeyTypePrimary', 'AccountKeyTypeSecondary'
554	KeyName AccountKeyType `json:"keyName,omitempty"`
555}
556
557// AccountUpdateParameters parameters for updating an Azure Batch account.
558type AccountUpdateParameters struct {
559	// Tags - The user-specified tags associated with the account.
560	Tags map[string]*string `json:"tags"`
561	// AccountUpdateProperties - The properties of the account.
562	*AccountUpdateProperties `json:"properties,omitempty"`
563	// Identity - The identity of the Batch account.
564	Identity *AccountIdentity `json:"identity,omitempty"`
565}
566
567// MarshalJSON is the custom marshaler for AccountUpdateParameters.
568func (aup AccountUpdateParameters) MarshalJSON() ([]byte, error) {
569	objectMap := make(map[string]interface{})
570	if aup.Tags != nil {
571		objectMap["tags"] = aup.Tags
572	}
573	if aup.AccountUpdateProperties != nil {
574		objectMap["properties"] = aup.AccountUpdateProperties
575	}
576	if aup.Identity != nil {
577		objectMap["identity"] = aup.Identity
578	}
579	return json.Marshal(objectMap)
580}
581
582// UnmarshalJSON is the custom unmarshaler for AccountUpdateParameters struct.
583func (aup *AccountUpdateParameters) UnmarshalJSON(body []byte) error {
584	var m map[string]*json.RawMessage
585	err := json.Unmarshal(body, &m)
586	if err != nil {
587		return err
588	}
589	for k, v := range m {
590		switch k {
591		case "tags":
592			if v != nil {
593				var tags map[string]*string
594				err = json.Unmarshal(*v, &tags)
595				if err != nil {
596					return err
597				}
598				aup.Tags = tags
599			}
600		case "properties":
601			if v != nil {
602				var accountUpdateProperties AccountUpdateProperties
603				err = json.Unmarshal(*v, &accountUpdateProperties)
604				if err != nil {
605					return err
606				}
607				aup.AccountUpdateProperties = &accountUpdateProperties
608			}
609		case "identity":
610			if v != nil {
611				var identity AccountIdentity
612				err = json.Unmarshal(*v, &identity)
613				if err != nil {
614					return err
615				}
616				aup.Identity = &identity
617			}
618		}
619	}
620
621	return nil
622}
623
624// AccountUpdateProperties the properties of a Batch account.
625type AccountUpdateProperties struct {
626	// AutoStorage - The properties related to the auto-storage account.
627	AutoStorage *AutoStorageBaseProperties `json:"autoStorage,omitempty"`
628	// Encryption - Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used instead.
629	Encryption *EncryptionProperties `json:"encryption,omitempty"`
630	// AllowedAuthenticationModes - List of allowed authentication modes for the Batch account that can be used to authenticate with the data plane. This does not affect authentication with the control plane.
631	AllowedAuthenticationModes *[]AuthenticationMode `json:"allowedAuthenticationModes,omitempty"`
632}
633
634// ActivateApplicationPackageParameters parameters for an activating an application package.
635type ActivateApplicationPackageParameters struct {
636	// Format - The format of the application package binary file.
637	Format *string `json:"format,omitempty"`
638}
639
640// Application contains information about an application in a Batch account.
641type Application struct {
642	autorest.Response `json:"-"`
643	// ApplicationProperties - The properties associated with the Application.
644	*ApplicationProperties `json:"properties,omitempty"`
645	// ID - READ-ONLY; The ID of the resource.
646	ID *string `json:"id,omitempty"`
647	// Name - READ-ONLY; The name of the resource.
648	Name *string `json:"name,omitempty"`
649	// Type - READ-ONLY; The type of the resource.
650	Type *string `json:"type,omitempty"`
651	// Etag - READ-ONLY; The ETag of the resource, used for concurrency statements.
652	Etag *string `json:"etag,omitempty"`
653}
654
655// MarshalJSON is the custom marshaler for Application.
656func (a Application) MarshalJSON() ([]byte, error) {
657	objectMap := make(map[string]interface{})
658	if a.ApplicationProperties != nil {
659		objectMap["properties"] = a.ApplicationProperties
660	}
661	return json.Marshal(objectMap)
662}
663
664// UnmarshalJSON is the custom unmarshaler for Application struct.
665func (a *Application) UnmarshalJSON(body []byte) error {
666	var m map[string]*json.RawMessage
667	err := json.Unmarshal(body, &m)
668	if err != nil {
669		return err
670	}
671	for k, v := range m {
672		switch k {
673		case "properties":
674			if v != nil {
675				var applicationProperties ApplicationProperties
676				err = json.Unmarshal(*v, &applicationProperties)
677				if err != nil {
678					return err
679				}
680				a.ApplicationProperties = &applicationProperties
681			}
682		case "id":
683			if v != nil {
684				var ID string
685				err = json.Unmarshal(*v, &ID)
686				if err != nil {
687					return err
688				}
689				a.ID = &ID
690			}
691		case "name":
692			if v != nil {
693				var name string
694				err = json.Unmarshal(*v, &name)
695				if err != nil {
696					return err
697				}
698				a.Name = &name
699			}
700		case "type":
701			if v != nil {
702				var typeVar string
703				err = json.Unmarshal(*v, &typeVar)
704				if err != nil {
705					return err
706				}
707				a.Type = &typeVar
708			}
709		case "etag":
710			if v != nil {
711				var etag string
712				err = json.Unmarshal(*v, &etag)
713				if err != nil {
714					return err
715				}
716				a.Etag = &etag
717			}
718		}
719	}
720
721	return nil
722}
723
724// ApplicationPackage an application package which represents a particular version of an application.
725type ApplicationPackage struct {
726	autorest.Response `json:"-"`
727	// ApplicationPackageProperties - The properties associated with the Application Package.
728	*ApplicationPackageProperties `json:"properties,omitempty"`
729	// ID - READ-ONLY; The ID of the resource.
730	ID *string `json:"id,omitempty"`
731	// Name - READ-ONLY; The name of the resource.
732	Name *string `json:"name,omitempty"`
733	// Type - READ-ONLY; The type of the resource.
734	Type *string `json:"type,omitempty"`
735	// Etag - READ-ONLY; The ETag of the resource, used for concurrency statements.
736	Etag *string `json:"etag,omitempty"`
737}
738
739// MarshalJSON is the custom marshaler for ApplicationPackage.
740func (ap ApplicationPackage) MarshalJSON() ([]byte, error) {
741	objectMap := make(map[string]interface{})
742	if ap.ApplicationPackageProperties != nil {
743		objectMap["properties"] = ap.ApplicationPackageProperties
744	}
745	return json.Marshal(objectMap)
746}
747
748// UnmarshalJSON is the custom unmarshaler for ApplicationPackage struct.
749func (ap *ApplicationPackage) UnmarshalJSON(body []byte) error {
750	var m map[string]*json.RawMessage
751	err := json.Unmarshal(body, &m)
752	if err != nil {
753		return err
754	}
755	for k, v := range m {
756		switch k {
757		case "properties":
758			if v != nil {
759				var applicationPackageProperties ApplicationPackageProperties
760				err = json.Unmarshal(*v, &applicationPackageProperties)
761				if err != nil {
762					return err
763				}
764				ap.ApplicationPackageProperties = &applicationPackageProperties
765			}
766		case "id":
767			if v != nil {
768				var ID string
769				err = json.Unmarshal(*v, &ID)
770				if err != nil {
771					return err
772				}
773				ap.ID = &ID
774			}
775		case "name":
776			if v != nil {
777				var name string
778				err = json.Unmarshal(*v, &name)
779				if err != nil {
780					return err
781				}
782				ap.Name = &name
783			}
784		case "type":
785			if v != nil {
786				var typeVar string
787				err = json.Unmarshal(*v, &typeVar)
788				if err != nil {
789					return err
790				}
791				ap.Type = &typeVar
792			}
793		case "etag":
794			if v != nil {
795				var etag string
796				err = json.Unmarshal(*v, &etag)
797				if err != nil {
798					return err
799				}
800				ap.Etag = &etag
801			}
802		}
803	}
804
805	return nil
806}
807
808// ApplicationPackageProperties properties of an application package
809type ApplicationPackageProperties struct {
810	// State - READ-ONLY; The current state of the application package. Possible values include: 'PackageStatePending', 'PackageStateActive'
811	State PackageState `json:"state,omitempty"`
812	// Format - READ-ONLY; The format of the application package, if the package is active.
813	Format *string `json:"format,omitempty"`
814	// StorageURL - READ-ONLY; The URL for the application package in Azure Storage.
815	StorageURL *string `json:"storageUrl,omitempty"`
816	// StorageURLExpiry - READ-ONLY; The UTC time at which the Azure Storage URL will expire.
817	StorageURLExpiry *date.Time `json:"storageUrlExpiry,omitempty"`
818	// LastActivationTime - READ-ONLY; The time at which the package was last activated, if the package is active.
819	LastActivationTime *date.Time `json:"lastActivationTime,omitempty"`
820}
821
822// MarshalJSON is the custom marshaler for ApplicationPackageProperties.
823func (app ApplicationPackageProperties) MarshalJSON() ([]byte, error) {
824	objectMap := make(map[string]interface{})
825	return json.Marshal(objectMap)
826}
827
828// ApplicationPackageReference ...
829type ApplicationPackageReference struct {
830	ID *string `json:"id,omitempty"`
831	// Version - If this is omitted, and no default version is specified for this application, the request fails with the error code InvalidApplicationPackageReferences. If you are calling the REST API directly, the HTTP status code is 409.
832	Version *string `json:"version,omitempty"`
833}
834
835// ApplicationProperties the properties associated with the Application.
836type ApplicationProperties struct {
837	// DisplayName - The display name for the application.
838	DisplayName *string `json:"displayName,omitempty"`
839	// AllowUpdates - A value indicating whether packages within the application may be overwritten using the same version string.
840	AllowUpdates *bool `json:"allowUpdates,omitempty"`
841	// DefaultVersion - The package to use if a client requests the application but does not specify a version. This property can only be set to the name of an existing package.
842	DefaultVersion *string `json:"defaultVersion,omitempty"`
843}
844
845// AutoScaleRun ...
846type AutoScaleRun struct {
847	EvaluationTime *date.Time `json:"evaluationTime,omitempty"`
848	// Results - Each variable value is returned in the form $variable=value, and variables are separated by semicolons.
849	Results *string            `json:"results,omitempty"`
850	Error   *AutoScaleRunError `json:"error,omitempty"`
851}
852
853// AutoScaleRunError ...
854type AutoScaleRunError struct {
855	// Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
856	Code *string `json:"code,omitempty"`
857	// Message - A message describing the error, intended to be suitable for display in a user interface.
858	Message *string              `json:"message,omitempty"`
859	Details *[]AutoScaleRunError `json:"details,omitempty"`
860}
861
862// AutoScaleSettings ...
863type AutoScaleSettings struct {
864	Formula *string `json:"formula,omitempty"`
865	// EvaluationInterval - If omitted, the default value is 15 minutes (PT15M).
866	EvaluationInterval *string `json:"evaluationInterval,omitempty"`
867}
868
869// AutoStorageBaseProperties the properties related to the auto-storage account.
870type AutoStorageBaseProperties struct {
871	// StorageAccountID - The resource ID of the storage account to be used for auto-storage account.
872	StorageAccountID *string `json:"storageAccountId,omitempty"`
873	// AuthenticationMode - The authentication mode which the Batch service will use to manage the auto-storage account. Possible values include: 'AutoStorageAuthenticationModeStorageKeys', 'AutoStorageAuthenticationModeBatchAccountManagedIdentity'
874	AuthenticationMode AutoStorageAuthenticationMode `json:"authenticationMode,omitempty"`
875	// NodeIdentityReference - The identity referenced here must be assigned to pools which have compute nodes that need access to auto-storage.
876	NodeIdentityReference *ComputeNodeIdentityReference `json:"nodeIdentityReference,omitempty"`
877}
878
879// AutoStorageProperties contains information about the auto-storage account associated with a Batch
880// account.
881type AutoStorageProperties struct {
882	// LastKeySync - The UTC time at which storage keys were last synchronized with the Batch account.
883	LastKeySync *date.Time `json:"lastKeySync,omitempty"`
884	// StorageAccountID - The resource ID of the storage account to be used for auto-storage account.
885	StorageAccountID *string `json:"storageAccountId,omitempty"`
886	// AuthenticationMode - The authentication mode which the Batch service will use to manage the auto-storage account. Possible values include: 'AutoStorageAuthenticationModeStorageKeys', 'AutoStorageAuthenticationModeBatchAccountManagedIdentity'
887	AuthenticationMode AutoStorageAuthenticationMode `json:"authenticationMode,omitempty"`
888	// NodeIdentityReference - The identity referenced here must be assigned to pools which have compute nodes that need access to auto-storage.
889	NodeIdentityReference *ComputeNodeIdentityReference `json:"nodeIdentityReference,omitempty"`
890}
891
892// AutoUserSpecification ...
893type AutoUserSpecification struct {
894	// Scope - The default value is Pool. If the pool is running Windows a value of Task should be specified if stricter isolation between tasks is required. For example, if the task mutates the registry in a way which could impact other tasks, or if certificates have been specified on the pool which should not be accessible by normal tasks but should be accessible by start tasks. Possible values include: 'AutoUserScopeTask', 'AutoUserScopePool'
895	Scope AutoUserScope `json:"scope,omitempty"`
896	// ElevationLevel - The default value is nonAdmin. Possible values include: 'ElevationLevelNonAdmin', 'ElevationLevelAdmin'
897	ElevationLevel ElevationLevel `json:"elevationLevel,omitempty"`
898}
899
900// AzureBlobFileSystemConfiguration ...
901type AzureBlobFileSystemConfiguration struct {
902	AccountName   *string `json:"accountName,omitempty"`
903	ContainerName *string `json:"containerName,omitempty"`
904	// AccountKey - This property is mutually exclusive with both sasKey and identity; exactly one must be specified.
905	AccountKey *string `json:"accountKey,omitempty"`
906	// SasKey - This property is mutually exclusive with both accountKey and identity; exactly one must be specified.
907	SasKey *string `json:"sasKey,omitempty"`
908	// BlobfuseOptions - These are 'net use' options in Windows and 'mount' options in Linux.
909	BlobfuseOptions *string `json:"blobfuseOptions,omitempty"`
910	// RelativeMountPath - All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable.
911	RelativeMountPath *string `json:"relativeMountPath,omitempty"`
912	// IdentityReference - This property is mutually exclusive with both accountKey and sasKey; exactly one must be specified.
913	IdentityReference *ComputeNodeIdentityReference `json:"identityReference,omitempty"`
914}
915
916// AzureFileShareConfiguration ...
917type AzureFileShareConfiguration struct {
918	AccountName *string `json:"accountName,omitempty"`
919	// AzureFileURL - This is of the form 'https://{account}.file.core.windows.net/'.
920	AzureFileURL *string `json:"azureFileUrl,omitempty"`
921	AccountKey   *string `json:"accountKey,omitempty"`
922	// RelativeMountPath - All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable.
923	RelativeMountPath *string `json:"relativeMountPath,omitempty"`
924	// MountOptions - These are 'net use' options in Windows and 'mount' options in Linux.
925	MountOptions *string `json:"mountOptions,omitempty"`
926}
927
928// Certificate contains information about a certificate.
929type Certificate struct {
930	autorest.Response `json:"-"`
931	// CertificateProperties - The properties associated with the certificate.
932	*CertificateProperties `json:"properties,omitempty"`
933	// ID - READ-ONLY; The ID of the resource.
934	ID *string `json:"id,omitempty"`
935	// Name - READ-ONLY; The name of the resource.
936	Name *string `json:"name,omitempty"`
937	// Type - READ-ONLY; The type of the resource.
938	Type *string `json:"type,omitempty"`
939	// Etag - READ-ONLY; The ETag of the resource, used for concurrency statements.
940	Etag *string `json:"etag,omitempty"`
941}
942
943// MarshalJSON is the custom marshaler for Certificate.
944func (c Certificate) MarshalJSON() ([]byte, error) {
945	objectMap := make(map[string]interface{})
946	if c.CertificateProperties != nil {
947		objectMap["properties"] = c.CertificateProperties
948	}
949	return json.Marshal(objectMap)
950}
951
952// UnmarshalJSON is the custom unmarshaler for Certificate struct.
953func (c *Certificate) UnmarshalJSON(body []byte) error {
954	var m map[string]*json.RawMessage
955	err := json.Unmarshal(body, &m)
956	if err != nil {
957		return err
958	}
959	for k, v := range m {
960		switch k {
961		case "properties":
962			if v != nil {
963				var certificateProperties CertificateProperties
964				err = json.Unmarshal(*v, &certificateProperties)
965				if err != nil {
966					return err
967				}
968				c.CertificateProperties = &certificateProperties
969			}
970		case "id":
971			if v != nil {
972				var ID string
973				err = json.Unmarshal(*v, &ID)
974				if err != nil {
975					return err
976				}
977				c.ID = &ID
978			}
979		case "name":
980			if v != nil {
981				var name string
982				err = json.Unmarshal(*v, &name)
983				if err != nil {
984					return err
985				}
986				c.Name = &name
987			}
988		case "type":
989			if v != nil {
990				var typeVar string
991				err = json.Unmarshal(*v, &typeVar)
992				if err != nil {
993					return err
994				}
995				c.Type = &typeVar
996			}
997		case "etag":
998			if v != nil {
999				var etag string
1000				err = json.Unmarshal(*v, &etag)
1001				if err != nil {
1002					return err
1003				}
1004				c.Etag = &etag
1005			}
1006		}
1007	}
1008
1009	return nil
1010}
1011
1012// CertificateBaseProperties base certificate properties.
1013type CertificateBaseProperties struct {
1014	// ThumbprintAlgorithm - This must match the first portion of the certificate name. Currently required to be 'SHA1'.
1015	ThumbprintAlgorithm *string `json:"thumbprintAlgorithm,omitempty"`
1016	// Thumbprint - This must match the thumbprint from the name.
1017	Thumbprint *string `json:"thumbprint,omitempty"`
1018	// Format - The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. Possible values include: 'CertificateFormatPfx', 'CertificateFormatCer'
1019	Format CertificateFormat `json:"format,omitempty"`
1020}
1021
1022// CertificateCreateOrUpdateParameters contains information about a certificate.
1023type CertificateCreateOrUpdateParameters struct {
1024	// CertificateCreateOrUpdateProperties - The properties associated with the certificate.
1025	*CertificateCreateOrUpdateProperties `json:"properties,omitempty"`
1026	// ID - READ-ONLY; The ID of the resource.
1027	ID *string `json:"id,omitempty"`
1028	// Name - READ-ONLY; The name of the resource.
1029	Name *string `json:"name,omitempty"`
1030	// Type - READ-ONLY; The type of the resource.
1031	Type *string `json:"type,omitempty"`
1032	// Etag - READ-ONLY; The ETag of the resource, used for concurrency statements.
1033	Etag *string `json:"etag,omitempty"`
1034}
1035
1036// MarshalJSON is the custom marshaler for CertificateCreateOrUpdateParameters.
1037func (ccoup CertificateCreateOrUpdateParameters) MarshalJSON() ([]byte, error) {
1038	objectMap := make(map[string]interface{})
1039	if ccoup.CertificateCreateOrUpdateProperties != nil {
1040		objectMap["properties"] = ccoup.CertificateCreateOrUpdateProperties
1041	}
1042	return json.Marshal(objectMap)
1043}
1044
1045// UnmarshalJSON is the custom unmarshaler for CertificateCreateOrUpdateParameters struct.
1046func (ccoup *CertificateCreateOrUpdateParameters) UnmarshalJSON(body []byte) error {
1047	var m map[string]*json.RawMessage
1048	err := json.Unmarshal(body, &m)
1049	if err != nil {
1050		return err
1051	}
1052	for k, v := range m {
1053		switch k {
1054		case "properties":
1055			if v != nil {
1056				var certificateCreateOrUpdateProperties CertificateCreateOrUpdateProperties
1057				err = json.Unmarshal(*v, &certificateCreateOrUpdateProperties)
1058				if err != nil {
1059					return err
1060				}
1061				ccoup.CertificateCreateOrUpdateProperties = &certificateCreateOrUpdateProperties
1062			}
1063		case "id":
1064			if v != nil {
1065				var ID string
1066				err = json.Unmarshal(*v, &ID)
1067				if err != nil {
1068					return err
1069				}
1070				ccoup.ID = &ID
1071			}
1072		case "name":
1073			if v != nil {
1074				var name string
1075				err = json.Unmarshal(*v, &name)
1076				if err != nil {
1077					return err
1078				}
1079				ccoup.Name = &name
1080			}
1081		case "type":
1082			if v != nil {
1083				var typeVar string
1084				err = json.Unmarshal(*v, &typeVar)
1085				if err != nil {
1086					return err
1087				}
1088				ccoup.Type = &typeVar
1089			}
1090		case "etag":
1091			if v != nil {
1092				var etag string
1093				err = json.Unmarshal(*v, &etag)
1094				if err != nil {
1095					return err
1096				}
1097				ccoup.Etag = &etag
1098			}
1099		}
1100	}
1101
1102	return nil
1103}
1104
1105// CertificateCreateOrUpdateProperties certificate properties for create operations
1106type CertificateCreateOrUpdateProperties struct {
1107	// Data - The maximum size is 10KB.
1108	Data *string `json:"data,omitempty"`
1109	// Password - This must not be specified if the certificate format is Cer.
1110	Password *string `json:"password,omitempty"`
1111	// ThumbprintAlgorithm - This must match the first portion of the certificate name. Currently required to be 'SHA1'.
1112	ThumbprintAlgorithm *string `json:"thumbprintAlgorithm,omitempty"`
1113	// Thumbprint - This must match the thumbprint from the name.
1114	Thumbprint *string `json:"thumbprint,omitempty"`
1115	// Format - The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. Possible values include: 'CertificateFormatPfx', 'CertificateFormatCer'
1116	Format CertificateFormat `json:"format,omitempty"`
1117}
1118
1119// CertificateDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
1120// operation.
1121type CertificateDeleteFuture struct {
1122	azure.FutureAPI
1123	// Result returns the result of the asynchronous operation.
1124	// If the operation has not completed it will return an error.
1125	Result func(CertificateClient) (autorest.Response, error)
1126}
1127
1128// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1129func (future *CertificateDeleteFuture) UnmarshalJSON(body []byte) error {
1130	var azFuture azure.Future
1131	if err := json.Unmarshal(body, &azFuture); err != nil {
1132		return err
1133	}
1134	future.FutureAPI = &azFuture
1135	future.Result = future.result
1136	return nil
1137}
1138
1139// result is the default implementation for CertificateDeleteFuture.Result.
1140func (future *CertificateDeleteFuture) result(client CertificateClient) (ar autorest.Response, err error) {
1141	var done bool
1142	done, err = future.DoneWithContext(context.Background(), client)
1143	if err != nil {
1144		err = autorest.NewErrorWithError(err, "batch.CertificateDeleteFuture", "Result", future.Response(), "Polling failure")
1145		return
1146	}
1147	if !done {
1148		ar.Response = future.Response()
1149		err = azure.NewAsyncOpIncompleteError("batch.CertificateDeleteFuture")
1150		return
1151	}
1152	ar.Response = future.Response()
1153	return
1154}
1155
1156// CertificateProperties certificate properties.
1157type CertificateProperties struct {
1158	// ProvisioningState - READ-ONLY; Possible values include: 'CertificateProvisioningStateSucceeded', 'CertificateProvisioningStateDeleting', 'CertificateProvisioningStateFailed'
1159	ProvisioningState CertificateProvisioningState `json:"provisioningState,omitempty"`
1160	// ProvisioningStateTransitionTime - READ-ONLY
1161	ProvisioningStateTransitionTime *date.Time `json:"provisioningStateTransitionTime,omitempty"`
1162	// PreviousProvisioningState - READ-ONLY; The previous provisioned state of the resource. Possible values include: 'CertificateProvisioningStateSucceeded', 'CertificateProvisioningStateDeleting', 'CertificateProvisioningStateFailed'
1163	PreviousProvisioningState CertificateProvisioningState `json:"previousProvisioningState,omitempty"`
1164	// PreviousProvisioningStateTransitionTime - READ-ONLY
1165	PreviousProvisioningStateTransitionTime *date.Time `json:"previousProvisioningStateTransitionTime,omitempty"`
1166	// PublicData - READ-ONLY; The public key of the certificate.
1167	PublicData *string `json:"publicData,omitempty"`
1168	// DeleteCertificateError - READ-ONLY; This is only returned when the certificate provisioningState is 'Failed'.
1169	DeleteCertificateError *DeleteCertificateError `json:"deleteCertificateError,omitempty"`
1170	// ThumbprintAlgorithm - This must match the first portion of the certificate name. Currently required to be 'SHA1'.
1171	ThumbprintAlgorithm *string `json:"thumbprintAlgorithm,omitempty"`
1172	// Thumbprint - This must match the thumbprint from the name.
1173	Thumbprint *string `json:"thumbprint,omitempty"`
1174	// Format - The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. Possible values include: 'CertificateFormatPfx', 'CertificateFormatCer'
1175	Format CertificateFormat `json:"format,omitempty"`
1176}
1177
1178// MarshalJSON is the custom marshaler for CertificateProperties.
1179func (cp CertificateProperties) MarshalJSON() ([]byte, error) {
1180	objectMap := make(map[string]interface{})
1181	if cp.ThumbprintAlgorithm != nil {
1182		objectMap["thumbprintAlgorithm"] = cp.ThumbprintAlgorithm
1183	}
1184	if cp.Thumbprint != nil {
1185		objectMap["thumbprint"] = cp.Thumbprint
1186	}
1187	if cp.Format != "" {
1188		objectMap["format"] = cp.Format
1189	}
1190	return json.Marshal(objectMap)
1191}
1192
1193// CertificateReference ...
1194type CertificateReference struct {
1195	ID *string `json:"id,omitempty"`
1196	// StoreLocation - The default value is currentUser. This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. Possible values include: 'CertificateStoreLocationCurrentUser', 'CertificateStoreLocationLocalMachine'
1197	StoreLocation CertificateStoreLocation `json:"storeLocation,omitempty"`
1198	// StoreName - This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). Common store names include: My, Root, CA, Trust, Disallowed, TrustedPeople, TrustedPublisher, AuthRoot, AddressBook, but any custom store name can also be used. The default value is My.
1199	StoreName  *string                  `json:"storeName,omitempty"`
1200	Visibility *[]CertificateVisibility `json:"visibility,omitempty"`
1201}
1202
1203// CheckNameAvailabilityParameters parameters for a check name availability request.
1204type CheckNameAvailabilityParameters struct {
1205	// Name - The name to check for availability
1206	Name *string `json:"name,omitempty"`
1207	// Type - The resource type.
1208	Type *string `json:"type,omitempty"`
1209}
1210
1211// CheckNameAvailabilityResult the CheckNameAvailability operation response.
1212type CheckNameAvailabilityResult struct {
1213	autorest.Response `json:"-"`
1214	// NameAvailable - READ-ONLY; Gets a boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or invalid and cannot be used.
1215	NameAvailable *bool `json:"nameAvailable,omitempty"`
1216	// Reason - READ-ONLY; Gets the reason that a Batch account name could not be used. The Reason element is only returned if NameAvailable is false. Possible values include: 'NameAvailabilityReasonInvalid', 'NameAvailabilityReasonAlreadyExists'
1217	Reason NameAvailabilityReason `json:"reason,omitempty"`
1218	// Message - READ-ONLY; Gets an error message explaining the Reason value in more detail.
1219	Message *string `json:"message,omitempty"`
1220}
1221
1222// MarshalJSON is the custom marshaler for CheckNameAvailabilityResult.
1223func (cnar CheckNameAvailabilityResult) MarshalJSON() ([]byte, error) {
1224	objectMap := make(map[string]interface{})
1225	return json.Marshal(objectMap)
1226}
1227
1228// CIFSMountConfiguration ...
1229type CIFSMountConfiguration struct {
1230	Username *string `json:"username,omitempty"`
1231	Source   *string `json:"source,omitempty"`
1232	// RelativeMountPath - All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable.
1233	RelativeMountPath *string `json:"relativeMountPath,omitempty"`
1234	// MountOptions - These are 'net use' options in Windows and 'mount' options in Linux.
1235	MountOptions *string `json:"mountOptions,omitempty"`
1236	Password     *string `json:"password,omitempty"`
1237}
1238
1239// CloudError an error response from the Batch service.
1240type CloudError struct {
1241	// Error - The body of the error response.
1242	Error *CloudErrorBody `json:"error,omitempty"`
1243}
1244
1245// CloudErrorBody an error response from the Batch service.
1246type CloudErrorBody struct {
1247	// Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
1248	Code *string `json:"code,omitempty"`
1249	// Message - A message describing the error, intended to be suitable for display in a user interface.
1250	Message *string `json:"message,omitempty"`
1251	// Target - The target of the particular error. For example, the name of the property in error.
1252	Target *string `json:"target,omitempty"`
1253	// Details - A list of additional details about the error.
1254	Details *[]CloudErrorBody `json:"details,omitempty"`
1255}
1256
1257// CloudServiceConfiguration ...
1258type CloudServiceConfiguration struct {
1259	// OsFamily - Possible values are: 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to Windows Server 2012. 4 - OS Family 4, equivalent to Windows Server 2012 R2. 5 - OS Family 5, equivalent to Windows Server 2016. 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).
1260	OsFamily *string `json:"osFamily,omitempty"`
1261	// OsVersion - The default value is * which specifies the latest operating system version for the specified OS family.
1262	OsVersion *string `json:"osVersion,omitempty"`
1263}
1264
1265// ComputeNodeIdentityReference the reference to a user assigned identity associated with the Batch pool
1266// which a compute node will use.
1267type ComputeNodeIdentityReference struct {
1268	// ResourceID - The ARM resource id of the user assigned identity.
1269	ResourceID *string `json:"resourceId,omitempty"`
1270}
1271
1272// ContainerConfiguration ...
1273type ContainerConfiguration struct {
1274	Type *string `json:"type,omitempty"`
1275	// 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.
1276	ContainerImageNames *[]string `json:"containerImageNames,omitempty"`
1277	// ContainerRegistries - If any images must be downloaded from a private registry which requires credentials, then those credentials must be provided here.
1278	ContainerRegistries *[]ContainerRegistry `json:"containerRegistries,omitempty"`
1279}
1280
1281// ContainerRegistry ...
1282type ContainerRegistry struct {
1283	UserName *string `json:"username,omitempty"`
1284	Password *string `json:"password,omitempty"`
1285	// RegistryServer - If omitted, the default is "docker.io".
1286	RegistryServer    *string                       `json:"registryServer,omitempty"`
1287	IdentityReference *ComputeNodeIdentityReference `json:"identityReference,omitempty"`
1288}
1289
1290// DataDisk settings which will be used by the data disks associated to Compute Nodes in the Pool. When
1291// using attached data disks, you need to mount and format the disks from within a VM to use them.
1292type DataDisk struct {
1293	// Lun - The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct lun. The value must be between 0 and 63, inclusive.
1294	Lun *int32 `json:"lun,omitempty"`
1295	// Caching - Values are:
1296	//  none - The caching mode for the disk is not enabled.
1297	//  readOnly - The caching mode for the disk is read only.
1298	//  readWrite - The caching mode for the disk is read and write.
1299	//  The default value for caching is none. For information about the caching options see: https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. Possible values include: 'CachingTypeNone', 'CachingTypeReadOnly', 'CachingTypeReadWrite'
1300	Caching    CachingType `json:"caching,omitempty"`
1301	DiskSizeGB *int32      `json:"diskSizeGB,omitempty"`
1302	// StorageAccountType - If omitted, the default is "Standard_LRS". Values are:
1303	//  Standard_LRS - The data disk should use standard locally redundant storage.
1304	//  Premium_LRS - The data disk should use premium locally redundant storage. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypePremiumLRS'
1305	StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
1306}
1307
1308// DeleteCertificateError an error response from the Batch service.
1309type DeleteCertificateError struct {
1310	// Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
1311	Code *string `json:"code,omitempty"`
1312	// Message - A message describing the error, intended to be suitable for display in a user interface.
1313	Message *string `json:"message,omitempty"`
1314	// Target - The target of the particular error. For example, the name of the property in error.
1315	Target *string `json:"target,omitempty"`
1316	// Details - A list of additional details about the error.
1317	Details *[]DeleteCertificateError `json:"details,omitempty"`
1318}
1319
1320// DeploymentConfiguration ...
1321type DeploymentConfiguration struct {
1322	// 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'.
1323	CloudServiceConfiguration *CloudServiceConfiguration `json:"cloudServiceConfiguration,omitempty"`
1324	// VirtualMachineConfiguration - This property and cloudServiceConfiguration are mutually exclusive and one of the properties must be specified.
1325	VirtualMachineConfiguration *VirtualMachineConfiguration `json:"virtualMachineConfiguration,omitempty"`
1326}
1327
1328// DiffDiskSettings ...
1329type DiffDiskSettings struct {
1330	// Placement - This property can be used by user in the request to choose which location the operating system should be in. e.g., cache disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at https://docs.microsoft.com/en-us/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VMs at https://docs.microsoft.com/en-us/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. Possible values include: 'DiffDiskPlacementCacheDisk'
1331	Placement DiffDiskPlacement `json:"placement,omitempty"`
1332}
1333
1334// DiskEncryptionConfiguration the disk encryption configuration applied on compute nodes in the pool. Disk
1335// encryption configuration is not supported on Linux pool created with Virtual Machine Image or Shared
1336// Image Gallery Image.
1337type DiskEncryptionConfiguration struct {
1338	// Targets - On Linux pool, only "TemporaryDisk" is supported; on Windows pool, "OsDisk" and "TemporaryDisk" must be specified.
1339	Targets *[]DiskEncryptionTarget `json:"targets,omitempty"`
1340}
1341
1342// EncryptionProperties configures how customer data is encrypted inside the Batch account. By default,
1343// accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can
1344// be used instead.
1345type EncryptionProperties struct {
1346	// KeySource - Type of the key source. Possible values include: 'KeySourceMicrosoftBatch', 'KeySourceMicrosoftKeyVault'
1347	KeySource KeySource `json:"keySource,omitempty"`
1348	// KeyVaultProperties - Additional details when using Microsoft.KeyVault
1349	KeyVaultProperties *KeyVaultProperties `json:"keyVaultProperties,omitempty"`
1350}
1351
1352// EndpointDependency a domain name and connection details used to access a dependency.
1353type EndpointDependency struct {
1354	// DomainName - READ-ONLY; The domain name of the dependency. Domain names may be fully qualified or may contain a * wildcard.
1355	DomainName *string `json:"domainName,omitempty"`
1356	// Description - READ-ONLY; Human-readable supplemental information about the dependency and when it is applicable.
1357	Description *string `json:"description,omitempty"`
1358	// EndpointDetails - READ-ONLY; The list of connection details for this endpoint.
1359	EndpointDetails *[]EndpointDetail `json:"endpointDetails,omitempty"`
1360}
1361
1362// MarshalJSON is the custom marshaler for EndpointDependency.
1363func (ed EndpointDependency) MarshalJSON() ([]byte, error) {
1364	objectMap := make(map[string]interface{})
1365	return json.Marshal(objectMap)
1366}
1367
1368// EndpointDetail details about the connection between the Batch service and the endpoint.
1369type EndpointDetail struct {
1370	// Port - READ-ONLY; The port an endpoint is connected to.
1371	Port *int32 `json:"port,omitempty"`
1372}
1373
1374// MarshalJSON is the custom marshaler for EndpointDetail.
1375func (ed EndpointDetail) MarshalJSON() ([]byte, error) {
1376	objectMap := make(map[string]interface{})
1377	return json.Marshal(objectMap)
1378}
1379
1380// EnvironmentSetting ...
1381type EnvironmentSetting struct {
1382	Name  *string `json:"name,omitempty"`
1383	Value *string `json:"value,omitempty"`
1384}
1385
1386// FixedScaleSettings ...
1387type FixedScaleSettings struct {
1388	// ResizeTimeout - The default value is 15 minutes. Timeout values use ISO 8601 format. For example, use PT10M for 10 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).
1389	ResizeTimeout *string `json:"resizeTimeout,omitempty"`
1390	// TargetDedicatedNodes - At least one of targetDedicatedNodes, targetLowPriorityNodes must be set.
1391	TargetDedicatedNodes *int32 `json:"targetDedicatedNodes,omitempty"`
1392	// TargetLowPriorityNodes - At least one of targetDedicatedNodes, targetLowPriorityNodes must be set.
1393	TargetLowPriorityNodes *int32 `json:"targetLowPriorityNodes,omitempty"`
1394	// NodeDeallocationOption - If omitted, the default value is Requeue. Possible values include: 'ComputeNodeDeallocationOptionRequeue', 'ComputeNodeDeallocationOptionTerminate', 'ComputeNodeDeallocationOptionTaskCompletion', 'ComputeNodeDeallocationOptionRetainedData'
1395	NodeDeallocationOption ComputeNodeDeallocationOption `json:"nodeDeallocationOption,omitempty"`
1396}
1397
1398// ImageReference ...
1399type ImageReference struct {
1400	// Publisher - For example, Canonical or MicrosoftWindowsServer.
1401	Publisher *string `json:"publisher,omitempty"`
1402	// Offer - For example, UbuntuServer or WindowsServer.
1403	Offer *string `json:"offer,omitempty"`
1404	// Sku - For example, 18.04-LTS or 2019-Datacenter.
1405	Sku *string `json:"sku,omitempty"`
1406	// Version - A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'.
1407	Version *string `json:"version,omitempty"`
1408	// ID - This property is mutually exclusive with other properties. The Shared Image Gallery image must have replicas in the same region as the Azure Batch account. For information about the firewall settings for the Batch node agent to communicate with the Batch service see https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration.
1409	ID *string `json:"id,omitempty"`
1410}
1411
1412// InboundNatPool ...
1413type InboundNatPool struct {
1414	// 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.
1415	Name *string `json:"name,omitempty"`
1416	// Protocol - Possible values include: 'InboundEndpointProtocolTCP', 'InboundEndpointProtocolUDP'
1417	Protocol InboundEndpointProtocol `json:"protocol,omitempty"`
1418	// 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.
1419	BackendPort *int32 `json:"backendPort,omitempty"`
1420	// 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. If any reserved or overlapping values are provided the request fails with HTTP status code 400.
1421	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
1422	// 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. If any reserved or overlapping values are provided the request fails with HTTP status code 400.
1423	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
1424	// 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.
1425	NetworkSecurityGroupRules *[]NetworkSecurityGroupRule `json:"networkSecurityGroupRules,omitempty"`
1426}
1427
1428// KeyVaultProperties keyVault configuration when using an encryption KeySource of Microsoft.KeyVault.
1429type KeyVaultProperties struct {
1430	// KeyIdentifier - Full path to the versioned secret. Example https://mykeyvault.vault.azure.net/keys/testkey/6e34a81fef704045975661e297a4c053. To be usable the following prerequisites must be met:
1431	//  The Batch Account has a System Assigned identity
1432	//  The account identity has been granted Key/Get, Key/Unwrap and Key/Wrap permissions
1433	//  The KeyVault has soft-delete and purge protection enabled
1434	KeyIdentifier *string `json:"keyIdentifier,omitempty"`
1435}
1436
1437// KeyVaultReference identifies the Azure key vault associated with a Batch account.
1438type KeyVaultReference struct {
1439	// ID - The resource ID of the Azure key vault associated with the Batch account.
1440	ID *string `json:"id,omitempty"`
1441	// URL - The URL of the Azure key vault associated with the Batch account.
1442	URL *string `json:"url,omitempty"`
1443}
1444
1445// LinuxUserConfiguration ...
1446type LinuxUserConfiguration struct {
1447	// UID - The uid and gid properties must be specified together or not at all. If not specified the underlying operating system picks the uid.
1448	UID *int32 `json:"uid,omitempty"`
1449	// Gid - The uid and gid properties must be specified together or not at all. If not specified the underlying operating system picks the gid.
1450	Gid *int32 `json:"gid,omitempty"`
1451	// SSHPrivateKey - The private key must not be password protected. The private key is used to automatically configure asymmetric-key based authentication for SSH between nodes in a Linux pool when the pool's enableInterNodeCommunication property is true (it is ignored if enableInterNodeCommunication is false). It does this by placing the key pair into the user's .ssh directory. If not specified, password-less SSH is not configured between nodes (no modification of the user's .ssh directory is done).
1452	SSHPrivateKey *string `json:"sshPrivateKey,omitempty"`
1453}
1454
1455// ListApplicationPackagesResult the result of performing list application packages.
1456type ListApplicationPackagesResult struct {
1457	autorest.Response `json:"-"`
1458	// Value - The list of application packages.
1459	Value *[]ApplicationPackage `json:"value,omitempty"`
1460	// NextLink - The URL to get the next set of results.
1461	NextLink *string `json:"nextLink,omitempty"`
1462}
1463
1464// ListApplicationPackagesResultIterator provides access to a complete listing of ApplicationPackage
1465// values.
1466type ListApplicationPackagesResultIterator struct {
1467	i    int
1468	page ListApplicationPackagesResultPage
1469}
1470
1471// NextWithContext advances to the next value.  If there was an error making
1472// the request the iterator does not advance and the error is returned.
1473func (iter *ListApplicationPackagesResultIterator) NextWithContext(ctx context.Context) (err error) {
1474	if tracing.IsEnabled() {
1475		ctx = tracing.StartSpan(ctx, fqdn+"/ListApplicationPackagesResultIterator.NextWithContext")
1476		defer func() {
1477			sc := -1
1478			if iter.Response().Response.Response != nil {
1479				sc = iter.Response().Response.Response.StatusCode
1480			}
1481			tracing.EndSpan(ctx, sc, err)
1482		}()
1483	}
1484	iter.i++
1485	if iter.i < len(iter.page.Values()) {
1486		return nil
1487	}
1488	err = iter.page.NextWithContext(ctx)
1489	if err != nil {
1490		iter.i--
1491		return err
1492	}
1493	iter.i = 0
1494	return nil
1495}
1496
1497// Next advances to the next value.  If there was an error making
1498// the request the iterator does not advance and the error is returned.
1499// Deprecated: Use NextWithContext() instead.
1500func (iter *ListApplicationPackagesResultIterator) Next() error {
1501	return iter.NextWithContext(context.Background())
1502}
1503
1504// NotDone returns true if the enumeration should be started or is not yet complete.
1505func (iter ListApplicationPackagesResultIterator) NotDone() bool {
1506	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1507}
1508
1509// Response returns the raw server response from the last page request.
1510func (iter ListApplicationPackagesResultIterator) Response() ListApplicationPackagesResult {
1511	return iter.page.Response()
1512}
1513
1514// Value returns the current value or a zero-initialized value if the
1515// iterator has advanced beyond the end of the collection.
1516func (iter ListApplicationPackagesResultIterator) Value() ApplicationPackage {
1517	if !iter.page.NotDone() {
1518		return ApplicationPackage{}
1519	}
1520	return iter.page.Values()[iter.i]
1521}
1522
1523// Creates a new instance of the ListApplicationPackagesResultIterator type.
1524func NewListApplicationPackagesResultIterator(page ListApplicationPackagesResultPage) ListApplicationPackagesResultIterator {
1525	return ListApplicationPackagesResultIterator{page: page}
1526}
1527
1528// IsEmpty returns true if the ListResult contains no values.
1529func (lapr ListApplicationPackagesResult) IsEmpty() bool {
1530	return lapr.Value == nil || len(*lapr.Value) == 0
1531}
1532
1533// hasNextLink returns true if the NextLink is not empty.
1534func (lapr ListApplicationPackagesResult) hasNextLink() bool {
1535	return lapr.NextLink != nil && len(*lapr.NextLink) != 0
1536}
1537
1538// listApplicationPackagesResultPreparer prepares a request to retrieve the next set of results.
1539// It returns nil if no more results exist.
1540func (lapr ListApplicationPackagesResult) listApplicationPackagesResultPreparer(ctx context.Context) (*http.Request, error) {
1541	if !lapr.hasNextLink() {
1542		return nil, nil
1543	}
1544	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1545		autorest.AsJSON(),
1546		autorest.AsGet(),
1547		autorest.WithBaseURL(to.String(lapr.NextLink)))
1548}
1549
1550// ListApplicationPackagesResultPage contains a page of ApplicationPackage values.
1551type ListApplicationPackagesResultPage struct {
1552	fn   func(context.Context, ListApplicationPackagesResult) (ListApplicationPackagesResult, error)
1553	lapr ListApplicationPackagesResult
1554}
1555
1556// NextWithContext advances to the next page of values.  If there was an error making
1557// the request the page does not advance and the error is returned.
1558func (page *ListApplicationPackagesResultPage) NextWithContext(ctx context.Context) (err error) {
1559	if tracing.IsEnabled() {
1560		ctx = tracing.StartSpan(ctx, fqdn+"/ListApplicationPackagesResultPage.NextWithContext")
1561		defer func() {
1562			sc := -1
1563			if page.Response().Response.Response != nil {
1564				sc = page.Response().Response.Response.StatusCode
1565			}
1566			tracing.EndSpan(ctx, sc, err)
1567		}()
1568	}
1569	for {
1570		next, err := page.fn(ctx, page.lapr)
1571		if err != nil {
1572			return err
1573		}
1574		page.lapr = next
1575		if !next.hasNextLink() || !next.IsEmpty() {
1576			break
1577		}
1578	}
1579	return nil
1580}
1581
1582// Next advances to the next page of values.  If there was an error making
1583// the request the page does not advance and the error is returned.
1584// Deprecated: Use NextWithContext() instead.
1585func (page *ListApplicationPackagesResultPage) Next() error {
1586	return page.NextWithContext(context.Background())
1587}
1588
1589// NotDone returns true if the page enumeration should be started or is not yet complete.
1590func (page ListApplicationPackagesResultPage) NotDone() bool {
1591	return !page.lapr.IsEmpty()
1592}
1593
1594// Response returns the raw server response from the last page request.
1595func (page ListApplicationPackagesResultPage) Response() ListApplicationPackagesResult {
1596	return page.lapr
1597}
1598
1599// Values returns the slice of values for the current page or nil if there are no values.
1600func (page ListApplicationPackagesResultPage) Values() []ApplicationPackage {
1601	if page.lapr.IsEmpty() {
1602		return nil
1603	}
1604	return *page.lapr.Value
1605}
1606
1607// Creates a new instance of the ListApplicationPackagesResultPage type.
1608func NewListApplicationPackagesResultPage(cur ListApplicationPackagesResult, getNextPage func(context.Context, ListApplicationPackagesResult) (ListApplicationPackagesResult, error)) ListApplicationPackagesResultPage {
1609	return ListApplicationPackagesResultPage{
1610		fn:   getNextPage,
1611		lapr: cur,
1612	}
1613}
1614
1615// ListApplicationsResult the result of performing list applications.
1616type ListApplicationsResult struct {
1617	autorest.Response `json:"-"`
1618	// Value - The list of applications.
1619	Value *[]Application `json:"value,omitempty"`
1620	// NextLink - The URL to get the next set of results.
1621	NextLink *string `json:"nextLink,omitempty"`
1622}
1623
1624// ListApplicationsResultIterator provides access to a complete listing of Application values.
1625type ListApplicationsResultIterator struct {
1626	i    int
1627	page ListApplicationsResultPage
1628}
1629
1630// NextWithContext advances to the next value.  If there was an error making
1631// the request the iterator does not advance and the error is returned.
1632func (iter *ListApplicationsResultIterator) NextWithContext(ctx context.Context) (err error) {
1633	if tracing.IsEnabled() {
1634		ctx = tracing.StartSpan(ctx, fqdn+"/ListApplicationsResultIterator.NextWithContext")
1635		defer func() {
1636			sc := -1
1637			if iter.Response().Response.Response != nil {
1638				sc = iter.Response().Response.Response.StatusCode
1639			}
1640			tracing.EndSpan(ctx, sc, err)
1641		}()
1642	}
1643	iter.i++
1644	if iter.i < len(iter.page.Values()) {
1645		return nil
1646	}
1647	err = iter.page.NextWithContext(ctx)
1648	if err != nil {
1649		iter.i--
1650		return err
1651	}
1652	iter.i = 0
1653	return nil
1654}
1655
1656// Next advances to the next value.  If there was an error making
1657// the request the iterator does not advance and the error is returned.
1658// Deprecated: Use NextWithContext() instead.
1659func (iter *ListApplicationsResultIterator) Next() error {
1660	return iter.NextWithContext(context.Background())
1661}
1662
1663// NotDone returns true if the enumeration should be started or is not yet complete.
1664func (iter ListApplicationsResultIterator) NotDone() bool {
1665	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1666}
1667
1668// Response returns the raw server response from the last page request.
1669func (iter ListApplicationsResultIterator) Response() ListApplicationsResult {
1670	return iter.page.Response()
1671}
1672
1673// Value returns the current value or a zero-initialized value if the
1674// iterator has advanced beyond the end of the collection.
1675func (iter ListApplicationsResultIterator) Value() Application {
1676	if !iter.page.NotDone() {
1677		return Application{}
1678	}
1679	return iter.page.Values()[iter.i]
1680}
1681
1682// Creates a new instance of the ListApplicationsResultIterator type.
1683func NewListApplicationsResultIterator(page ListApplicationsResultPage) ListApplicationsResultIterator {
1684	return ListApplicationsResultIterator{page: page}
1685}
1686
1687// IsEmpty returns true if the ListResult contains no values.
1688func (lar ListApplicationsResult) IsEmpty() bool {
1689	return lar.Value == nil || len(*lar.Value) == 0
1690}
1691
1692// hasNextLink returns true if the NextLink is not empty.
1693func (lar ListApplicationsResult) hasNextLink() bool {
1694	return lar.NextLink != nil && len(*lar.NextLink) != 0
1695}
1696
1697// listApplicationsResultPreparer prepares a request to retrieve the next set of results.
1698// It returns nil if no more results exist.
1699func (lar ListApplicationsResult) listApplicationsResultPreparer(ctx context.Context) (*http.Request, error) {
1700	if !lar.hasNextLink() {
1701		return nil, nil
1702	}
1703	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1704		autorest.AsJSON(),
1705		autorest.AsGet(),
1706		autorest.WithBaseURL(to.String(lar.NextLink)))
1707}
1708
1709// ListApplicationsResultPage contains a page of Application values.
1710type ListApplicationsResultPage struct {
1711	fn  func(context.Context, ListApplicationsResult) (ListApplicationsResult, error)
1712	lar ListApplicationsResult
1713}
1714
1715// NextWithContext advances to the next page of values.  If there was an error making
1716// the request the page does not advance and the error is returned.
1717func (page *ListApplicationsResultPage) NextWithContext(ctx context.Context) (err error) {
1718	if tracing.IsEnabled() {
1719		ctx = tracing.StartSpan(ctx, fqdn+"/ListApplicationsResultPage.NextWithContext")
1720		defer func() {
1721			sc := -1
1722			if page.Response().Response.Response != nil {
1723				sc = page.Response().Response.Response.StatusCode
1724			}
1725			tracing.EndSpan(ctx, sc, err)
1726		}()
1727	}
1728	for {
1729		next, err := page.fn(ctx, page.lar)
1730		if err != nil {
1731			return err
1732		}
1733		page.lar = next
1734		if !next.hasNextLink() || !next.IsEmpty() {
1735			break
1736		}
1737	}
1738	return nil
1739}
1740
1741// Next advances to the next page of values.  If there was an error making
1742// the request the page does not advance and the error is returned.
1743// Deprecated: Use NextWithContext() instead.
1744func (page *ListApplicationsResultPage) Next() error {
1745	return page.NextWithContext(context.Background())
1746}
1747
1748// NotDone returns true if the page enumeration should be started or is not yet complete.
1749func (page ListApplicationsResultPage) NotDone() bool {
1750	return !page.lar.IsEmpty()
1751}
1752
1753// Response returns the raw server response from the last page request.
1754func (page ListApplicationsResultPage) Response() ListApplicationsResult {
1755	return page.lar
1756}
1757
1758// Values returns the slice of values for the current page or nil if there are no values.
1759func (page ListApplicationsResultPage) Values() []Application {
1760	if page.lar.IsEmpty() {
1761		return nil
1762	}
1763	return *page.lar.Value
1764}
1765
1766// Creates a new instance of the ListApplicationsResultPage type.
1767func NewListApplicationsResultPage(cur ListApplicationsResult, getNextPage func(context.Context, ListApplicationsResult) (ListApplicationsResult, error)) ListApplicationsResultPage {
1768	return ListApplicationsResultPage{
1769		fn:  getNextPage,
1770		lar: cur,
1771	}
1772}
1773
1774// ListCertificatesResult values returned by the List operation.
1775type ListCertificatesResult struct {
1776	autorest.Response `json:"-"`
1777	// Value - The collection of returned certificates.
1778	Value *[]Certificate `json:"value,omitempty"`
1779	// NextLink - The continuation token.
1780	NextLink *string `json:"nextLink,omitempty"`
1781}
1782
1783// ListCertificatesResultIterator provides access to a complete listing of Certificate values.
1784type ListCertificatesResultIterator struct {
1785	i    int
1786	page ListCertificatesResultPage
1787}
1788
1789// NextWithContext advances to the next value.  If there was an error making
1790// the request the iterator does not advance and the error is returned.
1791func (iter *ListCertificatesResultIterator) NextWithContext(ctx context.Context) (err error) {
1792	if tracing.IsEnabled() {
1793		ctx = tracing.StartSpan(ctx, fqdn+"/ListCertificatesResultIterator.NextWithContext")
1794		defer func() {
1795			sc := -1
1796			if iter.Response().Response.Response != nil {
1797				sc = iter.Response().Response.Response.StatusCode
1798			}
1799			tracing.EndSpan(ctx, sc, err)
1800		}()
1801	}
1802	iter.i++
1803	if iter.i < len(iter.page.Values()) {
1804		return nil
1805	}
1806	err = iter.page.NextWithContext(ctx)
1807	if err != nil {
1808		iter.i--
1809		return err
1810	}
1811	iter.i = 0
1812	return nil
1813}
1814
1815// Next advances to the next value.  If there was an error making
1816// the request the iterator does not advance and the error is returned.
1817// Deprecated: Use NextWithContext() instead.
1818func (iter *ListCertificatesResultIterator) Next() error {
1819	return iter.NextWithContext(context.Background())
1820}
1821
1822// NotDone returns true if the enumeration should be started or is not yet complete.
1823func (iter ListCertificatesResultIterator) NotDone() bool {
1824	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1825}
1826
1827// Response returns the raw server response from the last page request.
1828func (iter ListCertificatesResultIterator) Response() ListCertificatesResult {
1829	return iter.page.Response()
1830}
1831
1832// Value returns the current value or a zero-initialized value if the
1833// iterator has advanced beyond the end of the collection.
1834func (iter ListCertificatesResultIterator) Value() Certificate {
1835	if !iter.page.NotDone() {
1836		return Certificate{}
1837	}
1838	return iter.page.Values()[iter.i]
1839}
1840
1841// Creates a new instance of the ListCertificatesResultIterator type.
1842func NewListCertificatesResultIterator(page ListCertificatesResultPage) ListCertificatesResultIterator {
1843	return ListCertificatesResultIterator{page: page}
1844}
1845
1846// IsEmpty returns true if the ListResult contains no values.
1847func (lcr ListCertificatesResult) IsEmpty() bool {
1848	return lcr.Value == nil || len(*lcr.Value) == 0
1849}
1850
1851// hasNextLink returns true if the NextLink is not empty.
1852func (lcr ListCertificatesResult) hasNextLink() bool {
1853	return lcr.NextLink != nil && len(*lcr.NextLink) != 0
1854}
1855
1856// listCertificatesResultPreparer prepares a request to retrieve the next set of results.
1857// It returns nil if no more results exist.
1858func (lcr ListCertificatesResult) listCertificatesResultPreparer(ctx context.Context) (*http.Request, error) {
1859	if !lcr.hasNextLink() {
1860		return nil, nil
1861	}
1862	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1863		autorest.AsJSON(),
1864		autorest.AsGet(),
1865		autorest.WithBaseURL(to.String(lcr.NextLink)))
1866}
1867
1868// ListCertificatesResultPage contains a page of Certificate values.
1869type ListCertificatesResultPage struct {
1870	fn  func(context.Context, ListCertificatesResult) (ListCertificatesResult, error)
1871	lcr ListCertificatesResult
1872}
1873
1874// NextWithContext advances to the next page of values.  If there was an error making
1875// the request the page does not advance and the error is returned.
1876func (page *ListCertificatesResultPage) NextWithContext(ctx context.Context) (err error) {
1877	if tracing.IsEnabled() {
1878		ctx = tracing.StartSpan(ctx, fqdn+"/ListCertificatesResultPage.NextWithContext")
1879		defer func() {
1880			sc := -1
1881			if page.Response().Response.Response != nil {
1882				sc = page.Response().Response.Response.StatusCode
1883			}
1884			tracing.EndSpan(ctx, sc, err)
1885		}()
1886	}
1887	for {
1888		next, err := page.fn(ctx, page.lcr)
1889		if err != nil {
1890			return err
1891		}
1892		page.lcr = next
1893		if !next.hasNextLink() || !next.IsEmpty() {
1894			break
1895		}
1896	}
1897	return nil
1898}
1899
1900// Next advances to the next page of values.  If there was an error making
1901// the request the page does not advance and the error is returned.
1902// Deprecated: Use NextWithContext() instead.
1903func (page *ListCertificatesResultPage) Next() error {
1904	return page.NextWithContext(context.Background())
1905}
1906
1907// NotDone returns true if the page enumeration should be started or is not yet complete.
1908func (page ListCertificatesResultPage) NotDone() bool {
1909	return !page.lcr.IsEmpty()
1910}
1911
1912// Response returns the raw server response from the last page request.
1913func (page ListCertificatesResultPage) Response() ListCertificatesResult {
1914	return page.lcr
1915}
1916
1917// Values returns the slice of values for the current page or nil if there are no values.
1918func (page ListCertificatesResultPage) Values() []Certificate {
1919	if page.lcr.IsEmpty() {
1920		return nil
1921	}
1922	return *page.lcr.Value
1923}
1924
1925// Creates a new instance of the ListCertificatesResultPage type.
1926func NewListCertificatesResultPage(cur ListCertificatesResult, getNextPage func(context.Context, ListCertificatesResult) (ListCertificatesResult, error)) ListCertificatesResultPage {
1927	return ListCertificatesResultPage{
1928		fn:  getNextPage,
1929		lcr: cur,
1930	}
1931}
1932
1933// ListPoolsResult values returned by the List operation.
1934type ListPoolsResult struct {
1935	autorest.Response `json:"-"`
1936	// Value - The collection of returned pools.
1937	Value *[]Pool `json:"value,omitempty"`
1938	// NextLink - The continuation token.
1939	NextLink *string `json:"nextLink,omitempty"`
1940}
1941
1942// ListPoolsResultIterator provides access to a complete listing of Pool values.
1943type ListPoolsResultIterator struct {
1944	i    int
1945	page ListPoolsResultPage
1946}
1947
1948// NextWithContext advances to the next value.  If there was an error making
1949// the request the iterator does not advance and the error is returned.
1950func (iter *ListPoolsResultIterator) NextWithContext(ctx context.Context) (err error) {
1951	if tracing.IsEnabled() {
1952		ctx = tracing.StartSpan(ctx, fqdn+"/ListPoolsResultIterator.NextWithContext")
1953		defer func() {
1954			sc := -1
1955			if iter.Response().Response.Response != nil {
1956				sc = iter.Response().Response.Response.StatusCode
1957			}
1958			tracing.EndSpan(ctx, sc, err)
1959		}()
1960	}
1961	iter.i++
1962	if iter.i < len(iter.page.Values()) {
1963		return nil
1964	}
1965	err = iter.page.NextWithContext(ctx)
1966	if err != nil {
1967		iter.i--
1968		return err
1969	}
1970	iter.i = 0
1971	return nil
1972}
1973
1974// Next advances to the next value.  If there was an error making
1975// the request the iterator does not advance and the error is returned.
1976// Deprecated: Use NextWithContext() instead.
1977func (iter *ListPoolsResultIterator) Next() error {
1978	return iter.NextWithContext(context.Background())
1979}
1980
1981// NotDone returns true if the enumeration should be started or is not yet complete.
1982func (iter ListPoolsResultIterator) NotDone() bool {
1983	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1984}
1985
1986// Response returns the raw server response from the last page request.
1987func (iter ListPoolsResultIterator) Response() ListPoolsResult {
1988	return iter.page.Response()
1989}
1990
1991// Value returns the current value or a zero-initialized value if the
1992// iterator has advanced beyond the end of the collection.
1993func (iter ListPoolsResultIterator) Value() Pool {
1994	if !iter.page.NotDone() {
1995		return Pool{}
1996	}
1997	return iter.page.Values()[iter.i]
1998}
1999
2000// Creates a new instance of the ListPoolsResultIterator type.
2001func NewListPoolsResultIterator(page ListPoolsResultPage) ListPoolsResultIterator {
2002	return ListPoolsResultIterator{page: page}
2003}
2004
2005// IsEmpty returns true if the ListResult contains no values.
2006func (lpr ListPoolsResult) IsEmpty() bool {
2007	return lpr.Value == nil || len(*lpr.Value) == 0
2008}
2009
2010// hasNextLink returns true if the NextLink is not empty.
2011func (lpr ListPoolsResult) hasNextLink() bool {
2012	return lpr.NextLink != nil && len(*lpr.NextLink) != 0
2013}
2014
2015// listPoolsResultPreparer prepares a request to retrieve the next set of results.
2016// It returns nil if no more results exist.
2017func (lpr ListPoolsResult) listPoolsResultPreparer(ctx context.Context) (*http.Request, error) {
2018	if !lpr.hasNextLink() {
2019		return nil, nil
2020	}
2021	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2022		autorest.AsJSON(),
2023		autorest.AsGet(),
2024		autorest.WithBaseURL(to.String(lpr.NextLink)))
2025}
2026
2027// ListPoolsResultPage contains a page of Pool values.
2028type ListPoolsResultPage struct {
2029	fn  func(context.Context, ListPoolsResult) (ListPoolsResult, error)
2030	lpr ListPoolsResult
2031}
2032
2033// NextWithContext advances to the next page of values.  If there was an error making
2034// the request the page does not advance and the error is returned.
2035func (page *ListPoolsResultPage) NextWithContext(ctx context.Context) (err error) {
2036	if tracing.IsEnabled() {
2037		ctx = tracing.StartSpan(ctx, fqdn+"/ListPoolsResultPage.NextWithContext")
2038		defer func() {
2039			sc := -1
2040			if page.Response().Response.Response != nil {
2041				sc = page.Response().Response.Response.StatusCode
2042			}
2043			tracing.EndSpan(ctx, sc, err)
2044		}()
2045	}
2046	for {
2047		next, err := page.fn(ctx, page.lpr)
2048		if err != nil {
2049			return err
2050		}
2051		page.lpr = next
2052		if !next.hasNextLink() || !next.IsEmpty() {
2053			break
2054		}
2055	}
2056	return nil
2057}
2058
2059// Next advances to the next page of values.  If there was an error making
2060// the request the page does not advance and the error is returned.
2061// Deprecated: Use NextWithContext() instead.
2062func (page *ListPoolsResultPage) Next() error {
2063	return page.NextWithContext(context.Background())
2064}
2065
2066// NotDone returns true if the page enumeration should be started or is not yet complete.
2067func (page ListPoolsResultPage) NotDone() bool {
2068	return !page.lpr.IsEmpty()
2069}
2070
2071// Response returns the raw server response from the last page request.
2072func (page ListPoolsResultPage) Response() ListPoolsResult {
2073	return page.lpr
2074}
2075
2076// Values returns the slice of values for the current page or nil if there are no values.
2077func (page ListPoolsResultPage) Values() []Pool {
2078	if page.lpr.IsEmpty() {
2079		return nil
2080	}
2081	return *page.lpr.Value
2082}
2083
2084// Creates a new instance of the ListPoolsResultPage type.
2085func NewListPoolsResultPage(cur ListPoolsResult, getNextPage func(context.Context, ListPoolsResult) (ListPoolsResult, error)) ListPoolsResultPage {
2086	return ListPoolsResultPage{
2087		fn:  getNextPage,
2088		lpr: cur,
2089	}
2090}
2091
2092// ListPrivateEndpointConnectionsResult values returned by the List operation.
2093type ListPrivateEndpointConnectionsResult struct {
2094	autorest.Response `json:"-"`
2095	// Value - The collection of returned private endpoint connection.
2096	Value *[]PrivateEndpointConnection `json:"value,omitempty"`
2097	// NextLink - The continuation token.
2098	NextLink *string `json:"nextLink,omitempty"`
2099}
2100
2101// ListPrivateEndpointConnectionsResultIterator provides access to a complete listing of
2102// PrivateEndpointConnection values.
2103type ListPrivateEndpointConnectionsResultIterator struct {
2104	i    int
2105	page ListPrivateEndpointConnectionsResultPage
2106}
2107
2108// NextWithContext advances to the next value.  If there was an error making
2109// the request the iterator does not advance and the error is returned.
2110func (iter *ListPrivateEndpointConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
2111	if tracing.IsEnabled() {
2112		ctx = tracing.StartSpan(ctx, fqdn+"/ListPrivateEndpointConnectionsResultIterator.NextWithContext")
2113		defer func() {
2114			sc := -1
2115			if iter.Response().Response.Response != nil {
2116				sc = iter.Response().Response.Response.StatusCode
2117			}
2118			tracing.EndSpan(ctx, sc, err)
2119		}()
2120	}
2121	iter.i++
2122	if iter.i < len(iter.page.Values()) {
2123		return nil
2124	}
2125	err = iter.page.NextWithContext(ctx)
2126	if err != nil {
2127		iter.i--
2128		return err
2129	}
2130	iter.i = 0
2131	return nil
2132}
2133
2134// Next advances to the next value.  If there was an error making
2135// the request the iterator does not advance and the error is returned.
2136// Deprecated: Use NextWithContext() instead.
2137func (iter *ListPrivateEndpointConnectionsResultIterator) Next() error {
2138	return iter.NextWithContext(context.Background())
2139}
2140
2141// NotDone returns true if the enumeration should be started or is not yet complete.
2142func (iter ListPrivateEndpointConnectionsResultIterator) NotDone() bool {
2143	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2144}
2145
2146// Response returns the raw server response from the last page request.
2147func (iter ListPrivateEndpointConnectionsResultIterator) Response() ListPrivateEndpointConnectionsResult {
2148	return iter.page.Response()
2149}
2150
2151// Value returns the current value or a zero-initialized value if the
2152// iterator has advanced beyond the end of the collection.
2153func (iter ListPrivateEndpointConnectionsResultIterator) Value() PrivateEndpointConnection {
2154	if !iter.page.NotDone() {
2155		return PrivateEndpointConnection{}
2156	}
2157	return iter.page.Values()[iter.i]
2158}
2159
2160// Creates a new instance of the ListPrivateEndpointConnectionsResultIterator type.
2161func NewListPrivateEndpointConnectionsResultIterator(page ListPrivateEndpointConnectionsResultPage) ListPrivateEndpointConnectionsResultIterator {
2162	return ListPrivateEndpointConnectionsResultIterator{page: page}
2163}
2164
2165// IsEmpty returns true if the ListResult contains no values.
2166func (lpecr ListPrivateEndpointConnectionsResult) IsEmpty() bool {
2167	return lpecr.Value == nil || len(*lpecr.Value) == 0
2168}
2169
2170// hasNextLink returns true if the NextLink is not empty.
2171func (lpecr ListPrivateEndpointConnectionsResult) hasNextLink() bool {
2172	return lpecr.NextLink != nil && len(*lpecr.NextLink) != 0
2173}
2174
2175// listPrivateEndpointConnectionsResultPreparer prepares a request to retrieve the next set of results.
2176// It returns nil if no more results exist.
2177func (lpecr ListPrivateEndpointConnectionsResult) listPrivateEndpointConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
2178	if !lpecr.hasNextLink() {
2179		return nil, nil
2180	}
2181	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2182		autorest.AsJSON(),
2183		autorest.AsGet(),
2184		autorest.WithBaseURL(to.String(lpecr.NextLink)))
2185}
2186
2187// ListPrivateEndpointConnectionsResultPage contains a page of PrivateEndpointConnection values.
2188type ListPrivateEndpointConnectionsResultPage struct {
2189	fn    func(context.Context, ListPrivateEndpointConnectionsResult) (ListPrivateEndpointConnectionsResult, error)
2190	lpecr ListPrivateEndpointConnectionsResult
2191}
2192
2193// NextWithContext advances to the next page of values.  If there was an error making
2194// the request the page does not advance and the error is returned.
2195func (page *ListPrivateEndpointConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
2196	if tracing.IsEnabled() {
2197		ctx = tracing.StartSpan(ctx, fqdn+"/ListPrivateEndpointConnectionsResultPage.NextWithContext")
2198		defer func() {
2199			sc := -1
2200			if page.Response().Response.Response != nil {
2201				sc = page.Response().Response.Response.StatusCode
2202			}
2203			tracing.EndSpan(ctx, sc, err)
2204		}()
2205	}
2206	for {
2207		next, err := page.fn(ctx, page.lpecr)
2208		if err != nil {
2209			return err
2210		}
2211		page.lpecr = next
2212		if !next.hasNextLink() || !next.IsEmpty() {
2213			break
2214		}
2215	}
2216	return nil
2217}
2218
2219// Next advances to the next page of values.  If there was an error making
2220// the request the page does not advance and the error is returned.
2221// Deprecated: Use NextWithContext() instead.
2222func (page *ListPrivateEndpointConnectionsResultPage) Next() error {
2223	return page.NextWithContext(context.Background())
2224}
2225
2226// NotDone returns true if the page enumeration should be started or is not yet complete.
2227func (page ListPrivateEndpointConnectionsResultPage) NotDone() bool {
2228	return !page.lpecr.IsEmpty()
2229}
2230
2231// Response returns the raw server response from the last page request.
2232func (page ListPrivateEndpointConnectionsResultPage) Response() ListPrivateEndpointConnectionsResult {
2233	return page.lpecr
2234}
2235
2236// Values returns the slice of values for the current page or nil if there are no values.
2237func (page ListPrivateEndpointConnectionsResultPage) Values() []PrivateEndpointConnection {
2238	if page.lpecr.IsEmpty() {
2239		return nil
2240	}
2241	return *page.lpecr.Value
2242}
2243
2244// Creates a new instance of the ListPrivateEndpointConnectionsResultPage type.
2245func NewListPrivateEndpointConnectionsResultPage(cur ListPrivateEndpointConnectionsResult, getNextPage func(context.Context, ListPrivateEndpointConnectionsResult) (ListPrivateEndpointConnectionsResult, error)) ListPrivateEndpointConnectionsResultPage {
2246	return ListPrivateEndpointConnectionsResultPage{
2247		fn:    getNextPage,
2248		lpecr: cur,
2249	}
2250}
2251
2252// ListPrivateLinkResourcesResult values returned by the List operation.
2253type ListPrivateLinkResourcesResult struct {
2254	autorest.Response `json:"-"`
2255	// Value - The collection of returned private link resources.
2256	Value *[]PrivateLinkResource `json:"value,omitempty"`
2257	// NextLink - The continuation token.
2258	NextLink *string `json:"nextLink,omitempty"`
2259}
2260
2261// ListPrivateLinkResourcesResultIterator provides access to a complete listing of PrivateLinkResource
2262// values.
2263type ListPrivateLinkResourcesResultIterator struct {
2264	i    int
2265	page ListPrivateLinkResourcesResultPage
2266}
2267
2268// NextWithContext advances to the next value.  If there was an error making
2269// the request the iterator does not advance and the error is returned.
2270func (iter *ListPrivateLinkResourcesResultIterator) NextWithContext(ctx context.Context) (err error) {
2271	if tracing.IsEnabled() {
2272		ctx = tracing.StartSpan(ctx, fqdn+"/ListPrivateLinkResourcesResultIterator.NextWithContext")
2273		defer func() {
2274			sc := -1
2275			if iter.Response().Response.Response != nil {
2276				sc = iter.Response().Response.Response.StatusCode
2277			}
2278			tracing.EndSpan(ctx, sc, err)
2279		}()
2280	}
2281	iter.i++
2282	if iter.i < len(iter.page.Values()) {
2283		return nil
2284	}
2285	err = iter.page.NextWithContext(ctx)
2286	if err != nil {
2287		iter.i--
2288		return err
2289	}
2290	iter.i = 0
2291	return nil
2292}
2293
2294// Next advances to the next value.  If there was an error making
2295// the request the iterator does not advance and the error is returned.
2296// Deprecated: Use NextWithContext() instead.
2297func (iter *ListPrivateLinkResourcesResultIterator) Next() error {
2298	return iter.NextWithContext(context.Background())
2299}
2300
2301// NotDone returns true if the enumeration should be started or is not yet complete.
2302func (iter ListPrivateLinkResourcesResultIterator) NotDone() bool {
2303	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2304}
2305
2306// Response returns the raw server response from the last page request.
2307func (iter ListPrivateLinkResourcesResultIterator) Response() ListPrivateLinkResourcesResult {
2308	return iter.page.Response()
2309}
2310
2311// Value returns the current value or a zero-initialized value if the
2312// iterator has advanced beyond the end of the collection.
2313func (iter ListPrivateLinkResourcesResultIterator) Value() PrivateLinkResource {
2314	if !iter.page.NotDone() {
2315		return PrivateLinkResource{}
2316	}
2317	return iter.page.Values()[iter.i]
2318}
2319
2320// Creates a new instance of the ListPrivateLinkResourcesResultIterator type.
2321func NewListPrivateLinkResourcesResultIterator(page ListPrivateLinkResourcesResultPage) ListPrivateLinkResourcesResultIterator {
2322	return ListPrivateLinkResourcesResultIterator{page: page}
2323}
2324
2325// IsEmpty returns true if the ListResult contains no values.
2326func (lplrr ListPrivateLinkResourcesResult) IsEmpty() bool {
2327	return lplrr.Value == nil || len(*lplrr.Value) == 0
2328}
2329
2330// hasNextLink returns true if the NextLink is not empty.
2331func (lplrr ListPrivateLinkResourcesResult) hasNextLink() bool {
2332	return lplrr.NextLink != nil && len(*lplrr.NextLink) != 0
2333}
2334
2335// listPrivateLinkResourcesResultPreparer prepares a request to retrieve the next set of results.
2336// It returns nil if no more results exist.
2337func (lplrr ListPrivateLinkResourcesResult) listPrivateLinkResourcesResultPreparer(ctx context.Context) (*http.Request, error) {
2338	if !lplrr.hasNextLink() {
2339		return nil, nil
2340	}
2341	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2342		autorest.AsJSON(),
2343		autorest.AsGet(),
2344		autorest.WithBaseURL(to.String(lplrr.NextLink)))
2345}
2346
2347// ListPrivateLinkResourcesResultPage contains a page of PrivateLinkResource values.
2348type ListPrivateLinkResourcesResultPage struct {
2349	fn    func(context.Context, ListPrivateLinkResourcesResult) (ListPrivateLinkResourcesResult, error)
2350	lplrr ListPrivateLinkResourcesResult
2351}
2352
2353// NextWithContext advances to the next page of values.  If there was an error making
2354// the request the page does not advance and the error is returned.
2355func (page *ListPrivateLinkResourcesResultPage) NextWithContext(ctx context.Context) (err error) {
2356	if tracing.IsEnabled() {
2357		ctx = tracing.StartSpan(ctx, fqdn+"/ListPrivateLinkResourcesResultPage.NextWithContext")
2358		defer func() {
2359			sc := -1
2360			if page.Response().Response.Response != nil {
2361				sc = page.Response().Response.Response.StatusCode
2362			}
2363			tracing.EndSpan(ctx, sc, err)
2364		}()
2365	}
2366	for {
2367		next, err := page.fn(ctx, page.lplrr)
2368		if err != nil {
2369			return err
2370		}
2371		page.lplrr = next
2372		if !next.hasNextLink() || !next.IsEmpty() {
2373			break
2374		}
2375	}
2376	return nil
2377}
2378
2379// Next advances to the next page of values.  If there was an error making
2380// the request the page does not advance and the error is returned.
2381// Deprecated: Use NextWithContext() instead.
2382func (page *ListPrivateLinkResourcesResultPage) Next() error {
2383	return page.NextWithContext(context.Background())
2384}
2385
2386// NotDone returns true if the page enumeration should be started or is not yet complete.
2387func (page ListPrivateLinkResourcesResultPage) NotDone() bool {
2388	return !page.lplrr.IsEmpty()
2389}
2390
2391// Response returns the raw server response from the last page request.
2392func (page ListPrivateLinkResourcesResultPage) Response() ListPrivateLinkResourcesResult {
2393	return page.lplrr
2394}
2395
2396// Values returns the slice of values for the current page or nil if there are no values.
2397func (page ListPrivateLinkResourcesResultPage) Values() []PrivateLinkResource {
2398	if page.lplrr.IsEmpty() {
2399		return nil
2400	}
2401	return *page.lplrr.Value
2402}
2403
2404// Creates a new instance of the ListPrivateLinkResourcesResultPage type.
2405func NewListPrivateLinkResourcesResultPage(cur ListPrivateLinkResourcesResult, getNextPage func(context.Context, ListPrivateLinkResourcesResult) (ListPrivateLinkResourcesResult, error)) ListPrivateLinkResourcesResultPage {
2406	return ListPrivateLinkResourcesResultPage{
2407		fn:    getNextPage,
2408		lplrr: cur,
2409	}
2410}
2411
2412// LocationQuota quotas associated with a Batch region for a particular subscription.
2413type LocationQuota struct {
2414	autorest.Response `json:"-"`
2415	// AccountQuota - READ-ONLY; The number of Batch accounts that may be created under the subscription in the specified region.
2416	AccountQuota *int32 `json:"accountQuota,omitempty"`
2417}
2418
2419// MarshalJSON is the custom marshaler for LocationQuota.
2420func (lq LocationQuota) MarshalJSON() ([]byte, error) {
2421	objectMap := make(map[string]interface{})
2422	return json.Marshal(objectMap)
2423}
2424
2425// MetadataItem the Batch service does not assign any meaning to this metadata; it is solely for the use of
2426// user code.
2427type MetadataItem struct {
2428	Name  *string `json:"name,omitempty"`
2429	Value *string `json:"value,omitempty"`
2430}
2431
2432// MountConfiguration ...
2433type MountConfiguration struct {
2434	// AzureBlobFileSystemConfiguration - This property is mutually exclusive with all other properties.
2435	AzureBlobFileSystemConfiguration *AzureBlobFileSystemConfiguration `json:"azureBlobFileSystemConfiguration,omitempty"`
2436	// NfsMountConfiguration - This property is mutually exclusive with all other properties.
2437	NfsMountConfiguration *NFSMountConfiguration `json:"nfsMountConfiguration,omitempty"`
2438	// CifsMountConfiguration - This property is mutually exclusive with all other properties.
2439	CifsMountConfiguration *CIFSMountConfiguration `json:"cifsMountConfiguration,omitempty"`
2440	// AzureFileShareConfiguration - This property is mutually exclusive with all other properties.
2441	AzureFileShareConfiguration *AzureFileShareConfiguration `json:"azureFileShareConfiguration,omitempty"`
2442}
2443
2444// NetworkConfiguration the network configuration for a pool.
2445type NetworkConfiguration struct {
2446	// SubnetID - The virtual network must be in the same region and subscription as the Azure Batch account. The specified subnet should have enough free IP addresses to accommodate the number of nodes in the pool. If the subnet doesn't have enough free IP addresses, the pool will partially allocate compute nodes and a resize error will occur. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet. The specified subnet must allow communication from the Azure Batch service to be able to schedule tasks on the compute nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the compute nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the compute nodes to unusable. 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 cloudServiceConfiguration pools, only 'classic' VNETs are supported. For more details see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration
2447	SubnetID *string `json:"subnetId,omitempty"`
2448	// EndpointConfiguration - Pool endpoint configuration is only supported on pools with the virtualMachineConfiguration property.
2449	EndpointConfiguration *PoolEndpointConfiguration `json:"endpointConfiguration,omitempty"`
2450	// PublicIPAddressConfiguration - This property is only supported on Pools with the virtualMachineConfiguration property.
2451	PublicIPAddressConfiguration *PublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"`
2452}
2453
2454// NetworkSecurityGroupRule ...
2455type NetworkSecurityGroupRule struct {
2456	// 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 4096. If any reserved or duplicate values are provided the request fails with HTTP status code 400.
2457	Priority *int32 `json:"priority,omitempty"`
2458	// Access - Possible values include: 'NetworkSecurityGroupRuleAccessAllow', 'NetworkSecurityGroupRuleAccessDeny'
2459	Access NetworkSecurityGroupRuleAccess `json:"access,omitempty"`
2460	// 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.
2461	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
2462	// SourcePortRanges - Valid values are '*' (for all ports 0 - 65535) or arrays of ports or port ranges (i.e. 100-200). The ports should in the range of 0 to 65535 and the port ranges or ports can't overlap. If any other values are provided the request fails with HTTP status code 400. Default value will be *.
2463	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
2464}
2465
2466// NFSMountConfiguration ...
2467type NFSMountConfiguration struct {
2468	Source *string `json:"source,omitempty"`
2469	// RelativeMountPath - All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable.
2470	RelativeMountPath *string `json:"relativeMountPath,omitempty"`
2471	// MountOptions - These are 'net use' options in Windows and 'mount' options in Linux.
2472	MountOptions *string `json:"mountOptions,omitempty"`
2473}
2474
2475// NodePlacementConfiguration allocation configuration used by Batch Service to provision the nodes.
2476type NodePlacementConfiguration struct {
2477	// Policy - Allocation policy used by Batch Service to provision the nodes. If not specified, Batch will use the regional policy. Possible values include: 'NodePlacementPolicyTypeRegional', 'NodePlacementPolicyTypeZonal'
2478	Policy NodePlacementPolicyType `json:"policy,omitempty"`
2479}
2480
2481// Operation ...
2482type Operation struct {
2483	// Name - This is of the format {provider}/{resource}/{operation}
2484	Name *string `json:"name,omitempty"`
2485	// IsDataAction - Indicates whether the operation is a data action
2486	IsDataAction *bool             `json:"isDataAction,omitempty"`
2487	Display      *OperationDisplay `json:"display,omitempty"`
2488	Origin       *string           `json:"origin,omitempty"`
2489	Properties   interface{}       `json:"properties,omitempty"`
2490}
2491
2492// OperationDisplay ...
2493type OperationDisplay struct {
2494	Provider *string `json:"provider,omitempty"`
2495	// Operation - For example: read, write, delete, or listKeys/action
2496	Operation   *string `json:"operation,omitempty"`
2497	Resource    *string `json:"resource,omitempty"`
2498	Description *string `json:"description,omitempty"`
2499}
2500
2501// OperationListResult ...
2502type OperationListResult struct {
2503	autorest.Response `json:"-"`
2504	Value             *[]Operation `json:"value,omitempty"`
2505	NextLink          *string      `json:"nextLink,omitempty"`
2506}
2507
2508// OperationListResultIterator provides access to a complete listing of Operation values.
2509type OperationListResultIterator struct {
2510	i    int
2511	page OperationListResultPage
2512}
2513
2514// NextWithContext advances to the next value.  If there was an error making
2515// the request the iterator does not advance and the error is returned.
2516func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
2517	if tracing.IsEnabled() {
2518		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
2519		defer func() {
2520			sc := -1
2521			if iter.Response().Response.Response != nil {
2522				sc = iter.Response().Response.Response.StatusCode
2523			}
2524			tracing.EndSpan(ctx, sc, err)
2525		}()
2526	}
2527	iter.i++
2528	if iter.i < len(iter.page.Values()) {
2529		return nil
2530	}
2531	err = iter.page.NextWithContext(ctx)
2532	if err != nil {
2533		iter.i--
2534		return err
2535	}
2536	iter.i = 0
2537	return nil
2538}
2539
2540// Next advances to the next value.  If there was an error making
2541// the request the iterator does not advance and the error is returned.
2542// Deprecated: Use NextWithContext() instead.
2543func (iter *OperationListResultIterator) Next() error {
2544	return iter.NextWithContext(context.Background())
2545}
2546
2547// NotDone returns true if the enumeration should be started or is not yet complete.
2548func (iter OperationListResultIterator) NotDone() bool {
2549	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2550}
2551
2552// Response returns the raw server response from the last page request.
2553func (iter OperationListResultIterator) Response() OperationListResult {
2554	return iter.page.Response()
2555}
2556
2557// Value returns the current value or a zero-initialized value if the
2558// iterator has advanced beyond the end of the collection.
2559func (iter OperationListResultIterator) Value() Operation {
2560	if !iter.page.NotDone() {
2561		return Operation{}
2562	}
2563	return iter.page.Values()[iter.i]
2564}
2565
2566// Creates a new instance of the OperationListResultIterator type.
2567func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
2568	return OperationListResultIterator{page: page}
2569}
2570
2571// IsEmpty returns true if the ListResult contains no values.
2572func (olr OperationListResult) IsEmpty() bool {
2573	return olr.Value == nil || len(*olr.Value) == 0
2574}
2575
2576// hasNextLink returns true if the NextLink is not empty.
2577func (olr OperationListResult) hasNextLink() bool {
2578	return olr.NextLink != nil && len(*olr.NextLink) != 0
2579}
2580
2581// operationListResultPreparer prepares a request to retrieve the next set of results.
2582// It returns nil if no more results exist.
2583func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
2584	if !olr.hasNextLink() {
2585		return nil, nil
2586	}
2587	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2588		autorest.AsJSON(),
2589		autorest.AsGet(),
2590		autorest.WithBaseURL(to.String(olr.NextLink)))
2591}
2592
2593// OperationListResultPage contains a page of Operation values.
2594type OperationListResultPage struct {
2595	fn  func(context.Context, OperationListResult) (OperationListResult, error)
2596	olr OperationListResult
2597}
2598
2599// NextWithContext advances to the next page of values.  If there was an error making
2600// the request the page does not advance and the error is returned.
2601func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
2602	if tracing.IsEnabled() {
2603		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
2604		defer func() {
2605			sc := -1
2606			if page.Response().Response.Response != nil {
2607				sc = page.Response().Response.Response.StatusCode
2608			}
2609			tracing.EndSpan(ctx, sc, err)
2610		}()
2611	}
2612	for {
2613		next, err := page.fn(ctx, page.olr)
2614		if err != nil {
2615			return err
2616		}
2617		page.olr = next
2618		if !next.hasNextLink() || !next.IsEmpty() {
2619			break
2620		}
2621	}
2622	return nil
2623}
2624
2625// Next advances to the next page of values.  If there was an error making
2626// the request the page does not advance and the error is returned.
2627// Deprecated: Use NextWithContext() instead.
2628func (page *OperationListResultPage) Next() error {
2629	return page.NextWithContext(context.Background())
2630}
2631
2632// NotDone returns true if the page enumeration should be started or is not yet complete.
2633func (page OperationListResultPage) NotDone() bool {
2634	return !page.olr.IsEmpty()
2635}
2636
2637// Response returns the raw server response from the last page request.
2638func (page OperationListResultPage) Response() OperationListResult {
2639	return page.olr
2640}
2641
2642// Values returns the slice of values for the current page or nil if there are no values.
2643func (page OperationListResultPage) Values() []Operation {
2644	if page.olr.IsEmpty() {
2645		return nil
2646	}
2647	return *page.olr.Value
2648}
2649
2650// Creates a new instance of the OperationListResultPage type.
2651func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
2652	return OperationListResultPage{
2653		fn:  getNextPage,
2654		olr: cur,
2655	}
2656}
2657
2658// OSDisk ...
2659type OSDisk struct {
2660	EphemeralOSDiskSettings *DiffDiskSettings `json:"ephemeralOSDiskSettings,omitempty"`
2661}
2662
2663// OutboundEnvironmentEndpoint a collection of related endpoints from the same service for which the Batch
2664// service requires outbound access.
2665type OutboundEnvironmentEndpoint struct {
2666	// Category - READ-ONLY; The type of service that the Batch service connects to.
2667	Category *string `json:"category,omitempty"`
2668	// Endpoints - READ-ONLY; The endpoints for this service to which the Batch service makes outbound calls.
2669	Endpoints *[]EndpointDependency `json:"endpoints,omitempty"`
2670}
2671
2672// MarshalJSON is the custom marshaler for OutboundEnvironmentEndpoint.
2673func (oee OutboundEnvironmentEndpoint) MarshalJSON() ([]byte, error) {
2674	objectMap := make(map[string]interface{})
2675	return json.Marshal(objectMap)
2676}
2677
2678// OutboundEnvironmentEndpointCollection values returned by the List operation.
2679type OutboundEnvironmentEndpointCollection struct {
2680	autorest.Response `json:"-"`
2681	// Value - READ-ONLY; The collection of outbound network dependency endpoints returned by the listing operation.
2682	Value *[]OutboundEnvironmentEndpoint `json:"value,omitempty"`
2683	// NextLink - The continuation token.
2684	NextLink *string `json:"nextLink,omitempty"`
2685}
2686
2687// MarshalJSON is the custom marshaler for OutboundEnvironmentEndpointCollection.
2688func (oeec OutboundEnvironmentEndpointCollection) MarshalJSON() ([]byte, error) {
2689	objectMap := make(map[string]interface{})
2690	if oeec.NextLink != nil {
2691		objectMap["nextLink"] = oeec.NextLink
2692	}
2693	return json.Marshal(objectMap)
2694}
2695
2696// OutboundEnvironmentEndpointCollectionIterator provides access to a complete listing of
2697// OutboundEnvironmentEndpoint values.
2698type OutboundEnvironmentEndpointCollectionIterator struct {
2699	i    int
2700	page OutboundEnvironmentEndpointCollectionPage
2701}
2702
2703// NextWithContext advances to the next value.  If there was an error making
2704// the request the iterator does not advance and the error is returned.
2705func (iter *OutboundEnvironmentEndpointCollectionIterator) NextWithContext(ctx context.Context) (err error) {
2706	if tracing.IsEnabled() {
2707		ctx = tracing.StartSpan(ctx, fqdn+"/OutboundEnvironmentEndpointCollectionIterator.NextWithContext")
2708		defer func() {
2709			sc := -1
2710			if iter.Response().Response.Response != nil {
2711				sc = iter.Response().Response.Response.StatusCode
2712			}
2713			tracing.EndSpan(ctx, sc, err)
2714		}()
2715	}
2716	iter.i++
2717	if iter.i < len(iter.page.Values()) {
2718		return nil
2719	}
2720	err = iter.page.NextWithContext(ctx)
2721	if err != nil {
2722		iter.i--
2723		return err
2724	}
2725	iter.i = 0
2726	return nil
2727}
2728
2729// Next advances to the next value.  If there was an error making
2730// the request the iterator does not advance and the error is returned.
2731// Deprecated: Use NextWithContext() instead.
2732func (iter *OutboundEnvironmentEndpointCollectionIterator) Next() error {
2733	return iter.NextWithContext(context.Background())
2734}
2735
2736// NotDone returns true if the enumeration should be started or is not yet complete.
2737func (iter OutboundEnvironmentEndpointCollectionIterator) NotDone() bool {
2738	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2739}
2740
2741// Response returns the raw server response from the last page request.
2742func (iter OutboundEnvironmentEndpointCollectionIterator) Response() OutboundEnvironmentEndpointCollection {
2743	return iter.page.Response()
2744}
2745
2746// Value returns the current value or a zero-initialized value if the
2747// iterator has advanced beyond the end of the collection.
2748func (iter OutboundEnvironmentEndpointCollectionIterator) Value() OutboundEnvironmentEndpoint {
2749	if !iter.page.NotDone() {
2750		return OutboundEnvironmentEndpoint{}
2751	}
2752	return iter.page.Values()[iter.i]
2753}
2754
2755// Creates a new instance of the OutboundEnvironmentEndpointCollectionIterator type.
2756func NewOutboundEnvironmentEndpointCollectionIterator(page OutboundEnvironmentEndpointCollectionPage) OutboundEnvironmentEndpointCollectionIterator {
2757	return OutboundEnvironmentEndpointCollectionIterator{page: page}
2758}
2759
2760// IsEmpty returns true if the ListResult contains no values.
2761func (oeec OutboundEnvironmentEndpointCollection) IsEmpty() bool {
2762	return oeec.Value == nil || len(*oeec.Value) == 0
2763}
2764
2765// hasNextLink returns true if the NextLink is not empty.
2766func (oeec OutboundEnvironmentEndpointCollection) hasNextLink() bool {
2767	return oeec.NextLink != nil && len(*oeec.NextLink) != 0
2768}
2769
2770// outboundEnvironmentEndpointCollectionPreparer prepares a request to retrieve the next set of results.
2771// It returns nil if no more results exist.
2772func (oeec OutboundEnvironmentEndpointCollection) outboundEnvironmentEndpointCollectionPreparer(ctx context.Context) (*http.Request, error) {
2773	if !oeec.hasNextLink() {
2774		return nil, nil
2775	}
2776	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2777		autorest.AsJSON(),
2778		autorest.AsGet(),
2779		autorest.WithBaseURL(to.String(oeec.NextLink)))
2780}
2781
2782// OutboundEnvironmentEndpointCollectionPage contains a page of OutboundEnvironmentEndpoint values.
2783type OutboundEnvironmentEndpointCollectionPage struct {
2784	fn   func(context.Context, OutboundEnvironmentEndpointCollection) (OutboundEnvironmentEndpointCollection, error)
2785	oeec OutboundEnvironmentEndpointCollection
2786}
2787
2788// NextWithContext advances to the next page of values.  If there was an error making
2789// the request the page does not advance and the error is returned.
2790func (page *OutboundEnvironmentEndpointCollectionPage) NextWithContext(ctx context.Context) (err error) {
2791	if tracing.IsEnabled() {
2792		ctx = tracing.StartSpan(ctx, fqdn+"/OutboundEnvironmentEndpointCollectionPage.NextWithContext")
2793		defer func() {
2794			sc := -1
2795			if page.Response().Response.Response != nil {
2796				sc = page.Response().Response.Response.StatusCode
2797			}
2798			tracing.EndSpan(ctx, sc, err)
2799		}()
2800	}
2801	for {
2802		next, err := page.fn(ctx, page.oeec)
2803		if err != nil {
2804			return err
2805		}
2806		page.oeec = next
2807		if !next.hasNextLink() || !next.IsEmpty() {
2808			break
2809		}
2810	}
2811	return nil
2812}
2813
2814// Next advances to the next page of values.  If there was an error making
2815// the request the page does not advance and the error is returned.
2816// Deprecated: Use NextWithContext() instead.
2817func (page *OutboundEnvironmentEndpointCollectionPage) Next() error {
2818	return page.NextWithContext(context.Background())
2819}
2820
2821// NotDone returns true if the page enumeration should be started or is not yet complete.
2822func (page OutboundEnvironmentEndpointCollectionPage) NotDone() bool {
2823	return !page.oeec.IsEmpty()
2824}
2825
2826// Response returns the raw server response from the last page request.
2827func (page OutboundEnvironmentEndpointCollectionPage) Response() OutboundEnvironmentEndpointCollection {
2828	return page.oeec
2829}
2830
2831// Values returns the slice of values for the current page or nil if there are no values.
2832func (page OutboundEnvironmentEndpointCollectionPage) Values() []OutboundEnvironmentEndpoint {
2833	if page.oeec.IsEmpty() {
2834		return nil
2835	}
2836	return *page.oeec.Value
2837}
2838
2839// Creates a new instance of the OutboundEnvironmentEndpointCollectionPage type.
2840func NewOutboundEnvironmentEndpointCollectionPage(cur OutboundEnvironmentEndpointCollection, getNextPage func(context.Context, OutboundEnvironmentEndpointCollection) (OutboundEnvironmentEndpointCollection, error)) OutboundEnvironmentEndpointCollectionPage {
2841	return OutboundEnvironmentEndpointCollectionPage{
2842		fn:   getNextPage,
2843		oeec: cur,
2844	}
2845}
2846
2847// Pool contains information about a pool.
2848type Pool struct {
2849	autorest.Response `json:"-"`
2850	// PoolProperties - The properties associated with the pool.
2851	*PoolProperties `json:"properties,omitempty"`
2852	// Identity - The type of identity used for the Batch Pool.
2853	Identity *PoolIdentity `json:"identity,omitempty"`
2854	// ID - READ-ONLY; The ID of the resource.
2855	ID *string `json:"id,omitempty"`
2856	// Name - READ-ONLY; The name of the resource.
2857	Name *string `json:"name,omitempty"`
2858	// Type - READ-ONLY; The type of the resource.
2859	Type *string `json:"type,omitempty"`
2860	// Etag - READ-ONLY; The ETag of the resource, used for concurrency statements.
2861	Etag *string `json:"etag,omitempty"`
2862}
2863
2864// MarshalJSON is the custom marshaler for Pool.
2865func (p Pool) MarshalJSON() ([]byte, error) {
2866	objectMap := make(map[string]interface{})
2867	if p.PoolProperties != nil {
2868		objectMap["properties"] = p.PoolProperties
2869	}
2870	if p.Identity != nil {
2871		objectMap["identity"] = p.Identity
2872	}
2873	return json.Marshal(objectMap)
2874}
2875
2876// UnmarshalJSON is the custom unmarshaler for Pool struct.
2877func (p *Pool) UnmarshalJSON(body []byte) error {
2878	var m map[string]*json.RawMessage
2879	err := json.Unmarshal(body, &m)
2880	if err != nil {
2881		return err
2882	}
2883	for k, v := range m {
2884		switch k {
2885		case "properties":
2886			if v != nil {
2887				var poolProperties PoolProperties
2888				err = json.Unmarshal(*v, &poolProperties)
2889				if err != nil {
2890					return err
2891				}
2892				p.PoolProperties = &poolProperties
2893			}
2894		case "identity":
2895			if v != nil {
2896				var identity PoolIdentity
2897				err = json.Unmarshal(*v, &identity)
2898				if err != nil {
2899					return err
2900				}
2901				p.Identity = &identity
2902			}
2903		case "id":
2904			if v != nil {
2905				var ID string
2906				err = json.Unmarshal(*v, &ID)
2907				if err != nil {
2908					return err
2909				}
2910				p.ID = &ID
2911			}
2912		case "name":
2913			if v != nil {
2914				var name string
2915				err = json.Unmarshal(*v, &name)
2916				if err != nil {
2917					return err
2918				}
2919				p.Name = &name
2920			}
2921		case "type":
2922			if v != nil {
2923				var typeVar string
2924				err = json.Unmarshal(*v, &typeVar)
2925				if err != nil {
2926					return err
2927				}
2928				p.Type = &typeVar
2929			}
2930		case "etag":
2931			if v != nil {
2932				var etag string
2933				err = json.Unmarshal(*v, &etag)
2934				if err != nil {
2935					return err
2936				}
2937				p.Etag = &etag
2938			}
2939		}
2940	}
2941
2942	return nil
2943}
2944
2945// PoolDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
2946type PoolDeleteFuture struct {
2947	azure.FutureAPI
2948	// Result returns the result of the asynchronous operation.
2949	// If the operation has not completed it will return an error.
2950	Result func(PoolClient) (autorest.Response, error)
2951}
2952
2953// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2954func (future *PoolDeleteFuture) UnmarshalJSON(body []byte) error {
2955	var azFuture azure.Future
2956	if err := json.Unmarshal(body, &azFuture); err != nil {
2957		return err
2958	}
2959	future.FutureAPI = &azFuture
2960	future.Result = future.result
2961	return nil
2962}
2963
2964// result is the default implementation for PoolDeleteFuture.Result.
2965func (future *PoolDeleteFuture) result(client PoolClient) (ar autorest.Response, err error) {
2966	var done bool
2967	done, err = future.DoneWithContext(context.Background(), client)
2968	if err != nil {
2969		err = autorest.NewErrorWithError(err, "batch.PoolDeleteFuture", "Result", future.Response(), "Polling failure")
2970		return
2971	}
2972	if !done {
2973		ar.Response = future.Response()
2974		err = azure.NewAsyncOpIncompleteError("batch.PoolDeleteFuture")
2975		return
2976	}
2977	ar.Response = future.Response()
2978	return
2979}
2980
2981// PoolEndpointConfiguration ...
2982type PoolEndpointConfiguration struct {
2983	// 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. This cannot be specified if the IPAddressProvisioningType is NoPublicIPAddresses.
2984	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
2985}
2986
2987// PoolIdentity the identity of the Batch pool, if configured. If the pool identity is updated during
2988// update an existing pool, only the new vms which are created after the pool shrinks to 0 will have the
2989// updated identities
2990type PoolIdentity struct {
2991	// Type - The type of identity used for the Batch Pool. Possible values include: 'PoolIdentityTypeUserAssigned', 'PoolIdentityTypeNone'
2992	Type PoolIdentityType `json:"type,omitempty"`
2993	// UserAssignedIdentities - The list of user identities associated with the Batch pool.
2994	UserAssignedIdentities map[string]*UserAssignedIdentities `json:"userAssignedIdentities"`
2995}
2996
2997// MarshalJSON is the custom marshaler for PoolIdentity.
2998func (pi PoolIdentity) MarshalJSON() ([]byte, error) {
2999	objectMap := make(map[string]interface{})
3000	if pi.Type != "" {
3001		objectMap["type"] = pi.Type
3002	}
3003	if pi.UserAssignedIdentities != nil {
3004		objectMap["userAssignedIdentities"] = pi.UserAssignedIdentities
3005	}
3006	return json.Marshal(objectMap)
3007}
3008
3009// PoolProperties pool properties.
3010type PoolProperties struct {
3011	// DisplayName - The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
3012	DisplayName *string `json:"displayName,omitempty"`
3013	// LastModified - READ-ONLY; This is the last time at which the pool level data, such as the targetDedicatedNodes or autoScaleSettings, changed. It does not factor in node-level changes such as a compute node changing state.
3014	LastModified *date.Time `json:"lastModified,omitempty"`
3015	// CreationTime - READ-ONLY
3016	CreationTime *date.Time `json:"creationTime,omitempty"`
3017	// ProvisioningState - READ-ONLY; Possible values include: 'PoolProvisioningStateSucceeded', 'PoolProvisioningStateDeleting'
3018	ProvisioningState PoolProvisioningState `json:"provisioningState,omitempty"`
3019	// ProvisioningStateTransitionTime - READ-ONLY
3020	ProvisioningStateTransitionTime *date.Time `json:"provisioningStateTransitionTime,omitempty"`
3021	// AllocationState - READ-ONLY; Possible values include: 'AllocationStateSteady', 'AllocationStateResizing', 'AllocationStateStopping'
3022	AllocationState AllocationState `json:"allocationState,omitempty"`
3023	// AllocationStateTransitionTime - READ-ONLY
3024	AllocationStateTransitionTime *date.Time `json:"allocationStateTransitionTime,omitempty"`
3025	// 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. 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).
3026	VMSize *string `json:"vmSize,omitempty"`
3027	// DeploymentConfiguration - Using CloudServiceConfiguration specifies that the nodes should be creating using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses Azure Virtual Machines (IaaS).
3028	DeploymentConfiguration *DeploymentConfiguration `json:"deploymentConfiguration,omitempty"`
3029	// CurrentDedicatedNodes - READ-ONLY
3030	CurrentDedicatedNodes *int32 `json:"currentDedicatedNodes,omitempty"`
3031	// CurrentLowPriorityNodes - READ-ONLY
3032	CurrentLowPriorityNodes *int32         `json:"currentLowPriorityNodes,omitempty"`
3033	ScaleSettings           *ScaleSettings `json:"scaleSettings,omitempty"`
3034	// AutoScaleRun - READ-ONLY; This property is set only if the pool automatically scales, i.e. autoScaleSettings are used.
3035	AutoScaleRun *AutoScaleRun `json:"autoScaleRun,omitempty"`
3036	// InterNodeCommunication - This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance of the requested number of nodes to be allocated in the pool. If not specified, this value defaults to 'Disabled'. Possible values include: 'InterNodeCommunicationStateEnabled', 'InterNodeCommunicationStateDisabled'
3037	InterNodeCommunication InterNodeCommunicationState `json:"interNodeCommunication,omitempty"`
3038	NetworkConfiguration   *NetworkConfiguration       `json:"networkConfiguration,omitempty"`
3039	// TaskSlotsPerNode - 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.
3040	TaskSlotsPerNode *int32 `json:"taskSlotsPerNode,omitempty"`
3041	// TaskSchedulingPolicy - If not specified, the default is spread.
3042	TaskSchedulingPolicy *TaskSchedulingPolicy `json:"taskSchedulingPolicy,omitempty"`
3043	UserAccounts         *[]UserAccount        `json:"userAccounts,omitempty"`
3044	// Metadata - The Batch service does not assign any meaning to metadata; it is solely for the use of user code.
3045	Metadata *[]MetadataItem `json:"metadata,omitempty"`
3046	// StartTask - In an PATCH (update) operation, this property can be set to an empty object to remove the start task from the pool.
3047	StartTask *StartTask `json:"startTask,omitempty"`
3048	// Certificates - For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory.
3049	Certificates *[]CertificateReference `json:"certificates,omitempty"`
3050	// ApplicationPackages - 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.
3051	ApplicationPackages *[]ApplicationPackageReference `json:"applicationPackages,omitempty"`
3052	// 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.
3053	ApplicationLicenses *[]string `json:"applicationLicenses,omitempty"`
3054	// ResizeOperationStatus - READ-ONLY
3055	ResizeOperationStatus *ResizeOperationStatus `json:"resizeOperationStatus,omitempty"`
3056	// MountConfiguration - This supports Azure Files, NFS, CIFS/SMB, and Blobfuse.
3057	MountConfiguration *[]MountConfiguration `json:"mountConfiguration,omitempty"`
3058}
3059
3060// MarshalJSON is the custom marshaler for PoolProperties.
3061func (pp PoolProperties) MarshalJSON() ([]byte, error) {
3062	objectMap := make(map[string]interface{})
3063	if pp.DisplayName != nil {
3064		objectMap["displayName"] = pp.DisplayName
3065	}
3066	if pp.VMSize != nil {
3067		objectMap["vmSize"] = pp.VMSize
3068	}
3069	if pp.DeploymentConfiguration != nil {
3070		objectMap["deploymentConfiguration"] = pp.DeploymentConfiguration
3071	}
3072	if pp.ScaleSettings != nil {
3073		objectMap["scaleSettings"] = pp.ScaleSettings
3074	}
3075	if pp.InterNodeCommunication != "" {
3076		objectMap["interNodeCommunication"] = pp.InterNodeCommunication
3077	}
3078	if pp.NetworkConfiguration != nil {
3079		objectMap["networkConfiguration"] = pp.NetworkConfiguration
3080	}
3081	if pp.TaskSlotsPerNode != nil {
3082		objectMap["taskSlotsPerNode"] = pp.TaskSlotsPerNode
3083	}
3084	if pp.TaskSchedulingPolicy != nil {
3085		objectMap["taskSchedulingPolicy"] = pp.TaskSchedulingPolicy
3086	}
3087	if pp.UserAccounts != nil {
3088		objectMap["userAccounts"] = pp.UserAccounts
3089	}
3090	if pp.Metadata != nil {
3091		objectMap["metadata"] = pp.Metadata
3092	}
3093	if pp.StartTask != nil {
3094		objectMap["startTask"] = pp.StartTask
3095	}
3096	if pp.Certificates != nil {
3097		objectMap["certificates"] = pp.Certificates
3098	}
3099	if pp.ApplicationPackages != nil {
3100		objectMap["applicationPackages"] = pp.ApplicationPackages
3101	}
3102	if pp.ApplicationLicenses != nil {
3103		objectMap["applicationLicenses"] = pp.ApplicationLicenses
3104	}
3105	if pp.MountConfiguration != nil {
3106		objectMap["mountConfiguration"] = pp.MountConfiguration
3107	}
3108	return json.Marshal(objectMap)
3109}
3110
3111// PrivateEndpoint the private endpoint of the private endpoint connection.
3112type PrivateEndpoint struct {
3113	// ID - READ-ONLY
3114	ID *string `json:"id,omitempty"`
3115}
3116
3117// MarshalJSON is the custom marshaler for PrivateEndpoint.
3118func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) {
3119	objectMap := make(map[string]interface{})
3120	return json.Marshal(objectMap)
3121}
3122
3123// PrivateEndpointConnection contains information about a private link resource.
3124type PrivateEndpointConnection struct {
3125	autorest.Response `json:"-"`
3126	// PrivateEndpointConnectionProperties - The properties associated with the private endpoint connection.
3127	*PrivateEndpointConnectionProperties `json:"properties,omitempty"`
3128	// ID - READ-ONLY; The ID of the resource.
3129	ID *string `json:"id,omitempty"`
3130	// Name - READ-ONLY; The name of the resource.
3131	Name *string `json:"name,omitempty"`
3132	// Type - READ-ONLY; The type of the resource.
3133	Type *string `json:"type,omitempty"`
3134	// Etag - READ-ONLY; The ETag of the resource, used for concurrency statements.
3135	Etag *string `json:"etag,omitempty"`
3136}
3137
3138// MarshalJSON is the custom marshaler for PrivateEndpointConnection.
3139func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
3140	objectMap := make(map[string]interface{})
3141	if pec.PrivateEndpointConnectionProperties != nil {
3142		objectMap["properties"] = pec.PrivateEndpointConnectionProperties
3143	}
3144	return json.Marshal(objectMap)
3145}
3146
3147// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
3148func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
3149	var m map[string]*json.RawMessage
3150	err := json.Unmarshal(body, &m)
3151	if err != nil {
3152		return err
3153	}
3154	for k, v := range m {
3155		switch k {
3156		case "properties":
3157			if v != nil {
3158				var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
3159				err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
3160				if err != nil {
3161					return err
3162				}
3163				pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
3164			}
3165		case "id":
3166			if v != nil {
3167				var ID string
3168				err = json.Unmarshal(*v, &ID)
3169				if err != nil {
3170					return err
3171				}
3172				pec.ID = &ID
3173			}
3174		case "name":
3175			if v != nil {
3176				var name string
3177				err = json.Unmarshal(*v, &name)
3178				if err != nil {
3179					return err
3180				}
3181				pec.Name = &name
3182			}
3183		case "type":
3184			if v != nil {
3185				var typeVar string
3186				err = json.Unmarshal(*v, &typeVar)
3187				if err != nil {
3188					return err
3189				}
3190				pec.Type = &typeVar
3191			}
3192		case "etag":
3193			if v != nil {
3194				var etag string
3195				err = json.Unmarshal(*v, &etag)
3196				if err != nil {
3197					return err
3198				}
3199				pec.Etag = &etag
3200			}
3201		}
3202	}
3203
3204	return nil
3205}
3206
3207// PrivateEndpointConnectionProperties private endpoint connection properties.
3208type PrivateEndpointConnectionProperties struct {
3209	// ProvisioningState - READ-ONLY; Possible values include: 'PrivateEndpointConnectionProvisioningStateSucceeded', 'PrivateEndpointConnectionProvisioningStateUpdating', 'PrivateEndpointConnectionProvisioningStateFailed'
3210	ProvisioningState                 PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"`
3211	PrivateEndpoint                   *PrivateEndpoint                           `json:"privateEndpoint,omitempty"`
3212	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState         `json:"privateLinkServiceConnectionState,omitempty"`
3213}
3214
3215// MarshalJSON is the custom marshaler for PrivateEndpointConnectionProperties.
3216func (pecp PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) {
3217	objectMap := make(map[string]interface{})
3218	if pecp.PrivateEndpoint != nil {
3219		objectMap["privateEndpoint"] = pecp.PrivateEndpoint
3220	}
3221	if pecp.PrivateLinkServiceConnectionState != nil {
3222		objectMap["privateLinkServiceConnectionState"] = pecp.PrivateLinkServiceConnectionState
3223	}
3224	return json.Marshal(objectMap)
3225}
3226
3227// PrivateEndpointConnectionUpdateFuture an abstraction for monitoring and retrieving the results of a
3228// long-running operation.
3229type PrivateEndpointConnectionUpdateFuture struct {
3230	azure.FutureAPI
3231	// Result returns the result of the asynchronous operation.
3232	// If the operation has not completed it will return an error.
3233	Result func(PrivateEndpointConnectionClient) (PrivateEndpointConnection, error)
3234}
3235
3236// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3237func (future *PrivateEndpointConnectionUpdateFuture) UnmarshalJSON(body []byte) error {
3238	var azFuture azure.Future
3239	if err := json.Unmarshal(body, &azFuture); err != nil {
3240		return err
3241	}
3242	future.FutureAPI = &azFuture
3243	future.Result = future.result
3244	return nil
3245}
3246
3247// result is the default implementation for PrivateEndpointConnectionUpdateFuture.Result.
3248func (future *PrivateEndpointConnectionUpdateFuture) result(client PrivateEndpointConnectionClient) (pec PrivateEndpointConnection, err error) {
3249	var done bool
3250	done, err = future.DoneWithContext(context.Background(), client)
3251	if err != nil {
3252		err = autorest.NewErrorWithError(err, "batch.PrivateEndpointConnectionUpdateFuture", "Result", future.Response(), "Polling failure")
3253		return
3254	}
3255	if !done {
3256		pec.Response.Response = future.Response()
3257		err = azure.NewAsyncOpIncompleteError("batch.PrivateEndpointConnectionUpdateFuture")
3258		return
3259	}
3260	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3261	if pec.Response.Response, err = future.GetResult(sender); err == nil && pec.Response.Response.StatusCode != http.StatusNoContent {
3262		pec, err = client.UpdateResponder(pec.Response.Response)
3263		if err != nil {
3264			err = autorest.NewErrorWithError(err, "batch.PrivateEndpointConnectionUpdateFuture", "Result", pec.Response.Response, "Failure responding to request")
3265		}
3266	}
3267	return
3268}
3269
3270// PrivateLinkResource contains information about a private link resource.
3271type PrivateLinkResource struct {
3272	autorest.Response `json:"-"`
3273	// PrivateLinkResourceProperties - The properties associated with the private link resource.
3274	*PrivateLinkResourceProperties `json:"properties,omitempty"`
3275	// ID - READ-ONLY; The ID of the resource.
3276	ID *string `json:"id,omitempty"`
3277	// Name - READ-ONLY; The name of the resource.
3278	Name *string `json:"name,omitempty"`
3279	// Type - READ-ONLY; The type of the resource.
3280	Type *string `json:"type,omitempty"`
3281	// Etag - READ-ONLY; The ETag of the resource, used for concurrency statements.
3282	Etag *string `json:"etag,omitempty"`
3283}
3284
3285// MarshalJSON is the custom marshaler for PrivateLinkResource.
3286func (plr PrivateLinkResource) MarshalJSON() ([]byte, error) {
3287	objectMap := make(map[string]interface{})
3288	if plr.PrivateLinkResourceProperties != nil {
3289		objectMap["properties"] = plr.PrivateLinkResourceProperties
3290	}
3291	return json.Marshal(objectMap)
3292}
3293
3294// UnmarshalJSON is the custom unmarshaler for PrivateLinkResource struct.
3295func (plr *PrivateLinkResource) UnmarshalJSON(body []byte) error {
3296	var m map[string]*json.RawMessage
3297	err := json.Unmarshal(body, &m)
3298	if err != nil {
3299		return err
3300	}
3301	for k, v := range m {
3302		switch k {
3303		case "properties":
3304			if v != nil {
3305				var privateLinkResourceProperties PrivateLinkResourceProperties
3306				err = json.Unmarshal(*v, &privateLinkResourceProperties)
3307				if err != nil {
3308					return err
3309				}
3310				plr.PrivateLinkResourceProperties = &privateLinkResourceProperties
3311			}
3312		case "id":
3313			if v != nil {
3314				var ID string
3315				err = json.Unmarshal(*v, &ID)
3316				if err != nil {
3317					return err
3318				}
3319				plr.ID = &ID
3320			}
3321		case "name":
3322			if v != nil {
3323				var name string
3324				err = json.Unmarshal(*v, &name)
3325				if err != nil {
3326					return err
3327				}
3328				plr.Name = &name
3329			}
3330		case "type":
3331			if v != nil {
3332				var typeVar string
3333				err = json.Unmarshal(*v, &typeVar)
3334				if err != nil {
3335					return err
3336				}
3337				plr.Type = &typeVar
3338			}
3339		case "etag":
3340			if v != nil {
3341				var etag string
3342				err = json.Unmarshal(*v, &etag)
3343				if err != nil {
3344					return err
3345				}
3346				plr.Etag = &etag
3347			}
3348		}
3349	}
3350
3351	return nil
3352}
3353
3354// PrivateLinkResourceProperties private link resource properties.
3355type PrivateLinkResourceProperties struct {
3356	// GroupID - READ-ONLY; The group id is used to establish the private link connection.
3357	GroupID *string `json:"groupId,omitempty"`
3358	// RequiredMembers - READ-ONLY
3359	RequiredMembers *[]string `json:"requiredMembers,omitempty"`
3360	// RequiredZoneNames - READ-ONLY
3361	RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"`
3362}
3363
3364// MarshalJSON is the custom marshaler for PrivateLinkResourceProperties.
3365func (plrp PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) {
3366	objectMap := make(map[string]interface{})
3367	return json.Marshal(objectMap)
3368}
3369
3370// PrivateLinkServiceConnectionState the private link service connection state of the private endpoint
3371// connection
3372type PrivateLinkServiceConnectionState struct {
3373	// Status - Possible values include: 'PrivateLinkServiceConnectionStatusApproved', 'PrivateLinkServiceConnectionStatusPending', 'PrivateLinkServiceConnectionStatusRejected', 'PrivateLinkServiceConnectionStatusDisconnected'
3374	Status      PrivateLinkServiceConnectionStatus `json:"status,omitempty"`
3375	Description *string                            `json:"description,omitempty"`
3376	// ActionRequired - READ-ONLY
3377	ActionRequired *string `json:"actionRequired,omitempty"`
3378}
3379
3380// MarshalJSON is the custom marshaler for PrivateLinkServiceConnectionState.
3381func (plscs PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error) {
3382	objectMap := make(map[string]interface{})
3383	if plscs.Status != "" {
3384		objectMap["status"] = plscs.Status
3385	}
3386	if plscs.Description != nil {
3387		objectMap["description"] = plscs.Description
3388	}
3389	return json.Marshal(objectMap)
3390}
3391
3392// ProxyResource a definition of an Azure resource.
3393type ProxyResource struct {
3394	// ID - READ-ONLY; The ID of the resource.
3395	ID *string `json:"id,omitempty"`
3396	// Name - READ-ONLY; The name of the resource.
3397	Name *string `json:"name,omitempty"`
3398	// Type - READ-ONLY; The type of the resource.
3399	Type *string `json:"type,omitempty"`
3400	// Etag - READ-ONLY; The ETag of the resource, used for concurrency statements.
3401	Etag *string `json:"etag,omitempty"`
3402}
3403
3404// MarshalJSON is the custom marshaler for ProxyResource.
3405func (pr ProxyResource) MarshalJSON() ([]byte, error) {
3406	objectMap := make(map[string]interface{})
3407	return json.Marshal(objectMap)
3408}
3409
3410// PublicIPAddressConfiguration the public IP Address configuration of the networking configuration of a
3411// Pool.
3412type PublicIPAddressConfiguration struct {
3413	// Provision - The default value is BatchManaged. Possible values include: 'IPAddressProvisioningTypeBatchManaged', 'IPAddressProvisioningTypeUserManaged', 'IPAddressProvisioningTypeNoPublicIPAddresses'
3414	Provision IPAddressProvisioningType `json:"provision,omitempty"`
3415	// IPAddressIds - The number of IPs specified here limits the maximum size of the Pool - 100 dedicated nodes or 100 low-priority nodes can be allocated for each public IP. For example, a pool needing 250 dedicated VMs would need at least 3 public IPs specified. Each element of this collection is of the form: /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}.
3416	IPAddressIds *[]string `json:"ipAddressIds,omitempty"`
3417}
3418
3419// ResizeError ...
3420type ResizeError struct {
3421	// Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
3422	Code *string `json:"code,omitempty"`
3423	// Message - A message describing the error, intended to be suitable for display in a user interface.
3424	Message *string        `json:"message,omitempty"`
3425	Details *[]ResizeError `json:"details,omitempty"`
3426}
3427
3428// ResizeOperationStatus describes either the current operation (if the pool AllocationState is Resizing)
3429// or the previously completed operation (if the AllocationState is Steady).
3430type ResizeOperationStatus struct {
3431	TargetDedicatedNodes   *int32 `json:"targetDedicatedNodes,omitempty"`
3432	TargetLowPriorityNodes *int32 `json:"targetLowPriorityNodes,omitempty"`
3433	// 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).
3434	ResizeTimeout *string `json:"resizeTimeout,omitempty"`
3435	// NodeDeallocationOption - The default value is requeue. Possible values include: 'ComputeNodeDeallocationOptionRequeue', 'ComputeNodeDeallocationOptionTerminate', 'ComputeNodeDeallocationOptionTaskCompletion', 'ComputeNodeDeallocationOptionRetainedData'
3436	NodeDeallocationOption ComputeNodeDeallocationOption `json:"nodeDeallocationOption,omitempty"`
3437	StartTime              *date.Time                    `json:"startTime,omitempty"`
3438	// Errors - This property is set only if an error occurred during the last pool resize, and only when the pool allocationState is Steady.
3439	Errors *[]ResizeError `json:"errors,omitempty"`
3440}
3441
3442// Resource a definition of an Azure resource.
3443type Resource struct {
3444	// ID - READ-ONLY; The ID of the resource.
3445	ID *string `json:"id,omitempty"`
3446	// Name - READ-ONLY; The name of the resource.
3447	Name *string `json:"name,omitempty"`
3448	// Type - READ-ONLY; The type of the resource.
3449	Type *string `json:"type,omitempty"`
3450	// Location - READ-ONLY; The location of the resource.
3451	Location *string `json:"location,omitempty"`
3452	// Tags - READ-ONLY; The tags of the resource.
3453	Tags map[string]*string `json:"tags"`
3454}
3455
3456// MarshalJSON is the custom marshaler for Resource.
3457func (r Resource) MarshalJSON() ([]byte, error) {
3458	objectMap := make(map[string]interface{})
3459	return json.Marshal(objectMap)
3460}
3461
3462// ResourceFile ...
3463type ResourceFile struct {
3464	// AutoStorageContainerName - The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified.
3465	AutoStorageContainerName *string `json:"autoStorageContainerName,omitempty"`
3466	// StorageContainerURL - The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified. This URL must be readable and listable from compute nodes. There are three 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, use a managed identity with read and list permissions, or set the ACL for the container to allow public access.
3467	StorageContainerURL *string `json:"storageContainerUrl,omitempty"`
3468	// 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 from compute nodes. There are three ways to get such a URL for a blob in Azure storage: include a Shared Access Signature (SAS) granting read permissions on the blob, use a managed identity with read permission, or set the ACL for the blob or its container to allow public access.
3469	HTTPURL *string `json:"httpUrl,omitempty"`
3470	// 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.
3471	BlobPrefix *string `json:"blobPrefix,omitempty"`
3472	// 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 '..').
3473	FilePath *string `json:"filePath,omitempty"`
3474	// FileMode - This property applies only to files being downloaded to Linux compute nodes. It will be ignored if it is specified for a resourceFile which will be downloaded to a Windows node. If this property is not specified for a Linux node, then a default value of 0770 is applied to the file.
3475	FileMode          *string                       `json:"fileMode,omitempty"`
3476	IdentityReference *ComputeNodeIdentityReference `json:"identityReference,omitempty"`
3477}
3478
3479// ScaleSettings defines the desired size of the pool. This can either be 'fixedScale' where the requested
3480// targetDedicatedNodes is specified, or 'autoScale' which defines a formula which is periodically
3481// reevaluated. If this property is not specified, the pool will have a fixed scale with 0
3482// targetDedicatedNodes.
3483type ScaleSettings struct {
3484	// FixedScale - This property and autoScale are mutually exclusive and one of the properties must be specified.
3485	FixedScale *FixedScaleSettings `json:"fixedScale,omitempty"`
3486	// AutoScale - This property and fixedScale are mutually exclusive and one of the properties must be specified.
3487	AutoScale *AutoScaleSettings `json:"autoScale,omitempty"`
3488}
3489
3490// SkuCapability a SKU capability, such as the number of cores.
3491type SkuCapability struct {
3492	// Name - READ-ONLY; The name of the feature.
3493	Name *string `json:"name,omitempty"`
3494	// Value - READ-ONLY; The value of the feature.
3495	Value *string `json:"value,omitempty"`
3496}
3497
3498// MarshalJSON is the custom marshaler for SkuCapability.
3499func (sc SkuCapability) MarshalJSON() ([]byte, error) {
3500	objectMap := make(map[string]interface{})
3501	return json.Marshal(objectMap)
3502}
3503
3504// StartTask in some cases the start task may be re-run even though the node was not rebooted. Due to this,
3505// start tasks should be idempotent and exit gracefully if the setup they're performing has already been
3506// done. Special care should be taken to avoid start tasks which create breakaway process or install/launch
3507// services from the start task working directory, as this will block Batch from being able to re-run the
3508// start task.
3509type StartTask struct {
3510	// 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. Required if any other properties of the startTask are specified.
3511	CommandLine         *string               `json:"commandLine,omitempty"`
3512	ResourceFiles       *[]ResourceFile       `json:"resourceFiles,omitempty"`
3513	EnvironmentSettings *[]EnvironmentSetting `json:"environmentSettings,omitempty"`
3514	// UserIdentity - If omitted, the task runs as a non-administrative user unique to the task.
3515	UserIdentity *UserIdentity `json:"userIdentity,omitempty"`
3516	// 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.
3517	MaxTaskRetryCount *int32 `json:"maxTaskRetryCount,omitempty"`
3518	// WaitForSuccess - If true and the start task fails on a compute node, the Batch service retries the start task up to its maximum retry count (maxTaskRetryCount). If the task has still not completed successfully after all retries, then the Batch service marks the compute node unusable, and will not schedule tasks to it. This condition can be detected via the node state and scheduling error detail. If false, the Batch service will not wait for the start task to complete. In this case, other tasks can start executing on the compute node while the start task is still running; and even if the start task fails, new tasks will continue to be scheduled on the node. The default is true.
3519	WaitForSuccess *bool `json:"waitForSuccess,omitempty"`
3520	// 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.
3521	ContainerSettings *TaskContainerSettings `json:"containerSettings,omitempty"`
3522}
3523
3524// SupportedSku describes a Batch supported SKU.
3525type SupportedSku struct {
3526	// Name - READ-ONLY; The name of the SKU.
3527	Name *string `json:"name,omitempty"`
3528	// FamilyName - READ-ONLY; The family name of the SKU.
3529	FamilyName *string `json:"familyName,omitempty"`
3530	// Capabilities - READ-ONLY; A collection of capabilities which this SKU supports.
3531	Capabilities *[]SkuCapability `json:"capabilities,omitempty"`
3532}
3533
3534// MarshalJSON is the custom marshaler for SupportedSku.
3535func (ss SupportedSku) MarshalJSON() ([]byte, error) {
3536	objectMap := make(map[string]interface{})
3537	return json.Marshal(objectMap)
3538}
3539
3540// SupportedSkusResult the Batch List supported SKUs operation response.
3541type SupportedSkusResult struct {
3542	autorest.Response `json:"-"`
3543	// Value - The list of SKUs available for the Batch service in the location.
3544	Value *[]SupportedSku `json:"value,omitempty"`
3545	// NextLink - READ-ONLY; The URL to use for getting the next set of results.
3546	NextLink *string `json:"nextLink,omitempty"`
3547}
3548
3549// MarshalJSON is the custom marshaler for SupportedSkusResult.
3550func (ssr SupportedSkusResult) MarshalJSON() ([]byte, error) {
3551	objectMap := make(map[string]interface{})
3552	if ssr.Value != nil {
3553		objectMap["value"] = ssr.Value
3554	}
3555	return json.Marshal(objectMap)
3556}
3557
3558// SupportedSkusResultIterator provides access to a complete listing of SupportedSku values.
3559type SupportedSkusResultIterator struct {
3560	i    int
3561	page SupportedSkusResultPage
3562}
3563
3564// NextWithContext advances to the next value.  If there was an error making
3565// the request the iterator does not advance and the error is returned.
3566func (iter *SupportedSkusResultIterator) NextWithContext(ctx context.Context) (err error) {
3567	if tracing.IsEnabled() {
3568		ctx = tracing.StartSpan(ctx, fqdn+"/SupportedSkusResultIterator.NextWithContext")
3569		defer func() {
3570			sc := -1
3571			if iter.Response().Response.Response != nil {
3572				sc = iter.Response().Response.Response.StatusCode
3573			}
3574			tracing.EndSpan(ctx, sc, err)
3575		}()
3576	}
3577	iter.i++
3578	if iter.i < len(iter.page.Values()) {
3579		return nil
3580	}
3581	err = iter.page.NextWithContext(ctx)
3582	if err != nil {
3583		iter.i--
3584		return err
3585	}
3586	iter.i = 0
3587	return nil
3588}
3589
3590// Next advances to the next value.  If there was an error making
3591// the request the iterator does not advance and the error is returned.
3592// Deprecated: Use NextWithContext() instead.
3593func (iter *SupportedSkusResultIterator) Next() error {
3594	return iter.NextWithContext(context.Background())
3595}
3596
3597// NotDone returns true if the enumeration should be started or is not yet complete.
3598func (iter SupportedSkusResultIterator) NotDone() bool {
3599	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3600}
3601
3602// Response returns the raw server response from the last page request.
3603func (iter SupportedSkusResultIterator) Response() SupportedSkusResult {
3604	return iter.page.Response()
3605}
3606
3607// Value returns the current value or a zero-initialized value if the
3608// iterator has advanced beyond the end of the collection.
3609func (iter SupportedSkusResultIterator) Value() SupportedSku {
3610	if !iter.page.NotDone() {
3611		return SupportedSku{}
3612	}
3613	return iter.page.Values()[iter.i]
3614}
3615
3616// Creates a new instance of the SupportedSkusResultIterator type.
3617func NewSupportedSkusResultIterator(page SupportedSkusResultPage) SupportedSkusResultIterator {
3618	return SupportedSkusResultIterator{page: page}
3619}
3620
3621// IsEmpty returns true if the ListResult contains no values.
3622func (ssr SupportedSkusResult) IsEmpty() bool {
3623	return ssr.Value == nil || len(*ssr.Value) == 0
3624}
3625
3626// hasNextLink returns true if the NextLink is not empty.
3627func (ssr SupportedSkusResult) hasNextLink() bool {
3628	return ssr.NextLink != nil && len(*ssr.NextLink) != 0
3629}
3630
3631// supportedSkusResultPreparer prepares a request to retrieve the next set of results.
3632// It returns nil if no more results exist.
3633func (ssr SupportedSkusResult) supportedSkusResultPreparer(ctx context.Context) (*http.Request, error) {
3634	if !ssr.hasNextLink() {
3635		return nil, nil
3636	}
3637	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3638		autorest.AsJSON(),
3639		autorest.AsGet(),
3640		autorest.WithBaseURL(to.String(ssr.NextLink)))
3641}
3642
3643// SupportedSkusResultPage contains a page of SupportedSku values.
3644type SupportedSkusResultPage struct {
3645	fn  func(context.Context, SupportedSkusResult) (SupportedSkusResult, error)
3646	ssr SupportedSkusResult
3647}
3648
3649// NextWithContext advances to the next page of values.  If there was an error making
3650// the request the page does not advance and the error is returned.
3651func (page *SupportedSkusResultPage) NextWithContext(ctx context.Context) (err error) {
3652	if tracing.IsEnabled() {
3653		ctx = tracing.StartSpan(ctx, fqdn+"/SupportedSkusResultPage.NextWithContext")
3654		defer func() {
3655			sc := -1
3656			if page.Response().Response.Response != nil {
3657				sc = page.Response().Response.Response.StatusCode
3658			}
3659			tracing.EndSpan(ctx, sc, err)
3660		}()
3661	}
3662	for {
3663		next, err := page.fn(ctx, page.ssr)
3664		if err != nil {
3665			return err
3666		}
3667		page.ssr = next
3668		if !next.hasNextLink() || !next.IsEmpty() {
3669			break
3670		}
3671	}
3672	return nil
3673}
3674
3675// Next advances to the next page of values.  If there was an error making
3676// the request the page does not advance and the error is returned.
3677// Deprecated: Use NextWithContext() instead.
3678func (page *SupportedSkusResultPage) Next() error {
3679	return page.NextWithContext(context.Background())
3680}
3681
3682// NotDone returns true if the page enumeration should be started or is not yet complete.
3683func (page SupportedSkusResultPage) NotDone() bool {
3684	return !page.ssr.IsEmpty()
3685}
3686
3687// Response returns the raw server response from the last page request.
3688func (page SupportedSkusResultPage) Response() SupportedSkusResult {
3689	return page.ssr
3690}
3691
3692// Values returns the slice of values for the current page or nil if there are no values.
3693func (page SupportedSkusResultPage) Values() []SupportedSku {
3694	if page.ssr.IsEmpty() {
3695		return nil
3696	}
3697	return *page.ssr.Value
3698}
3699
3700// Creates a new instance of the SupportedSkusResultPage type.
3701func NewSupportedSkusResultPage(cur SupportedSkusResult, getNextPage func(context.Context, SupportedSkusResult) (SupportedSkusResult, error)) SupportedSkusResultPage {
3702	return SupportedSkusResultPage{
3703		fn:  getNextPage,
3704		ssr: cur,
3705	}
3706}
3707
3708// TaskContainerSettings ...
3709type TaskContainerSettings struct {
3710	// ContainerRunOptions - These additional options are supplied as arguments to the "docker create" command, in addition to those controlled by the Batch Service.
3711	ContainerRunOptions *string `json:"containerRunOptions,omitempty"`
3712	// 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.
3713	ImageName *string `json:"imageName,omitempty"`
3714	// Registry - This setting can be omitted if was already provided at pool creation.
3715	Registry *ContainerRegistry `json:"registry,omitempty"`
3716	// WorkingDirectory - Possible values include: 'ContainerWorkingDirectoryTaskWorkingDirectory', 'ContainerWorkingDirectoryContainerImageDefault'
3717	WorkingDirectory ContainerWorkingDirectory `json:"workingDirectory,omitempty"`
3718}
3719
3720// TaskSchedulingPolicy ...
3721type TaskSchedulingPolicy struct {
3722	// NodeFillType - Possible values include: 'ComputeNodeFillTypeSpread', 'ComputeNodeFillTypePack'
3723	NodeFillType ComputeNodeFillType `json:"nodeFillType,omitempty"`
3724}
3725
3726// UserAccount ...
3727type UserAccount struct {
3728	Name     *string `json:"name,omitempty"`
3729	Password *string `json:"password,omitempty"`
3730	// ElevationLevel - nonAdmin - The auto user is a standard user without elevated access. admin - The auto user is a user with elevated access and operates with full Administrator permissions. The default value is nonAdmin. Possible values include: 'ElevationLevelNonAdmin', 'ElevationLevelAdmin'
3731	ElevationLevel ElevationLevel `json:"elevationLevel,omitempty"`
3732	// LinuxUserConfiguration - This property is ignored if specified on a Windows pool. If not specified, the user is created with the default options.
3733	LinuxUserConfiguration *LinuxUserConfiguration `json:"linuxUserConfiguration,omitempty"`
3734	// 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.
3735	WindowsUserConfiguration *WindowsUserConfiguration `json:"windowsUserConfiguration,omitempty"`
3736}
3737
3738// UserAssignedIdentities the list of associated user identities.
3739type UserAssignedIdentities struct {
3740	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
3741	PrincipalID *string `json:"principalId,omitempty"`
3742	// ClientID - READ-ONLY; The client id of user assigned identity.
3743	ClientID *string `json:"clientId,omitempty"`
3744}
3745
3746// MarshalJSON is the custom marshaler for UserAssignedIdentities.
3747func (uai UserAssignedIdentities) MarshalJSON() ([]byte, error) {
3748	objectMap := make(map[string]interface{})
3749	return json.Marshal(objectMap)
3750}
3751
3752// UserIdentity specify either the userName or autoUser property, but not both.
3753type UserIdentity struct {
3754	// UserName - The userName and autoUser properties are mutually exclusive; you must specify one but not both.
3755	UserName *string `json:"userName,omitempty"`
3756	// AutoUser - The userName and autoUser properties are mutually exclusive; you must specify one but not both.
3757	AutoUser *AutoUserSpecification `json:"autoUser,omitempty"`
3758}
3759
3760// VirtualMachineConfiguration ...
3761type VirtualMachineConfiguration struct {
3762	ImageReference *ImageReference `json:"imageReference,omitempty"`
3763	// NodeAgentSkuID - The Batch node agent is a program that runs on each node in the pool, and provides the command-and-control interface between the node and the Batch service. There are different implementations of the node agent, known as SKUs, for different operating systems. You must specify a node agent SKU which matches the selected image reference. To get the list of supported node agent SKUs along with their list of verified image references, see the 'List supported node agent SKUs' operation.
3764	NodeAgentSkuID *string `json:"nodeAgentSkuId,omitempty"`
3765	// WindowsConfiguration - This property must not be specified if the imageReference specifies a Linux OS image.
3766	WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
3767	// DataDisks - This property must be specified if the compute nodes in the pool need to have empty data disks attached to them.
3768	DataDisks *[]DataDisk `json:"dataDisks,omitempty"`
3769	// LicenseType - This only applies to images that contain the Windows operating system, and should only be used when you hold valid on-premises licenses for the nodes which will be deployed. If omitted, no on-premises licensing discount is applied. Values are:
3770	//  Windows_Server - The on-premises license is for Windows Server.
3771	//  Windows_Client - The on-premises license is for Windows Client.
3772	LicenseType *string `json:"licenseType,omitempty"`
3773	// ContainerConfiguration - If specified, setup is performed on each node in the pool to allow tasks to run in containers. All regular tasks and job manager tasks run on this pool must specify the containerSettings property, and all other tasks may specify it.
3774	ContainerConfiguration *ContainerConfiguration `json:"containerConfiguration,omitempty"`
3775	// DiskEncryptionConfiguration - If specified, encryption is performed on each node in the pool during node provisioning.
3776	DiskEncryptionConfiguration *DiskEncryptionConfiguration `json:"diskEncryptionConfiguration,omitempty"`
3777	// NodePlacementConfiguration - This configuration will specify rules on how nodes in the pool will be physically allocated.
3778	NodePlacementConfiguration *NodePlacementConfiguration `json:"nodePlacementConfiguration,omitempty"`
3779	// Extensions - If specified, the extensions mentioned in this configuration will be installed on each node.
3780	Extensions *[]VMExtension `json:"extensions,omitempty"`
3781	// OsDisk - Contains configuration for ephemeral OSDisk settings.
3782	OsDisk *OSDisk `json:"osDisk,omitempty"`
3783}
3784
3785// VirtualMachineFamilyCoreQuota a VM Family and its associated core quota for the Batch account.
3786type VirtualMachineFamilyCoreQuota struct {
3787	// Name - READ-ONLY; The Virtual Machine family name.
3788	Name *string `json:"name,omitempty"`
3789	// CoreQuota - READ-ONLY; The core quota for the VM family for the Batch account.
3790	CoreQuota *int32 `json:"coreQuota,omitempty"`
3791}
3792
3793// MarshalJSON is the custom marshaler for VirtualMachineFamilyCoreQuota.
3794func (vmfcq VirtualMachineFamilyCoreQuota) MarshalJSON() ([]byte, error) {
3795	objectMap := make(map[string]interface{})
3796	return json.Marshal(objectMap)
3797}
3798
3799// VMExtension ...
3800type VMExtension struct {
3801	Name               *string `json:"name,omitempty"`
3802	Publisher          *string `json:"publisher,omitempty"`
3803	Type               *string `json:"type,omitempty"`
3804	TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
3805	// AutoUpgradeMinorVersion - Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
3806	AutoUpgradeMinorVersion *bool       `json:"autoUpgradeMinorVersion,omitempty"`
3807	Settings                interface{} `json:"settings,omitempty"`
3808	// ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
3809	ProtectedSettings interface{} `json:"protectedSettings,omitempty"`
3810	// ProvisionAfterExtensions - Collection of extension names after which this extension needs to be provisioned.
3811	ProvisionAfterExtensions *[]string `json:"provisionAfterExtensions,omitempty"`
3812}
3813
3814// WindowsConfiguration ...
3815type WindowsConfiguration struct {
3816	// EnableAutomaticUpdates - If omitted, the default value is true.
3817	EnableAutomaticUpdates *bool `json:"enableAutomaticUpdates,omitempty"`
3818}
3819
3820// WindowsUserConfiguration ...
3821type WindowsUserConfiguration struct {
3822	// LoginMode - Specifies login mode for the user. The default value for VirtualMachineConfiguration pools is interactive mode and for CloudServiceConfiguration pools is batch mode. Possible values include: 'LoginModeBatch', 'LoginModeInteractive'
3823	LoginMode LoginMode `json:"loginMode,omitempty"`
3824}
3825