1package containerservice
2
3// Copyright (c) Microsoft and contributors.  All rights reserved.
4//
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13//
14// See the License for the specific language governing permissions and
15// limitations under the License.
16//
17// Code generated by Microsoft (R) AutoRest Code Generator.
18// Changes may cause incorrect behavior and will be lost if the code is regenerated.
19
20import (
21	"context"
22	"encoding/json"
23	"github.com/Azure/go-autorest/autorest"
24	"github.com/Azure/go-autorest/autorest/azure"
25	"github.com/Azure/go-autorest/autorest/to"
26	"github.com/Azure/go-autorest/tracing"
27	"net/http"
28)
29
30// The package's fully qualified name.
31const fqdn = "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2019-04-30/containerservice"
32
33// AccessProfile profile for enabling a user to access a managed cluster.
34type AccessProfile struct {
35	// KubeConfig - Base64-encoded Kubernetes configuration file.
36	KubeConfig *[]byte `json:"kubeConfig,omitempty"`
37}
38
39// AgentPool agent Pool.
40type AgentPool struct {
41	autorest.Response `json:"-"`
42	// ManagedClusterAgentPoolProfileProperties - Properties of an agent pool.
43	*ManagedClusterAgentPoolProfileProperties `json:"properties,omitempty"`
44	// ID - READ-ONLY; Resource ID.
45	ID *string `json:"id,omitempty"`
46	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
47	Name *string `json:"name,omitempty"`
48	// Type - READ-ONLY; Resource type
49	Type *string `json:"type,omitempty"`
50}
51
52// MarshalJSON is the custom marshaler for AgentPool.
53func (ap AgentPool) MarshalJSON() ([]byte, error) {
54	objectMap := make(map[string]interface{})
55	if ap.ManagedClusterAgentPoolProfileProperties != nil {
56		objectMap["properties"] = ap.ManagedClusterAgentPoolProfileProperties
57	}
58	return json.Marshal(objectMap)
59}
60
61// UnmarshalJSON is the custom unmarshaler for AgentPool struct.
62func (ap *AgentPool) UnmarshalJSON(body []byte) error {
63	var m map[string]*json.RawMessage
64	err := json.Unmarshal(body, &m)
65	if err != nil {
66		return err
67	}
68	for k, v := range m {
69		switch k {
70		case "properties":
71			if v != nil {
72				var managedClusterAgentPoolProfileProperties ManagedClusterAgentPoolProfileProperties
73				err = json.Unmarshal(*v, &managedClusterAgentPoolProfileProperties)
74				if err != nil {
75					return err
76				}
77				ap.ManagedClusterAgentPoolProfileProperties = &managedClusterAgentPoolProfileProperties
78			}
79		case "id":
80			if v != nil {
81				var ID string
82				err = json.Unmarshal(*v, &ID)
83				if err != nil {
84					return err
85				}
86				ap.ID = &ID
87			}
88		case "name":
89			if v != nil {
90				var name string
91				err = json.Unmarshal(*v, &name)
92				if err != nil {
93					return err
94				}
95				ap.Name = &name
96			}
97		case "type":
98			if v != nil {
99				var typeVar string
100				err = json.Unmarshal(*v, &typeVar)
101				if err != nil {
102					return err
103				}
104				ap.Type = &typeVar
105			}
106		}
107	}
108
109	return nil
110}
111
112// AgentPoolListResult the response from the List Agent Pools operation.
113type AgentPoolListResult struct {
114	autorest.Response `json:"-"`
115	// Value - The list of agent pools.
116	Value *[]AgentPool `json:"value,omitempty"`
117	// NextLink - READ-ONLY; The URL to get the next set of agent pool results.
118	NextLink *string `json:"nextLink,omitempty"`
119}
120
121// MarshalJSON is the custom marshaler for AgentPoolListResult.
122func (aplr AgentPoolListResult) MarshalJSON() ([]byte, error) {
123	objectMap := make(map[string]interface{})
124	if aplr.Value != nil {
125		objectMap["value"] = aplr.Value
126	}
127	return json.Marshal(objectMap)
128}
129
130// AgentPoolListResultIterator provides access to a complete listing of AgentPool values.
131type AgentPoolListResultIterator struct {
132	i    int
133	page AgentPoolListResultPage
134}
135
136// NextWithContext advances to the next value.  If there was an error making
137// the request the iterator does not advance and the error is returned.
138func (iter *AgentPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
139	if tracing.IsEnabled() {
140		ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolListResultIterator.NextWithContext")
141		defer func() {
142			sc := -1
143			if iter.Response().Response.Response != nil {
144				sc = iter.Response().Response.Response.StatusCode
145			}
146			tracing.EndSpan(ctx, sc, err)
147		}()
148	}
149	iter.i++
150	if iter.i < len(iter.page.Values()) {
151		return nil
152	}
153	err = iter.page.NextWithContext(ctx)
154	if err != nil {
155		iter.i--
156		return err
157	}
158	iter.i = 0
159	return nil
160}
161
162// Next advances to the next value.  If there was an error making
163// the request the iterator does not advance and the error is returned.
164// Deprecated: Use NextWithContext() instead.
165func (iter *AgentPoolListResultIterator) Next() error {
166	return iter.NextWithContext(context.Background())
167}
168
169// NotDone returns true if the enumeration should be started or is not yet complete.
170func (iter AgentPoolListResultIterator) NotDone() bool {
171	return iter.page.NotDone() && iter.i < len(iter.page.Values())
172}
173
174// Response returns the raw server response from the last page request.
175func (iter AgentPoolListResultIterator) Response() AgentPoolListResult {
176	return iter.page.Response()
177}
178
179// Value returns the current value or a zero-initialized value if the
180// iterator has advanced beyond the end of the collection.
181func (iter AgentPoolListResultIterator) Value() AgentPool {
182	if !iter.page.NotDone() {
183		return AgentPool{}
184	}
185	return iter.page.Values()[iter.i]
186}
187
188// Creates a new instance of the AgentPoolListResultIterator type.
189func NewAgentPoolListResultIterator(page AgentPoolListResultPage) AgentPoolListResultIterator {
190	return AgentPoolListResultIterator{page: page}
191}
192
193// IsEmpty returns true if the ListResult contains no values.
194func (aplr AgentPoolListResult) IsEmpty() bool {
195	return aplr.Value == nil || len(*aplr.Value) == 0
196}
197
198// hasNextLink returns true if the NextLink is not empty.
199func (aplr AgentPoolListResult) hasNextLink() bool {
200	return aplr.NextLink != nil && len(*aplr.NextLink) != 0
201}
202
203// agentPoolListResultPreparer prepares a request to retrieve the next set of results.
204// It returns nil if no more results exist.
205func (aplr AgentPoolListResult) agentPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
206	if !aplr.hasNextLink() {
207		return nil, nil
208	}
209	return autorest.Prepare((&http.Request{}).WithContext(ctx),
210		autorest.AsJSON(),
211		autorest.AsGet(),
212		autorest.WithBaseURL(to.String(aplr.NextLink)))
213}
214
215// AgentPoolListResultPage contains a page of AgentPool values.
216type AgentPoolListResultPage struct {
217	fn   func(context.Context, AgentPoolListResult) (AgentPoolListResult, error)
218	aplr AgentPoolListResult
219}
220
221// NextWithContext advances to the next page of values.  If there was an error making
222// the request the page does not advance and the error is returned.
223func (page *AgentPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
224	if tracing.IsEnabled() {
225		ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolListResultPage.NextWithContext")
226		defer func() {
227			sc := -1
228			if page.Response().Response.Response != nil {
229				sc = page.Response().Response.Response.StatusCode
230			}
231			tracing.EndSpan(ctx, sc, err)
232		}()
233	}
234	for {
235		next, err := page.fn(ctx, page.aplr)
236		if err != nil {
237			return err
238		}
239		page.aplr = next
240		if !next.hasNextLink() || !next.IsEmpty() {
241			break
242		}
243	}
244	return nil
245}
246
247// Next advances to the next page of values.  If there was an error making
248// the request the page does not advance and the error is returned.
249// Deprecated: Use NextWithContext() instead.
250func (page *AgentPoolListResultPage) Next() error {
251	return page.NextWithContext(context.Background())
252}
253
254// NotDone returns true if the page enumeration should be started or is not yet complete.
255func (page AgentPoolListResultPage) NotDone() bool {
256	return !page.aplr.IsEmpty()
257}
258
259// Response returns the raw server response from the last page request.
260func (page AgentPoolListResultPage) Response() AgentPoolListResult {
261	return page.aplr
262}
263
264// Values returns the slice of values for the current page or nil if there are no values.
265func (page AgentPoolListResultPage) Values() []AgentPool {
266	if page.aplr.IsEmpty() {
267		return nil
268	}
269	return *page.aplr.Value
270}
271
272// Creates a new instance of the AgentPoolListResultPage type.
273func NewAgentPoolListResultPage(cur AgentPoolListResult, getNextPage func(context.Context, AgentPoolListResult) (AgentPoolListResult, error)) AgentPoolListResultPage {
274	return AgentPoolListResultPage{
275		fn:   getNextPage,
276		aplr: cur,
277	}
278}
279
280// AgentPoolProfile profile for the container service agent pool.
281type AgentPoolProfile struct {
282	// Name - Unique name of the agent pool profile in the context of the subscription and resource group.
283	Name *string `json:"name,omitempty"`
284	// Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1.
285	Count *int32 `json:"count,omitempty"`
286	// 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'
287	VMSize VMSizeTypes `json:"vmSize,omitempty"`
288	// 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.
289	OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"`
290	// DNSPrefix - DNS prefix to be used to create the FQDN for the agent pool.
291	DNSPrefix *string `json:"dnsPrefix,omitempty"`
292	// Fqdn - READ-ONLY; FQDN for the agent pool.
293	Fqdn *string `json:"fqdn,omitempty"`
294	// Ports - Ports number array used to expose on this agent pool. The default opened ports are different based on your choice of orchestrator.
295	Ports *[]int32 `json:"ports,omitempty"`
296	// 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: 'StorageAccount', 'ManagedDisks'
297	StorageProfile StorageProfileTypes `json:"storageProfile,omitempty"`
298	// VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier.
299	VnetSubnetID *string `json:"vnetSubnetID,omitempty"`
300	// OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'
301	OsType OSType `json:"osType,omitempty"`
302}
303
304// MarshalJSON is the custom marshaler for AgentPoolProfile.
305func (app AgentPoolProfile) MarshalJSON() ([]byte, error) {
306	objectMap := make(map[string]interface{})
307	if app.Name != nil {
308		objectMap["name"] = app.Name
309	}
310	if app.Count != nil {
311		objectMap["count"] = app.Count
312	}
313	if app.VMSize != "" {
314		objectMap["vmSize"] = app.VMSize
315	}
316	if app.OsDiskSizeGB != nil {
317		objectMap["osDiskSizeGB"] = app.OsDiskSizeGB
318	}
319	if app.DNSPrefix != nil {
320		objectMap["dnsPrefix"] = app.DNSPrefix
321	}
322	if app.Ports != nil {
323		objectMap["ports"] = app.Ports
324	}
325	if app.StorageProfile != "" {
326		objectMap["storageProfile"] = app.StorageProfile
327	}
328	if app.VnetSubnetID != nil {
329		objectMap["vnetSubnetID"] = app.VnetSubnetID
330	}
331	if app.OsType != "" {
332		objectMap["osType"] = app.OsType
333	}
334	return json.Marshal(objectMap)
335}
336
337// AgentPoolsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
338// long-running operation.
339type AgentPoolsCreateOrUpdateFuture struct {
340	azure.FutureAPI
341	// Result returns the result of the asynchronous operation.
342	// If the operation has not completed it will return an error.
343	Result func(AgentPoolsClient) (AgentPool, error)
344}
345
346// AgentPoolsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
347// operation.
348type AgentPoolsDeleteFuture struct {
349	azure.FutureAPI
350	// Result returns the result of the asynchronous operation.
351	// If the operation has not completed it will return an error.
352	Result func(AgentPoolsClient) (autorest.Response, error)
353}
354
355// CloudError an error response from the Container service.
356type CloudError struct {
357	// Error - Details about the error.
358	Error *CloudErrorBody `json:"error,omitempty"`
359}
360
361// CloudErrorBody an error response from the Container service.
362type CloudErrorBody struct {
363	// Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
364	Code *string `json:"code,omitempty"`
365	// Message - A message describing the error, intended to be suitable for display in a user interface.
366	Message *string `json:"message,omitempty"`
367	// Target - The target of the particular error. For example, the name of the property in error.
368	Target *string `json:"target,omitempty"`
369	// Details - A list of additional details about the error.
370	Details *[]CloudErrorBody `json:"details,omitempty"`
371}
372
373// ContainerService container service.
374type ContainerService struct {
375	autorest.Response `json:"-"`
376	// Properties - Properties of the container service.
377	*Properties `json:"properties,omitempty"`
378	// ID - READ-ONLY; Resource Id
379	ID *string `json:"id,omitempty"`
380	// Name - READ-ONLY; Resource name
381	Name *string `json:"name,omitempty"`
382	// Type - READ-ONLY; Resource type
383	Type *string `json:"type,omitempty"`
384	// Location - Resource location
385	Location *string `json:"location,omitempty"`
386	// Tags - Resource tags
387	Tags map[string]*string `json:"tags"`
388}
389
390// MarshalJSON is the custom marshaler for ContainerService.
391func (cs ContainerService) MarshalJSON() ([]byte, error) {
392	objectMap := make(map[string]interface{})
393	if cs.Properties != nil {
394		objectMap["properties"] = cs.Properties
395	}
396	if cs.Location != nil {
397		objectMap["location"] = cs.Location
398	}
399	if cs.Tags != nil {
400		objectMap["tags"] = cs.Tags
401	}
402	return json.Marshal(objectMap)
403}
404
405// UnmarshalJSON is the custom unmarshaler for ContainerService struct.
406func (cs *ContainerService) UnmarshalJSON(body []byte) error {
407	var m map[string]*json.RawMessage
408	err := json.Unmarshal(body, &m)
409	if err != nil {
410		return err
411	}
412	for k, v := range m {
413		switch k {
414		case "properties":
415			if v != nil {
416				var properties Properties
417				err = json.Unmarshal(*v, &properties)
418				if err != nil {
419					return err
420				}
421				cs.Properties = &properties
422			}
423		case "id":
424			if v != nil {
425				var ID string
426				err = json.Unmarshal(*v, &ID)
427				if err != nil {
428					return err
429				}
430				cs.ID = &ID
431			}
432		case "name":
433			if v != nil {
434				var name string
435				err = json.Unmarshal(*v, &name)
436				if err != nil {
437					return err
438				}
439				cs.Name = &name
440			}
441		case "type":
442			if v != nil {
443				var typeVar string
444				err = json.Unmarshal(*v, &typeVar)
445				if err != nil {
446					return err
447				}
448				cs.Type = &typeVar
449			}
450		case "location":
451			if v != nil {
452				var location string
453				err = json.Unmarshal(*v, &location)
454				if err != nil {
455					return err
456				}
457				cs.Location = &location
458			}
459		case "tags":
460			if v != nil {
461				var tags map[string]*string
462				err = json.Unmarshal(*v, &tags)
463				if err != nil {
464					return err
465				}
466				cs.Tags = tags
467			}
468		}
469	}
470
471	return nil
472}
473
474// ContainerServicesCreateOrUpdateFutureType an abstraction for monitoring and retrieving the results of a
475// long-running operation.
476type ContainerServicesCreateOrUpdateFutureType struct {
477	azure.FutureAPI
478	// Result returns the result of the asynchronous operation.
479	// If the operation has not completed it will return an error.
480	Result func(ContainerServicesClient) (ContainerService, error)
481}
482
483// ContainerServicesDeleteFutureType an abstraction for monitoring and retrieving the results of a
484// long-running operation.
485type ContainerServicesDeleteFutureType struct {
486	azure.FutureAPI
487	// Result returns the result of the asynchronous operation.
488	// If the operation has not completed it will return an error.
489	Result func(ContainerServicesClient) (autorest.Response, error)
490}
491
492// CredentialResult the credential result response.
493type CredentialResult struct {
494	// Name - READ-ONLY; The name of the credential.
495	Name *string `json:"name,omitempty"`
496	// Value - READ-ONLY; Base64-encoded Kubernetes configuration file.
497	Value *[]byte `json:"value,omitempty"`
498}
499
500// CredentialResults the list of credential result response.
501type CredentialResults struct {
502	autorest.Response `json:"-"`
503	// Kubeconfigs - READ-ONLY; Base64-encoded Kubernetes configuration file.
504	Kubeconfigs *[]CredentialResult `json:"kubeconfigs,omitempty"`
505}
506
507// CustomProfile properties to configure a custom container service cluster.
508type CustomProfile struct {
509	// Orchestrator - The name of the custom orchestrator to use.
510	Orchestrator *string `json:"orchestrator,omitempty"`
511}
512
513// DiagnosticsProfile profile for diagnostics on the container service cluster.
514type DiagnosticsProfile struct {
515	// VMDiagnostics - Profile for diagnostics on the container service VMs.
516	VMDiagnostics *VMDiagnostics `json:"vmDiagnostics,omitempty"`
517}
518
519// KeyVaultSecretRef reference to a secret stored in Azure Key Vault.
520type KeyVaultSecretRef struct {
521	// VaultID - Key vault identifier.
522	VaultID *string `json:"vaultID,omitempty"`
523	// SecretName - The secret name.
524	SecretName *string `json:"secretName,omitempty"`
525	// Version - The secret version.
526	Version *string `json:"version,omitempty"`
527}
528
529// LinuxProfile profile for Linux VMs in the container service cluster.
530type LinuxProfile struct {
531	// AdminUsername - The administrator username to use for Linux VMs.
532	AdminUsername *string `json:"adminUsername,omitempty"`
533	// SSH - SSH configuration for Linux-based VMs running on Azure.
534	SSH *SSHConfiguration `json:"ssh,omitempty"`
535}
536
537// ListResult the response from the List Container Services operation.
538type ListResult struct {
539	autorest.Response `json:"-"`
540	// Value - The list of container services.
541	Value *[]ContainerService `json:"value,omitempty"`
542	// NextLink - READ-ONLY; The URL to get the next set of container service results.
543	NextLink *string `json:"nextLink,omitempty"`
544}
545
546// MarshalJSON is the custom marshaler for ListResult.
547func (lr ListResult) MarshalJSON() ([]byte, error) {
548	objectMap := make(map[string]interface{})
549	if lr.Value != nil {
550		objectMap["value"] = lr.Value
551	}
552	return json.Marshal(objectMap)
553}
554
555// ListResultIterator provides access to a complete listing of ContainerService values.
556type ListResultIterator struct {
557	i    int
558	page ListResultPage
559}
560
561// NextWithContext advances to the next value.  If there was an error making
562// the request the iterator does not advance and the error is returned.
563func (iter *ListResultIterator) NextWithContext(ctx context.Context) (err error) {
564	if tracing.IsEnabled() {
565		ctx = tracing.StartSpan(ctx, fqdn+"/ListResultIterator.NextWithContext")
566		defer func() {
567			sc := -1
568			if iter.Response().Response.Response != nil {
569				sc = iter.Response().Response.Response.StatusCode
570			}
571			tracing.EndSpan(ctx, sc, err)
572		}()
573	}
574	iter.i++
575	if iter.i < len(iter.page.Values()) {
576		return nil
577	}
578	err = iter.page.NextWithContext(ctx)
579	if err != nil {
580		iter.i--
581		return err
582	}
583	iter.i = 0
584	return nil
585}
586
587// Next advances to the next value.  If there was an error making
588// the request the iterator does not advance and the error is returned.
589// Deprecated: Use NextWithContext() instead.
590func (iter *ListResultIterator) Next() error {
591	return iter.NextWithContext(context.Background())
592}
593
594// NotDone returns true if the enumeration should be started or is not yet complete.
595func (iter ListResultIterator) NotDone() bool {
596	return iter.page.NotDone() && iter.i < len(iter.page.Values())
597}
598
599// Response returns the raw server response from the last page request.
600func (iter ListResultIterator) Response() ListResult {
601	return iter.page.Response()
602}
603
604// Value returns the current value or a zero-initialized value if the
605// iterator has advanced beyond the end of the collection.
606func (iter ListResultIterator) Value() ContainerService {
607	if !iter.page.NotDone() {
608		return ContainerService{}
609	}
610	return iter.page.Values()[iter.i]
611}
612
613// Creates a new instance of the ListResultIterator type.
614func NewListResultIterator(page ListResultPage) ListResultIterator {
615	return ListResultIterator{page: page}
616}
617
618// IsEmpty returns true if the ListResult contains no values.
619func (lr ListResult) IsEmpty() bool {
620	return lr.Value == nil || len(*lr.Value) == 0
621}
622
623// hasNextLink returns true if the NextLink is not empty.
624func (lr ListResult) hasNextLink() bool {
625	return lr.NextLink != nil && len(*lr.NextLink) != 0
626}
627
628// listResultPreparer prepares a request to retrieve the next set of results.
629// It returns nil if no more results exist.
630func (lr ListResult) listResultPreparer(ctx context.Context) (*http.Request, error) {
631	if !lr.hasNextLink() {
632		return nil, nil
633	}
634	return autorest.Prepare((&http.Request{}).WithContext(ctx),
635		autorest.AsJSON(),
636		autorest.AsGet(),
637		autorest.WithBaseURL(to.String(lr.NextLink)))
638}
639
640// ListResultPage contains a page of ContainerService values.
641type ListResultPage struct {
642	fn func(context.Context, ListResult) (ListResult, error)
643	lr ListResult
644}
645
646// NextWithContext advances to the next page of values.  If there was an error making
647// the request the page does not advance and the error is returned.
648func (page *ListResultPage) NextWithContext(ctx context.Context) (err error) {
649	if tracing.IsEnabled() {
650		ctx = tracing.StartSpan(ctx, fqdn+"/ListResultPage.NextWithContext")
651		defer func() {
652			sc := -1
653			if page.Response().Response.Response != nil {
654				sc = page.Response().Response.Response.StatusCode
655			}
656			tracing.EndSpan(ctx, sc, err)
657		}()
658	}
659	for {
660		next, err := page.fn(ctx, page.lr)
661		if err != nil {
662			return err
663		}
664		page.lr = next
665		if !next.hasNextLink() || !next.IsEmpty() {
666			break
667		}
668	}
669	return nil
670}
671
672// Next advances to the next page of values.  If there was an error making
673// the request the page does not advance and the error is returned.
674// Deprecated: Use NextWithContext() instead.
675func (page *ListResultPage) Next() error {
676	return page.NextWithContext(context.Background())
677}
678
679// NotDone returns true if the page enumeration should be started or is not yet complete.
680func (page ListResultPage) NotDone() bool {
681	return !page.lr.IsEmpty()
682}
683
684// Response returns the raw server response from the last page request.
685func (page ListResultPage) Response() ListResult {
686	return page.lr
687}
688
689// Values returns the slice of values for the current page or nil if there are no values.
690func (page ListResultPage) Values() []ContainerService {
691	if page.lr.IsEmpty() {
692		return nil
693	}
694	return *page.lr.Value
695}
696
697// Creates a new instance of the ListResultPage type.
698func NewListResultPage(cur ListResult, getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage {
699	return ListResultPage{
700		fn: getNextPage,
701		lr: cur,
702	}
703}
704
705// ManagedCluster managed cluster.
706type ManagedCluster struct {
707	autorest.Response `json:"-"`
708	// ManagedClusterProperties - Properties of a managed cluster.
709	*ManagedClusterProperties `json:"properties,omitempty"`
710	// Identity - The identity of the managed cluster, if configured.
711	Identity *ManagedClusterIdentity `json:"identity,omitempty"`
712	// ID - READ-ONLY; Resource Id
713	ID *string `json:"id,omitempty"`
714	// Name - READ-ONLY; Resource name
715	Name *string `json:"name,omitempty"`
716	// Type - READ-ONLY; Resource type
717	Type *string `json:"type,omitempty"`
718	// Location - Resource location
719	Location *string `json:"location,omitempty"`
720	// Tags - Resource tags
721	Tags map[string]*string `json:"tags"`
722}
723
724// MarshalJSON is the custom marshaler for ManagedCluster.
725func (mc ManagedCluster) MarshalJSON() ([]byte, error) {
726	objectMap := make(map[string]interface{})
727	if mc.ManagedClusterProperties != nil {
728		objectMap["properties"] = mc.ManagedClusterProperties
729	}
730	if mc.Identity != nil {
731		objectMap["identity"] = mc.Identity
732	}
733	if mc.Location != nil {
734		objectMap["location"] = mc.Location
735	}
736	if mc.Tags != nil {
737		objectMap["tags"] = mc.Tags
738	}
739	return json.Marshal(objectMap)
740}
741
742// UnmarshalJSON is the custom unmarshaler for ManagedCluster struct.
743func (mc *ManagedCluster) UnmarshalJSON(body []byte) error {
744	var m map[string]*json.RawMessage
745	err := json.Unmarshal(body, &m)
746	if err != nil {
747		return err
748	}
749	for k, v := range m {
750		switch k {
751		case "properties":
752			if v != nil {
753				var managedClusterProperties ManagedClusterProperties
754				err = json.Unmarshal(*v, &managedClusterProperties)
755				if err != nil {
756					return err
757				}
758				mc.ManagedClusterProperties = &managedClusterProperties
759			}
760		case "identity":
761			if v != nil {
762				var identity ManagedClusterIdentity
763				err = json.Unmarshal(*v, &identity)
764				if err != nil {
765					return err
766				}
767				mc.Identity = &identity
768			}
769		case "id":
770			if v != nil {
771				var ID string
772				err = json.Unmarshal(*v, &ID)
773				if err != nil {
774					return err
775				}
776				mc.ID = &ID
777			}
778		case "name":
779			if v != nil {
780				var name string
781				err = json.Unmarshal(*v, &name)
782				if err != nil {
783					return err
784				}
785				mc.Name = &name
786			}
787		case "type":
788			if v != nil {
789				var typeVar string
790				err = json.Unmarshal(*v, &typeVar)
791				if err != nil {
792					return err
793				}
794				mc.Type = &typeVar
795			}
796		case "location":
797			if v != nil {
798				var location string
799				err = json.Unmarshal(*v, &location)
800				if err != nil {
801					return err
802				}
803				mc.Location = &location
804			}
805		case "tags":
806			if v != nil {
807				var tags map[string]*string
808				err = json.Unmarshal(*v, &tags)
809				if err != nil {
810					return err
811				}
812				mc.Tags = tags
813			}
814		}
815	}
816
817	return nil
818}
819
820// ManagedClusterAADProfile aADProfile specifies attributes for Azure Active Directory integration.
821type ManagedClusterAADProfile struct {
822	// ClientAppID - The client AAD application ID.
823	ClientAppID *string `json:"clientAppID,omitempty"`
824	// ServerAppID - The server AAD application ID.
825	ServerAppID *string `json:"serverAppID,omitempty"`
826	// ServerAppSecret - The server AAD application secret.
827	ServerAppSecret *string `json:"serverAppSecret,omitempty"`
828	// TenantID - The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription.
829	TenantID *string `json:"tenantID,omitempty"`
830}
831
832// ManagedClusterAccessProfile managed cluster Access Profile.
833type ManagedClusterAccessProfile struct {
834	autorest.Response `json:"-"`
835	// AccessProfile - AccessProfile of a managed cluster.
836	*AccessProfile `json:"properties,omitempty"`
837	// ID - READ-ONLY; Resource Id
838	ID *string `json:"id,omitempty"`
839	// Name - READ-ONLY; Resource name
840	Name *string `json:"name,omitempty"`
841	// Type - READ-ONLY; Resource type
842	Type *string `json:"type,omitempty"`
843	// Location - Resource location
844	Location *string `json:"location,omitempty"`
845	// Tags - Resource tags
846	Tags map[string]*string `json:"tags"`
847}
848
849// MarshalJSON is the custom marshaler for ManagedClusterAccessProfile.
850func (mcap ManagedClusterAccessProfile) MarshalJSON() ([]byte, error) {
851	objectMap := make(map[string]interface{})
852	if mcap.AccessProfile != nil {
853		objectMap["properties"] = mcap.AccessProfile
854	}
855	if mcap.Location != nil {
856		objectMap["location"] = mcap.Location
857	}
858	if mcap.Tags != nil {
859		objectMap["tags"] = mcap.Tags
860	}
861	return json.Marshal(objectMap)
862}
863
864// UnmarshalJSON is the custom unmarshaler for ManagedClusterAccessProfile struct.
865func (mcap *ManagedClusterAccessProfile) UnmarshalJSON(body []byte) error {
866	var m map[string]*json.RawMessage
867	err := json.Unmarshal(body, &m)
868	if err != nil {
869		return err
870	}
871	for k, v := range m {
872		switch k {
873		case "properties":
874			if v != nil {
875				var accessProfile AccessProfile
876				err = json.Unmarshal(*v, &accessProfile)
877				if err != nil {
878					return err
879				}
880				mcap.AccessProfile = &accessProfile
881			}
882		case "id":
883			if v != nil {
884				var ID string
885				err = json.Unmarshal(*v, &ID)
886				if err != nil {
887					return err
888				}
889				mcap.ID = &ID
890			}
891		case "name":
892			if v != nil {
893				var name string
894				err = json.Unmarshal(*v, &name)
895				if err != nil {
896					return err
897				}
898				mcap.Name = &name
899			}
900		case "type":
901			if v != nil {
902				var typeVar string
903				err = json.Unmarshal(*v, &typeVar)
904				if err != nil {
905					return err
906				}
907				mcap.Type = &typeVar
908			}
909		case "location":
910			if v != nil {
911				var location string
912				err = json.Unmarshal(*v, &location)
913				if err != nil {
914					return err
915				}
916				mcap.Location = &location
917			}
918		case "tags":
919			if v != nil {
920				var tags map[string]*string
921				err = json.Unmarshal(*v, &tags)
922				if err != nil {
923					return err
924				}
925				mcap.Tags = tags
926			}
927		}
928	}
929
930	return nil
931}
932
933// ManagedClusterAddonProfile a Kubernetes add-on profile for a managed cluster.
934type ManagedClusterAddonProfile struct {
935	// Enabled - Whether the add-on is enabled or not.
936	Enabled *bool `json:"enabled,omitempty"`
937	// Config - Key-value pairs for configuring an add-on.
938	Config map[string]*string `json:"config"`
939}
940
941// MarshalJSON is the custom marshaler for ManagedClusterAddonProfile.
942func (mcap ManagedClusterAddonProfile) MarshalJSON() ([]byte, error) {
943	objectMap := make(map[string]interface{})
944	if mcap.Enabled != nil {
945		objectMap["enabled"] = mcap.Enabled
946	}
947	if mcap.Config != nil {
948		objectMap["config"] = mcap.Config
949	}
950	return json.Marshal(objectMap)
951}
952
953// ManagedClusterAgentPoolProfile profile for the container service agent pool.
954type ManagedClusterAgentPoolProfile struct {
955	// Name - Unique name of the agent pool profile in the context of the subscription and resource group.
956	Name *string `json:"name,omitempty"`
957	// Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1.
958	Count *int32 `json:"count,omitempty"`
959	// 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'
960	VMSize VMSizeTypes `json:"vmSize,omitempty"`
961	// 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.
962	OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"`
963	// VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier.
964	VnetSubnetID *string `json:"vnetSubnetID,omitempty"`
965	// MaxPods - Maximum number of pods that can run on a node.
966	MaxPods *int32 `json:"maxPods,omitempty"`
967	// OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'
968	OsType OSType `json:"osType,omitempty"`
969	// MaxCount - Maximum number of nodes for auto-scaling
970	MaxCount *int32 `json:"maxCount,omitempty"`
971	// MinCount - Minimum number of nodes for auto-scaling
972	MinCount *int32 `json:"minCount,omitempty"`
973	// EnableAutoScaling - Whether to enable auto-scaler
974	EnableAutoScaling *bool `json:"enableAutoScaling,omitempty"`
975	// Type - AgentPoolType represents types of an agent pool. Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet'
976	Type AgentPoolType `json:"type,omitempty"`
977	// OrchestratorVersion - Version of orchestrator specified when creating the managed cluster.
978	OrchestratorVersion *string `json:"orchestratorVersion,omitempty"`
979	// ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response.
980	ProvisioningState *string `json:"provisioningState,omitempty"`
981	// AvailabilityZones - (PREVIEW) Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType.
982	AvailabilityZones *[]string `json:"availabilityZones,omitempty"`
983}
984
985// MarshalJSON is the custom marshaler for ManagedClusterAgentPoolProfile.
986func (mcapp ManagedClusterAgentPoolProfile) MarshalJSON() ([]byte, error) {
987	objectMap := make(map[string]interface{})
988	if mcapp.Name != nil {
989		objectMap["name"] = mcapp.Name
990	}
991	if mcapp.Count != nil {
992		objectMap["count"] = mcapp.Count
993	}
994	if mcapp.VMSize != "" {
995		objectMap["vmSize"] = mcapp.VMSize
996	}
997	if mcapp.OsDiskSizeGB != nil {
998		objectMap["osDiskSizeGB"] = mcapp.OsDiskSizeGB
999	}
1000	if mcapp.VnetSubnetID != nil {
1001		objectMap["vnetSubnetID"] = mcapp.VnetSubnetID
1002	}
1003	if mcapp.MaxPods != nil {
1004		objectMap["maxPods"] = mcapp.MaxPods
1005	}
1006	if mcapp.OsType != "" {
1007		objectMap["osType"] = mcapp.OsType
1008	}
1009	if mcapp.MaxCount != nil {
1010		objectMap["maxCount"] = mcapp.MaxCount
1011	}
1012	if mcapp.MinCount != nil {
1013		objectMap["minCount"] = mcapp.MinCount
1014	}
1015	if mcapp.EnableAutoScaling != nil {
1016		objectMap["enableAutoScaling"] = mcapp.EnableAutoScaling
1017	}
1018	if mcapp.Type != "" {
1019		objectMap["type"] = mcapp.Type
1020	}
1021	if mcapp.OrchestratorVersion != nil {
1022		objectMap["orchestratorVersion"] = mcapp.OrchestratorVersion
1023	}
1024	if mcapp.AvailabilityZones != nil {
1025		objectMap["availabilityZones"] = mcapp.AvailabilityZones
1026	}
1027	return json.Marshal(objectMap)
1028}
1029
1030// ManagedClusterAgentPoolProfileProperties properties for the container service agent pool profile.
1031type ManagedClusterAgentPoolProfileProperties struct {
1032	// Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1.
1033	Count *int32 `json:"count,omitempty"`
1034	// 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'
1035	VMSize VMSizeTypes `json:"vmSize,omitempty"`
1036	// 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.
1037	OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"`
1038	// VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier.
1039	VnetSubnetID *string `json:"vnetSubnetID,omitempty"`
1040	// MaxPods - Maximum number of pods that can run on a node.
1041	MaxPods *int32 `json:"maxPods,omitempty"`
1042	// OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'
1043	OsType OSType `json:"osType,omitempty"`
1044	// MaxCount - Maximum number of nodes for auto-scaling
1045	MaxCount *int32 `json:"maxCount,omitempty"`
1046	// MinCount - Minimum number of nodes for auto-scaling
1047	MinCount *int32 `json:"minCount,omitempty"`
1048	// EnableAutoScaling - Whether to enable auto-scaler
1049	EnableAutoScaling *bool `json:"enableAutoScaling,omitempty"`
1050	// Type - AgentPoolType represents types of an agent pool. Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet'
1051	Type AgentPoolType `json:"type,omitempty"`
1052	// OrchestratorVersion - Version of orchestrator specified when creating the managed cluster.
1053	OrchestratorVersion *string `json:"orchestratorVersion,omitempty"`
1054	// ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response.
1055	ProvisioningState *string `json:"provisioningState,omitempty"`
1056	// AvailabilityZones - (PREVIEW) Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType.
1057	AvailabilityZones *[]string `json:"availabilityZones,omitempty"`
1058}
1059
1060// MarshalJSON is the custom marshaler for ManagedClusterAgentPoolProfileProperties.
1061func (mcappp ManagedClusterAgentPoolProfileProperties) MarshalJSON() ([]byte, error) {
1062	objectMap := make(map[string]interface{})
1063	if mcappp.Count != nil {
1064		objectMap["count"] = mcappp.Count
1065	}
1066	if mcappp.VMSize != "" {
1067		objectMap["vmSize"] = mcappp.VMSize
1068	}
1069	if mcappp.OsDiskSizeGB != nil {
1070		objectMap["osDiskSizeGB"] = mcappp.OsDiskSizeGB
1071	}
1072	if mcappp.VnetSubnetID != nil {
1073		objectMap["vnetSubnetID"] = mcappp.VnetSubnetID
1074	}
1075	if mcappp.MaxPods != nil {
1076		objectMap["maxPods"] = mcappp.MaxPods
1077	}
1078	if mcappp.OsType != "" {
1079		objectMap["osType"] = mcappp.OsType
1080	}
1081	if mcappp.MaxCount != nil {
1082		objectMap["maxCount"] = mcappp.MaxCount
1083	}
1084	if mcappp.MinCount != nil {
1085		objectMap["minCount"] = mcappp.MinCount
1086	}
1087	if mcappp.EnableAutoScaling != nil {
1088		objectMap["enableAutoScaling"] = mcappp.EnableAutoScaling
1089	}
1090	if mcappp.Type != "" {
1091		objectMap["type"] = mcappp.Type
1092	}
1093	if mcappp.OrchestratorVersion != nil {
1094		objectMap["orchestratorVersion"] = mcappp.OrchestratorVersion
1095	}
1096	if mcappp.AvailabilityZones != nil {
1097		objectMap["availabilityZones"] = mcappp.AvailabilityZones
1098	}
1099	return json.Marshal(objectMap)
1100}
1101
1102// ManagedClusterIdentity identity for the managed cluster.
1103type ManagedClusterIdentity struct {
1104	// PrincipalID - READ-ONLY; The principal id of the system assigned identity which is used by master components.
1105	PrincipalID *string `json:"principalId,omitempty"`
1106	// TenantID - READ-ONLY; The tenant id of the system assigned identity which is used by master components.
1107	TenantID *string `json:"tenantId,omitempty"`
1108	// 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: 'SystemAssigned', 'None'
1109	Type ResourceIdentityType `json:"type,omitempty"`
1110}
1111
1112// MarshalJSON is the custom marshaler for ManagedClusterIdentity.
1113func (mci ManagedClusterIdentity) MarshalJSON() ([]byte, error) {
1114	objectMap := make(map[string]interface{})
1115	if mci.Type != "" {
1116		objectMap["type"] = mci.Type
1117	}
1118	return json.Marshal(objectMap)
1119}
1120
1121// ManagedClusterListResult the response from the List Managed Clusters operation.
1122type ManagedClusterListResult struct {
1123	autorest.Response `json:"-"`
1124	// Value - The list of managed clusters.
1125	Value *[]ManagedCluster `json:"value,omitempty"`
1126	// NextLink - READ-ONLY; The URL to get the next set of managed cluster results.
1127	NextLink *string `json:"nextLink,omitempty"`
1128}
1129
1130// MarshalJSON is the custom marshaler for ManagedClusterListResult.
1131func (mclr ManagedClusterListResult) MarshalJSON() ([]byte, error) {
1132	objectMap := make(map[string]interface{})
1133	if mclr.Value != nil {
1134		objectMap["value"] = mclr.Value
1135	}
1136	return json.Marshal(objectMap)
1137}
1138
1139// ManagedClusterListResultIterator provides access to a complete listing of ManagedCluster values.
1140type ManagedClusterListResultIterator struct {
1141	i    int
1142	page ManagedClusterListResultPage
1143}
1144
1145// NextWithContext advances to the next value.  If there was an error making
1146// the request the iterator does not advance and the error is returned.
1147func (iter *ManagedClusterListResultIterator) NextWithContext(ctx context.Context) (err error) {
1148	if tracing.IsEnabled() {
1149		ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClusterListResultIterator.NextWithContext")
1150		defer func() {
1151			sc := -1
1152			if iter.Response().Response.Response != nil {
1153				sc = iter.Response().Response.Response.StatusCode
1154			}
1155			tracing.EndSpan(ctx, sc, err)
1156		}()
1157	}
1158	iter.i++
1159	if iter.i < len(iter.page.Values()) {
1160		return nil
1161	}
1162	err = iter.page.NextWithContext(ctx)
1163	if err != nil {
1164		iter.i--
1165		return err
1166	}
1167	iter.i = 0
1168	return nil
1169}
1170
1171// Next advances to the next value.  If there was an error making
1172// the request the iterator does not advance and the error is returned.
1173// Deprecated: Use NextWithContext() instead.
1174func (iter *ManagedClusterListResultIterator) Next() error {
1175	return iter.NextWithContext(context.Background())
1176}
1177
1178// NotDone returns true if the enumeration should be started or is not yet complete.
1179func (iter ManagedClusterListResultIterator) NotDone() bool {
1180	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1181}
1182
1183// Response returns the raw server response from the last page request.
1184func (iter ManagedClusterListResultIterator) Response() ManagedClusterListResult {
1185	return iter.page.Response()
1186}
1187
1188// Value returns the current value or a zero-initialized value if the
1189// iterator has advanced beyond the end of the collection.
1190func (iter ManagedClusterListResultIterator) Value() ManagedCluster {
1191	if !iter.page.NotDone() {
1192		return ManagedCluster{}
1193	}
1194	return iter.page.Values()[iter.i]
1195}
1196
1197// Creates a new instance of the ManagedClusterListResultIterator type.
1198func NewManagedClusterListResultIterator(page ManagedClusterListResultPage) ManagedClusterListResultIterator {
1199	return ManagedClusterListResultIterator{page: page}
1200}
1201
1202// IsEmpty returns true if the ListResult contains no values.
1203func (mclr ManagedClusterListResult) IsEmpty() bool {
1204	return mclr.Value == nil || len(*mclr.Value) == 0
1205}
1206
1207// hasNextLink returns true if the NextLink is not empty.
1208func (mclr ManagedClusterListResult) hasNextLink() bool {
1209	return mclr.NextLink != nil && len(*mclr.NextLink) != 0
1210}
1211
1212// managedClusterListResultPreparer prepares a request to retrieve the next set of results.
1213// It returns nil if no more results exist.
1214func (mclr ManagedClusterListResult) managedClusterListResultPreparer(ctx context.Context) (*http.Request, error) {
1215	if !mclr.hasNextLink() {
1216		return nil, nil
1217	}
1218	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1219		autorest.AsJSON(),
1220		autorest.AsGet(),
1221		autorest.WithBaseURL(to.String(mclr.NextLink)))
1222}
1223
1224// ManagedClusterListResultPage contains a page of ManagedCluster values.
1225type ManagedClusterListResultPage struct {
1226	fn   func(context.Context, ManagedClusterListResult) (ManagedClusterListResult, error)
1227	mclr ManagedClusterListResult
1228}
1229
1230// NextWithContext advances to the next page of values.  If there was an error making
1231// the request the page does not advance and the error is returned.
1232func (page *ManagedClusterListResultPage) NextWithContext(ctx context.Context) (err error) {
1233	if tracing.IsEnabled() {
1234		ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClusterListResultPage.NextWithContext")
1235		defer func() {
1236			sc := -1
1237			if page.Response().Response.Response != nil {
1238				sc = page.Response().Response.Response.StatusCode
1239			}
1240			tracing.EndSpan(ctx, sc, err)
1241		}()
1242	}
1243	for {
1244		next, err := page.fn(ctx, page.mclr)
1245		if err != nil {
1246			return err
1247		}
1248		page.mclr = next
1249		if !next.hasNextLink() || !next.IsEmpty() {
1250			break
1251		}
1252	}
1253	return nil
1254}
1255
1256// Next advances to the next page of values.  If there was an error making
1257// the request the page does not advance and the error is returned.
1258// Deprecated: Use NextWithContext() instead.
1259func (page *ManagedClusterListResultPage) Next() error {
1260	return page.NextWithContext(context.Background())
1261}
1262
1263// NotDone returns true if the page enumeration should be started or is not yet complete.
1264func (page ManagedClusterListResultPage) NotDone() bool {
1265	return !page.mclr.IsEmpty()
1266}
1267
1268// Response returns the raw server response from the last page request.
1269func (page ManagedClusterListResultPage) Response() ManagedClusterListResult {
1270	return page.mclr
1271}
1272
1273// Values returns the slice of values for the current page or nil if there are no values.
1274func (page ManagedClusterListResultPage) Values() []ManagedCluster {
1275	if page.mclr.IsEmpty() {
1276		return nil
1277	}
1278	return *page.mclr.Value
1279}
1280
1281// Creates a new instance of the ManagedClusterListResultPage type.
1282func NewManagedClusterListResultPage(cur ManagedClusterListResult, getNextPage func(context.Context, ManagedClusterListResult) (ManagedClusterListResult, error)) ManagedClusterListResultPage {
1283	return ManagedClusterListResultPage{
1284		fn:   getNextPage,
1285		mclr: cur,
1286	}
1287}
1288
1289// ManagedClusterPoolUpgradeProfile the list of available upgrade versions.
1290type ManagedClusterPoolUpgradeProfile struct {
1291	// KubernetesVersion - Kubernetes version (major, minor, patch).
1292	KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
1293	// Name - Pool name.
1294	Name *string `json:"name,omitempty"`
1295	// OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'
1296	OsType OSType `json:"osType,omitempty"`
1297	// Upgrades - List of orchestrator types and versions available for upgrade.
1298	Upgrades *[]ManagedClusterPoolUpgradeProfileUpgradesItem `json:"upgrades,omitempty"`
1299}
1300
1301// ManagedClusterPoolUpgradeProfileUpgradesItem ...
1302type ManagedClusterPoolUpgradeProfileUpgradesItem struct {
1303	// KubernetesVersion - Kubernetes version (major, minor, patch).
1304	KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
1305	// IsPreview - Whether Kubernetes version is currently in preview.
1306	IsPreview *bool `json:"isPreview,omitempty"`
1307}
1308
1309// ManagedClusterProperties properties of the managed cluster.
1310type ManagedClusterProperties struct {
1311	// ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response.
1312	ProvisioningState *string `json:"provisioningState,omitempty"`
1313	// MaxAgentPools - READ-ONLY; The max number of agent pools for the managed cluster.
1314	MaxAgentPools *int32 `json:"maxAgentPools,omitempty"`
1315	// KubernetesVersion - Version of Kubernetes specified when creating the managed cluster.
1316	KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
1317	// DNSPrefix - DNS prefix specified when creating the managed cluster.
1318	DNSPrefix *string `json:"dnsPrefix,omitempty"`
1319	// Fqdn - READ-ONLY; FQDN for the master pool.
1320	Fqdn *string `json:"fqdn,omitempty"`
1321	// AgentPoolProfiles - Properties of the agent pool.
1322	AgentPoolProfiles *[]ManagedClusterAgentPoolProfile `json:"agentPoolProfiles,omitempty"`
1323	// LinuxProfile - Profile for Linux VMs in the container service cluster.
1324	LinuxProfile *LinuxProfile `json:"linuxProfile,omitempty"`
1325	// WindowsProfile - Profile for Windows VMs in the container service cluster.
1326	WindowsProfile *ManagedClusterWindowsProfile `json:"windowsProfile,omitempty"`
1327	// ServicePrincipalProfile - Information about a service principal identity for the cluster to use for manipulating Azure APIs.
1328	ServicePrincipalProfile *ManagedClusterServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"`
1329	// AddonProfiles - Profile of managed cluster add-on.
1330	AddonProfiles map[string]*ManagedClusterAddonProfile `json:"addonProfiles"`
1331	// NodeResourceGroup - Name of the resource group containing agent pool nodes.
1332	NodeResourceGroup *string `json:"nodeResourceGroup,omitempty"`
1333	// EnableRBAC - Whether to enable Kubernetes Role-Based Access Control.
1334	EnableRBAC *bool `json:"enableRBAC,omitempty"`
1335	// 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.
1336	EnablePodSecurityPolicy *bool `json:"enablePodSecurityPolicy,omitempty"`
1337	// NetworkProfile - Profile of network configuration.
1338	NetworkProfile *NetworkProfileType `json:"networkProfile,omitempty"`
1339	// AadProfile - Profile of Azure Active Directory configuration.
1340	AadProfile *ManagedClusterAADProfile `json:"aadProfile,omitempty"`
1341	// APIServerAuthorizedIPRanges - (PREVIEW) Authorized IP Ranges to kubernetes API server.
1342	APIServerAuthorizedIPRanges *[]string `json:"apiServerAuthorizedIPRanges,omitempty"`
1343}
1344
1345// MarshalJSON is the custom marshaler for ManagedClusterProperties.
1346func (mcp ManagedClusterProperties) MarshalJSON() ([]byte, error) {
1347	objectMap := make(map[string]interface{})
1348	if mcp.KubernetesVersion != nil {
1349		objectMap["kubernetesVersion"] = mcp.KubernetesVersion
1350	}
1351	if mcp.DNSPrefix != nil {
1352		objectMap["dnsPrefix"] = mcp.DNSPrefix
1353	}
1354	if mcp.AgentPoolProfiles != nil {
1355		objectMap["agentPoolProfiles"] = mcp.AgentPoolProfiles
1356	}
1357	if mcp.LinuxProfile != nil {
1358		objectMap["linuxProfile"] = mcp.LinuxProfile
1359	}
1360	if mcp.WindowsProfile != nil {
1361		objectMap["windowsProfile"] = mcp.WindowsProfile
1362	}
1363	if mcp.ServicePrincipalProfile != nil {
1364		objectMap["servicePrincipalProfile"] = mcp.ServicePrincipalProfile
1365	}
1366	if mcp.AddonProfiles != nil {
1367		objectMap["addonProfiles"] = mcp.AddonProfiles
1368	}
1369	if mcp.NodeResourceGroup != nil {
1370		objectMap["nodeResourceGroup"] = mcp.NodeResourceGroup
1371	}
1372	if mcp.EnableRBAC != nil {
1373		objectMap["enableRBAC"] = mcp.EnableRBAC
1374	}
1375	if mcp.EnablePodSecurityPolicy != nil {
1376		objectMap["enablePodSecurityPolicy"] = mcp.EnablePodSecurityPolicy
1377	}
1378	if mcp.NetworkProfile != nil {
1379		objectMap["networkProfile"] = mcp.NetworkProfile
1380	}
1381	if mcp.AadProfile != nil {
1382		objectMap["aadProfile"] = mcp.AadProfile
1383	}
1384	if mcp.APIServerAuthorizedIPRanges != nil {
1385		objectMap["apiServerAuthorizedIPRanges"] = mcp.APIServerAuthorizedIPRanges
1386	}
1387	return json.Marshal(objectMap)
1388}
1389
1390// ManagedClustersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
1391// long-running operation.
1392type ManagedClustersCreateOrUpdateFuture struct {
1393	azure.FutureAPI
1394	// Result returns the result of the asynchronous operation.
1395	// If the operation has not completed it will return an error.
1396	Result func(ManagedClustersClient) (ManagedCluster, error)
1397}
1398
1399// ManagedClustersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
1400// operation.
1401type ManagedClustersDeleteFuture struct {
1402	azure.FutureAPI
1403	// Result returns the result of the asynchronous operation.
1404	// If the operation has not completed it will return an error.
1405	Result func(ManagedClustersClient) (autorest.Response, error)
1406}
1407
1408// ManagedClusterServicePrincipalProfile information about a service principal identity for the cluster to
1409// use for manipulating Azure APIs.
1410type ManagedClusterServicePrincipalProfile struct {
1411	// ClientID - The ID for the service principal.
1412	ClientID *string `json:"clientId,omitempty"`
1413	// Secret - The secret password associated with the service principal in plain text.
1414	Secret *string `json:"secret,omitempty"`
1415}
1416
1417// ManagedClustersResetAADProfileFuture an abstraction for monitoring and retrieving the results of a
1418// long-running operation.
1419type ManagedClustersResetAADProfileFuture struct {
1420	azure.FutureAPI
1421	// Result returns the result of the asynchronous operation.
1422	// If the operation has not completed it will return an error.
1423	Result func(ManagedClustersClient) (autorest.Response, error)
1424}
1425
1426// ManagedClustersResetServicePrincipalProfileFuture an abstraction for monitoring and retrieving the
1427// results of a long-running operation.
1428type ManagedClustersResetServicePrincipalProfileFuture struct {
1429	azure.FutureAPI
1430	// Result returns the result of the asynchronous operation.
1431	// If the operation has not completed it will return an error.
1432	Result func(ManagedClustersClient) (autorest.Response, error)
1433}
1434
1435// ManagedClustersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
1436// long-running operation.
1437type ManagedClustersUpdateTagsFuture struct {
1438	azure.FutureAPI
1439	// Result returns the result of the asynchronous operation.
1440	// If the operation has not completed it will return an error.
1441	Result func(ManagedClustersClient) (ManagedCluster, error)
1442}
1443
1444// ManagedClusterUpgradeProfile the list of available upgrades for compute pools.
1445type ManagedClusterUpgradeProfile struct {
1446	autorest.Response `json:"-"`
1447	// ID - READ-ONLY; Id of upgrade profile.
1448	ID *string `json:"id,omitempty"`
1449	// Name - READ-ONLY; Name of upgrade profile.
1450	Name *string `json:"name,omitempty"`
1451	// Type - READ-ONLY; Type of upgrade profile.
1452	Type *string `json:"type,omitempty"`
1453	// ManagedClusterUpgradeProfileProperties - Properties of upgrade profile.
1454	*ManagedClusterUpgradeProfileProperties `json:"properties,omitempty"`
1455}
1456
1457// MarshalJSON is the custom marshaler for ManagedClusterUpgradeProfile.
1458func (mcup ManagedClusterUpgradeProfile) MarshalJSON() ([]byte, error) {
1459	objectMap := make(map[string]interface{})
1460	if mcup.ManagedClusterUpgradeProfileProperties != nil {
1461		objectMap["properties"] = mcup.ManagedClusterUpgradeProfileProperties
1462	}
1463	return json.Marshal(objectMap)
1464}
1465
1466// UnmarshalJSON is the custom unmarshaler for ManagedClusterUpgradeProfile struct.
1467func (mcup *ManagedClusterUpgradeProfile) UnmarshalJSON(body []byte) error {
1468	var m map[string]*json.RawMessage
1469	err := json.Unmarshal(body, &m)
1470	if err != nil {
1471		return err
1472	}
1473	for k, v := range m {
1474		switch k {
1475		case "id":
1476			if v != nil {
1477				var ID string
1478				err = json.Unmarshal(*v, &ID)
1479				if err != nil {
1480					return err
1481				}
1482				mcup.ID = &ID
1483			}
1484		case "name":
1485			if v != nil {
1486				var name string
1487				err = json.Unmarshal(*v, &name)
1488				if err != nil {
1489					return err
1490				}
1491				mcup.Name = &name
1492			}
1493		case "type":
1494			if v != nil {
1495				var typeVar string
1496				err = json.Unmarshal(*v, &typeVar)
1497				if err != nil {
1498					return err
1499				}
1500				mcup.Type = &typeVar
1501			}
1502		case "properties":
1503			if v != nil {
1504				var managedClusterUpgradeProfileProperties ManagedClusterUpgradeProfileProperties
1505				err = json.Unmarshal(*v, &managedClusterUpgradeProfileProperties)
1506				if err != nil {
1507					return err
1508				}
1509				mcup.ManagedClusterUpgradeProfileProperties = &managedClusterUpgradeProfileProperties
1510			}
1511		}
1512	}
1513
1514	return nil
1515}
1516
1517// ManagedClusterUpgradeProfileProperties control plane and agent pool upgrade profiles.
1518type ManagedClusterUpgradeProfileProperties struct {
1519	// ControlPlaneProfile - The list of available upgrade versions for the control plane.
1520	ControlPlaneProfile *ManagedClusterPoolUpgradeProfile `json:"controlPlaneProfile,omitempty"`
1521	// AgentPoolProfiles - The list of available upgrade versions for agent pools.
1522	AgentPoolProfiles *[]ManagedClusterPoolUpgradeProfile `json:"agentPoolProfiles,omitempty"`
1523}
1524
1525// ManagedClusterWindowsProfile profile for Windows VMs in the container service cluster.
1526type ManagedClusterWindowsProfile struct {
1527	// 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
1528	AdminUsername *string `json:"adminUsername,omitempty"`
1529	// 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!"
1530	AdminPassword *string `json:"adminPassword,omitempty"`
1531}
1532
1533// MasterProfile profile for the container service master.
1534type MasterProfile struct {
1535	// Count - Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1.
1536	Count *int32 `json:"count,omitempty"`
1537	// DNSPrefix - DNS prefix to be used to create the FQDN for the master pool.
1538	DNSPrefix *string `json:"dnsPrefix,omitempty"`
1539	// 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'
1540	VMSize VMSizeTypes `json:"vmSize,omitempty"`
1541	// 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.
1542	OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"`
1543	// VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier.
1544	VnetSubnetID *string `json:"vnetSubnetID,omitempty"`
1545	// FirstConsecutiveStaticIP - FirstConsecutiveStaticIP used to specify the first static ip of masters.
1546	FirstConsecutiveStaticIP *string `json:"firstConsecutiveStaticIP,omitempty"`
1547	// 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: 'StorageAccount', 'ManagedDisks'
1548	StorageProfile StorageProfileTypes `json:"storageProfile,omitempty"`
1549	// Fqdn - READ-ONLY; FQDN for the master pool.
1550	Fqdn *string `json:"fqdn,omitempty"`
1551}
1552
1553// MarshalJSON is the custom marshaler for MasterProfile.
1554func (mp MasterProfile) MarshalJSON() ([]byte, error) {
1555	objectMap := make(map[string]interface{})
1556	if mp.Count != nil {
1557		objectMap["count"] = mp.Count
1558	}
1559	if mp.DNSPrefix != nil {
1560		objectMap["dnsPrefix"] = mp.DNSPrefix
1561	}
1562	if mp.VMSize != "" {
1563		objectMap["vmSize"] = mp.VMSize
1564	}
1565	if mp.OsDiskSizeGB != nil {
1566		objectMap["osDiskSizeGB"] = mp.OsDiskSizeGB
1567	}
1568	if mp.VnetSubnetID != nil {
1569		objectMap["vnetSubnetID"] = mp.VnetSubnetID
1570	}
1571	if mp.FirstConsecutiveStaticIP != nil {
1572		objectMap["firstConsecutiveStaticIP"] = mp.FirstConsecutiveStaticIP
1573	}
1574	if mp.StorageProfile != "" {
1575		objectMap["storageProfile"] = mp.StorageProfile
1576	}
1577	return json.Marshal(objectMap)
1578}
1579
1580// NetworkProfile represents the OpenShift networking configuration
1581type NetworkProfile struct {
1582	// VnetCidr - CIDR for the OpenShift Vnet.
1583	VnetCidr *string `json:"vnetCidr,omitempty"`
1584	// PeerVnetID - CIDR of the Vnet to peer.
1585	PeerVnetID *string `json:"peerVnetId,omitempty"`
1586	// VnetID - ID of the Vnet created for OSA cluster.
1587	VnetID *string `json:"vnetId,omitempty"`
1588}
1589
1590// NetworkProfileType profile of network configuration.
1591type NetworkProfileType struct {
1592	// NetworkPlugin - Network plugin used for building Kubernetes network. Possible values include: 'Azure', 'Kubenet'
1593	NetworkPlugin NetworkPlugin `json:"networkPlugin,omitempty"`
1594	// NetworkPolicy - Network policy used for building Kubernetes network. Possible values include: 'NetworkPolicyCalico', 'NetworkPolicyAzure'
1595	NetworkPolicy NetworkPolicy `json:"networkPolicy,omitempty"`
1596	// PodCidr - A CIDR notation IP range from which to assign pod IPs when kubenet is used.
1597	PodCidr *string `json:"podCidr,omitempty"`
1598	// ServiceCidr - A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges.
1599	ServiceCidr *string `json:"serviceCidr,omitempty"`
1600	// DNSServiceIP - An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr.
1601	DNSServiceIP *string `json:"dnsServiceIP,omitempty"`
1602	// 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.
1603	DockerBridgeCidr *string `json:"dockerBridgeCidr,omitempty"`
1604	// LoadBalancerSku - The load balancer sku for the managed cluster. Possible values include: 'Standard', 'Basic'
1605	LoadBalancerSku LoadBalancerSku `json:"loadBalancerSku,omitempty"`
1606}
1607
1608// OpenShiftManagedCluster openShift Managed cluster.
1609type OpenShiftManagedCluster struct {
1610	autorest.Response `json:"-"`
1611	// Plan - Define the resource plan as required by ARM for billing purposes
1612	Plan *PurchasePlan `json:"plan,omitempty"`
1613	// OpenShiftManagedClusterProperties - Properties of a OpenShift managed cluster.
1614	*OpenShiftManagedClusterProperties `json:"properties,omitempty"`
1615	// ID - READ-ONLY; Resource Id
1616	ID *string `json:"id,omitempty"`
1617	// Name - READ-ONLY; Resource name
1618	Name *string `json:"name,omitempty"`
1619	// Type - READ-ONLY; Resource type
1620	Type *string `json:"type,omitempty"`
1621	// Location - Resource location
1622	Location *string `json:"location,omitempty"`
1623	// Tags - Resource tags
1624	Tags map[string]*string `json:"tags"`
1625}
1626
1627// MarshalJSON is the custom marshaler for OpenShiftManagedCluster.
1628func (osmc OpenShiftManagedCluster) MarshalJSON() ([]byte, error) {
1629	objectMap := make(map[string]interface{})
1630	if osmc.Plan != nil {
1631		objectMap["plan"] = osmc.Plan
1632	}
1633	if osmc.OpenShiftManagedClusterProperties != nil {
1634		objectMap["properties"] = osmc.OpenShiftManagedClusterProperties
1635	}
1636	if osmc.Location != nil {
1637		objectMap["location"] = osmc.Location
1638	}
1639	if osmc.Tags != nil {
1640		objectMap["tags"] = osmc.Tags
1641	}
1642	return json.Marshal(objectMap)
1643}
1644
1645// UnmarshalJSON is the custom unmarshaler for OpenShiftManagedCluster struct.
1646func (osmc *OpenShiftManagedCluster) UnmarshalJSON(body []byte) error {
1647	var m map[string]*json.RawMessage
1648	err := json.Unmarshal(body, &m)
1649	if err != nil {
1650		return err
1651	}
1652	for k, v := range m {
1653		switch k {
1654		case "plan":
1655			if v != nil {
1656				var plan PurchasePlan
1657				err = json.Unmarshal(*v, &plan)
1658				if err != nil {
1659					return err
1660				}
1661				osmc.Plan = &plan
1662			}
1663		case "properties":
1664			if v != nil {
1665				var openShiftManagedClusterProperties OpenShiftManagedClusterProperties
1666				err = json.Unmarshal(*v, &openShiftManagedClusterProperties)
1667				if err != nil {
1668					return err
1669				}
1670				osmc.OpenShiftManagedClusterProperties = &openShiftManagedClusterProperties
1671			}
1672		case "id":
1673			if v != nil {
1674				var ID string
1675				err = json.Unmarshal(*v, &ID)
1676				if err != nil {
1677					return err
1678				}
1679				osmc.ID = &ID
1680			}
1681		case "name":
1682			if v != nil {
1683				var name string
1684				err = json.Unmarshal(*v, &name)
1685				if err != nil {
1686					return err
1687				}
1688				osmc.Name = &name
1689			}
1690		case "type":
1691			if v != nil {
1692				var typeVar string
1693				err = json.Unmarshal(*v, &typeVar)
1694				if err != nil {
1695					return err
1696				}
1697				osmc.Type = &typeVar
1698			}
1699		case "location":
1700			if v != nil {
1701				var location string
1702				err = json.Unmarshal(*v, &location)
1703				if err != nil {
1704					return err
1705				}
1706				osmc.Location = &location
1707			}
1708		case "tags":
1709			if v != nil {
1710				var tags map[string]*string
1711				err = json.Unmarshal(*v, &tags)
1712				if err != nil {
1713					return err
1714				}
1715				osmc.Tags = tags
1716			}
1717		}
1718	}
1719
1720	return nil
1721}
1722
1723// OpenShiftManagedClusterAADIdentityProvider defines the Identity provider for MS AAD.
1724type OpenShiftManagedClusterAADIdentityProvider struct {
1725	// ClientID - The clientId password associated with the provider.
1726	ClientID *string `json:"clientId,omitempty"`
1727	// Secret - The secret password associated with the provider.
1728	Secret *string `json:"secret,omitempty"`
1729	// TenantID - The tenantId associated with the provider.
1730	TenantID *string `json:"tenantId,omitempty"`
1731	// CustomerAdminGroupID - The groupId to be granted cluster admin role.
1732	CustomerAdminGroupID *string `json:"customerAdminGroupId,omitempty"`
1733	// Kind - Possible values include: 'KindOpenShiftManagedClusterBaseIdentityProvider', 'KindAADIdentityProvider'
1734	Kind Kind `json:"kind,omitempty"`
1735}
1736
1737// MarshalJSON is the custom marshaler for OpenShiftManagedClusterAADIdentityProvider.
1738func (osmcaip OpenShiftManagedClusterAADIdentityProvider) MarshalJSON() ([]byte, error) {
1739	osmcaip.Kind = KindAADIdentityProvider
1740	objectMap := make(map[string]interface{})
1741	if osmcaip.ClientID != nil {
1742		objectMap["clientId"] = osmcaip.ClientID
1743	}
1744	if osmcaip.Secret != nil {
1745		objectMap["secret"] = osmcaip.Secret
1746	}
1747	if osmcaip.TenantID != nil {
1748		objectMap["tenantId"] = osmcaip.TenantID
1749	}
1750	if osmcaip.CustomerAdminGroupID != nil {
1751		objectMap["customerAdminGroupId"] = osmcaip.CustomerAdminGroupID
1752	}
1753	if osmcaip.Kind != "" {
1754		objectMap["kind"] = osmcaip.Kind
1755	}
1756	return json.Marshal(objectMap)
1757}
1758
1759// AsOpenShiftManagedClusterAADIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterAADIdentityProvider.
1760func (osmcaip OpenShiftManagedClusterAADIdentityProvider) AsOpenShiftManagedClusterAADIdentityProvider() (*OpenShiftManagedClusterAADIdentityProvider, bool) {
1761	return &osmcaip, true
1762}
1763
1764// AsOpenShiftManagedClusterBaseIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterAADIdentityProvider.
1765func (osmcaip OpenShiftManagedClusterAADIdentityProvider) AsOpenShiftManagedClusterBaseIdentityProvider() (*OpenShiftManagedClusterBaseIdentityProvider, bool) {
1766	return nil, false
1767}
1768
1769// AsBasicOpenShiftManagedClusterBaseIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterAADIdentityProvider.
1770func (osmcaip OpenShiftManagedClusterAADIdentityProvider) AsBasicOpenShiftManagedClusterBaseIdentityProvider() (BasicOpenShiftManagedClusterBaseIdentityProvider, bool) {
1771	return &osmcaip, true
1772}
1773
1774// OpenShiftManagedClusterAgentPoolProfile defines the configuration of the OpenShift cluster VMs.
1775type OpenShiftManagedClusterAgentPoolProfile struct {
1776	// Name - Unique name of the pool profile in the context of the subscription and resource group.
1777	Name *string `json:"name,omitempty"`
1778	// Count - Number of agents (VMs) to host docker containers.
1779	Count *int32 `json:"count,omitempty"`
1780	// VMSize - Size of agent VMs. Possible values include: 'StandardD2sV3', 'StandardD4sV3', 'StandardD8sV3', 'StandardD16sV3', 'StandardD32sV3', 'StandardD64sV3', 'StandardDS4V2', 'StandardDS5V2', 'StandardF8sV2', 'StandardF16sV2', 'StandardF32sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8s', 'StandardF16s', 'StandardE4sV3', 'StandardE8sV3', 'StandardE16sV3', 'StandardE20sV3', 'StandardE32sV3', 'StandardE64sV3', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS5', 'StandardDS12V2', 'StandardDS13V2', 'StandardDS14V2', 'StandardDS15V2', 'StandardL4s', 'StandardL8s', 'StandardL16s', 'StandardL32s'
1781	VMSize OpenShiftContainerServiceVMSize `json:"vmSize,omitempty"`
1782	// SubnetCidr - Subnet CIDR for the peering.
1783	SubnetCidr *string `json:"subnetCidr,omitempty"`
1784	// OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'
1785	OsType OSType `json:"osType,omitempty"`
1786	// Role - Define the role of the AgentPoolProfile. Possible values include: 'Compute', 'Infra'
1787	Role OpenShiftAgentPoolProfileRole `json:"role,omitempty"`
1788}
1789
1790// OpenShiftManagedClusterAuthProfile defines all possible authentication profiles for the OpenShift
1791// cluster.
1792type OpenShiftManagedClusterAuthProfile struct {
1793	// IdentityProviders - Type of authentication profile to use.
1794	IdentityProviders *[]OpenShiftManagedClusterIdentityProvider `json:"identityProviders,omitempty"`
1795}
1796
1797// BasicOpenShiftManagedClusterBaseIdentityProvider structure for any Identity provider.
1798type BasicOpenShiftManagedClusterBaseIdentityProvider interface {
1799	AsOpenShiftManagedClusterAADIdentityProvider() (*OpenShiftManagedClusterAADIdentityProvider, bool)
1800	AsOpenShiftManagedClusterBaseIdentityProvider() (*OpenShiftManagedClusterBaseIdentityProvider, bool)
1801}
1802
1803// OpenShiftManagedClusterBaseIdentityProvider structure for any Identity provider.
1804type OpenShiftManagedClusterBaseIdentityProvider struct {
1805	// Kind - Possible values include: 'KindOpenShiftManagedClusterBaseIdentityProvider', 'KindAADIdentityProvider'
1806	Kind Kind `json:"kind,omitempty"`
1807}
1808
1809func unmarshalBasicOpenShiftManagedClusterBaseIdentityProvider(body []byte) (BasicOpenShiftManagedClusterBaseIdentityProvider, error) {
1810	var m map[string]interface{}
1811	err := json.Unmarshal(body, &m)
1812	if err != nil {
1813		return nil, err
1814	}
1815
1816	switch m["kind"] {
1817	case string(KindAADIdentityProvider):
1818		var osmcaip OpenShiftManagedClusterAADIdentityProvider
1819		err := json.Unmarshal(body, &osmcaip)
1820		return osmcaip, err
1821	default:
1822		var osmcbip OpenShiftManagedClusterBaseIdentityProvider
1823		err := json.Unmarshal(body, &osmcbip)
1824		return osmcbip, err
1825	}
1826}
1827func unmarshalBasicOpenShiftManagedClusterBaseIdentityProviderArray(body []byte) ([]BasicOpenShiftManagedClusterBaseIdentityProvider, error) {
1828	var rawMessages []*json.RawMessage
1829	err := json.Unmarshal(body, &rawMessages)
1830	if err != nil {
1831		return nil, err
1832	}
1833
1834	osmcbipArray := make([]BasicOpenShiftManagedClusterBaseIdentityProvider, len(rawMessages))
1835
1836	for index, rawMessage := range rawMessages {
1837		osmcbip, err := unmarshalBasicOpenShiftManagedClusterBaseIdentityProvider(*rawMessage)
1838		if err != nil {
1839			return nil, err
1840		}
1841		osmcbipArray[index] = osmcbip
1842	}
1843	return osmcbipArray, nil
1844}
1845
1846// MarshalJSON is the custom marshaler for OpenShiftManagedClusterBaseIdentityProvider.
1847func (osmcbip OpenShiftManagedClusterBaseIdentityProvider) MarshalJSON() ([]byte, error) {
1848	osmcbip.Kind = KindOpenShiftManagedClusterBaseIdentityProvider
1849	objectMap := make(map[string]interface{})
1850	if osmcbip.Kind != "" {
1851		objectMap["kind"] = osmcbip.Kind
1852	}
1853	return json.Marshal(objectMap)
1854}
1855
1856// AsOpenShiftManagedClusterAADIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterBaseIdentityProvider.
1857func (osmcbip OpenShiftManagedClusterBaseIdentityProvider) AsOpenShiftManagedClusterAADIdentityProvider() (*OpenShiftManagedClusterAADIdentityProvider, bool) {
1858	return nil, false
1859}
1860
1861// AsOpenShiftManagedClusterBaseIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterBaseIdentityProvider.
1862func (osmcbip OpenShiftManagedClusterBaseIdentityProvider) AsOpenShiftManagedClusterBaseIdentityProvider() (*OpenShiftManagedClusterBaseIdentityProvider, bool) {
1863	return &osmcbip, true
1864}
1865
1866// AsBasicOpenShiftManagedClusterBaseIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterBaseIdentityProvider.
1867func (osmcbip OpenShiftManagedClusterBaseIdentityProvider) AsBasicOpenShiftManagedClusterBaseIdentityProvider() (BasicOpenShiftManagedClusterBaseIdentityProvider, bool) {
1868	return &osmcbip, true
1869}
1870
1871// OpenShiftManagedClusterIdentityProvider defines the configuration of the identity providers to be used
1872// in the OpenShift cluster.
1873type OpenShiftManagedClusterIdentityProvider struct {
1874	// Name - Name of the provider.
1875	Name *string `json:"name,omitempty"`
1876	// Provider - Configuration of the provider.
1877	Provider BasicOpenShiftManagedClusterBaseIdentityProvider `json:"provider,omitempty"`
1878}
1879
1880// UnmarshalJSON is the custom unmarshaler for OpenShiftManagedClusterIdentityProvider struct.
1881func (osmcip *OpenShiftManagedClusterIdentityProvider) UnmarshalJSON(body []byte) error {
1882	var m map[string]*json.RawMessage
1883	err := json.Unmarshal(body, &m)
1884	if err != nil {
1885		return err
1886	}
1887	for k, v := range m {
1888		switch k {
1889		case "name":
1890			if v != nil {
1891				var name string
1892				err = json.Unmarshal(*v, &name)
1893				if err != nil {
1894					return err
1895				}
1896				osmcip.Name = &name
1897			}
1898		case "provider":
1899			if v != nil {
1900				provider, err := unmarshalBasicOpenShiftManagedClusterBaseIdentityProvider(*v)
1901				if err != nil {
1902					return err
1903				}
1904				osmcip.Provider = provider
1905			}
1906		}
1907	}
1908
1909	return nil
1910}
1911
1912// OpenShiftManagedClusterListResult the response from the List OpenShift Managed Clusters operation.
1913type OpenShiftManagedClusterListResult struct {
1914	autorest.Response `json:"-"`
1915	// Value - The list of OpenShift managed clusters.
1916	Value *[]OpenShiftManagedCluster `json:"value,omitempty"`
1917	// NextLink - READ-ONLY; The URL to get the next set of OpenShift managed cluster results.
1918	NextLink *string `json:"nextLink,omitempty"`
1919}
1920
1921// MarshalJSON is the custom marshaler for OpenShiftManagedClusterListResult.
1922func (osmclr OpenShiftManagedClusterListResult) MarshalJSON() ([]byte, error) {
1923	objectMap := make(map[string]interface{})
1924	if osmclr.Value != nil {
1925		objectMap["value"] = osmclr.Value
1926	}
1927	return json.Marshal(objectMap)
1928}
1929
1930// OpenShiftManagedClusterListResultIterator provides access to a complete listing of
1931// OpenShiftManagedCluster values.
1932type OpenShiftManagedClusterListResultIterator struct {
1933	i    int
1934	page OpenShiftManagedClusterListResultPage
1935}
1936
1937// NextWithContext advances to the next value.  If there was an error making
1938// the request the iterator does not advance and the error is returned.
1939func (iter *OpenShiftManagedClusterListResultIterator) NextWithContext(ctx context.Context) (err error) {
1940	if tracing.IsEnabled() {
1941		ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClusterListResultIterator.NextWithContext")
1942		defer func() {
1943			sc := -1
1944			if iter.Response().Response.Response != nil {
1945				sc = iter.Response().Response.Response.StatusCode
1946			}
1947			tracing.EndSpan(ctx, sc, err)
1948		}()
1949	}
1950	iter.i++
1951	if iter.i < len(iter.page.Values()) {
1952		return nil
1953	}
1954	err = iter.page.NextWithContext(ctx)
1955	if err != nil {
1956		iter.i--
1957		return err
1958	}
1959	iter.i = 0
1960	return nil
1961}
1962
1963// Next advances to the next value.  If there was an error making
1964// the request the iterator does not advance and the error is returned.
1965// Deprecated: Use NextWithContext() instead.
1966func (iter *OpenShiftManagedClusterListResultIterator) Next() error {
1967	return iter.NextWithContext(context.Background())
1968}
1969
1970// NotDone returns true if the enumeration should be started or is not yet complete.
1971func (iter OpenShiftManagedClusterListResultIterator) NotDone() bool {
1972	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1973}
1974
1975// Response returns the raw server response from the last page request.
1976func (iter OpenShiftManagedClusterListResultIterator) Response() OpenShiftManagedClusterListResult {
1977	return iter.page.Response()
1978}
1979
1980// Value returns the current value or a zero-initialized value if the
1981// iterator has advanced beyond the end of the collection.
1982func (iter OpenShiftManagedClusterListResultIterator) Value() OpenShiftManagedCluster {
1983	if !iter.page.NotDone() {
1984		return OpenShiftManagedCluster{}
1985	}
1986	return iter.page.Values()[iter.i]
1987}
1988
1989// Creates a new instance of the OpenShiftManagedClusterListResultIterator type.
1990func NewOpenShiftManagedClusterListResultIterator(page OpenShiftManagedClusterListResultPage) OpenShiftManagedClusterListResultIterator {
1991	return OpenShiftManagedClusterListResultIterator{page: page}
1992}
1993
1994// IsEmpty returns true if the ListResult contains no values.
1995func (osmclr OpenShiftManagedClusterListResult) IsEmpty() bool {
1996	return osmclr.Value == nil || len(*osmclr.Value) == 0
1997}
1998
1999// hasNextLink returns true if the NextLink is not empty.
2000func (osmclr OpenShiftManagedClusterListResult) hasNextLink() bool {
2001	return osmclr.NextLink != nil && len(*osmclr.NextLink) != 0
2002}
2003
2004// openShiftManagedClusterListResultPreparer prepares a request to retrieve the next set of results.
2005// It returns nil if no more results exist.
2006func (osmclr OpenShiftManagedClusterListResult) openShiftManagedClusterListResultPreparer(ctx context.Context) (*http.Request, error) {
2007	if !osmclr.hasNextLink() {
2008		return nil, nil
2009	}
2010	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2011		autorest.AsJSON(),
2012		autorest.AsGet(),
2013		autorest.WithBaseURL(to.String(osmclr.NextLink)))
2014}
2015
2016// OpenShiftManagedClusterListResultPage contains a page of OpenShiftManagedCluster values.
2017type OpenShiftManagedClusterListResultPage struct {
2018	fn     func(context.Context, OpenShiftManagedClusterListResult) (OpenShiftManagedClusterListResult, error)
2019	osmclr OpenShiftManagedClusterListResult
2020}
2021
2022// NextWithContext advances to the next page of values.  If there was an error making
2023// the request the page does not advance and the error is returned.
2024func (page *OpenShiftManagedClusterListResultPage) NextWithContext(ctx context.Context) (err error) {
2025	if tracing.IsEnabled() {
2026		ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClusterListResultPage.NextWithContext")
2027		defer func() {
2028			sc := -1
2029			if page.Response().Response.Response != nil {
2030				sc = page.Response().Response.Response.StatusCode
2031			}
2032			tracing.EndSpan(ctx, sc, err)
2033		}()
2034	}
2035	for {
2036		next, err := page.fn(ctx, page.osmclr)
2037		if err != nil {
2038			return err
2039		}
2040		page.osmclr = next
2041		if !next.hasNextLink() || !next.IsEmpty() {
2042			break
2043		}
2044	}
2045	return nil
2046}
2047
2048// Next advances to the next page of values.  If there was an error making
2049// the request the page does not advance and the error is returned.
2050// Deprecated: Use NextWithContext() instead.
2051func (page *OpenShiftManagedClusterListResultPage) Next() error {
2052	return page.NextWithContext(context.Background())
2053}
2054
2055// NotDone returns true if the page enumeration should be started or is not yet complete.
2056func (page OpenShiftManagedClusterListResultPage) NotDone() bool {
2057	return !page.osmclr.IsEmpty()
2058}
2059
2060// Response returns the raw server response from the last page request.
2061func (page OpenShiftManagedClusterListResultPage) Response() OpenShiftManagedClusterListResult {
2062	return page.osmclr
2063}
2064
2065// Values returns the slice of values for the current page or nil if there are no values.
2066func (page OpenShiftManagedClusterListResultPage) Values() []OpenShiftManagedCluster {
2067	if page.osmclr.IsEmpty() {
2068		return nil
2069	}
2070	return *page.osmclr.Value
2071}
2072
2073// Creates a new instance of the OpenShiftManagedClusterListResultPage type.
2074func NewOpenShiftManagedClusterListResultPage(cur OpenShiftManagedClusterListResult, getNextPage func(context.Context, OpenShiftManagedClusterListResult) (OpenShiftManagedClusterListResult, error)) OpenShiftManagedClusterListResultPage {
2075	return OpenShiftManagedClusterListResultPage{
2076		fn:     getNextPage,
2077		osmclr: cur,
2078	}
2079}
2080
2081// OpenShiftManagedClusterMasterPoolProfile openShiftManagedClusterMaterPoolProfile contains configuration
2082// for OpenShift master VMs.
2083type OpenShiftManagedClusterMasterPoolProfile struct {
2084	// Name - Unique name of the master pool profile in the context of the subscription and resource group.
2085	Name *string `json:"name,omitempty"`
2086	// Count - Number of masters (VMs) to host docker containers. The default value is 3.
2087	Count *int32 `json:"count,omitempty"`
2088	// VMSize - Size of agent VMs. Possible values include: 'StandardD2sV3', 'StandardD4sV3', 'StandardD8sV3', 'StandardD16sV3', 'StandardD32sV3', 'StandardD64sV3', 'StandardDS4V2', 'StandardDS5V2', 'StandardF8sV2', 'StandardF16sV2', 'StandardF32sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8s', 'StandardF16s', 'StandardE4sV3', 'StandardE8sV3', 'StandardE16sV3', 'StandardE20sV3', 'StandardE32sV3', 'StandardE64sV3', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS5', 'StandardDS12V2', 'StandardDS13V2', 'StandardDS14V2', 'StandardDS15V2', 'StandardL4s', 'StandardL8s', 'StandardL16s', 'StandardL32s'
2089	VMSize OpenShiftContainerServiceVMSize `json:"vmSize,omitempty"`
2090	// SubnetCidr - Subnet CIDR for the peering.
2091	SubnetCidr *string `json:"subnetCidr,omitempty"`
2092	// OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'
2093	OsType OSType `json:"osType,omitempty"`
2094}
2095
2096// OpenShiftManagedClusterProperties properties of the OpenShift managed cluster.
2097type OpenShiftManagedClusterProperties struct {
2098	// ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response.
2099	ProvisioningState *string `json:"provisioningState,omitempty"`
2100	// OpenShiftVersion - Version of OpenShift specified when creating the cluster.
2101	OpenShiftVersion *string `json:"openShiftVersion,omitempty"`
2102	// ClusterVersion - READ-ONLY; Version of OpenShift specified when creating the cluster.
2103	ClusterVersion *string `json:"clusterVersion,omitempty"`
2104	// PublicHostname - READ-ONLY; Service generated FQDN for OpenShift API server.
2105	PublicHostname *string `json:"publicHostname,omitempty"`
2106	// Fqdn - READ-ONLY; Service generated FQDN for OpenShift API server loadbalancer internal hostname.
2107	Fqdn *string `json:"fqdn,omitempty"`
2108	// NetworkProfile - Configuration for OpenShift networking.
2109	NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"`
2110	// RouterProfiles - Configuration for OpenShift router(s).
2111	RouterProfiles *[]OpenShiftRouterProfile `json:"routerProfiles,omitempty"`
2112	// MasterPoolProfile - Configuration for OpenShift master VMs.
2113	MasterPoolProfile *OpenShiftManagedClusterMasterPoolProfile `json:"masterPoolProfile,omitempty"`
2114	// AgentPoolProfiles - Configuration of OpenShift cluster VMs.
2115	AgentPoolProfiles *[]OpenShiftManagedClusterAgentPoolProfile `json:"agentPoolProfiles,omitempty"`
2116	// AuthProfile - Configures OpenShift authentication.
2117	AuthProfile *OpenShiftManagedClusterAuthProfile `json:"authProfile,omitempty"`
2118}
2119
2120// MarshalJSON is the custom marshaler for OpenShiftManagedClusterProperties.
2121func (osmcp OpenShiftManagedClusterProperties) MarshalJSON() ([]byte, error) {
2122	objectMap := make(map[string]interface{})
2123	if osmcp.OpenShiftVersion != nil {
2124		objectMap["openShiftVersion"] = osmcp.OpenShiftVersion
2125	}
2126	if osmcp.NetworkProfile != nil {
2127		objectMap["networkProfile"] = osmcp.NetworkProfile
2128	}
2129	if osmcp.RouterProfiles != nil {
2130		objectMap["routerProfiles"] = osmcp.RouterProfiles
2131	}
2132	if osmcp.MasterPoolProfile != nil {
2133		objectMap["masterPoolProfile"] = osmcp.MasterPoolProfile
2134	}
2135	if osmcp.AgentPoolProfiles != nil {
2136		objectMap["agentPoolProfiles"] = osmcp.AgentPoolProfiles
2137	}
2138	if osmcp.AuthProfile != nil {
2139		objectMap["authProfile"] = osmcp.AuthProfile
2140	}
2141	return json.Marshal(objectMap)
2142}
2143
2144// OpenShiftManagedClustersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
2145// a long-running operation.
2146type OpenShiftManagedClustersCreateOrUpdateFuture struct {
2147	azure.FutureAPI
2148	// Result returns the result of the asynchronous operation.
2149	// If the operation has not completed it will return an error.
2150	Result func(OpenShiftManagedClustersClient) (OpenShiftManagedCluster, error)
2151}
2152
2153// OpenShiftManagedClustersDeleteFuture an abstraction for monitoring and retrieving the results of a
2154// long-running operation.
2155type OpenShiftManagedClustersDeleteFuture 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(OpenShiftManagedClustersClient) (autorest.Response, error)
2160}
2161
2162// OpenShiftManagedClustersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
2163// long-running operation.
2164type OpenShiftManagedClustersUpdateTagsFuture struct {
2165	azure.FutureAPI
2166	// Result returns the result of the asynchronous operation.
2167	// If the operation has not completed it will return an error.
2168	Result func(OpenShiftManagedClustersClient) (OpenShiftManagedCluster, error)
2169}
2170
2171// OpenShiftRouterProfile represents an OpenShift router
2172type OpenShiftRouterProfile struct {
2173	// Name - Name of the router profile.
2174	Name *string `json:"name,omitempty"`
2175	// PublicSubdomain - READ-ONLY; DNS subdomain for OpenShift router.
2176	PublicSubdomain *string `json:"publicSubdomain,omitempty"`
2177	// Fqdn - READ-ONLY; Auto-allocated FQDN for the OpenShift router.
2178	Fqdn *string `json:"fqdn,omitempty"`
2179}
2180
2181// MarshalJSON is the custom marshaler for OpenShiftRouterProfile.
2182func (osrp OpenShiftRouterProfile) MarshalJSON() ([]byte, error) {
2183	objectMap := make(map[string]interface{})
2184	if osrp.Name != nil {
2185		objectMap["name"] = osrp.Name
2186	}
2187	return json.Marshal(objectMap)
2188}
2189
2190// OperationListResult the List Compute Operation operation response.
2191type OperationListResult struct {
2192	autorest.Response `json:"-"`
2193	// Value - READ-ONLY; The list of compute operations
2194	Value *[]OperationValue `json:"value,omitempty"`
2195}
2196
2197// OperationValue describes the properties of a Compute Operation value.
2198type OperationValue struct {
2199	// Origin - READ-ONLY; The origin of the compute operation.
2200	Origin *string `json:"origin,omitempty"`
2201	// Name - READ-ONLY; The name of the compute operation.
2202	Name *string `json:"name,omitempty"`
2203	// OperationValueDisplay - Describes the properties of a Compute Operation Value Display.
2204	*OperationValueDisplay `json:"display,omitempty"`
2205}
2206
2207// MarshalJSON is the custom marshaler for OperationValue.
2208func (ov OperationValue) MarshalJSON() ([]byte, error) {
2209	objectMap := make(map[string]interface{})
2210	if ov.OperationValueDisplay != nil {
2211		objectMap["display"] = ov.OperationValueDisplay
2212	}
2213	return json.Marshal(objectMap)
2214}
2215
2216// UnmarshalJSON is the custom unmarshaler for OperationValue struct.
2217func (ov *OperationValue) UnmarshalJSON(body []byte) error {
2218	var m map[string]*json.RawMessage
2219	err := json.Unmarshal(body, &m)
2220	if err != nil {
2221		return err
2222	}
2223	for k, v := range m {
2224		switch k {
2225		case "origin":
2226			if v != nil {
2227				var origin string
2228				err = json.Unmarshal(*v, &origin)
2229				if err != nil {
2230					return err
2231				}
2232				ov.Origin = &origin
2233			}
2234		case "name":
2235			if v != nil {
2236				var name string
2237				err = json.Unmarshal(*v, &name)
2238				if err != nil {
2239					return err
2240				}
2241				ov.Name = &name
2242			}
2243		case "display":
2244			if v != nil {
2245				var operationValueDisplay OperationValueDisplay
2246				err = json.Unmarshal(*v, &operationValueDisplay)
2247				if err != nil {
2248					return err
2249				}
2250				ov.OperationValueDisplay = &operationValueDisplay
2251			}
2252		}
2253	}
2254
2255	return nil
2256}
2257
2258// OperationValueDisplay describes the properties of a Compute Operation Value Display.
2259type OperationValueDisplay struct {
2260	// Operation - READ-ONLY; The display name of the compute operation.
2261	Operation *string `json:"operation,omitempty"`
2262	// Resource - READ-ONLY; The display name of the resource the operation applies to.
2263	Resource *string `json:"resource,omitempty"`
2264	// Description - READ-ONLY; The description of the operation.
2265	Description *string `json:"description,omitempty"`
2266	// Provider - READ-ONLY; The resource provider for the operation.
2267	Provider *string `json:"provider,omitempty"`
2268}
2269
2270// OrchestratorProfile contains information about orchestrator.
2271type OrchestratorProfile struct {
2272	// OrchestratorType - Orchestrator type.
2273	OrchestratorType *string `json:"orchestratorType,omitempty"`
2274	// OrchestratorVersion - Orchestrator version (major, minor, patch).
2275	OrchestratorVersion *string `json:"orchestratorVersion,omitempty"`
2276	// IsPreview - Whether Kubernetes version is currently in preview.
2277	IsPreview *bool `json:"isPreview,omitempty"`
2278}
2279
2280// OrchestratorProfileType profile for the container service orchestrator.
2281type OrchestratorProfileType struct {
2282	// OrchestratorType - The orchestrator to use to manage container service cluster resources. Valid values are Kubernetes, Swarm, DCOS, DockerCE and Custom. Possible values include: 'Kubernetes', 'Swarm', 'DCOS', 'DockerCE', 'Custom'
2283	OrchestratorType OrchestratorTypes `json:"orchestratorType,omitempty"`
2284	// OrchestratorVersion - The version of the orchestrator to use. You can specify the major.minor.patch part of the actual version.For example, you can specify version as "1.6.11".
2285	OrchestratorVersion *string `json:"orchestratorVersion,omitempty"`
2286}
2287
2288// OrchestratorVersionProfile the profile of an orchestrator and its available versions.
2289type OrchestratorVersionProfile struct {
2290	// OrchestratorType - Orchestrator type.
2291	OrchestratorType *string `json:"orchestratorType,omitempty"`
2292	// OrchestratorVersion - Orchestrator version (major, minor, patch).
2293	OrchestratorVersion *string `json:"orchestratorVersion,omitempty"`
2294	// Default - Installed by default if version is not specified.
2295	Default *bool `json:"default,omitempty"`
2296	// IsPreview - Whether Kubernetes version is currently in preview.
2297	IsPreview *bool `json:"isPreview,omitempty"`
2298	// Upgrades - The list of available upgrade versions.
2299	Upgrades *[]OrchestratorProfile `json:"upgrades,omitempty"`
2300}
2301
2302// OrchestratorVersionProfileListResult the list of versions for supported orchestrators.
2303type OrchestratorVersionProfileListResult struct {
2304	autorest.Response `json:"-"`
2305	// ID - READ-ONLY; Id of the orchestrator version profile list result.
2306	ID *string `json:"id,omitempty"`
2307	// Name - READ-ONLY; Name of the orchestrator version profile list result.
2308	Name *string `json:"name,omitempty"`
2309	// Type - READ-ONLY; Type of the orchestrator version profile list result.
2310	Type *string `json:"type,omitempty"`
2311	// OrchestratorVersionProfileProperties - The properties of an orchestrator version profile.
2312	*OrchestratorVersionProfileProperties `json:"properties,omitempty"`
2313}
2314
2315// MarshalJSON is the custom marshaler for OrchestratorVersionProfileListResult.
2316func (ovplr OrchestratorVersionProfileListResult) MarshalJSON() ([]byte, error) {
2317	objectMap := make(map[string]interface{})
2318	if ovplr.OrchestratorVersionProfileProperties != nil {
2319		objectMap["properties"] = ovplr.OrchestratorVersionProfileProperties
2320	}
2321	return json.Marshal(objectMap)
2322}
2323
2324// UnmarshalJSON is the custom unmarshaler for OrchestratorVersionProfileListResult struct.
2325func (ovplr *OrchestratorVersionProfileListResult) UnmarshalJSON(body []byte) error {
2326	var m map[string]*json.RawMessage
2327	err := json.Unmarshal(body, &m)
2328	if err != nil {
2329		return err
2330	}
2331	for k, v := range m {
2332		switch k {
2333		case "id":
2334			if v != nil {
2335				var ID string
2336				err = json.Unmarshal(*v, &ID)
2337				if err != nil {
2338					return err
2339				}
2340				ovplr.ID = &ID
2341			}
2342		case "name":
2343			if v != nil {
2344				var name string
2345				err = json.Unmarshal(*v, &name)
2346				if err != nil {
2347					return err
2348				}
2349				ovplr.Name = &name
2350			}
2351		case "type":
2352			if v != nil {
2353				var typeVar string
2354				err = json.Unmarshal(*v, &typeVar)
2355				if err != nil {
2356					return err
2357				}
2358				ovplr.Type = &typeVar
2359			}
2360		case "properties":
2361			if v != nil {
2362				var orchestratorVersionProfileProperties OrchestratorVersionProfileProperties
2363				err = json.Unmarshal(*v, &orchestratorVersionProfileProperties)
2364				if err != nil {
2365					return err
2366				}
2367				ovplr.OrchestratorVersionProfileProperties = &orchestratorVersionProfileProperties
2368			}
2369		}
2370	}
2371
2372	return nil
2373}
2374
2375// OrchestratorVersionProfileProperties the properties of an orchestrator version profile.
2376type OrchestratorVersionProfileProperties struct {
2377	// Orchestrators - List of orchestrator version profiles.
2378	Orchestrators *[]OrchestratorVersionProfile `json:"orchestrators,omitempty"`
2379}
2380
2381// Properties properties of the container service.
2382type Properties struct {
2383	// ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response.
2384	ProvisioningState *string `json:"provisioningState,omitempty"`
2385	// OrchestratorProfile - Profile for the container service orchestrator.
2386	OrchestratorProfile *OrchestratorProfileType `json:"orchestratorProfile,omitempty"`
2387	// CustomProfile - Properties to configure a custom container service cluster.
2388	CustomProfile *CustomProfile `json:"customProfile,omitempty"`
2389	// ServicePrincipalProfile - Information about a service principal identity for the cluster to use for manipulating Azure APIs. Exact one of secret or keyVaultSecretRef need to be specified.
2390	ServicePrincipalProfile *ServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"`
2391	// MasterProfile - Profile for the container service master.
2392	MasterProfile *MasterProfile `json:"masterProfile,omitempty"`
2393	// AgentPoolProfiles - Properties of the agent pool.
2394	AgentPoolProfiles *[]AgentPoolProfile `json:"agentPoolProfiles,omitempty"`
2395	// WindowsProfile - Profile for Windows VMs in the container service cluster.
2396	WindowsProfile *WindowsProfile `json:"windowsProfile,omitempty"`
2397	// LinuxProfile - Profile for Linux VMs in the container service cluster.
2398	LinuxProfile *LinuxProfile `json:"linuxProfile,omitempty"`
2399	// DiagnosticsProfile - Profile for diagnostics in the container service cluster.
2400	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
2401}
2402
2403// MarshalJSON is the custom marshaler for Properties.
2404func (p Properties) MarshalJSON() ([]byte, error) {
2405	objectMap := make(map[string]interface{})
2406	if p.OrchestratorProfile != nil {
2407		objectMap["orchestratorProfile"] = p.OrchestratorProfile
2408	}
2409	if p.CustomProfile != nil {
2410		objectMap["customProfile"] = p.CustomProfile
2411	}
2412	if p.ServicePrincipalProfile != nil {
2413		objectMap["servicePrincipalProfile"] = p.ServicePrincipalProfile
2414	}
2415	if p.MasterProfile != nil {
2416		objectMap["masterProfile"] = p.MasterProfile
2417	}
2418	if p.AgentPoolProfiles != nil {
2419		objectMap["agentPoolProfiles"] = p.AgentPoolProfiles
2420	}
2421	if p.WindowsProfile != nil {
2422		objectMap["windowsProfile"] = p.WindowsProfile
2423	}
2424	if p.LinuxProfile != nil {
2425		objectMap["linuxProfile"] = p.LinuxProfile
2426	}
2427	if p.DiagnosticsProfile != nil {
2428		objectMap["diagnosticsProfile"] = p.DiagnosticsProfile
2429	}
2430	return json.Marshal(objectMap)
2431}
2432
2433// PurchasePlan used for establishing the purchase context of any 3rd Party artifact through MarketPlace.
2434type PurchasePlan struct {
2435	// Name - The plan ID.
2436	Name *string `json:"name,omitempty"`
2437	// Product - Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.
2438	Product *string `json:"product,omitempty"`
2439	// PromotionCode - The promotion code.
2440	PromotionCode *string `json:"promotionCode,omitempty"`
2441	// Publisher - The plan ID.
2442	Publisher *string `json:"publisher,omitempty"`
2443}
2444
2445// Resource the Resource model definition.
2446type Resource struct {
2447	// ID - READ-ONLY; Resource Id
2448	ID *string `json:"id,omitempty"`
2449	// Name - READ-ONLY; Resource name
2450	Name *string `json:"name,omitempty"`
2451	// Type - READ-ONLY; Resource type
2452	Type *string `json:"type,omitempty"`
2453	// Location - Resource location
2454	Location *string `json:"location,omitempty"`
2455	// Tags - Resource tags
2456	Tags map[string]*string `json:"tags"`
2457}
2458
2459// MarshalJSON is the custom marshaler for Resource.
2460func (r Resource) MarshalJSON() ([]byte, error) {
2461	objectMap := make(map[string]interface{})
2462	if r.Location != nil {
2463		objectMap["location"] = r.Location
2464	}
2465	if r.Tags != nil {
2466		objectMap["tags"] = r.Tags
2467	}
2468	return json.Marshal(objectMap)
2469}
2470
2471// ServicePrincipalProfile information about a service principal identity for the cluster to use for
2472// manipulating Azure APIs. Either secret or keyVaultSecretRef must be specified.
2473type ServicePrincipalProfile struct {
2474	// ClientID - The ID for the service principal.
2475	ClientID *string `json:"clientId,omitempty"`
2476	// Secret - The secret password associated with the service principal in plain text.
2477	Secret *string `json:"secret,omitempty"`
2478	// KeyVaultSecretRef - Reference to a secret stored in Azure Key Vault.
2479	KeyVaultSecretRef *KeyVaultSecretRef `json:"keyVaultSecretRef,omitempty"`
2480}
2481
2482// SSHConfiguration SSH configuration for Linux-based VMs running on Azure.
2483type SSHConfiguration struct {
2484	// PublicKeys - The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified.
2485	PublicKeys *[]SSHPublicKey `json:"publicKeys,omitempty"`
2486}
2487
2488// SSHPublicKey contains information about SSH certificate public key data.
2489type SSHPublicKey struct {
2490	// KeyData - Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers.
2491	KeyData *string `json:"keyData,omitempty"`
2492}
2493
2494// SubResource reference to another subresource.
2495type SubResource struct {
2496	// ID - READ-ONLY; Resource ID.
2497	ID *string `json:"id,omitempty"`
2498	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
2499	Name *string `json:"name,omitempty"`
2500	// Type - READ-ONLY; Resource type
2501	Type *string `json:"type,omitempty"`
2502}
2503
2504// TagsObject tags object for patch operations.
2505type TagsObject struct {
2506	// Tags - Resource tags.
2507	Tags map[string]*string `json:"tags"`
2508}
2509
2510// MarshalJSON is the custom marshaler for TagsObject.
2511func (toVar TagsObject) MarshalJSON() ([]byte, error) {
2512	objectMap := make(map[string]interface{})
2513	if toVar.Tags != nil {
2514		objectMap["tags"] = toVar.Tags
2515	}
2516	return json.Marshal(objectMap)
2517}
2518
2519// VMDiagnostics profile for diagnostics on the container service VMs.
2520type VMDiagnostics struct {
2521	// Enabled - Whether the VM diagnostic agent is provisioned on the VM.
2522	Enabled *bool `json:"enabled,omitempty"`
2523	// StorageURI - READ-ONLY; The URI of the storage account where diagnostics are stored.
2524	StorageURI *string `json:"storageUri,omitempty"`
2525}
2526
2527// MarshalJSON is the custom marshaler for VMDiagnostics.
2528func (vd VMDiagnostics) MarshalJSON() ([]byte, error) {
2529	objectMap := make(map[string]interface{})
2530	if vd.Enabled != nil {
2531		objectMap["enabled"] = vd.Enabled
2532	}
2533	return json.Marshal(objectMap)
2534}
2535
2536// WindowsProfile profile for Windows VMs in the container service cluster.
2537type WindowsProfile struct {
2538	// AdminUsername - The administrator username to use for Windows VMs.
2539	AdminUsername *string `json:"adminUsername,omitempty"`
2540	// AdminPassword - The administrator password to use for Windows VMs.
2541	AdminPassword *string `json:"adminPassword,omitempty"`
2542}
2543