1package containerservice
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/containerservice/mgmt/2021-03-01/containerservice"
22
23// AccessProfile profile for enabling a user to access a managed cluster.
24type AccessProfile struct {
25	// KubeConfig - Base64-encoded Kubernetes configuration file.
26	KubeConfig *[]byte `json:"kubeConfig,omitempty"`
27}
28
29// AgentPool agent Pool.
30type AgentPool struct {
31	autorest.Response `json:"-"`
32	// ManagedClusterAgentPoolProfileProperties - Properties of an agent pool.
33	*ManagedClusterAgentPoolProfileProperties `json:"properties,omitempty"`
34	// ID - READ-ONLY; Resource ID.
35	ID *string `json:"id,omitempty"`
36	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
37	Name *string `json:"name,omitempty"`
38	// Type - READ-ONLY; Resource type
39	Type *string `json:"type,omitempty"`
40}
41
42// MarshalJSON is the custom marshaler for AgentPool.
43func (ap AgentPool) MarshalJSON() ([]byte, error) {
44	objectMap := make(map[string]interface{})
45	if ap.ManagedClusterAgentPoolProfileProperties != nil {
46		objectMap["properties"] = ap.ManagedClusterAgentPoolProfileProperties
47	}
48	return json.Marshal(objectMap)
49}
50
51// UnmarshalJSON is the custom unmarshaler for AgentPool struct.
52func (ap *AgentPool) UnmarshalJSON(body []byte) error {
53	var m map[string]*json.RawMessage
54	err := json.Unmarshal(body, &m)
55	if err != nil {
56		return err
57	}
58	for k, v := range m {
59		switch k {
60		case "properties":
61			if v != nil {
62				var managedClusterAgentPoolProfileProperties ManagedClusterAgentPoolProfileProperties
63				err = json.Unmarshal(*v, &managedClusterAgentPoolProfileProperties)
64				if err != nil {
65					return err
66				}
67				ap.ManagedClusterAgentPoolProfileProperties = &managedClusterAgentPoolProfileProperties
68			}
69		case "id":
70			if v != nil {
71				var ID string
72				err = json.Unmarshal(*v, &ID)
73				if err != nil {
74					return err
75				}
76				ap.ID = &ID
77			}
78		case "name":
79			if v != nil {
80				var name string
81				err = json.Unmarshal(*v, &name)
82				if err != nil {
83					return err
84				}
85				ap.Name = &name
86			}
87		case "type":
88			if v != nil {
89				var typeVar string
90				err = json.Unmarshal(*v, &typeVar)
91				if err != nil {
92					return err
93				}
94				ap.Type = &typeVar
95			}
96		}
97	}
98
99	return nil
100}
101
102// AgentPoolAvailableVersions the list of available versions for an agent pool.
103type AgentPoolAvailableVersions struct {
104	autorest.Response `json:"-"`
105	// ID - READ-ONLY; Id of the agent pool available versions.
106	ID *string `json:"id,omitempty"`
107	// Name - READ-ONLY; Name of the agent pool available versions.
108	Name *string `json:"name,omitempty"`
109	// Type - READ-ONLY; Type of the agent pool  available versions.
110	Type *string `json:"type,omitempty"`
111	// AgentPoolAvailableVersionsProperties - Properties of agent pool available versions.
112	*AgentPoolAvailableVersionsProperties `json:"properties,omitempty"`
113}
114
115// MarshalJSON is the custom marshaler for AgentPoolAvailableVersions.
116func (apav AgentPoolAvailableVersions) MarshalJSON() ([]byte, error) {
117	objectMap := make(map[string]interface{})
118	if apav.AgentPoolAvailableVersionsProperties != nil {
119		objectMap["properties"] = apav.AgentPoolAvailableVersionsProperties
120	}
121	return json.Marshal(objectMap)
122}
123
124// UnmarshalJSON is the custom unmarshaler for AgentPoolAvailableVersions struct.
125func (apav *AgentPoolAvailableVersions) UnmarshalJSON(body []byte) error {
126	var m map[string]*json.RawMessage
127	err := json.Unmarshal(body, &m)
128	if err != nil {
129		return err
130	}
131	for k, v := range m {
132		switch k {
133		case "id":
134			if v != nil {
135				var ID string
136				err = json.Unmarshal(*v, &ID)
137				if err != nil {
138					return err
139				}
140				apav.ID = &ID
141			}
142		case "name":
143			if v != nil {
144				var name string
145				err = json.Unmarshal(*v, &name)
146				if err != nil {
147					return err
148				}
149				apav.Name = &name
150			}
151		case "type":
152			if v != nil {
153				var typeVar string
154				err = json.Unmarshal(*v, &typeVar)
155				if err != nil {
156					return err
157				}
158				apav.Type = &typeVar
159			}
160		case "properties":
161			if v != nil {
162				var agentPoolAvailableVersionsProperties AgentPoolAvailableVersionsProperties
163				err = json.Unmarshal(*v, &agentPoolAvailableVersionsProperties)
164				if err != nil {
165					return err
166				}
167				apav.AgentPoolAvailableVersionsProperties = &agentPoolAvailableVersionsProperties
168			}
169		}
170	}
171
172	return nil
173}
174
175// AgentPoolAvailableVersionsProperties the list of available agent pool versions.
176type AgentPoolAvailableVersionsProperties struct {
177	// AgentPoolVersions - List of versions available for agent pool.
178	AgentPoolVersions *[]AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem `json:"agentPoolVersions,omitempty"`
179}
180
181// AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem ...
182type AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem struct {
183	// Default - Whether this version is the default agent pool version.
184	Default *bool `json:"default,omitempty"`
185	// KubernetesVersion - Kubernetes version (major, minor, patch).
186	KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
187	// IsPreview - Whether Kubernetes version is currently in preview.
188	IsPreview *bool `json:"isPreview,omitempty"`
189}
190
191// AgentPoolListResult the response from the List Agent Pools operation.
192type AgentPoolListResult struct {
193	autorest.Response `json:"-"`
194	// Value - The list of agent pools.
195	Value *[]AgentPool `json:"value,omitempty"`
196	// NextLink - READ-ONLY; The URL to get the next set of agent pool results.
197	NextLink *string `json:"nextLink,omitempty"`
198}
199
200// MarshalJSON is the custom marshaler for AgentPoolListResult.
201func (aplr AgentPoolListResult) MarshalJSON() ([]byte, error) {
202	objectMap := make(map[string]interface{})
203	if aplr.Value != nil {
204		objectMap["value"] = aplr.Value
205	}
206	return json.Marshal(objectMap)
207}
208
209// AgentPoolListResultIterator provides access to a complete listing of AgentPool values.
210type AgentPoolListResultIterator struct {
211	i    int
212	page AgentPoolListResultPage
213}
214
215// NextWithContext advances to the next value.  If there was an error making
216// the request the iterator does not advance and the error is returned.
217func (iter *AgentPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
218	if tracing.IsEnabled() {
219		ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolListResultIterator.NextWithContext")
220		defer func() {
221			sc := -1
222			if iter.Response().Response.Response != nil {
223				sc = iter.Response().Response.Response.StatusCode
224			}
225			tracing.EndSpan(ctx, sc, err)
226		}()
227	}
228	iter.i++
229	if iter.i < len(iter.page.Values()) {
230		return nil
231	}
232	err = iter.page.NextWithContext(ctx)
233	if err != nil {
234		iter.i--
235		return err
236	}
237	iter.i = 0
238	return nil
239}
240
241// Next advances to the next value.  If there was an error making
242// the request the iterator does not advance and the error is returned.
243// Deprecated: Use NextWithContext() instead.
244func (iter *AgentPoolListResultIterator) Next() error {
245	return iter.NextWithContext(context.Background())
246}
247
248// NotDone returns true if the enumeration should be started or is not yet complete.
249func (iter AgentPoolListResultIterator) NotDone() bool {
250	return iter.page.NotDone() && iter.i < len(iter.page.Values())
251}
252
253// Response returns the raw server response from the last page request.
254func (iter AgentPoolListResultIterator) Response() AgentPoolListResult {
255	return iter.page.Response()
256}
257
258// Value returns the current value or a zero-initialized value if the
259// iterator has advanced beyond the end of the collection.
260func (iter AgentPoolListResultIterator) Value() AgentPool {
261	if !iter.page.NotDone() {
262		return AgentPool{}
263	}
264	return iter.page.Values()[iter.i]
265}
266
267// Creates a new instance of the AgentPoolListResultIterator type.
268func NewAgentPoolListResultIterator(page AgentPoolListResultPage) AgentPoolListResultIterator {
269	return AgentPoolListResultIterator{page: page}
270}
271
272// IsEmpty returns true if the ListResult contains no values.
273func (aplr AgentPoolListResult) IsEmpty() bool {
274	return aplr.Value == nil || len(*aplr.Value) == 0
275}
276
277// hasNextLink returns true if the NextLink is not empty.
278func (aplr AgentPoolListResult) hasNextLink() bool {
279	return aplr.NextLink != nil && len(*aplr.NextLink) != 0
280}
281
282// agentPoolListResultPreparer prepares a request to retrieve the next set of results.
283// It returns nil if no more results exist.
284func (aplr AgentPoolListResult) agentPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
285	if !aplr.hasNextLink() {
286		return nil, nil
287	}
288	return autorest.Prepare((&http.Request{}).WithContext(ctx),
289		autorest.AsJSON(),
290		autorest.AsGet(),
291		autorest.WithBaseURL(to.String(aplr.NextLink)))
292}
293
294// AgentPoolListResultPage contains a page of AgentPool values.
295type AgentPoolListResultPage struct {
296	fn   func(context.Context, AgentPoolListResult) (AgentPoolListResult, error)
297	aplr AgentPoolListResult
298}
299
300// NextWithContext advances to the next page of values.  If there was an error making
301// the request the page does not advance and the error is returned.
302func (page *AgentPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
303	if tracing.IsEnabled() {
304		ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolListResultPage.NextWithContext")
305		defer func() {
306			sc := -1
307			if page.Response().Response.Response != nil {
308				sc = page.Response().Response.Response.StatusCode
309			}
310			tracing.EndSpan(ctx, sc, err)
311		}()
312	}
313	for {
314		next, err := page.fn(ctx, page.aplr)
315		if err != nil {
316			return err
317		}
318		page.aplr = next
319		if !next.hasNextLink() || !next.IsEmpty() {
320			break
321		}
322	}
323	return nil
324}
325
326// Next advances to the next page of values.  If there was an error making
327// the request the page does not advance and the error is returned.
328// Deprecated: Use NextWithContext() instead.
329func (page *AgentPoolListResultPage) Next() error {
330	return page.NextWithContext(context.Background())
331}
332
333// NotDone returns true if the page enumeration should be started or is not yet complete.
334func (page AgentPoolListResultPage) NotDone() bool {
335	return !page.aplr.IsEmpty()
336}
337
338// Response returns the raw server response from the last page request.
339func (page AgentPoolListResultPage) Response() AgentPoolListResult {
340	return page.aplr
341}
342
343// Values returns the slice of values for the current page or nil if there are no values.
344func (page AgentPoolListResultPage) Values() []AgentPool {
345	if page.aplr.IsEmpty() {
346		return nil
347	}
348	return *page.aplr.Value
349}
350
351// Creates a new instance of the AgentPoolListResultPage type.
352func NewAgentPoolListResultPage(cur AgentPoolListResult, getNextPage func(context.Context, AgentPoolListResult) (AgentPoolListResult, error)) AgentPoolListResultPage {
353	return AgentPoolListResultPage{
354		fn:   getNextPage,
355		aplr: cur,
356	}
357}
358
359// AgentPoolsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
360// long-running operation.
361type AgentPoolsCreateOrUpdateFuture struct {
362	azure.FutureAPI
363	// Result returns the result of the asynchronous operation.
364	// If the operation has not completed it will return an error.
365	Result func(AgentPoolsClient) (AgentPool, error)
366}
367
368// UnmarshalJSON is the custom unmarshaller for CreateFuture.
369func (future *AgentPoolsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
370	var azFuture azure.Future
371	if err := json.Unmarshal(body, &azFuture); err != nil {
372		return err
373	}
374	future.FutureAPI = &azFuture
375	future.Result = future.result
376	return nil
377}
378
379// result is the default implementation for AgentPoolsCreateOrUpdateFuture.Result.
380func (future *AgentPoolsCreateOrUpdateFuture) result(client AgentPoolsClient) (ap AgentPool, err error) {
381	var done bool
382	done, err = future.DoneWithContext(context.Background(), client)
383	if err != nil {
384		err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
385		return
386	}
387	if !done {
388		ap.Response.Response = future.Response()
389		err = azure.NewAsyncOpIncompleteError("containerservice.AgentPoolsCreateOrUpdateFuture")
390		return
391	}
392	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
393	if ap.Response.Response, err = future.GetResult(sender); err == nil && ap.Response.Response.StatusCode != http.StatusNoContent {
394		ap, err = client.CreateOrUpdateResponder(ap.Response.Response)
395		if err != nil {
396			err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsCreateOrUpdateFuture", "Result", ap.Response.Response, "Failure responding to request")
397		}
398	}
399	return
400}
401
402// AgentPoolsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
403// operation.
404type AgentPoolsDeleteFuture struct {
405	azure.FutureAPI
406	// Result returns the result of the asynchronous operation.
407	// If the operation has not completed it will return an error.
408	Result func(AgentPoolsClient) (autorest.Response, error)
409}
410
411// UnmarshalJSON is the custom unmarshaller for CreateFuture.
412func (future *AgentPoolsDeleteFuture) UnmarshalJSON(body []byte) error {
413	var azFuture azure.Future
414	if err := json.Unmarshal(body, &azFuture); err != nil {
415		return err
416	}
417	future.FutureAPI = &azFuture
418	future.Result = future.result
419	return nil
420}
421
422// result is the default implementation for AgentPoolsDeleteFuture.Result.
423func (future *AgentPoolsDeleteFuture) result(client AgentPoolsClient) (ar autorest.Response, err error) {
424	var done bool
425	done, err = future.DoneWithContext(context.Background(), client)
426	if err != nil {
427		err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsDeleteFuture", "Result", future.Response(), "Polling failure")
428		return
429	}
430	if !done {
431		ar.Response = future.Response()
432		err = azure.NewAsyncOpIncompleteError("containerservice.AgentPoolsDeleteFuture")
433		return
434	}
435	ar.Response = future.Response()
436	return
437}
438
439// AgentPoolsUpgradeNodeImageVersionFuture an abstraction for monitoring and retrieving the results of a
440// long-running operation.
441type AgentPoolsUpgradeNodeImageVersionFuture struct {
442	azure.FutureAPI
443	// Result returns the result of the asynchronous operation.
444	// If the operation has not completed it will return an error.
445	Result func(AgentPoolsClient) (AgentPool, error)
446}
447
448// UnmarshalJSON is the custom unmarshaller for CreateFuture.
449func (future *AgentPoolsUpgradeNodeImageVersionFuture) UnmarshalJSON(body []byte) error {
450	var azFuture azure.Future
451	if err := json.Unmarshal(body, &azFuture); err != nil {
452		return err
453	}
454	future.FutureAPI = &azFuture
455	future.Result = future.result
456	return nil
457}
458
459// result is the default implementation for AgentPoolsUpgradeNodeImageVersionFuture.Result.
460func (future *AgentPoolsUpgradeNodeImageVersionFuture) result(client AgentPoolsClient) (ap AgentPool, err error) {
461	var done bool
462	done, err = future.DoneWithContext(context.Background(), client)
463	if err != nil {
464		err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsUpgradeNodeImageVersionFuture", "Result", future.Response(), "Polling failure")
465		return
466	}
467	if !done {
468		ap.Response.Response = future.Response()
469		err = azure.NewAsyncOpIncompleteError("containerservice.AgentPoolsUpgradeNodeImageVersionFuture")
470		return
471	}
472	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
473	if ap.Response.Response, err = future.GetResult(sender); err == nil && ap.Response.Response.StatusCode != http.StatusNoContent {
474		ap, err = client.UpgradeNodeImageVersionResponder(ap.Response.Response)
475		if err != nil {
476			err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsUpgradeNodeImageVersionFuture", "Result", ap.Response.Response, "Failure responding to request")
477		}
478	}
479	return
480}
481
482// AgentPoolUpgradeProfile the list of available upgrades for an agent pool.
483type AgentPoolUpgradeProfile struct {
484	autorest.Response `json:"-"`
485	// ID - READ-ONLY; Id of the agent pool upgrade profile.
486	ID *string `json:"id,omitempty"`
487	// Name - READ-ONLY; Name of the agent pool upgrade profile.
488	Name *string `json:"name,omitempty"`
489	// Type - READ-ONLY; Type of the agent pool upgrade profile.
490	Type *string `json:"type,omitempty"`
491	// AgentPoolUpgradeProfileProperties - Properties of agent pool upgrade profile.
492	*AgentPoolUpgradeProfileProperties `json:"properties,omitempty"`
493}
494
495// MarshalJSON is the custom marshaler for AgentPoolUpgradeProfile.
496func (apup AgentPoolUpgradeProfile) MarshalJSON() ([]byte, error) {
497	objectMap := make(map[string]interface{})
498	if apup.AgentPoolUpgradeProfileProperties != nil {
499		objectMap["properties"] = apup.AgentPoolUpgradeProfileProperties
500	}
501	return json.Marshal(objectMap)
502}
503
504// UnmarshalJSON is the custom unmarshaler for AgentPoolUpgradeProfile struct.
505func (apup *AgentPoolUpgradeProfile) UnmarshalJSON(body []byte) error {
506	var m map[string]*json.RawMessage
507	err := json.Unmarshal(body, &m)
508	if err != nil {
509		return err
510	}
511	for k, v := range m {
512		switch k {
513		case "id":
514			if v != nil {
515				var ID string
516				err = json.Unmarshal(*v, &ID)
517				if err != nil {
518					return err
519				}
520				apup.ID = &ID
521			}
522		case "name":
523			if v != nil {
524				var name string
525				err = json.Unmarshal(*v, &name)
526				if err != nil {
527					return err
528				}
529				apup.Name = &name
530			}
531		case "type":
532			if v != nil {
533				var typeVar string
534				err = json.Unmarshal(*v, &typeVar)
535				if err != nil {
536					return err
537				}
538				apup.Type = &typeVar
539			}
540		case "properties":
541			if v != nil {
542				var agentPoolUpgradeProfileProperties AgentPoolUpgradeProfileProperties
543				err = json.Unmarshal(*v, &agentPoolUpgradeProfileProperties)
544				if err != nil {
545					return err
546				}
547				apup.AgentPoolUpgradeProfileProperties = &agentPoolUpgradeProfileProperties
548			}
549		}
550	}
551
552	return nil
553}
554
555// AgentPoolUpgradeProfileProperties the list of available upgrade versions.
556type AgentPoolUpgradeProfileProperties struct {
557	// KubernetesVersion - Kubernetes version (major, minor, patch).
558	KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
559	// OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'OSTypeLinux', 'OSTypeWindows'
560	OsType OSType `json:"osType,omitempty"`
561	// Upgrades - List of orchestrator types and versions available for upgrade.
562	Upgrades *[]AgentPoolUpgradeProfilePropertiesUpgradesItem `json:"upgrades,omitempty"`
563	// LatestNodeImageVersion - LatestNodeImageVersion is the latest AKS supported node image version.
564	LatestNodeImageVersion *string `json:"latestNodeImageVersion,omitempty"`
565}
566
567// AgentPoolUpgradeProfilePropertiesUpgradesItem ...
568type AgentPoolUpgradeProfilePropertiesUpgradesItem struct {
569	// KubernetesVersion - Kubernetes version (major, minor, patch).
570	KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
571	// IsPreview - Whether Kubernetes version is currently in preview.
572	IsPreview *bool `json:"isPreview,omitempty"`
573}
574
575// AgentPoolUpgradeSettings settings for upgrading an agentpool
576type AgentPoolUpgradeSettings struct {
577	// MaxSurge - Count or percentage of additional nodes to be added during upgrade. If empty uses AKS default
578	MaxSurge *string `json:"maxSurge,omitempty"`
579}
580
581// CloudError an error response from the Container service.
582type CloudError struct {
583	// Error - Details about the error.
584	Error *CloudErrorBody `json:"error,omitempty"`
585}
586
587// CloudErrorBody an error response from the Container service.
588type CloudErrorBody struct {
589	// Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
590	Code *string `json:"code,omitempty"`
591	// Message - A message describing the error, intended to be suitable for display in a user interface.
592	Message *string `json:"message,omitempty"`
593	// Target - The target of the particular error. For example, the name of the property in error.
594	Target *string `json:"target,omitempty"`
595	// Details - A list of additional details about the error.
596	Details *[]CloudErrorBody `json:"details,omitempty"`
597}
598
599// CommandResultProperties ...
600type CommandResultProperties struct {
601	// ProvisioningState - READ-ONLY; provisioning State
602	ProvisioningState *string `json:"provisioningState,omitempty"`
603	// ExitCode - READ-ONLY; exit code of the command
604	ExitCode *int32 `json:"exitCode,omitempty"`
605	// StartedAt - READ-ONLY; time when the command started.
606	StartedAt *date.Time `json:"startedAt,omitempty"`
607	// FinishedAt - READ-ONLY; time when the command finished.
608	FinishedAt *date.Time `json:"finishedAt,omitempty"`
609	// Logs - READ-ONLY; command output.
610	Logs *string `json:"logs,omitempty"`
611	// Reason - READ-ONLY; explain why provisioningState is set to failed (if so).
612	Reason *string `json:"reason,omitempty"`
613}
614
615// MarshalJSON is the custom marshaler for CommandResultProperties.
616func (crp CommandResultProperties) MarshalJSON() ([]byte, error) {
617	objectMap := make(map[string]interface{})
618	return json.Marshal(objectMap)
619}
620
621// CredentialResult the credential result response.
622type CredentialResult struct {
623	// Name - READ-ONLY; The name of the credential.
624	Name *string `json:"name,omitempty"`
625	// Value - READ-ONLY; Base64-encoded Kubernetes configuration file.
626	Value *[]byte `json:"value,omitempty"`
627}
628
629// MarshalJSON is the custom marshaler for CredentialResult.
630func (cr CredentialResult) MarshalJSON() ([]byte, error) {
631	objectMap := make(map[string]interface{})
632	return json.Marshal(objectMap)
633}
634
635// CredentialResults the list of credential result response.
636type CredentialResults struct {
637	autorest.Response `json:"-"`
638	// Kubeconfigs - READ-ONLY; Base64-encoded Kubernetes configuration file.
639	Kubeconfigs *[]CredentialResult `json:"kubeconfigs,omitempty"`
640}
641
642// MarshalJSON is the custom marshaler for CredentialResults.
643func (cr CredentialResults) MarshalJSON() ([]byte, error) {
644	objectMap := make(map[string]interface{})
645	return json.Marshal(objectMap)
646}
647
648// DiagnosticsProfile profile for diagnostics on the container service cluster.
649type DiagnosticsProfile struct {
650	// VMDiagnostics - Profile for diagnostics on the container service VMs.
651	VMDiagnostics *VMDiagnostics `json:"vmDiagnostics,omitempty"`
652}
653
654// ExtendedLocation the complex type of the extended location.
655type ExtendedLocation struct {
656	// Name - The name of the extended location.
657	Name *string `json:"name,omitempty"`
658	// Type - The type of the extended location. Possible values include: 'ExtendedLocationTypesEdgeZone'
659	Type ExtendedLocationTypes `json:"type,omitempty"`
660}
661
662// KubeletConfig kubelet configurations of agent nodes.
663type KubeletConfig struct {
664	// CPUManagerPolicy - CPU Manager policy to use.
665	CPUManagerPolicy *string `json:"cpuManagerPolicy,omitempty"`
666	// CPUCfsQuota - Enable CPU CFS quota enforcement for containers that specify CPU limits.
667	CPUCfsQuota *bool `json:"cpuCfsQuota,omitempty"`
668	// CPUCfsQuotaPeriod - Sets CPU CFS quota period value.
669	CPUCfsQuotaPeriod *string `json:"cpuCfsQuotaPeriod,omitempty"`
670	// ImageGcHighThreshold - The percent of disk usage after which image garbage collection is always run.
671	ImageGcHighThreshold *int32 `json:"imageGcHighThreshold,omitempty"`
672	// ImageGcLowThreshold - The percent of disk usage before which image garbage collection is never run.
673	ImageGcLowThreshold *int32 `json:"imageGcLowThreshold,omitempty"`
674	// TopologyManagerPolicy - Topology Manager policy to use.
675	TopologyManagerPolicy *string `json:"topologyManagerPolicy,omitempty"`
676	// AllowedUnsafeSysctls - Allowlist of unsafe sysctls or unsafe sysctl patterns (ending in `*`).
677	AllowedUnsafeSysctls *[]string `json:"allowedUnsafeSysctls,omitempty"`
678	// FailSwapOn - If set to true it will make the Kubelet fail to start if swap is enabled on the node.
679	FailSwapOn *bool `json:"failSwapOn,omitempty"`
680	// ContainerLogMaxSizeMB - The maximum size (e.g. 10Mi) of container log file before it is rotated.
681	ContainerLogMaxSizeMB *int32 `json:"containerLogMaxSizeMB,omitempty"`
682	// ContainerLogMaxFiles - The maximum number of container log files that can be present for a container. The number must be ≥ 2.
683	ContainerLogMaxFiles *int32 `json:"containerLogMaxFiles,omitempty"`
684	// PodMaxPids - The maximum number of processes per pod.
685	PodMaxPids *int32 `json:"podMaxPids,omitempty"`
686}
687
688// LinuxOSConfig OS configurations of Linux agent nodes.
689type LinuxOSConfig struct {
690	// Sysctls - Sysctl settings for Linux agent nodes.
691	Sysctls *SysctlConfig `json:"sysctls,omitempty"`
692	// TransparentHugePageEnabled - Transparent Huge Page enabled configuration.
693	TransparentHugePageEnabled *string `json:"transparentHugePageEnabled,omitempty"`
694	// TransparentHugePageDefrag - Transparent Huge Page defrag configuration.
695	TransparentHugePageDefrag *string `json:"transparentHugePageDefrag,omitempty"`
696	// SwapFileSizeMB - SwapFileSizeMB specifies size in MB of a swap file will be created on each node.
697	SwapFileSizeMB *int32 `json:"swapFileSizeMB,omitempty"`
698}
699
700// LinuxProfile profile for Linux VMs in the container service cluster.
701type LinuxProfile struct {
702	// AdminUsername - The administrator username to use for Linux VMs.
703	AdminUsername *string `json:"adminUsername,omitempty"`
704	// SSH - SSH configuration for Linux-based VMs running on Azure.
705	SSH *SSHConfiguration `json:"ssh,omitempty"`
706}
707
708// MaintenanceConfiguration maintenance configuration.
709type MaintenanceConfiguration struct {
710	autorest.Response `json:"-"`
711	// SystemData - READ-ONLY; The system meta data relating to this resource.
712	SystemData *SystemData `json:"systemData,omitempty"`
713	// MaintenanceConfigurationProperties - Properties of a default maintenance configuration.
714	*MaintenanceConfigurationProperties `json:"properties,omitempty"`
715	// ID - READ-ONLY; Resource ID.
716	ID *string `json:"id,omitempty"`
717	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
718	Name *string `json:"name,omitempty"`
719	// Type - READ-ONLY; Resource type
720	Type *string `json:"type,omitempty"`
721}
722
723// MarshalJSON is the custom marshaler for MaintenanceConfiguration.
724func (mc MaintenanceConfiguration) MarshalJSON() ([]byte, error) {
725	objectMap := make(map[string]interface{})
726	if mc.MaintenanceConfigurationProperties != nil {
727		objectMap["properties"] = mc.MaintenanceConfigurationProperties
728	}
729	return json.Marshal(objectMap)
730}
731
732// UnmarshalJSON is the custom unmarshaler for MaintenanceConfiguration struct.
733func (mc *MaintenanceConfiguration) UnmarshalJSON(body []byte) error {
734	var m map[string]*json.RawMessage
735	err := json.Unmarshal(body, &m)
736	if err != nil {
737		return err
738	}
739	for k, v := range m {
740		switch k {
741		case "systemData":
742			if v != nil {
743				var systemData SystemData
744				err = json.Unmarshal(*v, &systemData)
745				if err != nil {
746					return err
747				}
748				mc.SystemData = &systemData
749			}
750		case "properties":
751			if v != nil {
752				var maintenanceConfigurationProperties MaintenanceConfigurationProperties
753				err = json.Unmarshal(*v, &maintenanceConfigurationProperties)
754				if err != nil {
755					return err
756				}
757				mc.MaintenanceConfigurationProperties = &maintenanceConfigurationProperties
758			}
759		case "id":
760			if v != nil {
761				var ID string
762				err = json.Unmarshal(*v, &ID)
763				if err != nil {
764					return err
765				}
766				mc.ID = &ID
767			}
768		case "name":
769			if v != nil {
770				var name string
771				err = json.Unmarshal(*v, &name)
772				if err != nil {
773					return err
774				}
775				mc.Name = &name
776			}
777		case "type":
778			if v != nil {
779				var typeVar string
780				err = json.Unmarshal(*v, &typeVar)
781				if err != nil {
782					return err
783				}
784				mc.Type = &typeVar
785			}
786		}
787	}
788
789	return nil
790}
791
792// MaintenanceConfigurationListResult the response from the List maintenance configurations operation.
793type MaintenanceConfigurationListResult struct {
794	autorest.Response `json:"-"`
795	// Value - The list of maintenance configurations.
796	Value *[]MaintenanceConfiguration `json:"value,omitempty"`
797	// NextLink - READ-ONLY; The URL to get the next set of maintenance configuration results.
798	NextLink *string `json:"nextLink,omitempty"`
799}
800
801// MarshalJSON is the custom marshaler for MaintenanceConfigurationListResult.
802func (mclr MaintenanceConfigurationListResult) MarshalJSON() ([]byte, error) {
803	objectMap := make(map[string]interface{})
804	if mclr.Value != nil {
805		objectMap["value"] = mclr.Value
806	}
807	return json.Marshal(objectMap)
808}
809
810// MaintenanceConfigurationListResultIterator provides access to a complete listing of
811// MaintenanceConfiguration values.
812type MaintenanceConfigurationListResultIterator struct {
813	i    int
814	page MaintenanceConfigurationListResultPage
815}
816
817// NextWithContext advances to the next value.  If there was an error making
818// the request the iterator does not advance and the error is returned.
819func (iter *MaintenanceConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
820	if tracing.IsEnabled() {
821		ctx = tracing.StartSpan(ctx, fqdn+"/MaintenanceConfigurationListResultIterator.NextWithContext")
822		defer func() {
823			sc := -1
824			if iter.Response().Response.Response != nil {
825				sc = iter.Response().Response.Response.StatusCode
826			}
827			tracing.EndSpan(ctx, sc, err)
828		}()
829	}
830	iter.i++
831	if iter.i < len(iter.page.Values()) {
832		return nil
833	}
834	err = iter.page.NextWithContext(ctx)
835	if err != nil {
836		iter.i--
837		return err
838	}
839	iter.i = 0
840	return nil
841}
842
843// Next advances to the next value.  If there was an error making
844// the request the iterator does not advance and the error is returned.
845// Deprecated: Use NextWithContext() instead.
846func (iter *MaintenanceConfigurationListResultIterator) Next() error {
847	return iter.NextWithContext(context.Background())
848}
849
850// NotDone returns true if the enumeration should be started or is not yet complete.
851func (iter MaintenanceConfigurationListResultIterator) NotDone() bool {
852	return iter.page.NotDone() && iter.i < len(iter.page.Values())
853}
854
855// Response returns the raw server response from the last page request.
856func (iter MaintenanceConfigurationListResultIterator) Response() MaintenanceConfigurationListResult {
857	return iter.page.Response()
858}
859
860// Value returns the current value or a zero-initialized value if the
861// iterator has advanced beyond the end of the collection.
862func (iter MaintenanceConfigurationListResultIterator) Value() MaintenanceConfiguration {
863	if !iter.page.NotDone() {
864		return MaintenanceConfiguration{}
865	}
866	return iter.page.Values()[iter.i]
867}
868
869// Creates a new instance of the MaintenanceConfigurationListResultIterator type.
870func NewMaintenanceConfigurationListResultIterator(page MaintenanceConfigurationListResultPage) MaintenanceConfigurationListResultIterator {
871	return MaintenanceConfigurationListResultIterator{page: page}
872}
873
874// IsEmpty returns true if the ListResult contains no values.
875func (mclr MaintenanceConfigurationListResult) IsEmpty() bool {
876	return mclr.Value == nil || len(*mclr.Value) == 0
877}
878
879// hasNextLink returns true if the NextLink is not empty.
880func (mclr MaintenanceConfigurationListResult) hasNextLink() bool {
881	return mclr.NextLink != nil && len(*mclr.NextLink) != 0
882}
883
884// maintenanceConfigurationListResultPreparer prepares a request to retrieve the next set of results.
885// It returns nil if no more results exist.
886func (mclr MaintenanceConfigurationListResult) maintenanceConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
887	if !mclr.hasNextLink() {
888		return nil, nil
889	}
890	return autorest.Prepare((&http.Request{}).WithContext(ctx),
891		autorest.AsJSON(),
892		autorest.AsGet(),
893		autorest.WithBaseURL(to.String(mclr.NextLink)))
894}
895
896// MaintenanceConfigurationListResultPage contains a page of MaintenanceConfiguration values.
897type MaintenanceConfigurationListResultPage struct {
898	fn   func(context.Context, MaintenanceConfigurationListResult) (MaintenanceConfigurationListResult, error)
899	mclr MaintenanceConfigurationListResult
900}
901
902// NextWithContext advances to the next page of values.  If there was an error making
903// the request the page does not advance and the error is returned.
904func (page *MaintenanceConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
905	if tracing.IsEnabled() {
906		ctx = tracing.StartSpan(ctx, fqdn+"/MaintenanceConfigurationListResultPage.NextWithContext")
907		defer func() {
908			sc := -1
909			if page.Response().Response.Response != nil {
910				sc = page.Response().Response.Response.StatusCode
911			}
912			tracing.EndSpan(ctx, sc, err)
913		}()
914	}
915	for {
916		next, err := page.fn(ctx, page.mclr)
917		if err != nil {
918			return err
919		}
920		page.mclr = next
921		if !next.hasNextLink() || !next.IsEmpty() {
922			break
923		}
924	}
925	return nil
926}
927
928// Next advances to the next page of values.  If there was an error making
929// the request the page does not advance and the error is returned.
930// Deprecated: Use NextWithContext() instead.
931func (page *MaintenanceConfigurationListResultPage) Next() error {
932	return page.NextWithContext(context.Background())
933}
934
935// NotDone returns true if the page enumeration should be started or is not yet complete.
936func (page MaintenanceConfigurationListResultPage) NotDone() bool {
937	return !page.mclr.IsEmpty()
938}
939
940// Response returns the raw server response from the last page request.
941func (page MaintenanceConfigurationListResultPage) Response() MaintenanceConfigurationListResult {
942	return page.mclr
943}
944
945// Values returns the slice of values for the current page or nil if there are no values.
946func (page MaintenanceConfigurationListResultPage) Values() []MaintenanceConfiguration {
947	if page.mclr.IsEmpty() {
948		return nil
949	}
950	return *page.mclr.Value
951}
952
953// Creates a new instance of the MaintenanceConfigurationListResultPage type.
954func NewMaintenanceConfigurationListResultPage(cur MaintenanceConfigurationListResult, getNextPage func(context.Context, MaintenanceConfigurationListResult) (MaintenanceConfigurationListResult, error)) MaintenanceConfigurationListResultPage {
955	return MaintenanceConfigurationListResultPage{
956		fn:   getNextPage,
957		mclr: cur,
958	}
959}
960
961// MaintenanceConfigurationProperties default maintenance configuration properties.
962type MaintenanceConfigurationProperties struct {
963	// TimeInWeek - Weekday time slots allowed to upgrade.
964	TimeInWeek *[]TimeInWeek `json:"timeInWeek,omitempty"`
965	// NotAllowedTime - Time slots on which upgrade is not allowed.
966	NotAllowedTime *[]TimeSpan `json:"notAllowedTime,omitempty"`
967}
968
969// ManagedCluster managed cluster.
970type ManagedCluster struct {
971	autorest.Response `json:"-"`
972	// ManagedClusterProperties - Properties of a managed cluster.
973	*ManagedClusterProperties `json:"properties,omitempty"`
974	// Identity - The identity of the managed cluster, if configured.
975	Identity *ManagedClusterIdentity `json:"identity,omitempty"`
976	// Sku - The managed cluster SKU.
977	Sku *ManagedClusterSKU `json:"sku,omitempty"`
978	// ExtendedLocation - The extended location of the Virtual Machine.
979	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
980	// ID - READ-ONLY; Resource Id
981	ID *string `json:"id,omitempty"`
982	// Name - READ-ONLY; Resource name
983	Name *string `json:"name,omitempty"`
984	// Type - READ-ONLY; Resource type
985	Type *string `json:"type,omitempty"`
986	// Location - Resource location
987	Location *string `json:"location,omitempty"`
988	// Tags - Resource tags
989	Tags map[string]*string `json:"tags"`
990}
991
992// MarshalJSON is the custom marshaler for ManagedCluster.
993func (mc ManagedCluster) MarshalJSON() ([]byte, error) {
994	objectMap := make(map[string]interface{})
995	if mc.ManagedClusterProperties != nil {
996		objectMap["properties"] = mc.ManagedClusterProperties
997	}
998	if mc.Identity != nil {
999		objectMap["identity"] = mc.Identity
1000	}
1001	if mc.Sku != nil {
1002		objectMap["sku"] = mc.Sku
1003	}
1004	if mc.ExtendedLocation != nil {
1005		objectMap["extendedLocation"] = mc.ExtendedLocation
1006	}
1007	if mc.Location != nil {
1008		objectMap["location"] = mc.Location
1009	}
1010	if mc.Tags != nil {
1011		objectMap["tags"] = mc.Tags
1012	}
1013	return json.Marshal(objectMap)
1014}
1015
1016// UnmarshalJSON is the custom unmarshaler for ManagedCluster struct.
1017func (mc *ManagedCluster) UnmarshalJSON(body []byte) error {
1018	var m map[string]*json.RawMessage
1019	err := json.Unmarshal(body, &m)
1020	if err != nil {
1021		return err
1022	}
1023	for k, v := range m {
1024		switch k {
1025		case "properties":
1026			if v != nil {
1027				var managedClusterProperties ManagedClusterProperties
1028				err = json.Unmarshal(*v, &managedClusterProperties)
1029				if err != nil {
1030					return err
1031				}
1032				mc.ManagedClusterProperties = &managedClusterProperties
1033			}
1034		case "identity":
1035			if v != nil {
1036				var identity ManagedClusterIdentity
1037				err = json.Unmarshal(*v, &identity)
1038				if err != nil {
1039					return err
1040				}
1041				mc.Identity = &identity
1042			}
1043		case "sku":
1044			if v != nil {
1045				var sku ManagedClusterSKU
1046				err = json.Unmarshal(*v, &sku)
1047				if err != nil {
1048					return err
1049				}
1050				mc.Sku = &sku
1051			}
1052		case "extendedLocation":
1053			if v != nil {
1054				var extendedLocation ExtendedLocation
1055				err = json.Unmarshal(*v, &extendedLocation)
1056				if err != nil {
1057					return err
1058				}
1059				mc.ExtendedLocation = &extendedLocation
1060			}
1061		case "id":
1062			if v != nil {
1063				var ID string
1064				err = json.Unmarshal(*v, &ID)
1065				if err != nil {
1066					return err
1067				}
1068				mc.ID = &ID
1069			}
1070		case "name":
1071			if v != nil {
1072				var name string
1073				err = json.Unmarshal(*v, &name)
1074				if err != nil {
1075					return err
1076				}
1077				mc.Name = &name
1078			}
1079		case "type":
1080			if v != nil {
1081				var typeVar string
1082				err = json.Unmarshal(*v, &typeVar)
1083				if err != nil {
1084					return err
1085				}
1086				mc.Type = &typeVar
1087			}
1088		case "location":
1089			if v != nil {
1090				var location string
1091				err = json.Unmarshal(*v, &location)
1092				if err != nil {
1093					return err
1094				}
1095				mc.Location = &location
1096			}
1097		case "tags":
1098			if v != nil {
1099				var tags map[string]*string
1100				err = json.Unmarshal(*v, &tags)
1101				if err != nil {
1102					return err
1103				}
1104				mc.Tags = tags
1105			}
1106		}
1107	}
1108
1109	return nil
1110}
1111
1112// ManagedClusterAADProfile aADProfile specifies attributes for Azure Active Directory integration.
1113type ManagedClusterAADProfile struct {
1114	// Managed - Whether to enable managed AAD.
1115	Managed *bool `json:"managed,omitempty"`
1116	// EnableAzureRBAC - Whether to enable Azure RBAC for Kubernetes authorization.
1117	EnableAzureRBAC *bool `json:"enableAzureRBAC,omitempty"`
1118	// AdminGroupObjectIDs - AAD group object IDs that will have admin role of the cluster.
1119	AdminGroupObjectIDs *[]string `json:"adminGroupObjectIDs,omitempty"`
1120	// ClientAppID - The client AAD application ID.
1121	ClientAppID *string `json:"clientAppID,omitempty"`
1122	// ServerAppID - The server AAD application ID.
1123	ServerAppID *string `json:"serverAppID,omitempty"`
1124	// ServerAppSecret - The server AAD application secret.
1125	ServerAppSecret *string `json:"serverAppSecret,omitempty"`
1126	// TenantID - The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription.
1127	TenantID *string `json:"tenantID,omitempty"`
1128}
1129
1130// ManagedClusterAccessProfile managed cluster Access Profile.
1131type ManagedClusterAccessProfile struct {
1132	autorest.Response `json:"-"`
1133	// AccessProfile - AccessProfile of a managed cluster.
1134	*AccessProfile `json:"properties,omitempty"`
1135	// ID - READ-ONLY; Resource Id
1136	ID *string `json:"id,omitempty"`
1137	// Name - READ-ONLY; Resource name
1138	Name *string `json:"name,omitempty"`
1139	// Type - READ-ONLY; Resource type
1140	Type *string `json:"type,omitempty"`
1141	// Location - Resource location
1142	Location *string `json:"location,omitempty"`
1143	// Tags - Resource tags
1144	Tags map[string]*string `json:"tags"`
1145}
1146
1147// MarshalJSON is the custom marshaler for ManagedClusterAccessProfile.
1148func (mcap ManagedClusterAccessProfile) MarshalJSON() ([]byte, error) {
1149	objectMap := make(map[string]interface{})
1150	if mcap.AccessProfile != nil {
1151		objectMap["properties"] = mcap.AccessProfile
1152	}
1153	if mcap.Location != nil {
1154		objectMap["location"] = mcap.Location
1155	}
1156	if mcap.Tags != nil {
1157		objectMap["tags"] = mcap.Tags
1158	}
1159	return json.Marshal(objectMap)
1160}
1161
1162// UnmarshalJSON is the custom unmarshaler for ManagedClusterAccessProfile struct.
1163func (mcap *ManagedClusterAccessProfile) UnmarshalJSON(body []byte) error {
1164	var m map[string]*json.RawMessage
1165	err := json.Unmarshal(body, &m)
1166	if err != nil {
1167		return err
1168	}
1169	for k, v := range m {
1170		switch k {
1171		case "properties":
1172			if v != nil {
1173				var accessProfile AccessProfile
1174				err = json.Unmarshal(*v, &accessProfile)
1175				if err != nil {
1176					return err
1177				}
1178				mcap.AccessProfile = &accessProfile
1179			}
1180		case "id":
1181			if v != nil {
1182				var ID string
1183				err = json.Unmarshal(*v, &ID)
1184				if err != nil {
1185					return err
1186				}
1187				mcap.ID = &ID
1188			}
1189		case "name":
1190			if v != nil {
1191				var name string
1192				err = json.Unmarshal(*v, &name)
1193				if err != nil {
1194					return err
1195				}
1196				mcap.Name = &name
1197			}
1198		case "type":
1199			if v != nil {
1200				var typeVar string
1201				err = json.Unmarshal(*v, &typeVar)
1202				if err != nil {
1203					return err
1204				}
1205				mcap.Type = &typeVar
1206			}
1207		case "location":
1208			if v != nil {
1209				var location string
1210				err = json.Unmarshal(*v, &location)
1211				if err != nil {
1212					return err
1213				}
1214				mcap.Location = &location
1215			}
1216		case "tags":
1217			if v != nil {
1218				var tags map[string]*string
1219				err = json.Unmarshal(*v, &tags)
1220				if err != nil {
1221					return err
1222				}
1223				mcap.Tags = tags
1224			}
1225		}
1226	}
1227
1228	return nil
1229}
1230
1231// ManagedClusterAddonProfile a Kubernetes add-on profile for a managed cluster.
1232type ManagedClusterAddonProfile struct {
1233	// Enabled - Whether the add-on is enabled or not.
1234	Enabled *bool `json:"enabled,omitempty"`
1235	// Config - Key-value pairs for configuring an add-on.
1236	Config map[string]*string `json:"config"`
1237	// Identity - READ-ONLY; Information of user assigned identity used by this add-on.
1238	Identity *ManagedClusterAddonProfileIdentity `json:"identity,omitempty"`
1239}
1240
1241// MarshalJSON is the custom marshaler for ManagedClusterAddonProfile.
1242func (mcap ManagedClusterAddonProfile) MarshalJSON() ([]byte, error) {
1243	objectMap := make(map[string]interface{})
1244	if mcap.Enabled != nil {
1245		objectMap["enabled"] = mcap.Enabled
1246	}
1247	if mcap.Config != nil {
1248		objectMap["config"] = mcap.Config
1249	}
1250	return json.Marshal(objectMap)
1251}
1252
1253// ManagedClusterAddonProfileIdentity information of user assigned identity used by this add-on.
1254type ManagedClusterAddonProfileIdentity struct {
1255	// ResourceID - The resource id of the user assigned identity.
1256	ResourceID *string `json:"resourceId,omitempty"`
1257	// ClientID - The client id of the user assigned identity.
1258	ClientID *string `json:"clientId,omitempty"`
1259	// ObjectID - The object id of the user assigned identity.
1260	ObjectID *string `json:"objectId,omitempty"`
1261}
1262
1263// ManagedClusterAgentPoolProfile profile for the container service agent pool.
1264type ManagedClusterAgentPoolProfile struct {
1265	// Name - Unique name of the agent pool profile in the context of the subscription and resource group.
1266	Name *string `json:"name,omitempty"`
1267	// Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for system pools. The default value is 1.
1268	Count *int32 `json:"count,omitempty"`
1269	// VMSize - Size of agent VMs.
1270	VMSize *string `json:"vmSize,omitempty"`
1271	// OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified.
1272	OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"`
1273	// OsDiskType - OS disk type to be used for machines in a given agent pool. Allowed values are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after creation. Possible values include: 'OSDiskTypeManaged', 'OSDiskTypeEphemeral'
1274	OsDiskType OSDiskType `json:"osDiskType,omitempty"`
1275	// KubeletDiskType - KubeletDiskType determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, resulting in Kubelet using the OS disk for data. Possible values include: 'KubeletDiskTypeOS', 'KubeletDiskTypeTemporary'
1276	KubeletDiskType KubeletDiskType `json:"kubeletDiskType,omitempty"`
1277	// VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe pods
1278	VnetSubnetID *string `json:"vnetSubnetID,omitempty"`
1279	// PodSubnetID - Pod SubnetID specifies the VNet's subnet identifier for pods.
1280	PodSubnetID *string `json:"podSubnetID,omitempty"`
1281	// MaxPods - Maximum number of pods that can run on a node.
1282	MaxPods *int32 `json:"maxPods,omitempty"`
1283	// OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'OSTypeLinux', 'OSTypeWindows'
1284	OsType OSType `json:"osType,omitempty"`
1285	// OsSKU - OsSKU to be used to specify os sku. Choose from Ubuntu(default) and CBLMariner for Linux OSType. Not applicable to Windows OSType. Possible values include: 'OSSKUUbuntu', 'OSSKUCBLMariner'
1286	OsSKU OSSKU `json:"osSKU,omitempty"`
1287	// MaxCount - Maximum number of nodes for auto-scaling
1288	MaxCount *int32 `json:"maxCount,omitempty"`
1289	// MinCount - Minimum number of nodes for auto-scaling
1290	MinCount *int32 `json:"minCount,omitempty"`
1291	// EnableAutoScaling - Whether to enable auto-scaler
1292	EnableAutoScaling *bool `json:"enableAutoScaling,omitempty"`
1293	// Type - AgentPoolType represents types of an agent pool. Possible values include: 'AgentPoolTypeVirtualMachineScaleSets', 'AgentPoolTypeAvailabilitySet'
1294	Type AgentPoolType `json:"type,omitempty"`
1295	// Mode - AgentPoolMode represents mode of an agent pool. Possible values include: 'AgentPoolModeSystem', 'AgentPoolModeUser'
1296	Mode AgentPoolMode `json:"mode,omitempty"`
1297	// OrchestratorVersion - Version of orchestrator specified when creating the managed cluster.
1298	OrchestratorVersion *string `json:"orchestratorVersion,omitempty"`
1299	// NodeImageVersion - READ-ONLY; Version of node image
1300	NodeImageVersion *string `json:"nodeImageVersion,omitempty"`
1301	// UpgradeSettings - Settings for upgrading the agentpool
1302	UpgradeSettings *AgentPoolUpgradeSettings `json:"upgradeSettings,omitempty"`
1303	// ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response.
1304	ProvisioningState *string `json:"provisioningState,omitempty"`
1305	// PowerState - READ-ONLY; Describes whether the Agent Pool is Running or Stopped
1306	PowerState *PowerState `json:"powerState,omitempty"`
1307	// AvailabilityZones - Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType.
1308	AvailabilityZones *[]string `json:"availabilityZones,omitempty"`
1309	// EnableNodePublicIP - Enable public IP for nodes
1310	EnableNodePublicIP *bool `json:"enableNodePublicIP,omitempty"`
1311	// NodePublicIPPrefixID - Public IP Prefix ID. VM nodes use IPs assigned from this Public IP Prefix.
1312	NodePublicIPPrefixID *string `json:"nodePublicIPPrefixID,omitempty"`
1313	// ScaleSetPriority - ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. Possible values include: 'ScaleSetPrioritySpot', 'ScaleSetPriorityRegular'
1314	ScaleSetPriority ScaleSetPriority `json:"scaleSetPriority,omitempty"`
1315	// ScaleSetEvictionPolicy - ScaleSetEvictionPolicy to be used to specify eviction policy for Spot virtual machine scale set. Default to Delete. Possible values include: 'ScaleSetEvictionPolicyDelete', 'ScaleSetEvictionPolicyDeallocate'
1316	ScaleSetEvictionPolicy ScaleSetEvictionPolicy `json:"scaleSetEvictionPolicy,omitempty"`
1317	// SpotMaxPrice - SpotMaxPrice to be used to specify the maximum price you are willing to pay in US Dollars. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand.
1318	SpotMaxPrice *float64 `json:"spotMaxPrice,omitempty"`
1319	// Tags - Agent pool tags to be persisted on the agent pool virtual machine scale set.
1320	Tags map[string]*string `json:"tags"`
1321	// NodeLabels - Agent pool node labels to be persisted across all nodes in agent pool.
1322	NodeLabels map[string]*string `json:"nodeLabels"`
1323	// NodeTaints - Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.
1324	NodeTaints *[]string `json:"nodeTaints,omitempty"`
1325	// ProximityPlacementGroupID - The ID for Proximity Placement Group.
1326	ProximityPlacementGroupID *string `json:"proximityPlacementGroupID,omitempty"`
1327	// KubeletConfig - KubeletConfig specifies the configuration of kubelet on agent nodes.
1328	KubeletConfig *KubeletConfig `json:"kubeletConfig,omitempty"`
1329	// LinuxOSConfig - LinuxOSConfig specifies the OS configuration of linux agent nodes.
1330	LinuxOSConfig *LinuxOSConfig `json:"linuxOSConfig,omitempty"`
1331	// EnableEncryptionAtHost - Whether to enable EncryptionAtHost
1332	EnableEncryptionAtHost *bool `json:"enableEncryptionAtHost,omitempty"`
1333	// EnableFIPS - Whether to use FIPS enabled OS
1334	EnableFIPS *bool `json:"enableFIPS,omitempty"`
1335	// GpuInstanceProfile - GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. Supported values are MIG1g, MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'GPUInstanceProfileMIG1g', 'GPUInstanceProfileMIG2g', 'GPUInstanceProfileMIG3g', 'GPUInstanceProfileMIG4g', 'GPUInstanceProfileMIG7g'
1336	GpuInstanceProfile GPUInstanceProfile `json:"gpuInstanceProfile,omitempty"`
1337}
1338
1339// MarshalJSON is the custom marshaler for ManagedClusterAgentPoolProfile.
1340func (mcapp ManagedClusterAgentPoolProfile) MarshalJSON() ([]byte, error) {
1341	objectMap := make(map[string]interface{})
1342	if mcapp.Name != nil {
1343		objectMap["name"] = mcapp.Name
1344	}
1345	if mcapp.Count != nil {
1346		objectMap["count"] = mcapp.Count
1347	}
1348	if mcapp.VMSize != nil {
1349		objectMap["vmSize"] = mcapp.VMSize
1350	}
1351	if mcapp.OsDiskSizeGB != nil {
1352		objectMap["osDiskSizeGB"] = mcapp.OsDiskSizeGB
1353	}
1354	if mcapp.OsDiskType != "" {
1355		objectMap["osDiskType"] = mcapp.OsDiskType
1356	}
1357	if mcapp.KubeletDiskType != "" {
1358		objectMap["kubeletDiskType"] = mcapp.KubeletDiskType
1359	}
1360	if mcapp.VnetSubnetID != nil {
1361		objectMap["vnetSubnetID"] = mcapp.VnetSubnetID
1362	}
1363	if mcapp.PodSubnetID != nil {
1364		objectMap["podSubnetID"] = mcapp.PodSubnetID
1365	}
1366	if mcapp.MaxPods != nil {
1367		objectMap["maxPods"] = mcapp.MaxPods
1368	}
1369	if mcapp.OsType != "" {
1370		objectMap["osType"] = mcapp.OsType
1371	}
1372	if mcapp.OsSKU != "" {
1373		objectMap["osSKU"] = mcapp.OsSKU
1374	}
1375	if mcapp.MaxCount != nil {
1376		objectMap["maxCount"] = mcapp.MaxCount
1377	}
1378	if mcapp.MinCount != nil {
1379		objectMap["minCount"] = mcapp.MinCount
1380	}
1381	if mcapp.EnableAutoScaling != nil {
1382		objectMap["enableAutoScaling"] = mcapp.EnableAutoScaling
1383	}
1384	if mcapp.Type != "" {
1385		objectMap["type"] = mcapp.Type
1386	}
1387	if mcapp.Mode != "" {
1388		objectMap["mode"] = mcapp.Mode
1389	}
1390	if mcapp.OrchestratorVersion != nil {
1391		objectMap["orchestratorVersion"] = mcapp.OrchestratorVersion
1392	}
1393	if mcapp.UpgradeSettings != nil {
1394		objectMap["upgradeSettings"] = mcapp.UpgradeSettings
1395	}
1396	if mcapp.AvailabilityZones != nil {
1397		objectMap["availabilityZones"] = mcapp.AvailabilityZones
1398	}
1399	if mcapp.EnableNodePublicIP != nil {
1400		objectMap["enableNodePublicIP"] = mcapp.EnableNodePublicIP
1401	}
1402	if mcapp.NodePublicIPPrefixID != nil {
1403		objectMap["nodePublicIPPrefixID"] = mcapp.NodePublicIPPrefixID
1404	}
1405	if mcapp.ScaleSetPriority != "" {
1406		objectMap["scaleSetPriority"] = mcapp.ScaleSetPriority
1407	}
1408	if mcapp.ScaleSetEvictionPolicy != "" {
1409		objectMap["scaleSetEvictionPolicy"] = mcapp.ScaleSetEvictionPolicy
1410	}
1411	if mcapp.SpotMaxPrice != nil {
1412		objectMap["spotMaxPrice"] = mcapp.SpotMaxPrice
1413	}
1414	if mcapp.Tags != nil {
1415		objectMap["tags"] = mcapp.Tags
1416	}
1417	if mcapp.NodeLabels != nil {
1418		objectMap["nodeLabels"] = mcapp.NodeLabels
1419	}
1420	if mcapp.NodeTaints != nil {
1421		objectMap["nodeTaints"] = mcapp.NodeTaints
1422	}
1423	if mcapp.ProximityPlacementGroupID != nil {
1424		objectMap["proximityPlacementGroupID"] = mcapp.ProximityPlacementGroupID
1425	}
1426	if mcapp.KubeletConfig != nil {
1427		objectMap["kubeletConfig"] = mcapp.KubeletConfig
1428	}
1429	if mcapp.LinuxOSConfig != nil {
1430		objectMap["linuxOSConfig"] = mcapp.LinuxOSConfig
1431	}
1432	if mcapp.EnableEncryptionAtHost != nil {
1433		objectMap["enableEncryptionAtHost"] = mcapp.EnableEncryptionAtHost
1434	}
1435	if mcapp.EnableFIPS != nil {
1436		objectMap["enableFIPS"] = mcapp.EnableFIPS
1437	}
1438	if mcapp.GpuInstanceProfile != "" {
1439		objectMap["gpuInstanceProfile"] = mcapp.GpuInstanceProfile
1440	}
1441	return json.Marshal(objectMap)
1442}
1443
1444// ManagedClusterAgentPoolProfileProperties properties for the container service agent pool profile.
1445type ManagedClusterAgentPoolProfileProperties struct {
1446	// Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for system pools. The default value is 1.
1447	Count *int32 `json:"count,omitempty"`
1448	// VMSize - Size of agent VMs.
1449	VMSize *string `json:"vmSize,omitempty"`
1450	// OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified.
1451	OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"`
1452	// OsDiskType - OS disk type to be used for machines in a given agent pool. Allowed values are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after creation. Possible values include: 'OSDiskTypeManaged', 'OSDiskTypeEphemeral'
1453	OsDiskType OSDiskType `json:"osDiskType,omitempty"`
1454	// KubeletDiskType - KubeletDiskType determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, resulting in Kubelet using the OS disk for data. Possible values include: 'KubeletDiskTypeOS', 'KubeletDiskTypeTemporary'
1455	KubeletDiskType KubeletDiskType `json:"kubeletDiskType,omitempty"`
1456	// VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe pods
1457	VnetSubnetID *string `json:"vnetSubnetID,omitempty"`
1458	// PodSubnetID - Pod SubnetID specifies the VNet's subnet identifier for pods.
1459	PodSubnetID *string `json:"podSubnetID,omitempty"`
1460	// MaxPods - Maximum number of pods that can run on a node.
1461	MaxPods *int32 `json:"maxPods,omitempty"`
1462	// OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'OSTypeLinux', 'OSTypeWindows'
1463	OsType OSType `json:"osType,omitempty"`
1464	// OsSKU - OsSKU to be used to specify os sku. Choose from Ubuntu(default) and CBLMariner for Linux OSType. Not applicable to Windows OSType. Possible values include: 'OSSKUUbuntu', 'OSSKUCBLMariner'
1465	OsSKU OSSKU `json:"osSKU,omitempty"`
1466	// MaxCount - Maximum number of nodes for auto-scaling
1467	MaxCount *int32 `json:"maxCount,omitempty"`
1468	// MinCount - Minimum number of nodes for auto-scaling
1469	MinCount *int32 `json:"minCount,omitempty"`
1470	// EnableAutoScaling - Whether to enable auto-scaler
1471	EnableAutoScaling *bool `json:"enableAutoScaling,omitempty"`
1472	// Type - AgentPoolType represents types of an agent pool. Possible values include: 'AgentPoolTypeVirtualMachineScaleSets', 'AgentPoolTypeAvailabilitySet'
1473	Type AgentPoolType `json:"type,omitempty"`
1474	// Mode - AgentPoolMode represents mode of an agent pool. Possible values include: 'AgentPoolModeSystem', 'AgentPoolModeUser'
1475	Mode AgentPoolMode `json:"mode,omitempty"`
1476	// OrchestratorVersion - Version of orchestrator specified when creating the managed cluster.
1477	OrchestratorVersion *string `json:"orchestratorVersion,omitempty"`
1478	// NodeImageVersion - READ-ONLY; Version of node image
1479	NodeImageVersion *string `json:"nodeImageVersion,omitempty"`
1480	// UpgradeSettings - Settings for upgrading the agentpool
1481	UpgradeSettings *AgentPoolUpgradeSettings `json:"upgradeSettings,omitempty"`
1482	// ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response.
1483	ProvisioningState *string `json:"provisioningState,omitempty"`
1484	// PowerState - READ-ONLY; Describes whether the Agent Pool is Running or Stopped
1485	PowerState *PowerState `json:"powerState,omitempty"`
1486	// AvailabilityZones - Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType.
1487	AvailabilityZones *[]string `json:"availabilityZones,omitempty"`
1488	// EnableNodePublicIP - Enable public IP for nodes
1489	EnableNodePublicIP *bool `json:"enableNodePublicIP,omitempty"`
1490	// NodePublicIPPrefixID - Public IP Prefix ID. VM nodes use IPs assigned from this Public IP Prefix.
1491	NodePublicIPPrefixID *string `json:"nodePublicIPPrefixID,omitempty"`
1492	// ScaleSetPriority - ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. Possible values include: 'ScaleSetPrioritySpot', 'ScaleSetPriorityRegular'
1493	ScaleSetPriority ScaleSetPriority `json:"scaleSetPriority,omitempty"`
1494	// ScaleSetEvictionPolicy - ScaleSetEvictionPolicy to be used to specify eviction policy for Spot virtual machine scale set. Default to Delete. Possible values include: 'ScaleSetEvictionPolicyDelete', 'ScaleSetEvictionPolicyDeallocate'
1495	ScaleSetEvictionPolicy ScaleSetEvictionPolicy `json:"scaleSetEvictionPolicy,omitempty"`
1496	// SpotMaxPrice - SpotMaxPrice to be used to specify the maximum price you are willing to pay in US Dollars. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand.
1497	SpotMaxPrice *float64 `json:"spotMaxPrice,omitempty"`
1498	// Tags - Agent pool tags to be persisted on the agent pool virtual machine scale set.
1499	Tags map[string]*string `json:"tags"`
1500	// NodeLabels - Agent pool node labels to be persisted across all nodes in agent pool.
1501	NodeLabels map[string]*string `json:"nodeLabels"`
1502	// NodeTaints - Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.
1503	NodeTaints *[]string `json:"nodeTaints,omitempty"`
1504	// ProximityPlacementGroupID - The ID for Proximity Placement Group.
1505	ProximityPlacementGroupID *string `json:"proximityPlacementGroupID,omitempty"`
1506	// KubeletConfig - KubeletConfig specifies the configuration of kubelet on agent nodes.
1507	KubeletConfig *KubeletConfig `json:"kubeletConfig,omitempty"`
1508	// LinuxOSConfig - LinuxOSConfig specifies the OS configuration of linux agent nodes.
1509	LinuxOSConfig *LinuxOSConfig `json:"linuxOSConfig,omitempty"`
1510	// EnableEncryptionAtHost - Whether to enable EncryptionAtHost
1511	EnableEncryptionAtHost *bool `json:"enableEncryptionAtHost,omitempty"`
1512	// EnableFIPS - Whether to use FIPS enabled OS
1513	EnableFIPS *bool `json:"enableFIPS,omitempty"`
1514	// GpuInstanceProfile - GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. Supported values are MIG1g, MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'GPUInstanceProfileMIG1g', 'GPUInstanceProfileMIG2g', 'GPUInstanceProfileMIG3g', 'GPUInstanceProfileMIG4g', 'GPUInstanceProfileMIG7g'
1515	GpuInstanceProfile GPUInstanceProfile `json:"gpuInstanceProfile,omitempty"`
1516}
1517
1518// MarshalJSON is the custom marshaler for ManagedClusterAgentPoolProfileProperties.
1519func (mcappp ManagedClusterAgentPoolProfileProperties) MarshalJSON() ([]byte, error) {
1520	objectMap := make(map[string]interface{})
1521	if mcappp.Count != nil {
1522		objectMap["count"] = mcappp.Count
1523	}
1524	if mcappp.VMSize != nil {
1525		objectMap["vmSize"] = mcappp.VMSize
1526	}
1527	if mcappp.OsDiskSizeGB != nil {
1528		objectMap["osDiskSizeGB"] = mcappp.OsDiskSizeGB
1529	}
1530	if mcappp.OsDiskType != "" {
1531		objectMap["osDiskType"] = mcappp.OsDiskType
1532	}
1533	if mcappp.KubeletDiskType != "" {
1534		objectMap["kubeletDiskType"] = mcappp.KubeletDiskType
1535	}
1536	if mcappp.VnetSubnetID != nil {
1537		objectMap["vnetSubnetID"] = mcappp.VnetSubnetID
1538	}
1539	if mcappp.PodSubnetID != nil {
1540		objectMap["podSubnetID"] = mcappp.PodSubnetID
1541	}
1542	if mcappp.MaxPods != nil {
1543		objectMap["maxPods"] = mcappp.MaxPods
1544	}
1545	if mcappp.OsType != "" {
1546		objectMap["osType"] = mcappp.OsType
1547	}
1548	if mcappp.OsSKU != "" {
1549		objectMap["osSKU"] = mcappp.OsSKU
1550	}
1551	if mcappp.MaxCount != nil {
1552		objectMap["maxCount"] = mcappp.MaxCount
1553	}
1554	if mcappp.MinCount != nil {
1555		objectMap["minCount"] = mcappp.MinCount
1556	}
1557	if mcappp.EnableAutoScaling != nil {
1558		objectMap["enableAutoScaling"] = mcappp.EnableAutoScaling
1559	}
1560	if mcappp.Type != "" {
1561		objectMap["type"] = mcappp.Type
1562	}
1563	if mcappp.Mode != "" {
1564		objectMap["mode"] = mcappp.Mode
1565	}
1566	if mcappp.OrchestratorVersion != nil {
1567		objectMap["orchestratorVersion"] = mcappp.OrchestratorVersion
1568	}
1569	if mcappp.UpgradeSettings != nil {
1570		objectMap["upgradeSettings"] = mcappp.UpgradeSettings
1571	}
1572	if mcappp.AvailabilityZones != nil {
1573		objectMap["availabilityZones"] = mcappp.AvailabilityZones
1574	}
1575	if mcappp.EnableNodePublicIP != nil {
1576		objectMap["enableNodePublicIP"] = mcappp.EnableNodePublicIP
1577	}
1578	if mcappp.NodePublicIPPrefixID != nil {
1579		objectMap["nodePublicIPPrefixID"] = mcappp.NodePublicIPPrefixID
1580	}
1581	if mcappp.ScaleSetPriority != "" {
1582		objectMap["scaleSetPriority"] = mcappp.ScaleSetPriority
1583	}
1584	if mcappp.ScaleSetEvictionPolicy != "" {
1585		objectMap["scaleSetEvictionPolicy"] = mcappp.ScaleSetEvictionPolicy
1586	}
1587	if mcappp.SpotMaxPrice != nil {
1588		objectMap["spotMaxPrice"] = mcappp.SpotMaxPrice
1589	}
1590	if mcappp.Tags != nil {
1591		objectMap["tags"] = mcappp.Tags
1592	}
1593	if mcappp.NodeLabels != nil {
1594		objectMap["nodeLabels"] = mcappp.NodeLabels
1595	}
1596	if mcappp.NodeTaints != nil {
1597		objectMap["nodeTaints"] = mcappp.NodeTaints
1598	}
1599	if mcappp.ProximityPlacementGroupID != nil {
1600		objectMap["proximityPlacementGroupID"] = mcappp.ProximityPlacementGroupID
1601	}
1602	if mcappp.KubeletConfig != nil {
1603		objectMap["kubeletConfig"] = mcappp.KubeletConfig
1604	}
1605	if mcappp.LinuxOSConfig != nil {
1606		objectMap["linuxOSConfig"] = mcappp.LinuxOSConfig
1607	}
1608	if mcappp.EnableEncryptionAtHost != nil {
1609		objectMap["enableEncryptionAtHost"] = mcappp.EnableEncryptionAtHost
1610	}
1611	if mcappp.EnableFIPS != nil {
1612		objectMap["enableFIPS"] = mcappp.EnableFIPS
1613	}
1614	if mcappp.GpuInstanceProfile != "" {
1615		objectMap["gpuInstanceProfile"] = mcappp.GpuInstanceProfile
1616	}
1617	return json.Marshal(objectMap)
1618}
1619
1620// ManagedClusterAPIServerAccessProfile access profile for managed cluster API server.
1621type ManagedClusterAPIServerAccessProfile struct {
1622	// AuthorizedIPRanges - Authorized IP Ranges to kubernetes API server.
1623	AuthorizedIPRanges *[]string `json:"authorizedIPRanges,omitempty"`
1624	// EnablePrivateCluster - Whether to create the cluster as a private cluster or not.
1625	EnablePrivateCluster *bool `json:"enablePrivateCluster,omitempty"`
1626	// PrivateDNSZone - Private dns zone mode for private cluster.
1627	PrivateDNSZone *string `json:"privateDNSZone,omitempty"`
1628}
1629
1630// ManagedClusterAutoUpgradeProfile auto upgrade profile for a managed cluster.
1631type ManagedClusterAutoUpgradeProfile struct {
1632	// UpgradeChannel - upgrade channel for auto upgrade. Possible values include: 'UpgradeChannelRapid', 'UpgradeChannelStable', 'UpgradeChannelPatch', 'UpgradeChannelNodeImage', 'UpgradeChannelNone'
1633	UpgradeChannel UpgradeChannel `json:"upgradeChannel,omitempty"`
1634}
1635
1636// ManagedClusterHTTPProxyConfig configurations for provisioning the cluster with HTTP proxy servers.
1637type ManagedClusterHTTPProxyConfig struct {
1638	// HTTPProxy - HTTP proxy server endpoint to use.
1639	HTTPProxy *string `json:"httpProxy,omitempty"`
1640	// HTTPSProxy - HTTPS proxy server endpoint to use.
1641	HTTPSProxy *string `json:"httpsProxy,omitempty"`
1642	// NoProxy - Endpoints that should not go through proxy.
1643	NoProxy *[]string `json:"noProxy,omitempty"`
1644	// TrustedCa - Alternative CA cert to use for connecting to proxy servers.
1645	TrustedCa *string `json:"trustedCa,omitempty"`
1646}
1647
1648// ManagedClusterIdentity identity for the managed cluster.
1649type ManagedClusterIdentity struct {
1650	// PrincipalID - READ-ONLY; The principal id of the system assigned identity which is used by master components.
1651	PrincipalID *string `json:"principalId,omitempty"`
1652	// TenantID - READ-ONLY; The tenant id of the system assigned identity which is used by master components.
1653	TenantID *string `json:"tenantId,omitempty"`
1654	// Type - The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master components and an auto-created user assigned identity in MC_ resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, service principal will be used instead. Possible values include: 'ResourceIdentityTypeSystemAssigned', 'ResourceIdentityTypeUserAssigned', 'ResourceIdentityTypeNone'
1655	Type ResourceIdentityType `json:"type,omitempty"`
1656	// UserAssignedIdentities - The user identity associated with the managed cluster. This identity will be used in control plane and only one user assigned identity is allowed. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
1657	UserAssignedIdentities map[string]*ManagedClusterIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
1658}
1659
1660// MarshalJSON is the custom marshaler for ManagedClusterIdentity.
1661func (mci ManagedClusterIdentity) MarshalJSON() ([]byte, error) {
1662	objectMap := make(map[string]interface{})
1663	if mci.Type != "" {
1664		objectMap["type"] = mci.Type
1665	}
1666	if mci.UserAssignedIdentities != nil {
1667		objectMap["userAssignedIdentities"] = mci.UserAssignedIdentities
1668	}
1669	return json.Marshal(objectMap)
1670}
1671
1672// ManagedClusterIdentityUserAssignedIdentitiesValue ...
1673type ManagedClusterIdentityUserAssignedIdentitiesValue struct {
1674	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
1675	PrincipalID *string `json:"principalId,omitempty"`
1676	// ClientID - READ-ONLY; The client id of user assigned identity.
1677	ClientID *string `json:"clientId,omitempty"`
1678}
1679
1680// MarshalJSON is the custom marshaler for ManagedClusterIdentityUserAssignedIdentitiesValue.
1681func (mciAiv ManagedClusterIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
1682	objectMap := make(map[string]interface{})
1683	return json.Marshal(objectMap)
1684}
1685
1686// ManagedClusterListResult the response from the List Managed Clusters operation.
1687type ManagedClusterListResult struct {
1688	autorest.Response `json:"-"`
1689	// Value - The list of managed clusters.
1690	Value *[]ManagedCluster `json:"value,omitempty"`
1691	// NextLink - READ-ONLY; The URL to get the next set of managed cluster results.
1692	NextLink *string `json:"nextLink,omitempty"`
1693}
1694
1695// MarshalJSON is the custom marshaler for ManagedClusterListResult.
1696func (mclr ManagedClusterListResult) MarshalJSON() ([]byte, error) {
1697	objectMap := make(map[string]interface{})
1698	if mclr.Value != nil {
1699		objectMap["value"] = mclr.Value
1700	}
1701	return json.Marshal(objectMap)
1702}
1703
1704// ManagedClusterListResultIterator provides access to a complete listing of ManagedCluster values.
1705type ManagedClusterListResultIterator struct {
1706	i    int
1707	page ManagedClusterListResultPage
1708}
1709
1710// NextWithContext advances to the next value.  If there was an error making
1711// the request the iterator does not advance and the error is returned.
1712func (iter *ManagedClusterListResultIterator) NextWithContext(ctx context.Context) (err error) {
1713	if tracing.IsEnabled() {
1714		ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClusterListResultIterator.NextWithContext")
1715		defer func() {
1716			sc := -1
1717			if iter.Response().Response.Response != nil {
1718				sc = iter.Response().Response.Response.StatusCode
1719			}
1720			tracing.EndSpan(ctx, sc, err)
1721		}()
1722	}
1723	iter.i++
1724	if iter.i < len(iter.page.Values()) {
1725		return nil
1726	}
1727	err = iter.page.NextWithContext(ctx)
1728	if err != nil {
1729		iter.i--
1730		return err
1731	}
1732	iter.i = 0
1733	return nil
1734}
1735
1736// Next advances to the next value.  If there was an error making
1737// the request the iterator does not advance and the error is returned.
1738// Deprecated: Use NextWithContext() instead.
1739func (iter *ManagedClusterListResultIterator) Next() error {
1740	return iter.NextWithContext(context.Background())
1741}
1742
1743// NotDone returns true if the enumeration should be started or is not yet complete.
1744func (iter ManagedClusterListResultIterator) NotDone() bool {
1745	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1746}
1747
1748// Response returns the raw server response from the last page request.
1749func (iter ManagedClusterListResultIterator) Response() ManagedClusterListResult {
1750	return iter.page.Response()
1751}
1752
1753// Value returns the current value or a zero-initialized value if the
1754// iterator has advanced beyond the end of the collection.
1755func (iter ManagedClusterListResultIterator) Value() ManagedCluster {
1756	if !iter.page.NotDone() {
1757		return ManagedCluster{}
1758	}
1759	return iter.page.Values()[iter.i]
1760}
1761
1762// Creates a new instance of the ManagedClusterListResultIterator type.
1763func NewManagedClusterListResultIterator(page ManagedClusterListResultPage) ManagedClusterListResultIterator {
1764	return ManagedClusterListResultIterator{page: page}
1765}
1766
1767// IsEmpty returns true if the ListResult contains no values.
1768func (mclr ManagedClusterListResult) IsEmpty() bool {
1769	return mclr.Value == nil || len(*mclr.Value) == 0
1770}
1771
1772// hasNextLink returns true if the NextLink is not empty.
1773func (mclr ManagedClusterListResult) hasNextLink() bool {
1774	return mclr.NextLink != nil && len(*mclr.NextLink) != 0
1775}
1776
1777// managedClusterListResultPreparer prepares a request to retrieve the next set of results.
1778// It returns nil if no more results exist.
1779func (mclr ManagedClusterListResult) managedClusterListResultPreparer(ctx context.Context) (*http.Request, error) {
1780	if !mclr.hasNextLink() {
1781		return nil, nil
1782	}
1783	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1784		autorest.AsJSON(),
1785		autorest.AsGet(),
1786		autorest.WithBaseURL(to.String(mclr.NextLink)))
1787}
1788
1789// ManagedClusterListResultPage contains a page of ManagedCluster values.
1790type ManagedClusterListResultPage struct {
1791	fn   func(context.Context, ManagedClusterListResult) (ManagedClusterListResult, error)
1792	mclr ManagedClusterListResult
1793}
1794
1795// NextWithContext advances to the next page of values.  If there was an error making
1796// the request the page does not advance and the error is returned.
1797func (page *ManagedClusterListResultPage) NextWithContext(ctx context.Context) (err error) {
1798	if tracing.IsEnabled() {
1799		ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClusterListResultPage.NextWithContext")
1800		defer func() {
1801			sc := -1
1802			if page.Response().Response.Response != nil {
1803				sc = page.Response().Response.Response.StatusCode
1804			}
1805			tracing.EndSpan(ctx, sc, err)
1806		}()
1807	}
1808	for {
1809		next, err := page.fn(ctx, page.mclr)
1810		if err != nil {
1811			return err
1812		}
1813		page.mclr = next
1814		if !next.hasNextLink() || !next.IsEmpty() {
1815			break
1816		}
1817	}
1818	return nil
1819}
1820
1821// Next advances to the next page of values.  If there was an error making
1822// the request the page does not advance and the error is returned.
1823// Deprecated: Use NextWithContext() instead.
1824func (page *ManagedClusterListResultPage) Next() error {
1825	return page.NextWithContext(context.Background())
1826}
1827
1828// NotDone returns true if the page enumeration should be started or is not yet complete.
1829func (page ManagedClusterListResultPage) NotDone() bool {
1830	return !page.mclr.IsEmpty()
1831}
1832
1833// Response returns the raw server response from the last page request.
1834func (page ManagedClusterListResultPage) Response() ManagedClusterListResult {
1835	return page.mclr
1836}
1837
1838// Values returns the slice of values for the current page or nil if there are no values.
1839func (page ManagedClusterListResultPage) Values() []ManagedCluster {
1840	if page.mclr.IsEmpty() {
1841		return nil
1842	}
1843	return *page.mclr.Value
1844}
1845
1846// Creates a new instance of the ManagedClusterListResultPage type.
1847func NewManagedClusterListResultPage(cur ManagedClusterListResult, getNextPage func(context.Context, ManagedClusterListResult) (ManagedClusterListResult, error)) ManagedClusterListResultPage {
1848	return ManagedClusterListResultPage{
1849		fn:   getNextPage,
1850		mclr: cur,
1851	}
1852}
1853
1854// ManagedClusterLoadBalancerProfile profile of the managed cluster load balancer.
1855type ManagedClusterLoadBalancerProfile struct {
1856	// ManagedOutboundIPs - Desired managed outbound IPs for the cluster load balancer.
1857	ManagedOutboundIPs *ManagedClusterLoadBalancerProfileManagedOutboundIPs `json:"managedOutboundIPs,omitempty"`
1858	// OutboundIPPrefixes - Desired outbound IP Prefix resources for the cluster load balancer.
1859	OutboundIPPrefixes *ManagedClusterLoadBalancerProfileOutboundIPPrefixes `json:"outboundIPPrefixes,omitempty"`
1860	// OutboundIPs - Desired outbound IP resources for the cluster load balancer.
1861	OutboundIPs *ManagedClusterLoadBalancerProfileOutboundIPs `json:"outboundIPs,omitempty"`
1862	// EffectiveOutboundIPs - The effective outbound IP resources of the cluster load balancer.
1863	EffectiveOutboundIPs *[]ResourceReference `json:"effectiveOutboundIPs,omitempty"`
1864	// AllocatedOutboundPorts - Desired number of allocated SNAT ports per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure dynamically allocating ports.
1865	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
1866	// IdleTimeoutInMinutes - Desired outbound flow idle timeout in minutes. Allowed values must be in the range of 4 to 120 (inclusive). The default value is 30 minutes.
1867	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
1868}
1869
1870// ManagedClusterLoadBalancerProfileManagedOutboundIPs desired managed outbound IPs for the cluster load
1871// balancer.
1872type ManagedClusterLoadBalancerProfileManagedOutboundIPs struct {
1873	// Count - Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1.
1874	Count *int32 `json:"count,omitempty"`
1875}
1876
1877// ManagedClusterLoadBalancerProfileOutboundIPPrefixes desired outbound IP Prefix resources for the cluster
1878// load balancer.
1879type ManagedClusterLoadBalancerProfileOutboundIPPrefixes struct {
1880	// PublicIPPrefixes - A list of public IP prefix resources.
1881	PublicIPPrefixes *[]ResourceReference `json:"publicIPPrefixes,omitempty"`
1882}
1883
1884// ManagedClusterLoadBalancerProfileOutboundIPs desired outbound IP resources for the cluster load
1885// balancer.
1886type ManagedClusterLoadBalancerProfileOutboundIPs struct {
1887	// PublicIPs - A list of public IP resources.
1888	PublicIPs *[]ResourceReference `json:"publicIPs,omitempty"`
1889}
1890
1891// ManagedClusterPodIdentity ...
1892type ManagedClusterPodIdentity struct {
1893	// Name - Name of the pod identity.
1894	Name *string `json:"name,omitempty"`
1895	// Namespace - Namespace of the pod identity.
1896	Namespace *string `json:"namespace,omitempty"`
1897	// BindingSelector - Binding selector to use for the AzureIdentityBinding resource.
1898	BindingSelector *string `json:"bindingSelector,omitempty"`
1899	// Identity - Information of the user assigned identity.
1900	Identity *UserAssignedIdentity `json:"identity,omitempty"`
1901	// ProvisioningState - READ-ONLY; The current provisioning state of the pod identity. Possible values include: 'ManagedClusterPodIdentityProvisioningStateAssigned', 'ManagedClusterPodIdentityProvisioningStateUpdating', 'ManagedClusterPodIdentityProvisioningStateDeleting', 'ManagedClusterPodIdentityProvisioningStateFailed'
1902	ProvisioningState ManagedClusterPodIdentityProvisioningState `json:"provisioningState,omitempty"`
1903	// ProvisioningInfo - READ-ONLY
1904	ProvisioningInfo *ManagedClusterPodIdentityProvisioningInfo `json:"provisioningInfo,omitempty"`
1905}
1906
1907// MarshalJSON is the custom marshaler for ManagedClusterPodIdentity.
1908func (mcpi ManagedClusterPodIdentity) MarshalJSON() ([]byte, error) {
1909	objectMap := make(map[string]interface{})
1910	if mcpi.Name != nil {
1911		objectMap["name"] = mcpi.Name
1912	}
1913	if mcpi.Namespace != nil {
1914		objectMap["namespace"] = mcpi.Namespace
1915	}
1916	if mcpi.BindingSelector != nil {
1917		objectMap["bindingSelector"] = mcpi.BindingSelector
1918	}
1919	if mcpi.Identity != nil {
1920		objectMap["identity"] = mcpi.Identity
1921	}
1922	return json.Marshal(objectMap)
1923}
1924
1925// ManagedClusterPodIdentityException ...
1926type ManagedClusterPodIdentityException struct {
1927	// Name - Name of the pod identity exception.
1928	Name *string `json:"name,omitempty"`
1929	// Namespace - Namespace of the pod identity exception.
1930	Namespace *string `json:"namespace,omitempty"`
1931	// PodLabels - Pod labels to match.
1932	PodLabels map[string]*string `json:"podLabels"`
1933}
1934
1935// MarshalJSON is the custom marshaler for ManagedClusterPodIdentityException.
1936func (mcpie ManagedClusterPodIdentityException) MarshalJSON() ([]byte, error) {
1937	objectMap := make(map[string]interface{})
1938	if mcpie.Name != nil {
1939		objectMap["name"] = mcpie.Name
1940	}
1941	if mcpie.Namespace != nil {
1942		objectMap["namespace"] = mcpie.Namespace
1943	}
1944	if mcpie.PodLabels != nil {
1945		objectMap["podLabels"] = mcpie.PodLabels
1946	}
1947	return json.Marshal(objectMap)
1948}
1949
1950// ManagedClusterPodIdentityProfile ...
1951type ManagedClusterPodIdentityProfile struct {
1952	// Enabled - Whether the pod identity addon is enabled.
1953	Enabled *bool `json:"enabled,omitempty"`
1954	// AllowNetworkPluginKubenet - Customer consent for enabling AAD pod identity addon in cluster using Kubenet network plugin.
1955	AllowNetworkPluginKubenet *bool `json:"allowNetworkPluginKubenet,omitempty"`
1956	// UserAssignedIdentities - User assigned pod identity settings.
1957	UserAssignedIdentities *[]ManagedClusterPodIdentity `json:"userAssignedIdentities,omitempty"`
1958	// UserAssignedIdentityExceptions - User assigned pod identity exception settings.
1959	UserAssignedIdentityExceptions *[]ManagedClusterPodIdentityException `json:"userAssignedIdentityExceptions,omitempty"`
1960}
1961
1962// ManagedClusterPodIdentityProvisioningInfo ...
1963type ManagedClusterPodIdentityProvisioningInfo struct {
1964	// Error - Pod identity assignment error (if any).
1965	Error *CloudError `json:"error,omitempty"`
1966}
1967
1968// ManagedClusterPoolUpgradeProfile the list of available upgrade versions.
1969type ManagedClusterPoolUpgradeProfile struct {
1970	// KubernetesVersion - Kubernetes version (major, minor, patch).
1971	KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
1972	// Name - Pool name.
1973	Name *string `json:"name,omitempty"`
1974	// OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'OSTypeLinux', 'OSTypeWindows'
1975	OsType OSType `json:"osType,omitempty"`
1976	// Upgrades - List of orchestrator types and versions available for upgrade.
1977	Upgrades *[]ManagedClusterPoolUpgradeProfileUpgradesItem `json:"upgrades,omitempty"`
1978}
1979
1980// ManagedClusterPoolUpgradeProfileUpgradesItem ...
1981type ManagedClusterPoolUpgradeProfileUpgradesItem struct {
1982	// KubernetesVersion - Kubernetes version (major, minor, patch).
1983	KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
1984	// IsPreview - Whether Kubernetes version is currently in preview.
1985	IsPreview *bool `json:"isPreview,omitempty"`
1986}
1987
1988// ManagedClusterProperties properties of the managed cluster.
1989type ManagedClusterProperties struct {
1990	// ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response.
1991	ProvisioningState *string `json:"provisioningState,omitempty"`
1992	// PowerState - READ-ONLY; Represents the Power State of the cluster
1993	PowerState *PowerState `json:"powerState,omitempty"`
1994	// MaxAgentPools - READ-ONLY; The max number of agent pools for the managed cluster.
1995	MaxAgentPools *int32 `json:"maxAgentPools,omitempty"`
1996	// KubernetesVersion - Version of Kubernetes specified when creating the managed cluster.
1997	KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
1998	// DNSPrefix - DNS prefix specified when creating the managed cluster.
1999	DNSPrefix *string `json:"dnsPrefix,omitempty"`
2000	// FqdnSubdomain - FQDN subdomain specified when creating private cluster with custom private dns zone.
2001	FqdnSubdomain *string `json:"fqdnSubdomain,omitempty"`
2002	// Fqdn - READ-ONLY; FQDN for the master pool.
2003	Fqdn *string `json:"fqdn,omitempty"`
2004	// PrivateFQDN - READ-ONLY; FQDN of private cluster.
2005	PrivateFQDN *string `json:"privateFQDN,omitempty"`
2006	// AzurePortalFQDN - READ-ONLY; FQDN for the master pool which used by proxy config.
2007	AzurePortalFQDN *string `json:"azurePortalFQDN,omitempty"`
2008	// AgentPoolProfiles - Properties of the agent pool.
2009	AgentPoolProfiles *[]ManagedClusterAgentPoolProfile `json:"agentPoolProfiles,omitempty"`
2010	// LinuxProfile - Profile for Linux VMs in the container service cluster.
2011	LinuxProfile *LinuxProfile `json:"linuxProfile,omitempty"`
2012	// WindowsProfile - Profile for Windows VMs in the container service cluster.
2013	WindowsProfile *ManagedClusterWindowsProfile `json:"windowsProfile,omitempty"`
2014	// ServicePrincipalProfile - Information about a service principal identity for the cluster to use for manipulating Azure APIs.
2015	ServicePrincipalProfile *ManagedClusterServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"`
2016	// AddonProfiles - Profile of managed cluster add-on.
2017	AddonProfiles map[string]*ManagedClusterAddonProfile `json:"addonProfiles"`
2018	// PodIdentityProfile - Profile of managed cluster pod identity.
2019	PodIdentityProfile *ManagedClusterPodIdentityProfile `json:"podIdentityProfile,omitempty"`
2020	// NodeResourceGroup - Name of the resource group containing agent pool nodes.
2021	NodeResourceGroup *string `json:"nodeResourceGroup,omitempty"`
2022	// EnableRBAC - Whether to enable Kubernetes Role-Based Access Control.
2023	EnableRBAC *bool `json:"enableRBAC,omitempty"`
2024	// EnablePodSecurityPolicy - (DEPRECATING) Whether to enable Kubernetes pod security policy (preview). This feature is set for removal on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy.
2025	EnablePodSecurityPolicy *bool `json:"enablePodSecurityPolicy,omitempty"`
2026	// NetworkProfile - Profile of network configuration.
2027	NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"`
2028	// AadProfile - Profile of Azure Active Directory configuration.
2029	AadProfile *ManagedClusterAADProfile `json:"aadProfile,omitempty"`
2030	// AutoUpgradeProfile - Profile of auto upgrade configuration.
2031	AutoUpgradeProfile *ManagedClusterAutoUpgradeProfile `json:"autoUpgradeProfile,omitempty"`
2032	// AutoScalerProfile - Parameters to be applied to the cluster-autoscaler when enabled
2033	AutoScalerProfile *ManagedClusterPropertiesAutoScalerProfile `json:"autoScalerProfile,omitempty"`
2034	// APIServerAccessProfile - Access profile for managed cluster API server.
2035	APIServerAccessProfile *ManagedClusterAPIServerAccessProfile `json:"apiServerAccessProfile,omitempty"`
2036	// DiskEncryptionSetID - ResourceId of the disk encryption set to use for enabling encryption at rest.
2037	DiskEncryptionSetID *string `json:"diskEncryptionSetID,omitempty"`
2038	// IdentityProfile - Identities associated with the cluster.
2039	IdentityProfile map[string]*ManagedClusterPropertiesIdentityProfileValue `json:"identityProfile"`
2040	// PrivateLinkResources - Private link resources associated with the cluster.
2041	PrivateLinkResources *[]PrivateLinkResource `json:"privateLinkResources,omitempty"`
2042	// DisableLocalAccounts - If set to true, getting static credential will be disabled for this cluster. Expected to only be used for AAD clusters.
2043	DisableLocalAccounts *bool `json:"disableLocalAccounts,omitempty"`
2044	// HTTPProxyConfig - Configurations for provisioning the cluster with HTTP proxy servers.
2045	HTTPProxyConfig *ManagedClusterHTTPProxyConfig `json:"httpProxyConfig,omitempty"`
2046}
2047
2048// MarshalJSON is the custom marshaler for ManagedClusterProperties.
2049func (mcp ManagedClusterProperties) MarshalJSON() ([]byte, error) {
2050	objectMap := make(map[string]interface{})
2051	if mcp.KubernetesVersion != nil {
2052		objectMap["kubernetesVersion"] = mcp.KubernetesVersion
2053	}
2054	if mcp.DNSPrefix != nil {
2055		objectMap["dnsPrefix"] = mcp.DNSPrefix
2056	}
2057	if mcp.FqdnSubdomain != nil {
2058		objectMap["fqdnSubdomain"] = mcp.FqdnSubdomain
2059	}
2060	if mcp.AgentPoolProfiles != nil {
2061		objectMap["agentPoolProfiles"] = mcp.AgentPoolProfiles
2062	}
2063	if mcp.LinuxProfile != nil {
2064		objectMap["linuxProfile"] = mcp.LinuxProfile
2065	}
2066	if mcp.WindowsProfile != nil {
2067		objectMap["windowsProfile"] = mcp.WindowsProfile
2068	}
2069	if mcp.ServicePrincipalProfile != nil {
2070		objectMap["servicePrincipalProfile"] = mcp.ServicePrincipalProfile
2071	}
2072	if mcp.AddonProfiles != nil {
2073		objectMap["addonProfiles"] = mcp.AddonProfiles
2074	}
2075	if mcp.PodIdentityProfile != nil {
2076		objectMap["podIdentityProfile"] = mcp.PodIdentityProfile
2077	}
2078	if mcp.NodeResourceGroup != nil {
2079		objectMap["nodeResourceGroup"] = mcp.NodeResourceGroup
2080	}
2081	if mcp.EnableRBAC != nil {
2082		objectMap["enableRBAC"] = mcp.EnableRBAC
2083	}
2084	if mcp.EnablePodSecurityPolicy != nil {
2085		objectMap["enablePodSecurityPolicy"] = mcp.EnablePodSecurityPolicy
2086	}
2087	if mcp.NetworkProfile != nil {
2088		objectMap["networkProfile"] = mcp.NetworkProfile
2089	}
2090	if mcp.AadProfile != nil {
2091		objectMap["aadProfile"] = mcp.AadProfile
2092	}
2093	if mcp.AutoUpgradeProfile != nil {
2094		objectMap["autoUpgradeProfile"] = mcp.AutoUpgradeProfile
2095	}
2096	if mcp.AutoScalerProfile != nil {
2097		objectMap["autoScalerProfile"] = mcp.AutoScalerProfile
2098	}
2099	if mcp.APIServerAccessProfile != nil {
2100		objectMap["apiServerAccessProfile"] = mcp.APIServerAccessProfile
2101	}
2102	if mcp.DiskEncryptionSetID != nil {
2103		objectMap["diskEncryptionSetID"] = mcp.DiskEncryptionSetID
2104	}
2105	if mcp.IdentityProfile != nil {
2106		objectMap["identityProfile"] = mcp.IdentityProfile
2107	}
2108	if mcp.PrivateLinkResources != nil {
2109		objectMap["privateLinkResources"] = mcp.PrivateLinkResources
2110	}
2111	if mcp.DisableLocalAccounts != nil {
2112		objectMap["disableLocalAccounts"] = mcp.DisableLocalAccounts
2113	}
2114	if mcp.HTTPProxyConfig != nil {
2115		objectMap["httpProxyConfig"] = mcp.HTTPProxyConfig
2116	}
2117	return json.Marshal(objectMap)
2118}
2119
2120// ManagedClusterPropertiesAutoScalerProfile parameters to be applied to the cluster-autoscaler when
2121// enabled
2122type ManagedClusterPropertiesAutoScalerProfile struct {
2123	BalanceSimilarNodeGroups *string `json:"balance-similar-node-groups,omitempty"`
2124	// Expander - Possible values include: 'ExpanderLeastWaste', 'ExpanderMostPods', 'ExpanderPriority', 'ExpanderRandom'
2125	Expander                      Expander `json:"expander,omitempty"`
2126	MaxEmptyBulkDelete            *string  `json:"max-empty-bulk-delete,omitempty"`
2127	MaxGracefulTerminationSec     *string  `json:"max-graceful-termination-sec,omitempty"`
2128	MaxNodeProvisionTime          *string  `json:"max-node-provision-time,omitempty"`
2129	MaxTotalUnreadyPercentage     *string  `json:"max-total-unready-percentage,omitempty"`
2130	NewPodScaleUpDelay            *string  `json:"new-pod-scale-up-delay,omitempty"`
2131	OkTotalUnreadyCount           *string  `json:"ok-total-unready-count,omitempty"`
2132	ScanInterval                  *string  `json:"scan-interval,omitempty"`
2133	ScaleDownDelayAfterAdd        *string  `json:"scale-down-delay-after-add,omitempty"`
2134	ScaleDownDelayAfterDelete     *string  `json:"scale-down-delay-after-delete,omitempty"`
2135	ScaleDownDelayAfterFailure    *string  `json:"scale-down-delay-after-failure,omitempty"`
2136	ScaleDownUnneededTime         *string  `json:"scale-down-unneeded-time,omitempty"`
2137	ScaleDownUnreadyTime          *string  `json:"scale-down-unready-time,omitempty"`
2138	ScaleDownUtilizationThreshold *string  `json:"scale-down-utilization-threshold,omitempty"`
2139	SkipNodesWithLocalStorage     *string  `json:"skip-nodes-with-local-storage,omitempty"`
2140	SkipNodesWithSystemPods       *string  `json:"skip-nodes-with-system-pods,omitempty"`
2141}
2142
2143// ManagedClusterPropertiesIdentityProfileValue ...
2144type ManagedClusterPropertiesIdentityProfileValue struct {
2145	// ResourceID - The resource id of the user assigned identity.
2146	ResourceID *string `json:"resourceId,omitempty"`
2147	// ClientID - The client id of the user assigned identity.
2148	ClientID *string `json:"clientId,omitempty"`
2149	// ObjectID - The object id of the user assigned identity.
2150	ObjectID *string `json:"objectId,omitempty"`
2151}
2152
2153// ManagedClustersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2154// long-running operation.
2155type ManagedClustersCreateOrUpdateFuture struct {
2156	azure.FutureAPI
2157	// Result returns the result of the asynchronous operation.
2158	// If the operation has not completed it will return an error.
2159	Result func(ManagedClustersClient) (ManagedCluster, error)
2160}
2161
2162// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2163func (future *ManagedClustersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2164	var azFuture azure.Future
2165	if err := json.Unmarshal(body, &azFuture); err != nil {
2166		return err
2167	}
2168	future.FutureAPI = &azFuture
2169	future.Result = future.result
2170	return nil
2171}
2172
2173// result is the default implementation for ManagedClustersCreateOrUpdateFuture.Result.
2174func (future *ManagedClustersCreateOrUpdateFuture) result(client ManagedClustersClient) (mc ManagedCluster, err error) {
2175	var done bool
2176	done, err = future.DoneWithContext(context.Background(), client)
2177	if err != nil {
2178		err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
2179		return
2180	}
2181	if !done {
2182		mc.Response.Response = future.Response()
2183		err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersCreateOrUpdateFuture")
2184		return
2185	}
2186	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2187	if mc.Response.Response, err = future.GetResult(sender); err == nil && mc.Response.Response.StatusCode != http.StatusNoContent {
2188		mc, err = client.CreateOrUpdateResponder(mc.Response.Response)
2189		if err != nil {
2190			err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", mc.Response.Response, "Failure responding to request")
2191		}
2192	}
2193	return
2194}
2195
2196// ManagedClustersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
2197// operation.
2198type ManagedClustersDeleteFuture struct {
2199	azure.FutureAPI
2200	// Result returns the result of the asynchronous operation.
2201	// If the operation has not completed it will return an error.
2202	Result func(ManagedClustersClient) (autorest.Response, error)
2203}
2204
2205// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2206func (future *ManagedClustersDeleteFuture) UnmarshalJSON(body []byte) error {
2207	var azFuture azure.Future
2208	if err := json.Unmarshal(body, &azFuture); err != nil {
2209		return err
2210	}
2211	future.FutureAPI = &azFuture
2212	future.Result = future.result
2213	return nil
2214}
2215
2216// result is the default implementation for ManagedClustersDeleteFuture.Result.
2217func (future *ManagedClustersDeleteFuture) result(client ManagedClustersClient) (ar autorest.Response, err error) {
2218	var done bool
2219	done, err = future.DoneWithContext(context.Background(), client)
2220	if err != nil {
2221		err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersDeleteFuture", "Result", future.Response(), "Polling failure")
2222		return
2223	}
2224	if !done {
2225		ar.Response = future.Response()
2226		err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersDeleteFuture")
2227		return
2228	}
2229	ar.Response = future.Response()
2230	return
2231}
2232
2233// ManagedClusterServicePrincipalProfile information about a service principal identity for the cluster to
2234// use for manipulating Azure APIs.
2235type ManagedClusterServicePrincipalProfile struct {
2236	// ClientID - The ID for the service principal.
2237	ClientID *string `json:"clientId,omitempty"`
2238	// Secret - The secret password associated with the service principal in plain text.
2239	Secret *string `json:"secret,omitempty"`
2240}
2241
2242// ManagedClusterSKU ...
2243type ManagedClusterSKU struct {
2244	// Name - Name of a managed cluster SKU. Possible values include: 'ManagedClusterSKUNameBasic'
2245	Name ManagedClusterSKUName `json:"name,omitempty"`
2246	// Tier - Tier of a managed cluster SKU. Possible values include: 'ManagedClusterSKUTierPaid', 'ManagedClusterSKUTierFree'
2247	Tier ManagedClusterSKUTier `json:"tier,omitempty"`
2248}
2249
2250// ManagedClustersResetAADProfileFuture an abstraction for monitoring and retrieving the results of a
2251// long-running operation.
2252type ManagedClustersResetAADProfileFuture struct {
2253	azure.FutureAPI
2254	// Result returns the result of the asynchronous operation.
2255	// If the operation has not completed it will return an error.
2256	Result func(ManagedClustersClient) (autorest.Response, error)
2257}
2258
2259// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2260func (future *ManagedClustersResetAADProfileFuture) UnmarshalJSON(body []byte) error {
2261	var azFuture azure.Future
2262	if err := json.Unmarshal(body, &azFuture); err != nil {
2263		return err
2264	}
2265	future.FutureAPI = &azFuture
2266	future.Result = future.result
2267	return nil
2268}
2269
2270// result is the default implementation for ManagedClustersResetAADProfileFuture.Result.
2271func (future *ManagedClustersResetAADProfileFuture) result(client ManagedClustersClient) (ar autorest.Response, err error) {
2272	var done bool
2273	done, err = future.DoneWithContext(context.Background(), client)
2274	if err != nil {
2275		err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersResetAADProfileFuture", "Result", future.Response(), "Polling failure")
2276		return
2277	}
2278	if !done {
2279		ar.Response = future.Response()
2280		err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersResetAADProfileFuture")
2281		return
2282	}
2283	ar.Response = future.Response()
2284	return
2285}
2286
2287// ManagedClustersResetServicePrincipalProfileFuture an abstraction for monitoring and retrieving the
2288// results of a long-running operation.
2289type ManagedClustersResetServicePrincipalProfileFuture struct {
2290	azure.FutureAPI
2291	// Result returns the result of the asynchronous operation.
2292	// If the operation has not completed it will return an error.
2293	Result func(ManagedClustersClient) (autorest.Response, error)
2294}
2295
2296// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2297func (future *ManagedClustersResetServicePrincipalProfileFuture) UnmarshalJSON(body []byte) error {
2298	var azFuture azure.Future
2299	if err := json.Unmarshal(body, &azFuture); err != nil {
2300		return err
2301	}
2302	future.FutureAPI = &azFuture
2303	future.Result = future.result
2304	return nil
2305}
2306
2307// result is the default implementation for ManagedClustersResetServicePrincipalProfileFuture.Result.
2308func (future *ManagedClustersResetServicePrincipalProfileFuture) result(client ManagedClustersClient) (ar autorest.Response, err error) {
2309	var done bool
2310	done, err = future.DoneWithContext(context.Background(), client)
2311	if err != nil {
2312		err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersResetServicePrincipalProfileFuture", "Result", future.Response(), "Polling failure")
2313		return
2314	}
2315	if !done {
2316		ar.Response = future.Response()
2317		err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersResetServicePrincipalProfileFuture")
2318		return
2319	}
2320	ar.Response = future.Response()
2321	return
2322}
2323
2324// ManagedClustersRotateClusterCertificatesFuture an abstraction for monitoring and retrieving the results
2325// of a long-running operation.
2326type ManagedClustersRotateClusterCertificatesFuture struct {
2327	azure.FutureAPI
2328	// Result returns the result of the asynchronous operation.
2329	// If the operation has not completed it will return an error.
2330	Result func(ManagedClustersClient) (autorest.Response, error)
2331}
2332
2333// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2334func (future *ManagedClustersRotateClusterCertificatesFuture) UnmarshalJSON(body []byte) error {
2335	var azFuture azure.Future
2336	if err := json.Unmarshal(body, &azFuture); err != nil {
2337		return err
2338	}
2339	future.FutureAPI = &azFuture
2340	future.Result = future.result
2341	return nil
2342}
2343
2344// result is the default implementation for ManagedClustersRotateClusterCertificatesFuture.Result.
2345func (future *ManagedClustersRotateClusterCertificatesFuture) result(client ManagedClustersClient) (ar autorest.Response, err error) {
2346	var done bool
2347	done, err = future.DoneWithContext(context.Background(), client)
2348	if err != nil {
2349		err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersRotateClusterCertificatesFuture", "Result", future.Response(), "Polling failure")
2350		return
2351	}
2352	if !done {
2353		ar.Response = future.Response()
2354		err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersRotateClusterCertificatesFuture")
2355		return
2356	}
2357	ar.Response = future.Response()
2358	return
2359}
2360
2361// ManagedClustersRunCommandFuture an abstraction for monitoring and retrieving the results of a
2362// long-running operation.
2363type ManagedClustersRunCommandFuture struct {
2364	azure.FutureAPI
2365	// Result returns the result of the asynchronous operation.
2366	// If the operation has not completed it will return an error.
2367	Result func(ManagedClustersClient) (RunCommandResult, error)
2368}
2369
2370// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2371func (future *ManagedClustersRunCommandFuture) UnmarshalJSON(body []byte) error {
2372	var azFuture azure.Future
2373	if err := json.Unmarshal(body, &azFuture); err != nil {
2374		return err
2375	}
2376	future.FutureAPI = &azFuture
2377	future.Result = future.result
2378	return nil
2379}
2380
2381// result is the default implementation for ManagedClustersRunCommandFuture.Result.
2382func (future *ManagedClustersRunCommandFuture) result(client ManagedClustersClient) (rcr RunCommandResult, err error) {
2383	var done bool
2384	done, err = future.DoneWithContext(context.Background(), client)
2385	if err != nil {
2386		err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersRunCommandFuture", "Result", future.Response(), "Polling failure")
2387		return
2388	}
2389	if !done {
2390		rcr.Response.Response = future.Response()
2391		err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersRunCommandFuture")
2392		return
2393	}
2394	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2395	if rcr.Response.Response, err = future.GetResult(sender); err == nil && rcr.Response.Response.StatusCode != http.StatusNoContent {
2396		rcr, err = client.RunCommandResponder(rcr.Response.Response)
2397		if err != nil {
2398			err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersRunCommandFuture", "Result", rcr.Response.Response, "Failure responding to request")
2399		}
2400	}
2401	return
2402}
2403
2404// ManagedClustersStartFuture an abstraction for monitoring and retrieving the results of a long-running
2405// operation.
2406type ManagedClustersStartFuture struct {
2407	azure.FutureAPI
2408	// Result returns the result of the asynchronous operation.
2409	// If the operation has not completed it will return an error.
2410	Result func(ManagedClustersClient) (autorest.Response, error)
2411}
2412
2413// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2414func (future *ManagedClustersStartFuture) UnmarshalJSON(body []byte) error {
2415	var azFuture azure.Future
2416	if err := json.Unmarshal(body, &azFuture); err != nil {
2417		return err
2418	}
2419	future.FutureAPI = &azFuture
2420	future.Result = future.result
2421	return nil
2422}
2423
2424// result is the default implementation for ManagedClustersStartFuture.Result.
2425func (future *ManagedClustersStartFuture) result(client ManagedClustersClient) (ar autorest.Response, err error) {
2426	var done bool
2427	done, err = future.DoneWithContext(context.Background(), client)
2428	if err != nil {
2429		err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersStartFuture", "Result", future.Response(), "Polling failure")
2430		return
2431	}
2432	if !done {
2433		ar.Response = future.Response()
2434		err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersStartFuture")
2435		return
2436	}
2437	ar.Response = future.Response()
2438	return
2439}
2440
2441// ManagedClustersStopFuture an abstraction for monitoring and retrieving the results of a long-running
2442// operation.
2443type ManagedClustersStopFuture struct {
2444	azure.FutureAPI
2445	// Result returns the result of the asynchronous operation.
2446	// If the operation has not completed it will return an error.
2447	Result func(ManagedClustersClient) (autorest.Response, error)
2448}
2449
2450// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2451func (future *ManagedClustersStopFuture) UnmarshalJSON(body []byte) error {
2452	var azFuture azure.Future
2453	if err := json.Unmarshal(body, &azFuture); err != nil {
2454		return err
2455	}
2456	future.FutureAPI = &azFuture
2457	future.Result = future.result
2458	return nil
2459}
2460
2461// result is the default implementation for ManagedClustersStopFuture.Result.
2462func (future *ManagedClustersStopFuture) result(client ManagedClustersClient) (ar autorest.Response, err error) {
2463	var done bool
2464	done, err = future.DoneWithContext(context.Background(), client)
2465	if err != nil {
2466		err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersStopFuture", "Result", future.Response(), "Polling failure")
2467		return
2468	}
2469	if !done {
2470		ar.Response = future.Response()
2471		err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersStopFuture")
2472		return
2473	}
2474	ar.Response = future.Response()
2475	return
2476}
2477
2478// ManagedClustersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
2479// long-running operation.
2480type ManagedClustersUpdateTagsFuture struct {
2481	azure.FutureAPI
2482	// Result returns the result of the asynchronous operation.
2483	// If the operation has not completed it will return an error.
2484	Result func(ManagedClustersClient) (ManagedCluster, error)
2485}
2486
2487// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2488func (future *ManagedClustersUpdateTagsFuture) UnmarshalJSON(body []byte) error {
2489	var azFuture azure.Future
2490	if err := json.Unmarshal(body, &azFuture); err != nil {
2491		return err
2492	}
2493	future.FutureAPI = &azFuture
2494	future.Result = future.result
2495	return nil
2496}
2497
2498// result is the default implementation for ManagedClustersUpdateTagsFuture.Result.
2499func (future *ManagedClustersUpdateTagsFuture) result(client ManagedClustersClient) (mc ManagedCluster, err error) {
2500	var done bool
2501	done, err = future.DoneWithContext(context.Background(), client)
2502	if err != nil {
2503		err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersUpdateTagsFuture", "Result", future.Response(), "Polling failure")
2504		return
2505	}
2506	if !done {
2507		mc.Response.Response = future.Response()
2508		err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersUpdateTagsFuture")
2509		return
2510	}
2511	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2512	if mc.Response.Response, err = future.GetResult(sender); err == nil && mc.Response.Response.StatusCode != http.StatusNoContent {
2513		mc, err = client.UpdateTagsResponder(mc.Response.Response)
2514		if err != nil {
2515			err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersUpdateTagsFuture", "Result", mc.Response.Response, "Failure responding to request")
2516		}
2517	}
2518	return
2519}
2520
2521// ManagedClusterUpgradeProfile the list of available upgrades for compute pools.
2522type ManagedClusterUpgradeProfile struct {
2523	autorest.Response `json:"-"`
2524	// ID - READ-ONLY; Id of upgrade profile.
2525	ID *string `json:"id,omitempty"`
2526	// Name - READ-ONLY; Name of upgrade profile.
2527	Name *string `json:"name,omitempty"`
2528	// Type - READ-ONLY; Type of upgrade profile.
2529	Type *string `json:"type,omitempty"`
2530	// ManagedClusterUpgradeProfileProperties - Properties of upgrade profile.
2531	*ManagedClusterUpgradeProfileProperties `json:"properties,omitempty"`
2532}
2533
2534// MarshalJSON is the custom marshaler for ManagedClusterUpgradeProfile.
2535func (mcup ManagedClusterUpgradeProfile) MarshalJSON() ([]byte, error) {
2536	objectMap := make(map[string]interface{})
2537	if mcup.ManagedClusterUpgradeProfileProperties != nil {
2538		objectMap["properties"] = mcup.ManagedClusterUpgradeProfileProperties
2539	}
2540	return json.Marshal(objectMap)
2541}
2542
2543// UnmarshalJSON is the custom unmarshaler for ManagedClusterUpgradeProfile struct.
2544func (mcup *ManagedClusterUpgradeProfile) UnmarshalJSON(body []byte) error {
2545	var m map[string]*json.RawMessage
2546	err := json.Unmarshal(body, &m)
2547	if err != nil {
2548		return err
2549	}
2550	for k, v := range m {
2551		switch k {
2552		case "id":
2553			if v != nil {
2554				var ID string
2555				err = json.Unmarshal(*v, &ID)
2556				if err != nil {
2557					return err
2558				}
2559				mcup.ID = &ID
2560			}
2561		case "name":
2562			if v != nil {
2563				var name string
2564				err = json.Unmarshal(*v, &name)
2565				if err != nil {
2566					return err
2567				}
2568				mcup.Name = &name
2569			}
2570		case "type":
2571			if v != nil {
2572				var typeVar string
2573				err = json.Unmarshal(*v, &typeVar)
2574				if err != nil {
2575					return err
2576				}
2577				mcup.Type = &typeVar
2578			}
2579		case "properties":
2580			if v != nil {
2581				var managedClusterUpgradeProfileProperties ManagedClusterUpgradeProfileProperties
2582				err = json.Unmarshal(*v, &managedClusterUpgradeProfileProperties)
2583				if err != nil {
2584					return err
2585				}
2586				mcup.ManagedClusterUpgradeProfileProperties = &managedClusterUpgradeProfileProperties
2587			}
2588		}
2589	}
2590
2591	return nil
2592}
2593
2594// ManagedClusterUpgradeProfileProperties control plane and agent pool upgrade profiles.
2595type ManagedClusterUpgradeProfileProperties struct {
2596	// ControlPlaneProfile - The list of available upgrade versions for the control plane.
2597	ControlPlaneProfile *ManagedClusterPoolUpgradeProfile `json:"controlPlaneProfile,omitempty"`
2598	// AgentPoolProfiles - The list of available upgrade versions for agent pools.
2599	AgentPoolProfiles *[]ManagedClusterPoolUpgradeProfile `json:"agentPoolProfiles,omitempty"`
2600}
2601
2602// ManagedClusterWindowsProfile profile for Windows VMs in the container service cluster.
2603type ManagedClusterWindowsProfile struct {
2604	// AdminUsername - Specifies the name of the administrator account. <br><br> **restriction:** Cannot end in "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". <br><br> **Minimum-length:** 1 character <br><br> **Max-length:** 20 characters
2605	AdminUsername *string `json:"adminUsername,omitempty"`
2606	// AdminPassword - Specifies the password of the administrator account. <br><br> **Minimum-length:** 8 characters <br><br> **Max-length:** 123 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"
2607	AdminPassword *string `json:"adminPassword,omitempty"`
2608	// LicenseType - The licenseType to use for Windows VMs. Windows_Server is used to enable Azure Hybrid User Benefits for Windows VMs. Possible values include: 'LicenseTypeNone', 'LicenseTypeWindowsServer'
2609	LicenseType LicenseType `json:"licenseType,omitempty"`
2610	// EnableCSIProxy - Whether to enable CSI proxy.
2611	EnableCSIProxy *bool `json:"enableCSIProxy,omitempty"`
2612}
2613
2614// MasterProfile profile for the container service master.
2615type MasterProfile struct {
2616	// Count - Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1.
2617	Count *int32 `json:"count,omitempty"`
2618	// DNSPrefix - DNS prefix to be used to create the FQDN for the master pool.
2619	DNSPrefix *string `json:"dnsPrefix,omitempty"`
2620	// VMSize - Size of agent VMs. Possible values include: 'VMSizeTypesStandardA1', 'VMSizeTypesStandardA10', 'VMSizeTypesStandardA11', 'VMSizeTypesStandardA1V2', 'VMSizeTypesStandardA2', 'VMSizeTypesStandardA2V2', 'VMSizeTypesStandardA2mV2', 'VMSizeTypesStandardA3', 'VMSizeTypesStandardA4', 'VMSizeTypesStandardA4V2', 'VMSizeTypesStandardA4mV2', 'VMSizeTypesStandardA5', 'VMSizeTypesStandardA6', 'VMSizeTypesStandardA7', 'VMSizeTypesStandardA8', 'VMSizeTypesStandardA8V2', 'VMSizeTypesStandardA8mV2', 'VMSizeTypesStandardA9', 'VMSizeTypesStandardB2ms', 'VMSizeTypesStandardB2s', 'VMSizeTypesStandardB4ms', 'VMSizeTypesStandardB8ms', 'VMSizeTypesStandardD1', 'VMSizeTypesStandardD11', 'VMSizeTypesStandardD11V2', 'VMSizeTypesStandardD11V2Promo', 'VMSizeTypesStandardD12', 'VMSizeTypesStandardD12V2', 'VMSizeTypesStandardD12V2Promo', 'VMSizeTypesStandardD13', 'VMSizeTypesStandardD13V2', 'VMSizeTypesStandardD13V2Promo', 'VMSizeTypesStandardD14', 'VMSizeTypesStandardD14V2', 'VMSizeTypesStandardD14V2Promo', 'VMSizeTypesStandardD15V2', 'VMSizeTypesStandardD16V3', 'VMSizeTypesStandardD16sV3', 'VMSizeTypesStandardD1V2', 'VMSizeTypesStandardD2', 'VMSizeTypesStandardD2V2', 'VMSizeTypesStandardD2V2Promo', 'VMSizeTypesStandardD2V3', 'VMSizeTypesStandardD2sV3', 'VMSizeTypesStandardD3', 'VMSizeTypesStandardD32V3', 'VMSizeTypesStandardD32sV3', 'VMSizeTypesStandardD3V2', 'VMSizeTypesStandardD3V2Promo', 'VMSizeTypesStandardD4', 'VMSizeTypesStandardD4V2', 'VMSizeTypesStandardD4V2Promo', 'VMSizeTypesStandardD4V3', 'VMSizeTypesStandardD4sV3', 'VMSizeTypesStandardD5V2', 'VMSizeTypesStandardD5V2Promo', 'VMSizeTypesStandardD64V3', 'VMSizeTypesStandardD64sV3', 'VMSizeTypesStandardD8V3', 'VMSizeTypesStandardD8sV3', 'VMSizeTypesStandardDS1', 'VMSizeTypesStandardDS11', 'VMSizeTypesStandardDS11V2', 'VMSizeTypesStandardDS11V2Promo', 'VMSizeTypesStandardDS12', 'VMSizeTypesStandardDS12V2', 'VMSizeTypesStandardDS12V2Promo', 'VMSizeTypesStandardDS13', 'VMSizeTypesStandardDS132V2', 'VMSizeTypesStandardDS134V2', 'VMSizeTypesStandardDS13V2', 'VMSizeTypesStandardDS13V2Promo', 'VMSizeTypesStandardDS14', 'VMSizeTypesStandardDS144V2', 'VMSizeTypesStandardDS148V2', 'VMSizeTypesStandardDS14V2', 'VMSizeTypesStandardDS14V2Promo', 'VMSizeTypesStandardDS15V2', 'VMSizeTypesStandardDS1V2', 'VMSizeTypesStandardDS2', 'VMSizeTypesStandardDS2V2', 'VMSizeTypesStandardDS2V2Promo', 'VMSizeTypesStandardDS3', 'VMSizeTypesStandardDS3V2', 'VMSizeTypesStandardDS3V2Promo', 'VMSizeTypesStandardDS4', 'VMSizeTypesStandardDS4V2', 'VMSizeTypesStandardDS4V2Promo', 'VMSizeTypesStandardDS5V2', 'VMSizeTypesStandardDS5V2Promo', 'VMSizeTypesStandardE16V3', 'VMSizeTypesStandardE16sV3', 'VMSizeTypesStandardE2V3', 'VMSizeTypesStandardE2sV3', 'VMSizeTypesStandardE3216sV3', 'VMSizeTypesStandardE328sV3', 'VMSizeTypesStandardE32V3', 'VMSizeTypesStandardE32sV3', 'VMSizeTypesStandardE4V3', 'VMSizeTypesStandardE4sV3', 'VMSizeTypesStandardE6416sV3', 'VMSizeTypesStandardE6432sV3', 'VMSizeTypesStandardE64V3', 'VMSizeTypesStandardE64sV3', 'VMSizeTypesStandardE8V3', 'VMSizeTypesStandardE8sV3', 'VMSizeTypesStandardF1', 'VMSizeTypesStandardF16', 'VMSizeTypesStandardF16s', 'VMSizeTypesStandardF16sV2', 'VMSizeTypesStandardF1s', 'VMSizeTypesStandardF2', 'VMSizeTypesStandardF2s', 'VMSizeTypesStandardF2sV2', 'VMSizeTypesStandardF32sV2', 'VMSizeTypesStandardF4', 'VMSizeTypesStandardF4s', 'VMSizeTypesStandardF4sV2', 'VMSizeTypesStandardF64sV2', 'VMSizeTypesStandardF72sV2', 'VMSizeTypesStandardF8', 'VMSizeTypesStandardF8s', 'VMSizeTypesStandardF8sV2', 'VMSizeTypesStandardG1', 'VMSizeTypesStandardG2', 'VMSizeTypesStandardG3', 'VMSizeTypesStandardG4', 'VMSizeTypesStandardG5', 'VMSizeTypesStandardGS1', 'VMSizeTypesStandardGS2', 'VMSizeTypesStandardGS3', 'VMSizeTypesStandardGS4', 'VMSizeTypesStandardGS44', 'VMSizeTypesStandardGS48', 'VMSizeTypesStandardGS5', 'VMSizeTypesStandardGS516', 'VMSizeTypesStandardGS58', 'VMSizeTypesStandardH16', 'VMSizeTypesStandardH16m', 'VMSizeTypesStandardH16mr', 'VMSizeTypesStandardH16r', 'VMSizeTypesStandardH8', 'VMSizeTypesStandardH8m', 'VMSizeTypesStandardL16s', 'VMSizeTypesStandardL32s', 'VMSizeTypesStandardL4s', 'VMSizeTypesStandardL8s', 'VMSizeTypesStandardM12832ms', 'VMSizeTypesStandardM12864ms', 'VMSizeTypesStandardM128ms', 'VMSizeTypesStandardM128s', 'VMSizeTypesStandardM6416ms', 'VMSizeTypesStandardM6432ms', 'VMSizeTypesStandardM64ms', 'VMSizeTypesStandardM64s', 'VMSizeTypesStandardNC12', 'VMSizeTypesStandardNC12sV2', 'VMSizeTypesStandardNC12sV3', 'VMSizeTypesStandardNC24', 'VMSizeTypesStandardNC24r', 'VMSizeTypesStandardNC24rsV2', 'VMSizeTypesStandardNC24rsV3', 'VMSizeTypesStandardNC24sV2', 'VMSizeTypesStandardNC24sV3', 'VMSizeTypesStandardNC6', 'VMSizeTypesStandardNC6sV2', 'VMSizeTypesStandardNC6sV3', 'VMSizeTypesStandardND12s', 'VMSizeTypesStandardND24rs', 'VMSizeTypesStandardND24s', 'VMSizeTypesStandardND6s', 'VMSizeTypesStandardNV12', 'VMSizeTypesStandardNV24', 'VMSizeTypesStandardNV6'
2621	VMSize VMSizeTypes `json:"vmSize,omitempty"`
2622	// OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified.
2623	OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"`
2624	// VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier.
2625	VnetSubnetID *string `json:"vnetSubnetID,omitempty"`
2626	// FirstConsecutiveStaticIP - FirstConsecutiveStaticIP used to specify the first static ip of masters.
2627	FirstConsecutiveStaticIP *string `json:"firstConsecutiveStaticIP,omitempty"`
2628	// StorageProfile - Storage profile specifies what kind of storage used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. Possible values include: 'StorageProfileTypesStorageAccount', 'StorageProfileTypesManagedDisks'
2629	StorageProfile StorageProfileTypes `json:"storageProfile,omitempty"`
2630	// Fqdn - READ-ONLY; FQDN for the master pool.
2631	Fqdn *string `json:"fqdn,omitempty"`
2632}
2633
2634// MarshalJSON is the custom marshaler for MasterProfile.
2635func (mp MasterProfile) MarshalJSON() ([]byte, error) {
2636	objectMap := make(map[string]interface{})
2637	if mp.Count != nil {
2638		objectMap["count"] = mp.Count
2639	}
2640	if mp.DNSPrefix != nil {
2641		objectMap["dnsPrefix"] = mp.DNSPrefix
2642	}
2643	if mp.VMSize != "" {
2644		objectMap["vmSize"] = mp.VMSize
2645	}
2646	if mp.OsDiskSizeGB != nil {
2647		objectMap["osDiskSizeGB"] = mp.OsDiskSizeGB
2648	}
2649	if mp.VnetSubnetID != nil {
2650		objectMap["vnetSubnetID"] = mp.VnetSubnetID
2651	}
2652	if mp.FirstConsecutiveStaticIP != nil {
2653		objectMap["firstConsecutiveStaticIP"] = mp.FirstConsecutiveStaticIP
2654	}
2655	if mp.StorageProfile != "" {
2656		objectMap["storageProfile"] = mp.StorageProfile
2657	}
2658	return json.Marshal(objectMap)
2659}
2660
2661// NetworkProfile profile of network configuration.
2662type NetworkProfile struct {
2663	// NetworkPlugin - Network plugin used for building Kubernetes network. Possible values include: 'NetworkPluginAzure', 'NetworkPluginKubenet'
2664	NetworkPlugin NetworkPlugin `json:"networkPlugin,omitempty"`
2665	// NetworkPolicy - Network policy used for building Kubernetes network. Possible values include: 'NetworkPolicyCalico', 'NetworkPolicyAzure'
2666	NetworkPolicy NetworkPolicy `json:"networkPolicy,omitempty"`
2667	// NetworkMode - Network mode used for building Kubernetes network. Possible values include: 'NetworkModeTransparent', 'NetworkModeBridge'
2668	NetworkMode NetworkMode `json:"networkMode,omitempty"`
2669	// PodCidr - A CIDR notation IP range from which to assign pod IPs when kubenet is used.
2670	PodCidr *string `json:"podCidr,omitempty"`
2671	// ServiceCidr - A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges.
2672	ServiceCidr *string `json:"serviceCidr,omitempty"`
2673	// DNSServiceIP - An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr.
2674	DNSServiceIP *string `json:"dnsServiceIP,omitempty"`
2675	// DockerBridgeCidr - A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the Kubernetes service address range.
2676	DockerBridgeCidr *string `json:"dockerBridgeCidr,omitempty"`
2677	// OutboundType - The outbound (egress) routing method. Possible values include: 'OutboundTypeLoadBalancer', 'OutboundTypeUserDefinedRouting'
2678	OutboundType OutboundType `json:"outboundType,omitempty"`
2679	// LoadBalancerSku - The load balancer sku for the managed cluster. Possible values include: 'LoadBalancerSkuStandard', 'LoadBalancerSkuBasic'
2680	LoadBalancerSku LoadBalancerSku `json:"loadBalancerSku,omitempty"`
2681	// LoadBalancerProfile - Profile of the cluster load balancer.
2682	LoadBalancerProfile *ManagedClusterLoadBalancerProfile `json:"loadBalancerProfile,omitempty"`
2683}
2684
2685// OperationListResult the List Compute Operation operation response.
2686type OperationListResult struct {
2687	autorest.Response `json:"-"`
2688	// Value - READ-ONLY; The list of compute operations
2689	Value *[]OperationValue `json:"value,omitempty"`
2690}
2691
2692// MarshalJSON is the custom marshaler for OperationListResult.
2693func (olr OperationListResult) MarshalJSON() ([]byte, error) {
2694	objectMap := make(map[string]interface{})
2695	return json.Marshal(objectMap)
2696}
2697
2698// OperationValue describes the properties of a Compute Operation value.
2699type OperationValue struct {
2700	// Origin - READ-ONLY; The origin of the compute operation.
2701	Origin *string `json:"origin,omitempty"`
2702	// Name - READ-ONLY; The name of the compute operation.
2703	Name *string `json:"name,omitempty"`
2704	// OperationValueDisplay - Describes the properties of a Compute Operation Value Display.
2705	*OperationValueDisplay `json:"display,omitempty"`
2706}
2707
2708// MarshalJSON is the custom marshaler for OperationValue.
2709func (ov OperationValue) MarshalJSON() ([]byte, error) {
2710	objectMap := make(map[string]interface{})
2711	if ov.OperationValueDisplay != nil {
2712		objectMap["display"] = ov.OperationValueDisplay
2713	}
2714	return json.Marshal(objectMap)
2715}
2716
2717// UnmarshalJSON is the custom unmarshaler for OperationValue struct.
2718func (ov *OperationValue) UnmarshalJSON(body []byte) error {
2719	var m map[string]*json.RawMessage
2720	err := json.Unmarshal(body, &m)
2721	if err != nil {
2722		return err
2723	}
2724	for k, v := range m {
2725		switch k {
2726		case "origin":
2727			if v != nil {
2728				var origin string
2729				err = json.Unmarshal(*v, &origin)
2730				if err != nil {
2731					return err
2732				}
2733				ov.Origin = &origin
2734			}
2735		case "name":
2736			if v != nil {
2737				var name string
2738				err = json.Unmarshal(*v, &name)
2739				if err != nil {
2740					return err
2741				}
2742				ov.Name = &name
2743			}
2744		case "display":
2745			if v != nil {
2746				var operationValueDisplay OperationValueDisplay
2747				err = json.Unmarshal(*v, &operationValueDisplay)
2748				if err != nil {
2749					return err
2750				}
2751				ov.OperationValueDisplay = &operationValueDisplay
2752			}
2753		}
2754	}
2755
2756	return nil
2757}
2758
2759// OperationValueDisplay describes the properties of a Compute Operation Value Display.
2760type OperationValueDisplay struct {
2761	// Operation - READ-ONLY; The display name of the compute operation.
2762	Operation *string `json:"operation,omitempty"`
2763	// Resource - READ-ONLY; The display name of the resource the operation applies to.
2764	Resource *string `json:"resource,omitempty"`
2765	// Description - READ-ONLY; The description of the operation.
2766	Description *string `json:"description,omitempty"`
2767	// Provider - READ-ONLY; The resource provider for the operation.
2768	Provider *string `json:"provider,omitempty"`
2769}
2770
2771// MarshalJSON is the custom marshaler for OperationValueDisplay.
2772func (ovd OperationValueDisplay) MarshalJSON() ([]byte, error) {
2773	objectMap := make(map[string]interface{})
2774	return json.Marshal(objectMap)
2775}
2776
2777// OSOptionProfile the OS option profile.
2778type OSOptionProfile struct {
2779	autorest.Response `json:"-"`
2780	// ID - READ-ONLY; Id of the OS option profile.
2781	ID *string `json:"id,omitempty"`
2782	// Name - READ-ONLY; Name of the OS option profile.
2783	Name *string `json:"name,omitempty"`
2784	// Type - READ-ONLY; Type of the OS option profile.
2785	Type *string `json:"type,omitempty"`
2786	// OSOptionPropertyList - The list of an OS option properties.
2787	*OSOptionPropertyList `json:"properties,omitempty"`
2788}
2789
2790// MarshalJSON is the custom marshaler for OSOptionProfile.
2791func (oop OSOptionProfile) MarshalJSON() ([]byte, error) {
2792	objectMap := make(map[string]interface{})
2793	if oop.OSOptionPropertyList != nil {
2794		objectMap["properties"] = oop.OSOptionPropertyList
2795	}
2796	return json.Marshal(objectMap)
2797}
2798
2799// UnmarshalJSON is the custom unmarshaler for OSOptionProfile struct.
2800func (oop *OSOptionProfile) UnmarshalJSON(body []byte) error {
2801	var m map[string]*json.RawMessage
2802	err := json.Unmarshal(body, &m)
2803	if err != nil {
2804		return err
2805	}
2806	for k, v := range m {
2807		switch k {
2808		case "id":
2809			if v != nil {
2810				var ID string
2811				err = json.Unmarshal(*v, &ID)
2812				if err != nil {
2813					return err
2814				}
2815				oop.ID = &ID
2816			}
2817		case "name":
2818			if v != nil {
2819				var name string
2820				err = json.Unmarshal(*v, &name)
2821				if err != nil {
2822					return err
2823				}
2824				oop.Name = &name
2825			}
2826		case "type":
2827			if v != nil {
2828				var typeVar string
2829				err = json.Unmarshal(*v, &typeVar)
2830				if err != nil {
2831					return err
2832				}
2833				oop.Type = &typeVar
2834			}
2835		case "properties":
2836			if v != nil {
2837				var oSOptionPropertyList OSOptionPropertyList
2838				err = json.Unmarshal(*v, &oSOptionPropertyList)
2839				if err != nil {
2840					return err
2841				}
2842				oop.OSOptionPropertyList = &oSOptionPropertyList
2843			}
2844		}
2845	}
2846
2847	return nil
2848}
2849
2850// OSOptionProperty OS option property.
2851type OSOptionProperty struct {
2852	// OsType - OS type.
2853	OsType *string `json:"os-type,omitempty"`
2854	// EnableFipsImage - Whether FIPS image is enabled.
2855	EnableFipsImage *bool `json:"enable-fips-image,omitempty"`
2856}
2857
2858// OSOptionPropertyList the list of OS option properties.
2859type OSOptionPropertyList struct {
2860	// OsOptionPropertyList - The list of OS option properties.
2861	OsOptionPropertyList *[]OSOptionProperty `json:"osOptionPropertyList,omitempty"`
2862}
2863
2864// PowerState describes the Power State of the cluster
2865type PowerState struct {
2866	// Code - Tells whether the cluster is Running or Stopped. Possible values include: 'CodeRunning', 'CodeStopped'
2867	Code Code `json:"code,omitempty"`
2868}
2869
2870// PrivateEndpoint private endpoint which a connection belongs to.
2871type PrivateEndpoint struct {
2872	// ID - The resource Id for private endpoint
2873	ID *string `json:"id,omitempty"`
2874}
2875
2876// PrivateEndpointConnection a private endpoint connection
2877type PrivateEndpointConnection struct {
2878	autorest.Response `json:"-"`
2879	// ID - READ-ONLY; The ID of the private endpoint connection.
2880	ID *string `json:"id,omitempty"`
2881	// Name - READ-ONLY; The name of the private endpoint connection.
2882	Name *string `json:"name,omitempty"`
2883	// Type - READ-ONLY; The resource type.
2884	Type *string `json:"type,omitempty"`
2885	// PrivateEndpointConnectionProperties - The properties of a private endpoint connection.
2886	*PrivateEndpointConnectionProperties `json:"properties,omitempty"`
2887}
2888
2889// MarshalJSON is the custom marshaler for PrivateEndpointConnection.
2890func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
2891	objectMap := make(map[string]interface{})
2892	if pec.PrivateEndpointConnectionProperties != nil {
2893		objectMap["properties"] = pec.PrivateEndpointConnectionProperties
2894	}
2895	return json.Marshal(objectMap)
2896}
2897
2898// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
2899func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
2900	var m map[string]*json.RawMessage
2901	err := json.Unmarshal(body, &m)
2902	if err != nil {
2903		return err
2904	}
2905	for k, v := range m {
2906		switch k {
2907		case "id":
2908			if v != nil {
2909				var ID string
2910				err = json.Unmarshal(*v, &ID)
2911				if err != nil {
2912					return err
2913				}
2914				pec.ID = &ID
2915			}
2916		case "name":
2917			if v != nil {
2918				var name string
2919				err = json.Unmarshal(*v, &name)
2920				if err != nil {
2921					return err
2922				}
2923				pec.Name = &name
2924			}
2925		case "type":
2926			if v != nil {
2927				var typeVar string
2928				err = json.Unmarshal(*v, &typeVar)
2929				if err != nil {
2930					return err
2931				}
2932				pec.Type = &typeVar
2933			}
2934		case "properties":
2935			if v != nil {
2936				var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
2937				err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
2938				if err != nil {
2939					return err
2940				}
2941				pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
2942			}
2943		}
2944	}
2945
2946	return nil
2947}
2948
2949// PrivateEndpointConnectionListResult a list of private endpoint connections
2950type PrivateEndpointConnectionListResult struct {
2951	autorest.Response `json:"-"`
2952	// Value - The collection value.
2953	Value *[]PrivateEndpointConnection `json:"value,omitempty"`
2954}
2955
2956// PrivateEndpointConnectionProperties properties of a private endpoint connection.
2957type PrivateEndpointConnectionProperties struct {
2958	// ProvisioningState - READ-ONLY; The current provisioning state. Possible values include: 'PrivateEndpointConnectionProvisioningStateSucceeded', 'PrivateEndpointConnectionProvisioningStateCreating', 'PrivateEndpointConnectionProvisioningStateDeleting', 'PrivateEndpointConnectionProvisioningStateFailed'
2959	ProvisioningState PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"`
2960	// PrivateEndpoint - The resource of private endpoint.
2961	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
2962	// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.
2963	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
2964}
2965
2966// MarshalJSON is the custom marshaler for PrivateEndpointConnectionProperties.
2967func (pecp PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) {
2968	objectMap := make(map[string]interface{})
2969	if pecp.PrivateEndpoint != nil {
2970		objectMap["privateEndpoint"] = pecp.PrivateEndpoint
2971	}
2972	if pecp.PrivateLinkServiceConnectionState != nil {
2973		objectMap["privateLinkServiceConnectionState"] = pecp.PrivateLinkServiceConnectionState
2974	}
2975	return json.Marshal(objectMap)
2976}
2977
2978// PrivateEndpointConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
2979// long-running operation.
2980type PrivateEndpointConnectionsDeleteFuture struct {
2981	azure.FutureAPI
2982	// Result returns the result of the asynchronous operation.
2983	// If the operation has not completed it will return an error.
2984	Result func(PrivateEndpointConnectionsClient) (autorest.Response, error)
2985}
2986
2987// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2988func (future *PrivateEndpointConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
2989	var azFuture azure.Future
2990	if err := json.Unmarshal(body, &azFuture); err != nil {
2991		return err
2992	}
2993	future.FutureAPI = &azFuture
2994	future.Result = future.result
2995	return nil
2996}
2997
2998// result is the default implementation for PrivateEndpointConnectionsDeleteFuture.Result.
2999func (future *PrivateEndpointConnectionsDeleteFuture) result(client PrivateEndpointConnectionsClient) (ar autorest.Response, err error) {
3000	var done bool
3001	done, err = future.DoneWithContext(context.Background(), client)
3002	if err != nil {
3003		err = autorest.NewErrorWithError(err, "containerservice.PrivateEndpointConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
3004		return
3005	}
3006	if !done {
3007		ar.Response = future.Response()
3008		err = azure.NewAsyncOpIncompleteError("containerservice.PrivateEndpointConnectionsDeleteFuture")
3009		return
3010	}
3011	ar.Response = future.Response()
3012	return
3013}
3014
3015// PrivateLinkResource a private link resource
3016type PrivateLinkResource struct {
3017	autorest.Response `json:"-"`
3018	// ID - The ID of the private link resource.
3019	ID *string `json:"id,omitempty"`
3020	// Name - The name of the private link resource.
3021	Name *string `json:"name,omitempty"`
3022	// Type - The resource type.
3023	Type *string `json:"type,omitempty"`
3024	// GroupID - The group ID of the resource.
3025	GroupID *string `json:"groupId,omitempty"`
3026	// RequiredMembers - RequiredMembers of the resource
3027	RequiredMembers *[]string `json:"requiredMembers,omitempty"`
3028	// PrivateLinkServiceID - READ-ONLY; The private link service ID of the resource, this field is exposed only to NRP internally.
3029	PrivateLinkServiceID *string `json:"privateLinkServiceID,omitempty"`
3030}
3031
3032// MarshalJSON is the custom marshaler for PrivateLinkResource.
3033func (plr PrivateLinkResource) MarshalJSON() ([]byte, error) {
3034	objectMap := make(map[string]interface{})
3035	if plr.ID != nil {
3036		objectMap["id"] = plr.ID
3037	}
3038	if plr.Name != nil {
3039		objectMap["name"] = plr.Name
3040	}
3041	if plr.Type != nil {
3042		objectMap["type"] = plr.Type
3043	}
3044	if plr.GroupID != nil {
3045		objectMap["groupId"] = plr.GroupID
3046	}
3047	if plr.RequiredMembers != nil {
3048		objectMap["requiredMembers"] = plr.RequiredMembers
3049	}
3050	return json.Marshal(objectMap)
3051}
3052
3053// PrivateLinkResourcesListResult a list of private link resources
3054type PrivateLinkResourcesListResult struct {
3055	autorest.Response `json:"-"`
3056	// Value - The collection value.
3057	Value *[]PrivateLinkResource `json:"value,omitempty"`
3058}
3059
3060// PrivateLinkServiceConnectionState the state of a private link service connection.
3061type PrivateLinkServiceConnectionState struct {
3062	// Status - The private link service connection status. Possible values include: 'ConnectionStatusPending', 'ConnectionStatusApproved', 'ConnectionStatusRejected', 'ConnectionStatusDisconnected'
3063	Status ConnectionStatus `json:"status,omitempty"`
3064	// Description - The private link service connection description.
3065	Description *string `json:"description,omitempty"`
3066}
3067
3068// Resource the Resource model definition.
3069type Resource struct {
3070	// ID - READ-ONLY; Resource Id
3071	ID *string `json:"id,omitempty"`
3072	// Name - READ-ONLY; Resource name
3073	Name *string `json:"name,omitempty"`
3074	// Type - READ-ONLY; Resource type
3075	Type *string `json:"type,omitempty"`
3076	// Location - Resource location
3077	Location *string `json:"location,omitempty"`
3078	// Tags - Resource tags
3079	Tags map[string]*string `json:"tags"`
3080}
3081
3082// MarshalJSON is the custom marshaler for Resource.
3083func (r Resource) MarshalJSON() ([]byte, error) {
3084	objectMap := make(map[string]interface{})
3085	if r.Location != nil {
3086		objectMap["location"] = r.Location
3087	}
3088	if r.Tags != nil {
3089		objectMap["tags"] = r.Tags
3090	}
3091	return json.Marshal(objectMap)
3092}
3093
3094// ResourceReference a reference to an Azure resource.
3095type ResourceReference struct {
3096	// ID - The fully qualified Azure resource id.
3097	ID *string `json:"id,omitempty"`
3098}
3099
3100// RunCommandRequest run command request
3101type RunCommandRequest struct {
3102	// Command - command to run.
3103	Command *string `json:"command,omitempty"`
3104	// Context - base64 encoded zip file, contains files required by the command
3105	Context *string `json:"context,omitempty"`
3106	// ClusterToken - AuthToken issued for AKS AAD Server App.
3107	ClusterToken *string `json:"clusterToken,omitempty"`
3108}
3109
3110// RunCommandResult run command result.
3111type RunCommandResult struct {
3112	autorest.Response `json:"-"`
3113	// ID - READ-ONLY; command id.
3114	ID *string `json:"id,omitempty"`
3115	// CommandResultProperties - Properties of command result.
3116	*CommandResultProperties `json:"properties,omitempty"`
3117}
3118
3119// MarshalJSON is the custom marshaler for RunCommandResult.
3120func (rcr RunCommandResult) MarshalJSON() ([]byte, error) {
3121	objectMap := make(map[string]interface{})
3122	if rcr.CommandResultProperties != nil {
3123		objectMap["properties"] = rcr.CommandResultProperties
3124	}
3125	return json.Marshal(objectMap)
3126}
3127
3128// UnmarshalJSON is the custom unmarshaler for RunCommandResult struct.
3129func (rcr *RunCommandResult) UnmarshalJSON(body []byte) error {
3130	var m map[string]*json.RawMessage
3131	err := json.Unmarshal(body, &m)
3132	if err != nil {
3133		return err
3134	}
3135	for k, v := range m {
3136		switch k {
3137		case "id":
3138			if v != nil {
3139				var ID string
3140				err = json.Unmarshal(*v, &ID)
3141				if err != nil {
3142					return err
3143				}
3144				rcr.ID = &ID
3145			}
3146		case "properties":
3147			if v != nil {
3148				var commandResultProperties CommandResultProperties
3149				err = json.Unmarshal(*v, &commandResultProperties)
3150				if err != nil {
3151					return err
3152				}
3153				rcr.CommandResultProperties = &commandResultProperties
3154			}
3155		}
3156	}
3157
3158	return nil
3159}
3160
3161// SSHConfiguration SSH configuration for Linux-based VMs running on Azure.
3162type SSHConfiguration struct {
3163	// PublicKeys - The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified.
3164	PublicKeys *[]SSHPublicKey `json:"publicKeys,omitempty"`
3165}
3166
3167// SSHPublicKey contains information about SSH certificate public key data.
3168type SSHPublicKey struct {
3169	// KeyData - Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers.
3170	KeyData *string `json:"keyData,omitempty"`
3171}
3172
3173// SubResource reference to another subresource.
3174type SubResource struct {
3175	// ID - READ-ONLY; Resource ID.
3176	ID *string `json:"id,omitempty"`
3177	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
3178	Name *string `json:"name,omitempty"`
3179	// Type - READ-ONLY; Resource type
3180	Type *string `json:"type,omitempty"`
3181}
3182
3183// MarshalJSON is the custom marshaler for SubResource.
3184func (sr SubResource) MarshalJSON() ([]byte, error) {
3185	objectMap := make(map[string]interface{})
3186	return json.Marshal(objectMap)
3187}
3188
3189// SysctlConfig sysctl settings for Linux agent nodes.
3190type SysctlConfig struct {
3191	// NetCoreSomaxconn - Sysctl setting net.core.somaxconn.
3192	NetCoreSomaxconn *int32 `json:"netCoreSomaxconn,omitempty"`
3193	// NetCoreNetdevMaxBacklog - Sysctl setting net.core.netdev_max_backlog.
3194	NetCoreNetdevMaxBacklog *int32 `json:"netCoreNetdevMaxBacklog,omitempty"`
3195	// NetCoreRmemDefault - Sysctl setting net.core.rmem_default.
3196	NetCoreRmemDefault *int32 `json:"netCoreRmemDefault,omitempty"`
3197	// NetCoreRmemMax - Sysctl setting net.core.rmem_max.
3198	NetCoreRmemMax *int32 `json:"netCoreRmemMax,omitempty"`
3199	// NetCoreWmemDefault - Sysctl setting net.core.wmem_default.
3200	NetCoreWmemDefault *int32 `json:"netCoreWmemDefault,omitempty"`
3201	// NetCoreWmemMax - Sysctl setting net.core.wmem_max.
3202	NetCoreWmemMax *int32 `json:"netCoreWmemMax,omitempty"`
3203	// NetCoreOptmemMax - Sysctl setting net.core.optmem_max.
3204	NetCoreOptmemMax *int32 `json:"netCoreOptmemMax,omitempty"`
3205	// NetIpv4TCPMaxSynBacklog - Sysctl setting net.ipv4.tcp_max_syn_backlog.
3206	NetIpv4TCPMaxSynBacklog *int32 `json:"netIpv4TcpMaxSynBacklog,omitempty"`
3207	// NetIpv4TCPMaxTwBuckets - Sysctl setting net.ipv4.tcp_max_tw_buckets.
3208	NetIpv4TCPMaxTwBuckets *int32 `json:"netIpv4TcpMaxTwBuckets,omitempty"`
3209	// NetIpv4TCPFinTimeout - Sysctl setting net.ipv4.tcp_fin_timeout.
3210	NetIpv4TCPFinTimeout *int32 `json:"netIpv4TcpFinTimeout,omitempty"`
3211	// NetIpv4TCPKeepaliveTime - Sysctl setting net.ipv4.tcp_keepalive_time.
3212	NetIpv4TCPKeepaliveTime *int32 `json:"netIpv4TcpKeepaliveTime,omitempty"`
3213	// NetIpv4TCPKeepaliveProbes - Sysctl setting net.ipv4.tcp_keepalive_probes.
3214	NetIpv4TCPKeepaliveProbes *int32 `json:"netIpv4TcpKeepaliveProbes,omitempty"`
3215	// NetIpv4TcpkeepaliveIntvl - Sysctl setting net.ipv4.tcp_keepalive_intvl.
3216	NetIpv4TcpkeepaliveIntvl *int32 `json:"netIpv4TcpkeepaliveIntvl,omitempty"`
3217	// NetIpv4TCPTwReuse - Sysctl setting net.ipv4.tcp_tw_reuse.
3218	NetIpv4TCPTwReuse *bool `json:"netIpv4TcpTwReuse,omitempty"`
3219	// NetIpv4IPLocalPortRange - Sysctl setting net.ipv4.ip_local_port_range.
3220	NetIpv4IPLocalPortRange *string `json:"netIpv4IpLocalPortRange,omitempty"`
3221	// NetIpv4NeighDefaultGcThresh1 - Sysctl setting net.ipv4.neigh.default.gc_thresh1.
3222	NetIpv4NeighDefaultGcThresh1 *int32 `json:"netIpv4NeighDefaultGcThresh1,omitempty"`
3223	// NetIpv4NeighDefaultGcThresh2 - Sysctl setting net.ipv4.neigh.default.gc_thresh2.
3224	NetIpv4NeighDefaultGcThresh2 *int32 `json:"netIpv4NeighDefaultGcThresh2,omitempty"`
3225	// NetIpv4NeighDefaultGcThresh3 - Sysctl setting net.ipv4.neigh.default.gc_thresh3.
3226	NetIpv4NeighDefaultGcThresh3 *int32 `json:"netIpv4NeighDefaultGcThresh3,omitempty"`
3227	// NetNetfilterNfConntrackMax - Sysctl setting net.netfilter.nf_conntrack_max.
3228	NetNetfilterNfConntrackMax *int32 `json:"netNetfilterNfConntrackMax,omitempty"`
3229	// NetNetfilterNfConntrackBuckets - Sysctl setting net.netfilter.nf_conntrack_buckets.
3230	NetNetfilterNfConntrackBuckets *int32 `json:"netNetfilterNfConntrackBuckets,omitempty"`
3231	// FsInotifyMaxUserWatches - Sysctl setting fs.inotify.max_user_watches.
3232	FsInotifyMaxUserWatches *int32 `json:"fsInotifyMaxUserWatches,omitempty"`
3233	// FsFileMax - Sysctl setting fs.file-max.
3234	FsFileMax *int32 `json:"fsFileMax,omitempty"`
3235	// FsAioMaxNr - Sysctl setting fs.aio-max-nr.
3236	FsAioMaxNr *int32 `json:"fsAioMaxNr,omitempty"`
3237	// FsNrOpen - Sysctl setting fs.nr_open.
3238	FsNrOpen *int32 `json:"fsNrOpen,omitempty"`
3239	// KernelThreadsMax - Sysctl setting kernel.threads-max.
3240	KernelThreadsMax *int32 `json:"kernelThreadsMax,omitempty"`
3241	// VMMaxMapCount - Sysctl setting vm.max_map_count.
3242	VMMaxMapCount *int32 `json:"vmMaxMapCount,omitempty"`
3243	// VMSwappiness - Sysctl setting vm.swappiness.
3244	VMSwappiness *int32 `json:"vmSwappiness,omitempty"`
3245	// VMVfsCachePressure - Sysctl setting vm.vfs_cache_pressure.
3246	VMVfsCachePressure *int32 `json:"vmVfsCachePressure,omitempty"`
3247}
3248
3249// SystemData metadata pertaining to creation and last modification of the resource.
3250type SystemData struct {
3251	// CreatedBy - The identity that created the resource.
3252	CreatedBy *string `json:"createdBy,omitempty"`
3253	// CreatedByType - The type of identity that created the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey'
3254	CreatedByType CreatedByType `json:"createdByType,omitempty"`
3255	// CreatedAt - The timestamp of resource creation (UTC).
3256	CreatedAt *date.Time `json:"createdAt,omitempty"`
3257	// LastModifiedBy - The identity that last modified the resource.
3258	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
3259	// LastModifiedByType - The type of identity that last modified the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey'
3260	LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"`
3261	// LastModifiedAt - The type of identity that last modified the resource.
3262	LastModifiedAt *date.Time `json:"lastModifiedAt,omitempty"`
3263}
3264
3265// TagsObject tags object for patch operations.
3266type TagsObject struct {
3267	// Tags - Resource tags.
3268	Tags map[string]*string `json:"tags"`
3269}
3270
3271// MarshalJSON is the custom marshaler for TagsObject.
3272func (toVar TagsObject) MarshalJSON() ([]byte, error) {
3273	objectMap := make(map[string]interface{})
3274	if toVar.Tags != nil {
3275		objectMap["tags"] = toVar.Tags
3276	}
3277	return json.Marshal(objectMap)
3278}
3279
3280// TimeInWeek time in a week.
3281type TimeInWeek struct {
3282	// Day - A day in a week. Possible values include: 'WeekDaySunday', 'WeekDayMonday', 'WeekDayTuesday', 'WeekDayWednesday', 'WeekDayThursday', 'WeekDayFriday', 'WeekDaySaturday'
3283	Day WeekDay `json:"day,omitempty"`
3284	// HourSlots - hour slots in a day.
3285	HourSlots *[]int32 `json:"hourSlots,omitempty"`
3286}
3287
3288// TimeSpan the time span with start and end properties.
3289type TimeSpan struct {
3290	// Start - The start of a time span
3291	Start *date.Time `json:"start,omitempty"`
3292	// End - The end of a time span
3293	End *date.Time `json:"end,omitempty"`
3294}
3295
3296// UserAssignedIdentity ...
3297type UserAssignedIdentity struct {
3298	// ResourceID - The resource id of the user assigned identity.
3299	ResourceID *string `json:"resourceId,omitempty"`
3300	// ClientID - The client id of the user assigned identity.
3301	ClientID *string `json:"clientId,omitempty"`
3302	// ObjectID - The object id of the user assigned identity.
3303	ObjectID *string `json:"objectId,omitempty"`
3304}
3305
3306// VMDiagnostics profile for diagnostics on the container service VMs.
3307type VMDiagnostics struct {
3308	// Enabled - Whether the VM diagnostic agent is provisioned on the VM.
3309	Enabled *bool `json:"enabled,omitempty"`
3310	// StorageURI - READ-ONLY; The URI of the storage account where diagnostics are stored.
3311	StorageURI *string `json:"storageUri,omitempty"`
3312}
3313
3314// MarshalJSON is the custom marshaler for VMDiagnostics.
3315func (vd VMDiagnostics) MarshalJSON() ([]byte, error) {
3316	objectMap := make(map[string]interface{})
3317	if vd.Enabled != nil {
3318		objectMap["enabled"] = vd.Enabled
3319	}
3320	return json.Marshal(objectMap)
3321}
3322