...

Source file src/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-08-31/containerservice/models.go

Documentation: github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2017-08-31/containerservice

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

View as plain text