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/2017-09-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// AgentPoolProfile profile for the container service agent pool.
40type AgentPoolProfile struct {
41	// Name - Unique name of the agent pool profile in the context of the subscription and resource group.
42	Name *string `json:"name,omitempty"`
43	// 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.
44	Count *int32 `json:"count,omitempty"`
45	// VMSize - Size of agent VMs. Possible values include: 'StandardA1', 'StandardA10', 'StandardA11', 'StandardA1V2', 'StandardA2', 'StandardA2V2', 'StandardA2mV2', 'StandardA3', 'StandardA4', 'StandardA4V2', 'StandardA4mV2', 'StandardA5', 'StandardA6', 'StandardA7', 'StandardA8', 'StandardA8V2', 'StandardA8mV2', 'StandardA9', 'StandardB2ms', 'StandardB2s', 'StandardB4ms', 'StandardB8ms', 'StandardD1', 'StandardD11', 'StandardD11V2', 'StandardD11V2Promo', 'StandardD12', 'StandardD12V2', 'StandardD12V2Promo', 'StandardD13', 'StandardD13V2', 'StandardD13V2Promo', 'StandardD14', 'StandardD14V2', 'StandardD14V2Promo', 'StandardD15V2', 'StandardD16V3', 'StandardD16sV3', 'StandardD1V2', 'StandardD2', 'StandardD2V2', 'StandardD2V2Promo', 'StandardD2V3', 'StandardD2sV3', 'StandardD3', 'StandardD32V3', 'StandardD32sV3', 'StandardD3V2', 'StandardD3V2Promo', 'StandardD4', 'StandardD4V2', 'StandardD4V2Promo', 'StandardD4V3', 'StandardD4sV3', 'StandardD5V2', 'StandardD5V2Promo', 'StandardD64V3', 'StandardD64sV3', 'StandardD8V3', 'StandardD8sV3', 'StandardDS1', 'StandardDS11', 'StandardDS11V2', 'StandardDS11V2Promo', 'StandardDS12', 'StandardDS12V2', 'StandardDS12V2Promo', 'StandardDS13', 'StandardDS132V2', 'StandardDS134V2', 'StandardDS13V2', 'StandardDS13V2Promo', 'StandardDS14', 'StandardDS144V2', 'StandardDS148V2', 'StandardDS14V2', 'StandardDS14V2Promo', 'StandardDS15V2', 'StandardDS1V2', 'StandardDS2', 'StandardDS2V2', 'StandardDS2V2Promo', 'StandardDS3', 'StandardDS3V2', 'StandardDS3V2Promo', 'StandardDS4', 'StandardDS4V2', 'StandardDS4V2Promo', 'StandardDS5V2', 'StandardDS5V2Promo', 'StandardE16V3', 'StandardE16sV3', 'StandardE2V3', 'StandardE2sV3', 'StandardE3216sV3', 'StandardE328sV3', 'StandardE32V3', 'StandardE32sV3', 'StandardE4V3', 'StandardE4sV3', 'StandardE6416sV3', 'StandardE6432sV3', 'StandardE64V3', 'StandardE64sV3', 'StandardE8V3', 'StandardE8sV3', 'StandardF1', 'StandardF16', 'StandardF16s', 'StandardF16sV2', 'StandardF1s', 'StandardF2', 'StandardF2s', 'StandardF2sV2', 'StandardF32sV2', 'StandardF4', 'StandardF4s', 'StandardF4sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8', 'StandardF8s', 'StandardF8sV2', 'StandardG1', 'StandardG2', 'StandardG3', 'StandardG4', 'StandardG5', 'StandardGS1', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS44', 'StandardGS48', 'StandardGS5', 'StandardGS516', 'StandardGS58', 'StandardH16', 'StandardH16m', 'StandardH16mr', 'StandardH16r', 'StandardH8', 'StandardH8m', 'StandardL16s', 'StandardL32s', 'StandardL4s', 'StandardL8s', 'StandardM12832ms', 'StandardM12864ms', 'StandardM128ms', 'StandardM128s', 'StandardM6416ms', 'StandardM6432ms', 'StandardM64ms', 'StandardM64s', 'StandardNC12', 'StandardNC12sV2', 'StandardNC12sV3', 'StandardNC24', 'StandardNC24r', 'StandardNC24rsV2', 'StandardNC24rsV3', 'StandardNC24sV2', 'StandardNC24sV3', 'StandardNC6', 'StandardNC6sV2', 'StandardNC6sV3', 'StandardND12s', 'StandardND24rs', 'StandardND24s', 'StandardND6s', 'StandardNV12', 'StandardNV24', 'StandardNV6'
46	VMSize VMSizeTypes `json:"vmSize,omitempty"`
47	// 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.
48	OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"`
49	// DNSPrefix - DNS prefix to be used to create the FQDN for the agent pool.
50	DNSPrefix *string `json:"dnsPrefix,omitempty"`
51	// Fqdn - READ-ONLY; FQDN for the agent pool.
52	Fqdn *string `json:"fqdn,omitempty"`
53	// Ports - Ports number array used to expose on this agent pool. The default opened ports are different based on your choice of orchestrator.
54	Ports *[]int32 `json:"ports,omitempty"`
55	// 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'
56	StorageProfile StorageProfileTypes `json:"storageProfile,omitempty"`
57	// VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier.
58	VnetSubnetID *string `json:"vnetSubnetID,omitempty"`
59	// OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'
60	OsType OSType `json:"osType,omitempty"`
61}
62
63// MarshalJSON is the custom marshaler for AgentPoolProfile.
64func (app AgentPoolProfile) MarshalJSON() ([]byte, error) {
65	objectMap := make(map[string]interface{})
66	if app.Name != nil {
67		objectMap["name"] = app.Name
68	}
69	if app.Count != nil {
70		objectMap["count"] = app.Count
71	}
72	if app.VMSize != "" {
73		objectMap["vmSize"] = app.VMSize
74	}
75	if app.OsDiskSizeGB != nil {
76		objectMap["osDiskSizeGB"] = app.OsDiskSizeGB
77	}
78	if app.DNSPrefix != nil {
79		objectMap["dnsPrefix"] = app.DNSPrefix
80	}
81	if app.Ports != nil {
82		objectMap["ports"] = app.Ports
83	}
84	if app.StorageProfile != "" {
85		objectMap["storageProfile"] = app.StorageProfile
86	}
87	if app.VnetSubnetID != nil {
88		objectMap["vnetSubnetID"] = app.VnetSubnetID
89	}
90	if app.OsType != "" {
91		objectMap["osType"] = app.OsType
92	}
93	return json.Marshal(objectMap)
94}
95
96// ContainerService container service.
97type ContainerService struct {
98	autorest.Response `json:"-"`
99	// Properties - Properties of the container service.
100	*Properties `json:"properties,omitempty"`
101	// ID - READ-ONLY; Resource Id
102	ID *string `json:"id,omitempty"`
103	// Name - READ-ONLY; Resource name
104	Name *string `json:"name,omitempty"`
105	// Type - READ-ONLY; Resource type
106	Type *string `json:"type,omitempty"`
107	// Location - Resource location
108	Location *string `json:"location,omitempty"`
109	// Tags - Resource tags
110	Tags map[string]*string `json:"tags"`
111}
112
113// MarshalJSON is the custom marshaler for ContainerService.
114func (cs ContainerService) MarshalJSON() ([]byte, error) {
115	objectMap := make(map[string]interface{})
116	if cs.Properties != nil {
117		objectMap["properties"] = cs.Properties
118	}
119	if cs.Location != nil {
120		objectMap["location"] = cs.Location
121	}
122	if cs.Tags != nil {
123		objectMap["tags"] = cs.Tags
124	}
125	return json.Marshal(objectMap)
126}
127
128// UnmarshalJSON is the custom unmarshaler for ContainerService struct.
129func (cs *ContainerService) UnmarshalJSON(body []byte) error {
130	var m map[string]*json.RawMessage
131	err := json.Unmarshal(body, &m)
132	if err != nil {
133		return err
134	}
135	for k, v := range m {
136		switch k {
137		case "properties":
138			if v != nil {
139				var properties Properties
140				err = json.Unmarshal(*v, &properties)
141				if err != nil {
142					return err
143				}
144				cs.Properties = &properties
145			}
146		case "id":
147			if v != nil {
148				var ID string
149				err = json.Unmarshal(*v, &ID)
150				if err != nil {
151					return err
152				}
153				cs.ID = &ID
154			}
155		case "name":
156			if v != nil {
157				var name string
158				err = json.Unmarshal(*v, &name)
159				if err != nil {
160					return err
161				}
162				cs.Name = &name
163			}
164		case "type":
165			if v != nil {
166				var typeVar string
167				err = json.Unmarshal(*v, &typeVar)
168				if err != nil {
169					return err
170				}
171				cs.Type = &typeVar
172			}
173		case "location":
174			if v != nil {
175				var location string
176				err = json.Unmarshal(*v, &location)
177				if err != nil {
178					return err
179				}
180				cs.Location = &location
181			}
182		case "tags":
183			if v != nil {
184				var tags map[string]*string
185				err = json.Unmarshal(*v, &tags)
186				if err != nil {
187					return err
188				}
189				cs.Tags = tags
190			}
191		}
192	}
193
194	return nil
195}
196
197// ContainerServicesCreateOrUpdateFutureType an abstraction for monitoring and retrieving the results of a
198// long-running operation.
199type ContainerServicesCreateOrUpdateFutureType struct {
200	azure.FutureAPI
201	// Result returns the result of the asynchronous operation.
202	// If the operation has not completed it will return an error.
203	Result func(ContainerServicesClient) (ContainerService, error)
204}
205
206// ContainerServicesDeleteFutureType an abstraction for monitoring and retrieving the results of a
207// long-running operation.
208type ContainerServicesDeleteFutureType struct {
209	azure.FutureAPI
210	// Result returns the result of the asynchronous operation.
211	// If the operation has not completed it will return an error.
212	Result func(ContainerServicesClient) (autorest.Response, error)
213}
214
215// CustomProfile properties to configure a custom container service cluster.
216type CustomProfile struct {
217	// Orchestrator - The name of the custom orchestrator to use.
218	Orchestrator *string `json:"orchestrator,omitempty"`
219}
220
221// DiagnosticsProfile profile for diagnostics on the container service cluster.
222type DiagnosticsProfile struct {
223	// VMDiagnostics - Profile for diagnostics on the container service VMs.
224	VMDiagnostics *VMDiagnostics `json:"vmDiagnostics,omitempty"`
225}
226
227// KeyVaultSecretRef reference to a secret stored in Azure Key Vault.
228type KeyVaultSecretRef struct {
229	// VaultID - Key vault identifier.
230	VaultID *string `json:"vaultID,omitempty"`
231	// SecretName - The secret name.
232	SecretName *string `json:"secretName,omitempty"`
233	// Version - The secret version.
234	Version *string `json:"version,omitempty"`
235}
236
237// LinuxProfile profile for Linux VMs in the container service cluster.
238type LinuxProfile struct {
239	// AdminUsername - The administrator username to use for Linux VMs.
240	AdminUsername *string `json:"adminUsername,omitempty"`
241	// SSH - SSH configuration for Linux-based VMs running on Azure.
242	SSH *SSHConfiguration `json:"ssh,omitempty"`
243}
244
245// ListResult the response from the List Container Services operation.
246type ListResult struct {
247	autorest.Response `json:"-"`
248	// Value - The list of container services.
249	Value *[]ContainerService `json:"value,omitempty"`
250	// NextLink - READ-ONLY; The URL to get the next set of container service results.
251	NextLink *string `json:"nextLink,omitempty"`
252}
253
254// MarshalJSON is the custom marshaler for ListResult.
255func (lr ListResult) MarshalJSON() ([]byte, error) {
256	objectMap := make(map[string]interface{})
257	if lr.Value != nil {
258		objectMap["value"] = lr.Value
259	}
260	return json.Marshal(objectMap)
261}
262
263// ListResultIterator provides access to a complete listing of ContainerService values.
264type ListResultIterator struct {
265	i    int
266	page ListResultPage
267}
268
269// NextWithContext advances to the next value.  If there was an error making
270// the request the iterator does not advance and the error is returned.
271func (iter *ListResultIterator) NextWithContext(ctx context.Context) (err error) {
272	if tracing.IsEnabled() {
273		ctx = tracing.StartSpan(ctx, fqdn+"/ListResultIterator.NextWithContext")
274		defer func() {
275			sc := -1
276			if iter.Response().Response.Response != nil {
277				sc = iter.Response().Response.Response.StatusCode
278			}
279			tracing.EndSpan(ctx, sc, err)
280		}()
281	}
282	iter.i++
283	if iter.i < len(iter.page.Values()) {
284		return nil
285	}
286	err = iter.page.NextWithContext(ctx)
287	if err != nil {
288		iter.i--
289		return err
290	}
291	iter.i = 0
292	return nil
293}
294
295// Next advances to the next value.  If there was an error making
296// the request the iterator does not advance and the error is returned.
297// Deprecated: Use NextWithContext() instead.
298func (iter *ListResultIterator) Next() error {
299	return iter.NextWithContext(context.Background())
300}
301
302// NotDone returns true if the enumeration should be started or is not yet complete.
303func (iter ListResultIterator) NotDone() bool {
304	return iter.page.NotDone() && iter.i < len(iter.page.Values())
305}
306
307// Response returns the raw server response from the last page request.
308func (iter ListResultIterator) Response() ListResult {
309	return iter.page.Response()
310}
311
312// Value returns the current value or a zero-initialized value if the
313// iterator has advanced beyond the end of the collection.
314func (iter ListResultIterator) Value() ContainerService {
315	if !iter.page.NotDone() {
316		return ContainerService{}
317	}
318	return iter.page.Values()[iter.i]
319}
320
321// Creates a new instance of the ListResultIterator type.
322func NewListResultIterator(page ListResultPage) ListResultIterator {
323	return ListResultIterator{page: page}
324}
325
326// IsEmpty returns true if the ListResult contains no values.
327func (lr ListResult) IsEmpty() bool {
328	return lr.Value == nil || len(*lr.Value) == 0
329}
330
331// hasNextLink returns true if the NextLink is not empty.
332func (lr ListResult) hasNextLink() bool {
333	return lr.NextLink != nil && len(*lr.NextLink) != 0
334}
335
336// listResultPreparer prepares a request to retrieve the next set of results.
337// It returns nil if no more results exist.
338func (lr ListResult) listResultPreparer(ctx context.Context) (*http.Request, error) {
339	if !lr.hasNextLink() {
340		return nil, nil
341	}
342	return autorest.Prepare((&http.Request{}).WithContext(ctx),
343		autorest.AsJSON(),
344		autorest.AsGet(),
345		autorest.WithBaseURL(to.String(lr.NextLink)))
346}
347
348// ListResultPage contains a page of ContainerService values.
349type ListResultPage struct {
350	fn func(context.Context, ListResult) (ListResult, error)
351	lr ListResult
352}
353
354// NextWithContext advances to the next page of values.  If there was an error making
355// the request the page does not advance and the error is returned.
356func (page *ListResultPage) NextWithContext(ctx context.Context) (err error) {
357	if tracing.IsEnabled() {
358		ctx = tracing.StartSpan(ctx, fqdn+"/ListResultPage.NextWithContext")
359		defer func() {
360			sc := -1
361			if page.Response().Response.Response != nil {
362				sc = page.Response().Response.Response.StatusCode
363			}
364			tracing.EndSpan(ctx, sc, err)
365		}()
366	}
367	for {
368		next, err := page.fn(ctx, page.lr)
369		if err != nil {
370			return err
371		}
372		page.lr = next
373		if !next.hasNextLink() || !next.IsEmpty() {
374			break
375		}
376	}
377	return nil
378}
379
380// Next advances to the next page of values.  If there was an error making
381// the request the page does not advance and the error is returned.
382// Deprecated: Use NextWithContext() instead.
383func (page *ListResultPage) Next() error {
384	return page.NextWithContext(context.Background())
385}
386
387// NotDone returns true if the page enumeration should be started or is not yet complete.
388func (page ListResultPage) NotDone() bool {
389	return !page.lr.IsEmpty()
390}
391
392// Response returns the raw server response from the last page request.
393func (page ListResultPage) Response() ListResult {
394	return page.lr
395}
396
397// Values returns the slice of values for the current page or nil if there are no values.
398func (page ListResultPage) Values() []ContainerService {
399	if page.lr.IsEmpty() {
400		return nil
401	}
402	return *page.lr.Value
403}
404
405// Creates a new instance of the ListResultPage type.
406func NewListResultPage(cur ListResult, getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage {
407	return ListResultPage{
408		fn: getNextPage,
409		lr: cur,
410	}
411}
412
413// ManagedCluster managed cluster.
414type ManagedCluster struct {
415	autorest.Response `json:"-"`
416	// ManagedClusterProperties - Properties of a managed cluster.
417	*ManagedClusterProperties `json:"properties,omitempty"`
418	// ID - READ-ONLY; Resource Id
419	ID *string `json:"id,omitempty"`
420	// Name - READ-ONLY; Resource name
421	Name *string `json:"name,omitempty"`
422	// Type - READ-ONLY; Resource type
423	Type *string `json:"type,omitempty"`
424	// Location - Resource location
425	Location *string `json:"location,omitempty"`
426	// Tags - Resource tags
427	Tags map[string]*string `json:"tags"`
428}
429
430// MarshalJSON is the custom marshaler for ManagedCluster.
431func (mc ManagedCluster) MarshalJSON() ([]byte, error) {
432	objectMap := make(map[string]interface{})
433	if mc.ManagedClusterProperties != nil {
434		objectMap["properties"] = mc.ManagedClusterProperties
435	}
436	if mc.Location != nil {
437		objectMap["location"] = mc.Location
438	}
439	if mc.Tags != nil {
440		objectMap["tags"] = mc.Tags
441	}
442	return json.Marshal(objectMap)
443}
444
445// UnmarshalJSON is the custom unmarshaler for ManagedCluster struct.
446func (mc *ManagedCluster) UnmarshalJSON(body []byte) error {
447	var m map[string]*json.RawMessage
448	err := json.Unmarshal(body, &m)
449	if err != nil {
450		return err
451	}
452	for k, v := range m {
453		switch k {
454		case "properties":
455			if v != nil {
456				var managedClusterProperties ManagedClusterProperties
457				err = json.Unmarshal(*v, &managedClusterProperties)
458				if err != nil {
459					return err
460				}
461				mc.ManagedClusterProperties = &managedClusterProperties
462			}
463		case "id":
464			if v != nil {
465				var ID string
466				err = json.Unmarshal(*v, &ID)
467				if err != nil {
468					return err
469				}
470				mc.ID = &ID
471			}
472		case "name":
473			if v != nil {
474				var name string
475				err = json.Unmarshal(*v, &name)
476				if err != nil {
477					return err
478				}
479				mc.Name = &name
480			}
481		case "type":
482			if v != nil {
483				var typeVar string
484				err = json.Unmarshal(*v, &typeVar)
485				if err != nil {
486					return err
487				}
488				mc.Type = &typeVar
489			}
490		case "location":
491			if v != nil {
492				var location string
493				err = json.Unmarshal(*v, &location)
494				if err != nil {
495					return err
496				}
497				mc.Location = &location
498			}
499		case "tags":
500			if v != nil {
501				var tags map[string]*string
502				err = json.Unmarshal(*v, &tags)
503				if err != nil {
504					return err
505				}
506				mc.Tags = tags
507			}
508		}
509	}
510
511	return nil
512}
513
514// ManagedClusterAccessProfile managed cluster Access Profile.
515type ManagedClusterAccessProfile struct {
516	autorest.Response `json:"-"`
517	// AccessProfile - AccessProfile of a managed cluster.
518	*AccessProfile `json:"properties,omitempty"`
519	// ID - READ-ONLY; Resource Id
520	ID *string `json:"id,omitempty"`
521	// Name - READ-ONLY; Resource name
522	Name *string `json:"name,omitempty"`
523	// Type - READ-ONLY; Resource type
524	Type *string `json:"type,omitempty"`
525	// Location - Resource location
526	Location *string `json:"location,omitempty"`
527	// Tags - Resource tags
528	Tags map[string]*string `json:"tags"`
529}
530
531// MarshalJSON is the custom marshaler for ManagedClusterAccessProfile.
532func (mcap ManagedClusterAccessProfile) MarshalJSON() ([]byte, error) {
533	objectMap := make(map[string]interface{})
534	if mcap.AccessProfile != nil {
535		objectMap["properties"] = mcap.AccessProfile
536	}
537	if mcap.Location != nil {
538		objectMap["location"] = mcap.Location
539	}
540	if mcap.Tags != nil {
541		objectMap["tags"] = mcap.Tags
542	}
543	return json.Marshal(objectMap)
544}
545
546// UnmarshalJSON is the custom unmarshaler for ManagedClusterAccessProfile struct.
547func (mcap *ManagedClusterAccessProfile) UnmarshalJSON(body []byte) error {
548	var m map[string]*json.RawMessage
549	err := json.Unmarshal(body, &m)
550	if err != nil {
551		return err
552	}
553	for k, v := range m {
554		switch k {
555		case "properties":
556			if v != nil {
557				var accessProfile AccessProfile
558				err = json.Unmarshal(*v, &accessProfile)
559				if err != nil {
560					return err
561				}
562				mcap.AccessProfile = &accessProfile
563			}
564		case "id":
565			if v != nil {
566				var ID string
567				err = json.Unmarshal(*v, &ID)
568				if err != nil {
569					return err
570				}
571				mcap.ID = &ID
572			}
573		case "name":
574			if v != nil {
575				var name string
576				err = json.Unmarshal(*v, &name)
577				if err != nil {
578					return err
579				}
580				mcap.Name = &name
581			}
582		case "type":
583			if v != nil {
584				var typeVar string
585				err = json.Unmarshal(*v, &typeVar)
586				if err != nil {
587					return err
588				}
589				mcap.Type = &typeVar
590			}
591		case "location":
592			if v != nil {
593				var location string
594				err = json.Unmarshal(*v, &location)
595				if err != nil {
596					return err
597				}
598				mcap.Location = &location
599			}
600		case "tags":
601			if v != nil {
602				var tags map[string]*string
603				err = json.Unmarshal(*v, &tags)
604				if err != nil {
605					return err
606				}
607				mcap.Tags = tags
608			}
609		}
610	}
611
612	return nil
613}
614
615// ManagedClusterListResult the response from the List Managed Clusters operation.
616type ManagedClusterListResult struct {
617	autorest.Response `json:"-"`
618	// Value - The list of managed clusters.
619	Value *[]ManagedCluster `json:"value,omitempty"`
620	// NextLink - READ-ONLY; The URL to get the next set of managed cluster results.
621	NextLink *string `json:"nextLink,omitempty"`
622}
623
624// MarshalJSON is the custom marshaler for ManagedClusterListResult.
625func (mclr ManagedClusterListResult) MarshalJSON() ([]byte, error) {
626	objectMap := make(map[string]interface{})
627	if mclr.Value != nil {
628		objectMap["value"] = mclr.Value
629	}
630	return json.Marshal(objectMap)
631}
632
633// ManagedClusterListResultIterator provides access to a complete listing of ManagedCluster values.
634type ManagedClusterListResultIterator struct {
635	i    int
636	page ManagedClusterListResultPage
637}
638
639// NextWithContext advances to the next value.  If there was an error making
640// the request the iterator does not advance and the error is returned.
641func (iter *ManagedClusterListResultIterator) NextWithContext(ctx context.Context) (err error) {
642	if tracing.IsEnabled() {
643		ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClusterListResultIterator.NextWithContext")
644		defer func() {
645			sc := -1
646			if iter.Response().Response.Response != nil {
647				sc = iter.Response().Response.Response.StatusCode
648			}
649			tracing.EndSpan(ctx, sc, err)
650		}()
651	}
652	iter.i++
653	if iter.i < len(iter.page.Values()) {
654		return nil
655	}
656	err = iter.page.NextWithContext(ctx)
657	if err != nil {
658		iter.i--
659		return err
660	}
661	iter.i = 0
662	return nil
663}
664
665// Next advances to the next value.  If there was an error making
666// the request the iterator does not advance and the error is returned.
667// Deprecated: Use NextWithContext() instead.
668func (iter *ManagedClusterListResultIterator) Next() error {
669	return iter.NextWithContext(context.Background())
670}
671
672// NotDone returns true if the enumeration should be started or is not yet complete.
673func (iter ManagedClusterListResultIterator) NotDone() bool {
674	return iter.page.NotDone() && iter.i < len(iter.page.Values())
675}
676
677// Response returns the raw server response from the last page request.
678func (iter ManagedClusterListResultIterator) Response() ManagedClusterListResult {
679	return iter.page.Response()
680}
681
682// Value returns the current value or a zero-initialized value if the
683// iterator has advanced beyond the end of the collection.
684func (iter ManagedClusterListResultIterator) Value() ManagedCluster {
685	if !iter.page.NotDone() {
686		return ManagedCluster{}
687	}
688	return iter.page.Values()[iter.i]
689}
690
691// Creates a new instance of the ManagedClusterListResultIterator type.
692func NewManagedClusterListResultIterator(page ManagedClusterListResultPage) ManagedClusterListResultIterator {
693	return ManagedClusterListResultIterator{page: page}
694}
695
696// IsEmpty returns true if the ListResult contains no values.
697func (mclr ManagedClusterListResult) IsEmpty() bool {
698	return mclr.Value == nil || len(*mclr.Value) == 0
699}
700
701// hasNextLink returns true if the NextLink is not empty.
702func (mclr ManagedClusterListResult) hasNextLink() bool {
703	return mclr.NextLink != nil && len(*mclr.NextLink) != 0
704}
705
706// managedClusterListResultPreparer prepares a request to retrieve the next set of results.
707// It returns nil if no more results exist.
708func (mclr ManagedClusterListResult) managedClusterListResultPreparer(ctx context.Context) (*http.Request, error) {
709	if !mclr.hasNextLink() {
710		return nil, nil
711	}
712	return autorest.Prepare((&http.Request{}).WithContext(ctx),
713		autorest.AsJSON(),
714		autorest.AsGet(),
715		autorest.WithBaseURL(to.String(mclr.NextLink)))
716}
717
718// ManagedClusterListResultPage contains a page of ManagedCluster values.
719type ManagedClusterListResultPage struct {
720	fn   func(context.Context, ManagedClusterListResult) (ManagedClusterListResult, error)
721	mclr ManagedClusterListResult
722}
723
724// NextWithContext advances to the next page of values.  If there was an error making
725// the request the page does not advance and the error is returned.
726func (page *ManagedClusterListResultPage) NextWithContext(ctx context.Context) (err error) {
727	if tracing.IsEnabled() {
728		ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClusterListResultPage.NextWithContext")
729		defer func() {
730			sc := -1
731			if page.Response().Response.Response != nil {
732				sc = page.Response().Response.Response.StatusCode
733			}
734			tracing.EndSpan(ctx, sc, err)
735		}()
736	}
737	for {
738		next, err := page.fn(ctx, page.mclr)
739		if err != nil {
740			return err
741		}
742		page.mclr = next
743		if !next.hasNextLink() || !next.IsEmpty() {
744			break
745		}
746	}
747	return nil
748}
749
750// Next advances to the next page of values.  If there was an error making
751// the request the page does not advance and the error is returned.
752// Deprecated: Use NextWithContext() instead.
753func (page *ManagedClusterListResultPage) Next() error {
754	return page.NextWithContext(context.Background())
755}
756
757// NotDone returns true if the page enumeration should be started or is not yet complete.
758func (page ManagedClusterListResultPage) NotDone() bool {
759	return !page.mclr.IsEmpty()
760}
761
762// Response returns the raw server response from the last page request.
763func (page ManagedClusterListResultPage) Response() ManagedClusterListResult {
764	return page.mclr
765}
766
767// Values returns the slice of values for the current page or nil if there are no values.
768func (page ManagedClusterListResultPage) Values() []ManagedCluster {
769	if page.mclr.IsEmpty() {
770		return nil
771	}
772	return *page.mclr.Value
773}
774
775// Creates a new instance of the ManagedClusterListResultPage type.
776func NewManagedClusterListResultPage(cur ManagedClusterListResult, getNextPage func(context.Context, ManagedClusterListResult) (ManagedClusterListResult, error)) ManagedClusterListResultPage {
777	return ManagedClusterListResultPage{
778		fn:   getNextPage,
779		mclr: cur,
780	}
781}
782
783// ManagedClusterPoolUpgradeProfile the list of available upgrade versions.
784type ManagedClusterPoolUpgradeProfile struct {
785	// KubernetesVersion - Kubernetes version (major, minor, patch).
786	KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
787	// Name - Pool name.
788	Name *string `json:"name,omitempty"`
789	// OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'
790	OsType OSType `json:"osType,omitempty"`
791	// Upgrades - List of orchestrator types and versions available for upgrade.
792	Upgrades *[]string `json:"upgrades,omitempty"`
793}
794
795// ManagedClusterProperties properties of the managed cluster.
796type ManagedClusterProperties struct {
797	// ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response.
798	ProvisioningState *string `json:"provisioningState,omitempty"`
799	// DNSPrefix - DNS prefix specified when creating the managed cluster.
800	DNSPrefix *string `json:"dnsPrefix,omitempty"`
801	// Fqdn - READ-ONLY; FQDN for the master pool.
802	Fqdn *string `json:"fqdn,omitempty"`
803	// KubernetesVersion - Version of Kubernetes specified when creating the managed cluster.
804	KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
805	// AgentPoolProfiles - Properties of the agent pool.
806	AgentPoolProfiles *[]AgentPoolProfile `json:"agentPoolProfiles,omitempty"`
807	// LinuxProfile - Profile for Linux VMs in the container service cluster.
808	LinuxProfile *LinuxProfile `json:"linuxProfile,omitempty"`
809	// ServicePrincipalProfile - Information about a service principal identity for the cluster to use for manipulating Azure APIs. Either secret or keyVaultSecretRef must be specified.
810	ServicePrincipalProfile *ServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"`
811}
812
813// MarshalJSON is the custom marshaler for ManagedClusterProperties.
814func (mcp ManagedClusterProperties) MarshalJSON() ([]byte, error) {
815	objectMap := make(map[string]interface{})
816	if mcp.DNSPrefix != nil {
817		objectMap["dnsPrefix"] = mcp.DNSPrefix
818	}
819	if mcp.KubernetesVersion != nil {
820		objectMap["kubernetesVersion"] = mcp.KubernetesVersion
821	}
822	if mcp.AgentPoolProfiles != nil {
823		objectMap["agentPoolProfiles"] = mcp.AgentPoolProfiles
824	}
825	if mcp.LinuxProfile != nil {
826		objectMap["linuxProfile"] = mcp.LinuxProfile
827	}
828	if mcp.ServicePrincipalProfile != nil {
829		objectMap["servicePrincipalProfile"] = mcp.ServicePrincipalProfile
830	}
831	return json.Marshal(objectMap)
832}
833
834// ManagedClustersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
835// long-running operation.
836type ManagedClustersCreateOrUpdateFuture struct {
837	azure.FutureAPI
838	// Result returns the result of the asynchronous operation.
839	// If the operation has not completed it will return an error.
840	Result func(ManagedClustersClient) (ManagedCluster, error)
841}
842
843// ManagedClustersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
844// operation.
845type ManagedClustersDeleteFuture struct {
846	azure.FutureAPI
847	// Result returns the result of the asynchronous operation.
848	// If the operation has not completed it will return an error.
849	Result func(ManagedClustersClient) (autorest.Response, error)
850}
851
852// ManagedClusterUpgradeProfile the list of available upgrades for compute pools.
853type ManagedClusterUpgradeProfile struct {
854	autorest.Response `json:"-"`
855	// ID - READ-ONLY; Id of upgrade profile.
856	ID *string `json:"id,omitempty"`
857	// Name - READ-ONLY; Name of upgrade profile.
858	Name *string `json:"name,omitempty"`
859	// Type - READ-ONLY; Type of upgrade profile.
860	Type *string `json:"type,omitempty"`
861	// ManagedClusterUpgradeProfileProperties - Properties of upgrade profile.
862	*ManagedClusterUpgradeProfileProperties `json:"properties,omitempty"`
863}
864
865// MarshalJSON is the custom marshaler for ManagedClusterUpgradeProfile.
866func (mcup ManagedClusterUpgradeProfile) MarshalJSON() ([]byte, error) {
867	objectMap := make(map[string]interface{})
868	if mcup.ManagedClusterUpgradeProfileProperties != nil {
869		objectMap["properties"] = mcup.ManagedClusterUpgradeProfileProperties
870	}
871	return json.Marshal(objectMap)
872}
873
874// UnmarshalJSON is the custom unmarshaler for ManagedClusterUpgradeProfile struct.
875func (mcup *ManagedClusterUpgradeProfile) UnmarshalJSON(body []byte) error {
876	var m map[string]*json.RawMessage
877	err := json.Unmarshal(body, &m)
878	if err != nil {
879		return err
880	}
881	for k, v := range m {
882		switch k {
883		case "id":
884			if v != nil {
885				var ID string
886				err = json.Unmarshal(*v, &ID)
887				if err != nil {
888					return err
889				}
890				mcup.ID = &ID
891			}
892		case "name":
893			if v != nil {
894				var name string
895				err = json.Unmarshal(*v, &name)
896				if err != nil {
897					return err
898				}
899				mcup.Name = &name
900			}
901		case "type":
902			if v != nil {
903				var typeVar string
904				err = json.Unmarshal(*v, &typeVar)
905				if err != nil {
906					return err
907				}
908				mcup.Type = &typeVar
909			}
910		case "properties":
911			if v != nil {
912				var managedClusterUpgradeProfileProperties ManagedClusterUpgradeProfileProperties
913				err = json.Unmarshal(*v, &managedClusterUpgradeProfileProperties)
914				if err != nil {
915					return err
916				}
917				mcup.ManagedClusterUpgradeProfileProperties = &managedClusterUpgradeProfileProperties
918			}
919		}
920	}
921
922	return nil
923}
924
925// ManagedClusterUpgradeProfileProperties control plane and agent pool upgrade profiles.
926type ManagedClusterUpgradeProfileProperties struct {
927	// ControlPlaneProfile - The list of available upgrade versions for the control plane.
928	ControlPlaneProfile *ManagedClusterPoolUpgradeProfile `json:"controlPlaneProfile,omitempty"`
929	// AgentPoolProfiles - The list of available upgrade versions for agent pools.
930	AgentPoolProfiles *[]ManagedClusterPoolUpgradeProfile `json:"agentPoolProfiles,omitempty"`
931}
932
933// MasterProfile profile for the container service master.
934type MasterProfile struct {
935	// Count - Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1.
936	Count *int32 `json:"count,omitempty"`
937	// DNSPrefix - DNS prefix to be used to create the FQDN for the master pool.
938	DNSPrefix *string `json:"dnsPrefix,omitempty"`
939	// VMSize - Size of agent VMs. Possible values include: 'StandardA1', 'StandardA10', 'StandardA11', 'StandardA1V2', 'StandardA2', 'StandardA2V2', 'StandardA2mV2', 'StandardA3', 'StandardA4', 'StandardA4V2', 'StandardA4mV2', 'StandardA5', 'StandardA6', 'StandardA7', 'StandardA8', 'StandardA8V2', 'StandardA8mV2', 'StandardA9', 'StandardB2ms', 'StandardB2s', 'StandardB4ms', 'StandardB8ms', 'StandardD1', 'StandardD11', 'StandardD11V2', 'StandardD11V2Promo', 'StandardD12', 'StandardD12V2', 'StandardD12V2Promo', 'StandardD13', 'StandardD13V2', 'StandardD13V2Promo', 'StandardD14', 'StandardD14V2', 'StandardD14V2Promo', 'StandardD15V2', 'StandardD16V3', 'StandardD16sV3', 'StandardD1V2', 'StandardD2', 'StandardD2V2', 'StandardD2V2Promo', 'StandardD2V3', 'StandardD2sV3', 'StandardD3', 'StandardD32V3', 'StandardD32sV3', 'StandardD3V2', 'StandardD3V2Promo', 'StandardD4', 'StandardD4V2', 'StandardD4V2Promo', 'StandardD4V3', 'StandardD4sV3', 'StandardD5V2', 'StandardD5V2Promo', 'StandardD64V3', 'StandardD64sV3', 'StandardD8V3', 'StandardD8sV3', 'StandardDS1', 'StandardDS11', 'StandardDS11V2', 'StandardDS11V2Promo', 'StandardDS12', 'StandardDS12V2', 'StandardDS12V2Promo', 'StandardDS13', 'StandardDS132V2', 'StandardDS134V2', 'StandardDS13V2', 'StandardDS13V2Promo', 'StandardDS14', 'StandardDS144V2', 'StandardDS148V2', 'StandardDS14V2', 'StandardDS14V2Promo', 'StandardDS15V2', 'StandardDS1V2', 'StandardDS2', 'StandardDS2V2', 'StandardDS2V2Promo', 'StandardDS3', 'StandardDS3V2', 'StandardDS3V2Promo', 'StandardDS4', 'StandardDS4V2', 'StandardDS4V2Promo', 'StandardDS5V2', 'StandardDS5V2Promo', 'StandardE16V3', 'StandardE16sV3', 'StandardE2V3', 'StandardE2sV3', 'StandardE3216sV3', 'StandardE328sV3', 'StandardE32V3', 'StandardE32sV3', 'StandardE4V3', 'StandardE4sV3', 'StandardE6416sV3', 'StandardE6432sV3', 'StandardE64V3', 'StandardE64sV3', 'StandardE8V3', 'StandardE8sV3', 'StandardF1', 'StandardF16', 'StandardF16s', 'StandardF16sV2', 'StandardF1s', 'StandardF2', 'StandardF2s', 'StandardF2sV2', 'StandardF32sV2', 'StandardF4', 'StandardF4s', 'StandardF4sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8', 'StandardF8s', 'StandardF8sV2', 'StandardG1', 'StandardG2', 'StandardG3', 'StandardG4', 'StandardG5', 'StandardGS1', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS44', 'StandardGS48', 'StandardGS5', 'StandardGS516', 'StandardGS58', 'StandardH16', 'StandardH16m', 'StandardH16mr', 'StandardH16r', 'StandardH8', 'StandardH8m', 'StandardL16s', 'StandardL32s', 'StandardL4s', 'StandardL8s', 'StandardM12832ms', 'StandardM12864ms', 'StandardM128ms', 'StandardM128s', 'StandardM6416ms', 'StandardM6432ms', 'StandardM64ms', 'StandardM64s', 'StandardNC12', 'StandardNC12sV2', 'StandardNC12sV3', 'StandardNC24', 'StandardNC24r', 'StandardNC24rsV2', 'StandardNC24rsV3', 'StandardNC24sV2', 'StandardNC24sV3', 'StandardNC6', 'StandardNC6sV2', 'StandardNC6sV3', 'StandardND12s', 'StandardND24rs', 'StandardND24s', 'StandardND6s', 'StandardNV12', 'StandardNV24', 'StandardNV6'
940	VMSize VMSizeTypes `json:"vmSize,omitempty"`
941	// 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.
942	OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"`
943	// VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier.
944	VnetSubnetID *string `json:"vnetSubnetID,omitempty"`
945	// FirstConsecutiveStaticIP - FirstConsecutiveStaticIP used to specify the first static ip of masters.
946	FirstConsecutiveStaticIP *string `json:"firstConsecutiveStaticIP,omitempty"`
947	// 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'
948	StorageProfile StorageProfileTypes `json:"storageProfile,omitempty"`
949	// Fqdn - READ-ONLY; FQDN for the master pool.
950	Fqdn *string `json:"fqdn,omitempty"`
951}
952
953// MarshalJSON is the custom marshaler for MasterProfile.
954func (mp MasterProfile) MarshalJSON() ([]byte, error) {
955	objectMap := make(map[string]interface{})
956	if mp.Count != nil {
957		objectMap["count"] = mp.Count
958	}
959	if mp.DNSPrefix != nil {
960		objectMap["dnsPrefix"] = mp.DNSPrefix
961	}
962	if mp.VMSize != "" {
963		objectMap["vmSize"] = mp.VMSize
964	}
965	if mp.OsDiskSizeGB != nil {
966		objectMap["osDiskSizeGB"] = mp.OsDiskSizeGB
967	}
968	if mp.VnetSubnetID != nil {
969		objectMap["vnetSubnetID"] = mp.VnetSubnetID
970	}
971	if mp.FirstConsecutiveStaticIP != nil {
972		objectMap["firstConsecutiveStaticIP"] = mp.FirstConsecutiveStaticIP
973	}
974	if mp.StorageProfile != "" {
975		objectMap["storageProfile"] = mp.StorageProfile
976	}
977	return json.Marshal(objectMap)
978}
979
980// OrchestratorProfile contains information about orchestrator.
981type OrchestratorProfile struct {
982	// OrchestratorType - Orchestrator type.
983	OrchestratorType *string `json:"orchestratorType,omitempty"`
984	// OrchestratorVersion - Orchestrator version (major, minor, patch).
985	OrchestratorVersion *string `json:"orchestratorVersion,omitempty"`
986}
987
988// OrchestratorProfileType profile for the container service orchestrator.
989type OrchestratorProfileType struct {
990	// 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'
991	OrchestratorType OrchestratorTypes `json:"orchestratorType,omitempty"`
992	// 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".
993	OrchestratorVersion *string `json:"orchestratorVersion,omitempty"`
994}
995
996// OrchestratorVersionProfile the profile of an orchestrator and its available versions.
997type OrchestratorVersionProfile struct {
998	// OrchestratorType - Orchestrator type.
999	OrchestratorType *string `json:"orchestratorType,omitempty"`
1000	// OrchestratorVersion - Orchestrator version (major, minor, patch).
1001	OrchestratorVersion *string `json:"orchestratorVersion,omitempty"`
1002	// Default - Installed by default if version is not specified.
1003	Default *bool `json:"default,omitempty"`
1004	// Upgrades - The list of available upgrade versions.
1005	Upgrades *[]OrchestratorProfile `json:"upgrades,omitempty"`
1006}
1007
1008// OrchestratorVersionProfileListResult the list of versions for supported orchestrators.
1009type OrchestratorVersionProfileListResult struct {
1010	autorest.Response `json:"-"`
1011	// ID - READ-ONLY; Id of the orchestrator version profile list result.
1012	ID *string `json:"id,omitempty"`
1013	// Name - READ-ONLY; Name of the orchestrator version profile list result.
1014	Name *string `json:"name,omitempty"`
1015	// Type - READ-ONLY; Type of the orchestrator version profile list result.
1016	Type *string `json:"type,omitempty"`
1017	// OrchestratorVersionProfileProperties - The properties of an orchestrator version profile.
1018	*OrchestratorVersionProfileProperties `json:"properties,omitempty"`
1019}
1020
1021// MarshalJSON is the custom marshaler for OrchestratorVersionProfileListResult.
1022func (ovplr OrchestratorVersionProfileListResult) MarshalJSON() ([]byte, error) {
1023	objectMap := make(map[string]interface{})
1024	if ovplr.OrchestratorVersionProfileProperties != nil {
1025		objectMap["properties"] = ovplr.OrchestratorVersionProfileProperties
1026	}
1027	return json.Marshal(objectMap)
1028}
1029
1030// UnmarshalJSON is the custom unmarshaler for OrchestratorVersionProfileListResult struct.
1031func (ovplr *OrchestratorVersionProfileListResult) UnmarshalJSON(body []byte) error {
1032	var m map[string]*json.RawMessage
1033	err := json.Unmarshal(body, &m)
1034	if err != nil {
1035		return err
1036	}
1037	for k, v := range m {
1038		switch k {
1039		case "id":
1040			if v != nil {
1041				var ID string
1042				err = json.Unmarshal(*v, &ID)
1043				if err != nil {
1044					return err
1045				}
1046				ovplr.ID = &ID
1047			}
1048		case "name":
1049			if v != nil {
1050				var name string
1051				err = json.Unmarshal(*v, &name)
1052				if err != nil {
1053					return err
1054				}
1055				ovplr.Name = &name
1056			}
1057		case "type":
1058			if v != nil {
1059				var typeVar string
1060				err = json.Unmarshal(*v, &typeVar)
1061				if err != nil {
1062					return err
1063				}
1064				ovplr.Type = &typeVar
1065			}
1066		case "properties":
1067			if v != nil {
1068				var orchestratorVersionProfileProperties OrchestratorVersionProfileProperties
1069				err = json.Unmarshal(*v, &orchestratorVersionProfileProperties)
1070				if err != nil {
1071					return err
1072				}
1073				ovplr.OrchestratorVersionProfileProperties = &orchestratorVersionProfileProperties
1074			}
1075		}
1076	}
1077
1078	return nil
1079}
1080
1081// OrchestratorVersionProfileProperties the properties of an orchestrator version profile.
1082type OrchestratorVersionProfileProperties struct {
1083	// Orchestrators - List of orchestrator version profiles.
1084	Orchestrators *[]OrchestratorVersionProfile `json:"orchestrators,omitempty"`
1085}
1086
1087// Properties properties of the container service.
1088type Properties struct {
1089	// ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response.
1090	ProvisioningState *string `json:"provisioningState,omitempty"`
1091	// OrchestratorProfile - Profile for the container service orchestrator.
1092	OrchestratorProfile *OrchestratorProfileType `json:"orchestratorProfile,omitempty"`
1093	// CustomProfile - Properties to configure a custom container service cluster.
1094	CustomProfile *CustomProfile `json:"customProfile,omitempty"`
1095	// 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.
1096	ServicePrincipalProfile *ServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"`
1097	// MasterProfile - Profile for the container service master.
1098	MasterProfile *MasterProfile `json:"masterProfile,omitempty"`
1099	// AgentPoolProfiles - Properties of the agent pool.
1100	AgentPoolProfiles *[]AgentPoolProfile `json:"agentPoolProfiles,omitempty"`
1101	// WindowsProfile - Profile for Windows VMs in the container service cluster.
1102	WindowsProfile *WindowsProfile `json:"windowsProfile,omitempty"`
1103	// LinuxProfile - Profile for Linux VMs in the container service cluster.
1104	LinuxProfile *LinuxProfile `json:"linuxProfile,omitempty"`
1105	// DiagnosticsProfile - Profile for diagnostics in the container service cluster.
1106	DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
1107}
1108
1109// MarshalJSON is the custom marshaler for Properties.
1110func (p Properties) MarshalJSON() ([]byte, error) {
1111	objectMap := make(map[string]interface{})
1112	if p.OrchestratorProfile != nil {
1113		objectMap["orchestratorProfile"] = p.OrchestratorProfile
1114	}
1115	if p.CustomProfile != nil {
1116		objectMap["customProfile"] = p.CustomProfile
1117	}
1118	if p.ServicePrincipalProfile != nil {
1119		objectMap["servicePrincipalProfile"] = p.ServicePrincipalProfile
1120	}
1121	if p.MasterProfile != nil {
1122		objectMap["masterProfile"] = p.MasterProfile
1123	}
1124	if p.AgentPoolProfiles != nil {
1125		objectMap["agentPoolProfiles"] = p.AgentPoolProfiles
1126	}
1127	if p.WindowsProfile != nil {
1128		objectMap["windowsProfile"] = p.WindowsProfile
1129	}
1130	if p.LinuxProfile != nil {
1131		objectMap["linuxProfile"] = p.LinuxProfile
1132	}
1133	if p.DiagnosticsProfile != nil {
1134		objectMap["diagnosticsProfile"] = p.DiagnosticsProfile
1135	}
1136	return json.Marshal(objectMap)
1137}
1138
1139// Resource the Resource model definition.
1140type Resource struct {
1141	// ID - READ-ONLY; Resource Id
1142	ID *string `json:"id,omitempty"`
1143	// Name - READ-ONLY; Resource name
1144	Name *string `json:"name,omitempty"`
1145	// Type - READ-ONLY; Resource type
1146	Type *string `json:"type,omitempty"`
1147	// Location - Resource location
1148	Location *string `json:"location,omitempty"`
1149	// Tags - Resource tags
1150	Tags map[string]*string `json:"tags"`
1151}
1152
1153// MarshalJSON is the custom marshaler for Resource.
1154func (r Resource) MarshalJSON() ([]byte, error) {
1155	objectMap := make(map[string]interface{})
1156	if r.Location != nil {
1157		objectMap["location"] = r.Location
1158	}
1159	if r.Tags != nil {
1160		objectMap["tags"] = r.Tags
1161	}
1162	return json.Marshal(objectMap)
1163}
1164
1165// ServicePrincipalProfile information about a service principal identity for the cluster to use for
1166// manipulating Azure APIs. Either secret or keyVaultSecretRef must be specified.
1167type ServicePrincipalProfile struct {
1168	// ClientID - The ID for the service principal.
1169	ClientID *string `json:"clientId,omitempty"`
1170	// Secret - The secret password associated with the service principal in plain text.
1171	Secret *string `json:"secret,omitempty"`
1172	// KeyVaultSecretRef - Reference to a secret stored in Azure Key Vault.
1173	KeyVaultSecretRef *KeyVaultSecretRef `json:"keyVaultSecretRef,omitempty"`
1174}
1175
1176// SSHConfiguration SSH configuration for Linux-based VMs running on Azure.
1177type SSHConfiguration struct {
1178	// PublicKeys - The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified.
1179	PublicKeys *[]SSHPublicKey `json:"publicKeys,omitempty"`
1180}
1181
1182// SSHPublicKey contains information about SSH certificate public key data.
1183type SSHPublicKey struct {
1184	// KeyData - Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers.
1185	KeyData *string `json:"keyData,omitempty"`
1186}
1187
1188// VMDiagnostics profile for diagnostics on the container service VMs.
1189type VMDiagnostics struct {
1190	// Enabled - Whether the VM diagnostic agent is provisioned on the VM.
1191	Enabled *bool `json:"enabled,omitempty"`
1192	// StorageURI - READ-ONLY; The URI of the storage account where diagnostics are stored.
1193	StorageURI *string `json:"storageUri,omitempty"`
1194}
1195
1196// MarshalJSON is the custom marshaler for VMDiagnostics.
1197func (vd VMDiagnostics) MarshalJSON() ([]byte, error) {
1198	objectMap := make(map[string]interface{})
1199	if vd.Enabled != nil {
1200		objectMap["enabled"] = vd.Enabled
1201	}
1202	return json.Marshal(objectMap)
1203}
1204
1205// WindowsProfile profile for Windows VMs in the container service cluster.
1206type WindowsProfile struct {
1207	// AdminUsername - The administrator username to use for Windows VMs.
1208	AdminUsername *string `json:"adminUsername,omitempty"`
1209	// AdminPassword - The administrator password to use for Windows VMs.
1210	AdminPassword *string `json:"adminPassword,omitempty"`
1211}
1212