diff --git a/services/containerservice/mgmt/2017-07-01/containerservice/containerservices.go b/services/containerservice/mgmt/2017-07-01/containerservice/containerservices.go index 8adf8deb0c9f..c5cedb7900c6 100644 --- a/services/containerservice/mgmt/2017-07-01/containerservice/containerservices.go +++ b/services/containerservice/mgmt/2017-07-01/containerservice/containerservices.go @@ -110,7 +110,7 @@ func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context } preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsJSON(), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", pathParameters), diff --git a/services/containerservice/mgmt/2017-08-31/containerservice/containerservices.go b/services/containerservice/mgmt/2017-08-31/containerservice/containerservicesgroup.go similarity index 75% rename from services/containerservice/mgmt/2017-08-31/containerservice/containerservices.go rename to services/containerservice/mgmt/2017-08-31/containerservice/containerservicesgroup.go index 8adf8deb0c9f..0c3fef8a9e73 100644 --- a/services/containerservice/mgmt/2017-08-31/containerservice/containerservices.go +++ b/services/containerservice/mgmt/2017-08-31/containerservice/containerservicesgroup.go @@ -25,19 +25,19 @@ import ( "net/http" ) -// ContainerServicesClient is the the Container Service Client. -type ContainerServicesClient struct { +// ContainerServicesGroupClient is the the Container Service Client. +type ContainerServicesGroupClient struct { BaseClient } -// NewContainerServicesClient creates an instance of the ContainerServicesClient client. -func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { - return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) +// NewContainerServicesGroupClient creates an instance of the ContainerServicesGroupClient client. +func NewContainerServicesGroupClient(subscriptionID string) ContainerServicesGroupClient { + return NewContainerServicesGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client. -func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { - return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} +// NewContainerServicesGroupClientWithBaseURI creates an instance of the ContainerServicesGroupClient client. +func NewContainerServicesGroupClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesGroupClient { + return ContainerServicesGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate creates or updates a container service with the specified configuration of orchestrator, masters, and @@ -46,7 +46,7 @@ func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string // resourceGroupName is the name of the resource group. containerServiceName is the name of the container service // in the specified subscription and resource group. parameters is parameters supplied to the Create or Update a // Container Service operation. -func (client ContainerServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, containerServiceName string, parameters ContainerService) (result ContainerServicesCreateOrUpdateFutureType, err error) { +func (client ContainerServicesGroupClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, containerServiceName string, parameters ContainerService) (result ContainerServicesGroupCreateOrUpdateFutureType, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, @@ -78,18 +78,18 @@ func (client ContainerServicesClient) CreateOrUpdate(ctx context.Context, resour Chain: []validation.Constraint{{Target: "parameters.Properties.DiagnosticsProfile.VMDiagnostics.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, }}, }}}}}); err != nil { - return result, validation.NewError("containerservice.ContainerServicesClient", "CreateOrUpdate", err.Error()) + return result, validation.NewError("containerservice.ContainerServicesGroupClient", "CreateOrUpdate", err.Error()) } req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, containerServiceName, parameters) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "CreateOrUpdate", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesGroupClient", "CreateOrUpdate", nil, "Failure preparing request") return } result, err = client.CreateOrUpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "CreateOrUpdate", result.Response(), "Failure sending request") + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesGroupClient", "CreateOrUpdate", result.Response(), "Failure sending request") return } @@ -97,7 +97,7 @@ func (client ContainerServicesClient) CreateOrUpdate(ctx context.Context, resour } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, containerServiceName string, parameters ContainerService) (*http.Request, error) { +func (client ContainerServicesGroupClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, containerServiceName string, parameters ContainerService) (*http.Request, error) { pathParameters := map[string]interface{}{ "containerServiceName": autorest.Encode("path", containerServiceName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -110,7 +110,7 @@ func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context } preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsJSON(), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", pathParameters), @@ -121,7 +121,7 @@ func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. -func (client ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (future ContainerServicesCreateOrUpdateFutureType, err error) { +func (client ContainerServicesGroupClient) CreateOrUpdateSender(req *http.Request) (future ContainerServicesGroupCreateOrUpdateFutureType, err error) { sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) future.Future = azure.NewFuture(req) future.req = req @@ -136,7 +136,7 @@ func (client ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (f // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always // closes the http.Response Body. -func (client ContainerServicesClient) CreateOrUpdateResponder(resp *http.Response) (result ContainerService, err error) { +func (client ContainerServicesGroupClient) CreateOrUpdateResponder(resp *http.Response) (result ContainerService, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -154,16 +154,16 @@ func (client ContainerServicesClient) CreateOrUpdateResponder(resp *http.Respons // // resourceGroupName is the name of the resource group. containerServiceName is the name of the container service // in the specified subscription and resource group. -func (client ContainerServicesClient) Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result ContainerServicesDeleteFutureType, err error) { +func (client ContainerServicesGroupClient) Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result ContainerServicesGroupDeleteFutureType, err error) { req, err := client.DeletePreparer(ctx, resourceGroupName, containerServiceName) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Delete", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesGroupClient", "Delete", nil, "Failure preparing request") return } result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Delete", result.Response(), "Failure sending request") + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesGroupClient", "Delete", result.Response(), "Failure sending request") return } @@ -171,7 +171,7 @@ func (client ContainerServicesClient) Delete(ctx context.Context, resourceGroupN } // DeletePreparer prepares the Delete request. -func (client ContainerServicesClient) DeletePreparer(ctx context.Context, resourceGroupName string, containerServiceName string) (*http.Request, error) { +func (client ContainerServicesGroupClient) DeletePreparer(ctx context.Context, resourceGroupName string, containerServiceName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "containerServiceName": autorest.Encode("path", containerServiceName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -193,7 +193,7 @@ func (client ContainerServicesClient) DeletePreparer(ctx context.Context, resour // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. -func (client ContainerServicesClient) DeleteSender(req *http.Request) (future ContainerServicesDeleteFutureType, err error) { +func (client ContainerServicesGroupClient) DeleteSender(req *http.Request) (future ContainerServicesGroupDeleteFutureType, err error) { sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) future.Future = azure.NewFuture(req) future.req = req @@ -208,7 +208,7 @@ func (client ContainerServicesClient) DeleteSender(req *http.Request) (future Co // DeleteResponder handles the response to the Delete request. The method always // closes the http.Response Body. -func (client ContainerServicesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { +func (client ContainerServicesGroupClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -224,30 +224,30 @@ func (client ContainerServicesClient) DeleteResponder(resp *http.Response) (resu // // resourceGroupName is the name of the resource group. containerServiceName is the name of the container service // in the specified subscription and resource group. -func (client ContainerServicesClient) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result ContainerService, err error) { +func (client ContainerServicesGroupClient) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result ContainerService, err error) { req, err := client.GetPreparer(ctx, resourceGroupName, containerServiceName) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Get", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesGroupClient", "Get", nil, "Failure preparing request") return } resp, err := client.GetSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Get", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesGroupClient", "Get", resp, "Failure sending request") return } result, err = client.GetResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Get", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesGroupClient", "Get", resp, "Failure responding to request") } return } // GetPreparer prepares the Get request. -func (client ContainerServicesClient) GetPreparer(ctx context.Context, resourceGroupName string, containerServiceName string) (*http.Request, error) { +func (client ContainerServicesGroupClient) GetPreparer(ctx context.Context, resourceGroupName string, containerServiceName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "containerServiceName": autorest.Encode("path", containerServiceName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -269,14 +269,14 @@ func (client ContainerServicesClient) GetPreparer(ctx context.Context, resourceG // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. -func (client ContainerServicesClient) GetSender(req *http.Request) (*http.Response, error) { +func (client ContainerServicesGroupClient) GetSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always // closes the http.Response Body. -func (client ContainerServicesClient) GetResponder(resp *http.Response) (result ContainerService, err error) { +func (client ContainerServicesGroupClient) GetResponder(resp *http.Response) (result ContainerService, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -289,31 +289,31 @@ func (client ContainerServicesClient) GetResponder(resp *http.Response) (result // List gets a list of container services in the specified subscription. The operation returns properties of each // container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. -func (client ContainerServicesClient) List(ctx context.Context) (result ListResultPage, err error) { +func (client ContainerServicesGroupClient) List(ctx context.Context) (result ListResultPage, err error) { result.fn = client.listNextResults req, err := client.ListPreparer(ctx) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "List", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesGroupClient", "List", nil, "Failure preparing request") return } resp, err := client.ListSender(req) if err != nil { result.lr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "List", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesGroupClient", "List", resp, "Failure sending request") return } result.lr, err = client.ListResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "List", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesGroupClient", "List", resp, "Failure responding to request") } return } // ListPreparer prepares the List request. -func (client ContainerServicesClient) ListPreparer(ctx context.Context) (*http.Request, error) { +func (client ContainerServicesGroupClient) ListPreparer(ctx context.Context) (*http.Request, error) { pathParameters := map[string]interface{}{ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -333,14 +333,14 @@ func (client ContainerServicesClient) ListPreparer(ctx context.Context) (*http.R // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. -func (client ContainerServicesClient) ListSender(req *http.Request) (*http.Response, error) { +func (client ContainerServicesGroupClient) ListSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always // closes the http.Response Body. -func (client ContainerServicesClient) ListResponder(resp *http.Response) (result ListResult, err error) { +func (client ContainerServicesGroupClient) ListResponder(resp *http.Response) (result ListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -352,10 +352,10 @@ func (client ContainerServicesClient) ListResponder(resp *http.Response) (result } // listNextResults retrieves the next set of results, if any. -func (client ContainerServicesClient) listNextResults(lastResults ListResult) (result ListResult, err error) { +func (client ContainerServicesGroupClient) listNextResults(lastResults ListResult) (result ListResult, err error) { req, err := lastResults.listResultPreparer() if err != nil { - return result, autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "listNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "containerservice.ContainerServicesGroupClient", "listNextResults", nil, "Failure preparing next results request") } if req == nil { return @@ -363,17 +363,17 @@ func (client ContainerServicesClient) listNextResults(lastResults ListResult) (r resp, err := client.ListSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "listNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "containerservice.ContainerServicesGroupClient", "listNextResults", resp, "Failure sending next results request") } result, err = client.ListResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "listNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesGroupClient", "listNextResults", resp, "Failure responding to next results request") } return } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ContainerServicesClient) ListComplete(ctx context.Context) (result ListResultIterator, err error) { +func (client ContainerServicesGroupClient) ListComplete(ctx context.Context) (result ListResultIterator, err error) { result.page, err = client.List(ctx) return } @@ -383,31 +383,31 @@ func (client ContainerServicesClient) ListComplete(ctx context.Context) (result // and FQDNs of masters and agents. // // resourceGroupName is the name of the resource group. -func (client ContainerServicesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListResultPage, err error) { +func (client ContainerServicesGroupClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListResultPage, err error) { result.fn = client.listByResourceGroupNextResults req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListByResourceGroup", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesGroupClient", "ListByResourceGroup", nil, "Failure preparing request") return } resp, err := client.ListByResourceGroupSender(req) if err != nil { result.lr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListByResourceGroup", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesGroupClient", "ListByResourceGroup", resp, "Failure sending request") return } result.lr, err = client.ListByResourceGroupResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListByResourceGroup", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesGroupClient", "ListByResourceGroup", resp, "Failure responding to request") } return } // ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client ContainerServicesClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { +func (client ContainerServicesGroupClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -428,14 +428,14 @@ func (client ContainerServicesClient) ListByResourceGroupPreparer(ctx context.Co // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. -func (client ContainerServicesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { +func (client ContainerServicesGroupClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always // closes the http.Response Body. -func (client ContainerServicesClient) ListByResourceGroupResponder(resp *http.Response) (result ListResult, err error) { +func (client ContainerServicesGroupClient) ListByResourceGroupResponder(resp *http.Response) (result ListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -447,10 +447,10 @@ func (client ContainerServicesClient) ListByResourceGroupResponder(resp *http.Re } // listByResourceGroupNextResults retrieves the next set of results, if any. -func (client ContainerServicesClient) listByResourceGroupNextResults(lastResults ListResult) (result ListResult, err error) { +func (client ContainerServicesGroupClient) listByResourceGroupNextResults(lastResults ListResult) (result ListResult, err error) { req, err := lastResults.listResultPreparer() if err != nil { - return result, autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "containerservice.ContainerServicesGroupClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") } if req == nil { return @@ -458,17 +458,17 @@ func (client ContainerServicesClient) listByResourceGroupNextResults(lastResults resp, err := client.ListByResourceGroupSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "containerservice.ContainerServicesGroupClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") } result, err = client.ListByResourceGroupResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesGroupClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") } return } // ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client ContainerServicesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListResultIterator, err error) { +func (client ContainerServicesGroupClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListResultIterator, err error) { result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) return } diff --git a/services/containerservice/mgmt/2017-08-31/containerservice/managedclusters.go b/services/containerservice/mgmt/2017-08-31/containerservice/managedclustersgroup.go similarity index 72% rename from services/containerservice/mgmt/2017-08-31/containerservice/managedclusters.go rename to services/containerservice/mgmt/2017-08-31/containerservice/managedclustersgroup.go index ad1a847e8cfc..90f48ec43a09 100644 --- a/services/containerservice/mgmt/2017-08-31/containerservice/managedclusters.go +++ b/services/containerservice/mgmt/2017-08-31/containerservice/managedclustersgroup.go @@ -25,19 +25,19 @@ import ( "net/http" ) -// ManagedClustersClient is the the Container Service Client. -type ManagedClustersClient struct { +// ManagedClustersGroupClient is the the Container Service Client. +type ManagedClustersGroupClient struct { BaseClient } -// NewManagedClustersClient creates an instance of the ManagedClustersClient client. -func NewManagedClustersClient(subscriptionID string) ManagedClustersClient { - return NewManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) +// NewManagedClustersGroupClient creates an instance of the ManagedClustersGroupClient client. +func NewManagedClustersGroupClient(subscriptionID string) ManagedClustersGroupClient { + return NewManagedClustersGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client. -func NewManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) ManagedClustersClient { - return ManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} +// NewManagedClustersGroupClientWithBaseURI creates an instance of the ManagedClustersGroupClient client. +func NewManagedClustersGroupClientWithBaseURI(baseURI string, subscriptionID string) ManagedClustersGroupClient { + return ManagedClustersGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate creates or updates a managed cluster with the specified configuration for agents and Kubernetes @@ -45,7 +45,7 @@ func NewManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) // // resourceGroupName is the name of the resource group. resourceName is the name of the managed cluster resource. // parameters is parameters supplied to the Create or Update a Managed Cluster operation. -func (client ManagedClustersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedCluster) (result ManagedClustersCreateOrUpdateFuture, err error) { +func (client ManagedClustersGroupClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedCluster) (result ManagedClustersGroupCreateOrUpdateFuture, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.ManagedClusterProperties", Name: validation.Null, Rule: false, @@ -63,18 +63,18 @@ func (client ManagedClustersClient) CreateOrUpdate(ctx context.Context, resource }}, }}, }}}}}); err != nil { - return result, validation.NewError("containerservice.ManagedClustersClient", "CreateOrUpdate", err.Error()) + return result, validation.NewError("containerservice.ManagedClustersGroupClient", "CreateOrUpdate", err.Error()) } req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceName, parameters) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "CreateOrUpdate", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupClient", "CreateOrUpdate", nil, "Failure preparing request") return } result, err = client.CreateOrUpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "CreateOrUpdate", result.Response(), "Failure sending request") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupClient", "CreateOrUpdate", result.Response(), "Failure sending request") return } @@ -82,7 +82,7 @@ func (client ManagedClustersClient) CreateOrUpdate(ctx context.Context, resource } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ManagedClustersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedCluster) (*http.Request, error) { +func (client ManagedClustersGroupClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedCluster) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "resourceName": autorest.Encode("path", resourceName), @@ -95,7 +95,7 @@ func (client ManagedClustersClient) CreateOrUpdatePreparer(ctx context.Context, } preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsJSON(), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", pathParameters), @@ -106,7 +106,7 @@ func (client ManagedClustersClient) CreateOrUpdatePreparer(ctx context.Context, // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. -func (client ManagedClustersClient) CreateOrUpdateSender(req *http.Request) (future ManagedClustersCreateOrUpdateFuture, err error) { +func (client ManagedClustersGroupClient) CreateOrUpdateSender(req *http.Request) (future ManagedClustersGroupCreateOrUpdateFuture, err error) { sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) future.Future = azure.NewFuture(req) future.req = req @@ -121,7 +121,7 @@ func (client ManagedClustersClient) CreateOrUpdateSender(req *http.Request) (fut // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always // closes the http.Response Body. -func (client ManagedClustersClient) CreateOrUpdateResponder(resp *http.Response) (result ManagedCluster, err error) { +func (client ManagedClustersGroupClient) CreateOrUpdateResponder(resp *http.Response) (result ManagedCluster, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -135,16 +135,16 @@ func (client ManagedClustersClient) CreateOrUpdateResponder(resp *http.Response) // Delete deletes the managed cluster with a specified resource group and name. // // resourceGroupName is the name of the resource group. resourceName is the name of the managed cluster resource. -func (client ManagedClustersClient) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedClustersDeleteFuture, err error) { +func (client ManagedClustersGroupClient) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedClustersGroupDeleteFuture, err error) { req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Delete", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupClient", "Delete", nil, "Failure preparing request") return } result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Delete", result.Response(), "Failure sending request") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupClient", "Delete", result.Response(), "Failure sending request") return } @@ -152,7 +152,7 @@ func (client ManagedClustersClient) Delete(ctx context.Context, resourceGroupNam } // DeletePreparer prepares the Delete request. -func (client ManagedClustersClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { +func (client ManagedClustersGroupClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "resourceName": autorest.Encode("path", resourceName), @@ -174,7 +174,7 @@ func (client ManagedClustersClient) DeletePreparer(ctx context.Context, resource // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. -func (client ManagedClustersClient) DeleteSender(req *http.Request) (future ManagedClustersDeleteFuture, err error) { +func (client ManagedClustersGroupClient) DeleteSender(req *http.Request) (future ManagedClustersGroupDeleteFuture, err error) { sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) future.Future = azure.NewFuture(req) future.req = req @@ -189,7 +189,7 @@ func (client ManagedClustersClient) DeleteSender(req *http.Request) (future Mana // DeleteResponder handles the response to the Delete request. The method always // closes the http.Response Body. -func (client ManagedClustersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { +func (client ManagedClustersGroupClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -202,30 +202,30 @@ func (client ManagedClustersClient) DeleteResponder(resp *http.Response) (result // Get gets the details of the managed cluster with a specified resource group and name. // // resourceGroupName is the name of the resource group. resourceName is the name of the managed cluster resource. -func (client ManagedClustersClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedCluster, err error) { +func (client ManagedClustersGroupClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedCluster, err error) { req, err := client.GetPreparer(ctx, resourceGroupName, resourceName) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Get", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupClient", "Get", nil, "Failure preparing request") return } resp, err := client.GetSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Get", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupClient", "Get", resp, "Failure sending request") return } result, err = client.GetResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Get", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupClient", "Get", resp, "Failure responding to request") } return } // GetPreparer prepares the Get request. -func (client ManagedClustersClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { +func (client ManagedClustersGroupClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "resourceName": autorest.Encode("path", resourceName), @@ -247,14 +247,14 @@ func (client ManagedClustersClient) GetPreparer(ctx context.Context, resourceGro // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. -func (client ManagedClustersClient) GetSender(req *http.Request) (*http.Response, error) { +func (client ManagedClustersGroupClient) GetSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always // closes the http.Response Body. -func (client ManagedClustersClient) GetResponder(resp *http.Response) (result ManagedCluster, err error) { +func (client ManagedClustersGroupClient) GetResponder(resp *http.Response) (result ManagedCluster, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -270,30 +270,30 @@ func (client ManagedClustersClient) GetResponder(resp *http.Response) (result Ma // // resourceGroupName is the name of the resource group. resourceName is the name of the managed cluster resource. // roleName is the name of the role for managed cluster accessProfile resource. -func (client ManagedClustersClient) GetAccessProfiles(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (result ManagedClusterAccessProfile, err error) { +func (client ManagedClustersGroupClient) GetAccessProfiles(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (result ManagedClusterAccessProfile, err error) { req, err := client.GetAccessProfilesPreparer(ctx, resourceGroupName, resourceName, roleName) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetAccessProfiles", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupClient", "GetAccessProfiles", nil, "Failure preparing request") return } resp, err := client.GetAccessProfilesSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetAccessProfiles", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupClient", "GetAccessProfiles", resp, "Failure sending request") return } result, err = client.GetAccessProfilesResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetAccessProfiles", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupClient", "GetAccessProfiles", resp, "Failure responding to request") } return } // GetAccessProfilesPreparer prepares the GetAccessProfiles request. -func (client ManagedClustersClient) GetAccessProfilesPreparer(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (*http.Request, error) { +func (client ManagedClustersGroupClient) GetAccessProfilesPreparer(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "resourceName": autorest.Encode("path", resourceName), @@ -316,14 +316,14 @@ func (client ManagedClustersClient) GetAccessProfilesPreparer(ctx context.Contex // GetAccessProfilesSender sends the GetAccessProfiles request. The method will close the // http.Response Body if it receives an error. -func (client ManagedClustersClient) GetAccessProfilesSender(req *http.Request) (*http.Response, error) { +func (client ManagedClustersGroupClient) GetAccessProfilesSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } // GetAccessProfilesResponder handles the response to the GetAccessProfiles request. The method always // closes the http.Response Body. -func (client ManagedClustersClient) GetAccessProfilesResponder(resp *http.Response) (result ManagedClusterAccessProfile, err error) { +func (client ManagedClustersGroupClient) GetAccessProfilesResponder(resp *http.Response) (result ManagedClusterAccessProfile, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -338,30 +338,30 @@ func (client ManagedClustersClient) GetAccessProfilesResponder(resp *http.Respon // name. // // resourceGroupName is the name of the resource group. resourceName is the name of the managed cluster resource. -func (client ManagedClustersClient) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedClusterUpgradeProfile, err error) { +func (client ManagedClustersGroupClient) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedClusterUpgradeProfile, err error) { req, err := client.GetUpgradeProfilePreparer(ctx, resourceGroupName, resourceName) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetUpgradeProfile", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupClient", "GetUpgradeProfile", nil, "Failure preparing request") return } resp, err := client.GetUpgradeProfileSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetUpgradeProfile", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupClient", "GetUpgradeProfile", resp, "Failure sending request") return } result, err = client.GetUpgradeProfileResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetUpgradeProfile", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupClient", "GetUpgradeProfile", resp, "Failure responding to request") } return } // GetUpgradeProfilePreparer prepares the GetUpgradeProfile request. -func (client ManagedClustersClient) GetUpgradeProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { +func (client ManagedClustersGroupClient) GetUpgradeProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "resourceName": autorest.Encode("path", resourceName), @@ -383,14 +383,14 @@ func (client ManagedClustersClient) GetUpgradeProfilePreparer(ctx context.Contex // GetUpgradeProfileSender sends the GetUpgradeProfile request. The method will close the // http.Response Body if it receives an error. -func (client ManagedClustersClient) GetUpgradeProfileSender(req *http.Request) (*http.Response, error) { +func (client ManagedClustersGroupClient) GetUpgradeProfileSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } // GetUpgradeProfileResponder handles the response to the GetUpgradeProfile request. The method always // closes the http.Response Body. -func (client ManagedClustersClient) GetUpgradeProfileResponder(resp *http.Response) (result ManagedClusterUpgradeProfile, err error) { +func (client ManagedClustersGroupClient) GetUpgradeProfileResponder(resp *http.Response) (result ManagedClusterUpgradeProfile, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -403,31 +403,31 @@ func (client ManagedClustersClient) GetUpgradeProfileResponder(resp *http.Respon // List gets a list of managed clusters in the specified subscription. The operation returns properties of each managed // cluster. -func (client ManagedClustersClient) List(ctx context.Context) (result ManagedClusterListResultPage, err error) { +func (client ManagedClustersGroupClient) List(ctx context.Context) (result ManagedClusterListResultPage, err error) { result.fn = client.listNextResults req, err := client.ListPreparer(ctx) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "List", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupClient", "List", nil, "Failure preparing request") return } resp, err := client.ListSender(req) if err != nil { result.mclr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "List", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupClient", "List", resp, "Failure sending request") return } result.mclr, err = client.ListResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "List", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupClient", "List", resp, "Failure responding to request") } return } // ListPreparer prepares the List request. -func (client ManagedClustersClient) ListPreparer(ctx context.Context) (*http.Request, error) { +func (client ManagedClustersGroupClient) ListPreparer(ctx context.Context) (*http.Request, error) { pathParameters := map[string]interface{}{ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -447,14 +447,14 @@ func (client ManagedClustersClient) ListPreparer(ctx context.Context) (*http.Req // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. -func (client ManagedClustersClient) ListSender(req *http.Request) (*http.Response, error) { +func (client ManagedClustersGroupClient) ListSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always // closes the http.Response Body. -func (client ManagedClustersClient) ListResponder(resp *http.Response) (result ManagedClusterListResult, err error) { +func (client ManagedClustersGroupClient) ListResponder(resp *http.Response) (result ManagedClusterListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -466,10 +466,10 @@ func (client ManagedClustersClient) ListResponder(resp *http.Response) (result M } // listNextResults retrieves the next set of results, if any. -func (client ManagedClustersClient) listNextResults(lastResults ManagedClusterListResult) (result ManagedClusterListResult, err error) { +func (client ManagedClustersGroupClient) listNextResults(lastResults ManagedClusterListResult) (result ManagedClusterListResult, err error) { req, err := lastResults.managedClusterListResultPreparer() if err != nil { - return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupClient", "listNextResults", nil, "Failure preparing next results request") } if req == nil { return @@ -477,17 +477,17 @@ func (client ManagedClustersClient) listNextResults(lastResults ManagedClusterLi resp, err := client.ListSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupClient", "listNextResults", resp, "Failure sending next results request") } result, err = client.ListResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupClient", "listNextResults", resp, "Failure responding to next results request") } return } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ManagedClustersClient) ListComplete(ctx context.Context) (result ManagedClusterListResultIterator, err error) { +func (client ManagedClustersGroupClient) ListComplete(ctx context.Context) (result ManagedClusterListResultIterator, err error) { result.page, err = client.List(ctx) return } @@ -496,31 +496,31 @@ func (client ManagedClustersClient) ListComplete(ctx context.Context) (result Ma // properties of each managed cluster. // // resourceGroupName is the name of the resource group. -func (client ManagedClustersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ManagedClusterListResultPage, err error) { +func (client ManagedClustersGroupClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ManagedClusterListResultPage, err error) { result.fn = client.listByResourceGroupNextResults req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListByResourceGroup", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupClient", "ListByResourceGroup", nil, "Failure preparing request") return } resp, err := client.ListByResourceGroupSender(req) if err != nil { result.mclr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListByResourceGroup", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupClient", "ListByResourceGroup", resp, "Failure sending request") return } result.mclr, err = client.ListByResourceGroupResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListByResourceGroup", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupClient", "ListByResourceGroup", resp, "Failure responding to request") } return } // ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client ManagedClustersClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { +func (client ManagedClustersGroupClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -541,14 +541,14 @@ func (client ManagedClustersClient) ListByResourceGroupPreparer(ctx context.Cont // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. -func (client ManagedClustersClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { +func (client ManagedClustersGroupClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always // closes the http.Response Body. -func (client ManagedClustersClient) ListByResourceGroupResponder(resp *http.Response) (result ManagedClusterListResult, err error) { +func (client ManagedClustersGroupClient) ListByResourceGroupResponder(resp *http.Response) (result ManagedClusterListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -560,10 +560,10 @@ func (client ManagedClustersClient) ListByResourceGroupResponder(resp *http.Resp } // listByResourceGroupNextResults retrieves the next set of results, if any. -func (client ManagedClustersClient) listByResourceGroupNextResults(lastResults ManagedClusterListResult) (result ManagedClusterListResult, err error) { +func (client ManagedClustersGroupClient) listByResourceGroupNextResults(lastResults ManagedClusterListResult) (result ManagedClusterListResult, err error) { req, err := lastResults.managedClusterListResultPreparer() if err != nil { - return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") } if req == nil { return @@ -571,17 +571,17 @@ func (client ManagedClustersClient) listByResourceGroupNextResults(lastResults M resp, err := client.ListByResourceGroupSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") } result, err = client.ListByResourceGroupResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") } return } // ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client ManagedClustersClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ManagedClusterListResultIterator, err error) { +func (client ManagedClustersGroupClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ManagedClusterListResultIterator, err error) { result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) return } diff --git a/services/containerservice/mgmt/2017-08-31/containerservice/models.go b/services/containerservice/mgmt/2017-08-31/containerservice/models.go index 8e2c7ef0e809..a4ada1953e4f 100644 --- a/services/containerservice/mgmt/2017-08-31/containerservice/models.go +++ b/services/containerservice/mgmt/2017-08-31/containerservice/models.go @@ -350,7 +350,7 @@ func PossibleVMSizeTypesValues() [130]VMSizeTypes { // AccessProfile profile for enabling a user to access a managed cluster. type AccessProfile struct { // KubeConfig - Base64-encoded Kubernetes configuration file. - KubeConfig *string `json:"kubeConfig,omitempty"` + KubeConfig *[]byte `json:"kubeConfig,omitempty"` } // AgentPoolProfile profile for the container service agent pool. @@ -487,29 +487,29 @@ func (cs *ContainerService) UnmarshalJSON(body []byte) error { return nil } -// ContainerServicesCreateOrUpdateFutureType an abstraction for monitoring and retrieving the results of a +// ContainerServicesGroupCreateOrUpdateFutureType an abstraction for monitoring and retrieving the results of a // long-running operation. -type ContainerServicesCreateOrUpdateFutureType struct { +type ContainerServicesGroupCreateOrUpdateFutureType struct { azure.Future req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future ContainerServicesCreateOrUpdateFutureType) Result(client ContainerServicesClient) (cs ContainerService, err error) { +func (future ContainerServicesGroupCreateOrUpdateFutureType) Result(client ContainerServicesGroupClient) (cs ContainerService, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesGroupCreateOrUpdateFutureType", "Result", future.Response(), "Polling failure") return } if !done { - return cs, azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesCreateOrUpdateFutureType") + return cs, azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesGroupCreateOrUpdateFutureType") } if future.PollingMethod() == azure.PollingLocation { cs, err = client.CreateOrUpdateResponder(future.Response()) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", future.Response(), "Failure responding to request") + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesGroupCreateOrUpdateFutureType", "Result", future.Response(), "Failure responding to request") } return } @@ -526,39 +526,39 @@ func (future ContainerServicesCreateOrUpdateFutureType) Result(client ContainerS resp, err = autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesGroupCreateOrUpdateFutureType", "Result", resp, "Failure sending request") return } cs, err = client.CreateOrUpdateResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesGroupCreateOrUpdateFutureType", "Result", resp, "Failure responding to request") } return } -// ContainerServicesDeleteFutureType an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ContainerServicesDeleteFutureType struct { +// ContainerServicesGroupDeleteFutureType an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ContainerServicesGroupDeleteFutureType struct { azure.Future req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future ContainerServicesDeleteFutureType) Result(client ContainerServicesClient) (ar autorest.Response, err error) { +func (future ContainerServicesGroupDeleteFutureType) Result(client ContainerServicesGroupClient) (ar autorest.Response, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesDeleteFutureType", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesGroupDeleteFutureType", "Result", future.Response(), "Polling failure") return } if !done { - return ar, azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesDeleteFutureType") + return ar, azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesGroupDeleteFutureType") } if future.PollingMethod() == azure.PollingLocation { ar, err = client.DeleteResponder(future.Response()) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesDeleteFutureType", "Result", future.Response(), "Failure responding to request") + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesGroupDeleteFutureType", "Result", future.Response(), "Failure responding to request") } return } @@ -575,12 +575,12 @@ func (future ContainerServicesDeleteFutureType) Result(client ContainerServicesC resp, err = autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesDeleteFutureType", "Result", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesGroupDeleteFutureType", "Result", resp, "Failure sending request") return } ar, err = client.DeleteResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesDeleteFutureType", "Result", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesGroupDeleteFutureType", "Result", resp, "Failure responding to request") } return } @@ -1069,29 +1069,29 @@ type ManagedClusterProperties struct { ServicePrincipalProfile *ServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"` } -// ManagedClustersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ManagedClustersCreateOrUpdateFuture struct { +// ManagedClustersGroupCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ManagedClustersGroupCreateOrUpdateFuture struct { azure.Future req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future ManagedClustersCreateOrUpdateFuture) Result(client ManagedClustersClient) (mc ManagedCluster, err error) { +func (future ManagedClustersGroupCreateOrUpdateFuture) Result(client ManagedClustersGroupClient) (mc ManagedCluster, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - return mc, azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersCreateOrUpdateFuture") + return mc, azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersGroupCreateOrUpdateFuture") } if future.PollingMethod() == azure.PollingLocation { mc, err = client.CreateOrUpdateResponder(future.Response()) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") } return } @@ -1108,39 +1108,39 @@ func (future ManagedClustersCreateOrUpdateFuture) Result(client ManagedClustersC resp, err = autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupCreateOrUpdateFuture", "Result", resp, "Failure sending request") return } mc, err = client.CreateOrUpdateResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupCreateOrUpdateFuture", "Result", resp, "Failure responding to request") } return } -// ManagedClustersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// ManagedClustersGroupDeleteFuture an abstraction for monitoring and retrieving the results of a long-running // operation. -type ManagedClustersDeleteFuture struct { +type ManagedClustersGroupDeleteFuture struct { azure.Future req *http.Request } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future ManagedClustersDeleteFuture) Result(client ManagedClustersClient) (ar autorest.Response, err error) { +func (future ManagedClustersGroupDeleteFuture) Result(client ManagedClustersGroupClient) (ar autorest.Response, err error) { var done bool done, err = future.Done(client) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersDeleteFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - return ar, azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersDeleteFuture") + return ar, azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersGroupDeleteFuture") } if future.PollingMethod() == azure.PollingLocation { ar, err = client.DeleteResponder(future.Response()) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersDeleteFuture", "Result", future.Response(), "Failure responding to request") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupDeleteFuture", "Result", future.Response(), "Failure responding to request") } return } @@ -1157,12 +1157,12 @@ func (future ManagedClustersDeleteFuture) Result(client ManagedClustersClient) ( resp, err = autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersDeleteFuture", "Result", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupDeleteFuture", "Result", resp, "Failure sending request") return } ar, err = client.DeleteResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersDeleteFuture", "Result", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersGroupDeleteFuture", "Result", resp, "Failure responding to request") } return } @@ -1180,24 +1180,6 @@ type ManagedClusterUpgradeProfile struct { *ManagedClusterUpgradeProfileProperties `json:"properties,omitempty"` } -// MarshalJSON is the custom marshaler for ManagedClusterUpgradeProfile. -func (mcup ManagedClusterUpgradeProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mcup.ID != nil { - objectMap["id"] = mcup.ID - } - if mcup.Name != nil { - objectMap["name"] = mcup.Name - } - if mcup.Type != nil { - objectMap["type"] = mcup.Type - } - if mcup.ManagedClusterUpgradeProfileProperties != nil { - objectMap["properties"] = mcup.ManagedClusterUpgradeProfileProperties - } - return json.Marshal(objectMap) -} - // UnmarshalJSON is the custom unmarshaler for ManagedClusterUpgradeProfile struct. func (mcup *ManagedClusterUpgradeProfile) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage diff --git a/services/containerservice/mgmt/2017-09-30/containerservice/containerservices.go b/services/containerservice/mgmt/2017-09-30/containerservice/containerservices.go index 574c4cb17f48..3c85dc511939 100644 --- a/services/containerservice/mgmt/2017-09-30/containerservice/containerservices.go +++ b/services/containerservice/mgmt/2017-09-30/containerservice/containerservices.go @@ -110,7 +110,7 @@ func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context } preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsJSON(), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", pathParameters), diff --git a/services/containerservice/mgmt/2017-09-30/containerservice/managedclusters.go b/services/containerservice/mgmt/2017-09-30/containerservice/managedclusters.go index ad1a847e8cfc..3d0a6d863508 100644 --- a/services/containerservice/mgmt/2017-09-30/containerservice/managedclusters.go +++ b/services/containerservice/mgmt/2017-09-30/containerservice/managedclusters.go @@ -95,7 +95,7 @@ func (client ManagedClustersClient) CreateOrUpdatePreparer(ctx context.Context, } preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsJSON(), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", pathParameters), diff --git a/services/containerservice/mgmt/2017-09-30/containerservice/models.go b/services/containerservice/mgmt/2017-09-30/containerservice/models.go index 60393ecbdaf2..b8c0782cff2f 100644 --- a/services/containerservice/mgmt/2017-09-30/containerservice/models.go +++ b/services/containerservice/mgmt/2017-09-30/containerservice/models.go @@ -350,7 +350,7 @@ func PossibleVMSizeTypesValues() [130]VMSizeTypes { // AccessProfile profile for enabling a user to access a managed cluster. type AccessProfile struct { // KubeConfig - Base64-encoded Kubernetes configuration file. - KubeConfig *string `json:"kubeConfig,omitempty"` + KubeConfig *[]byte `json:"kubeConfig,omitempty"` } // AgentPoolProfile profile for the container service agent pool. @@ -1180,24 +1180,6 @@ type ManagedClusterUpgradeProfile struct { *ManagedClusterUpgradeProfileProperties `json:"properties,omitempty"` } -// MarshalJSON is the custom marshaler for ManagedClusterUpgradeProfile. -func (mcup ManagedClusterUpgradeProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mcup.ID != nil { - objectMap["id"] = mcup.ID - } - if mcup.Name != nil { - objectMap["name"] = mcup.Name - } - if mcup.Type != nil { - objectMap["type"] = mcup.Type - } - if mcup.ManagedClusterUpgradeProfileProperties != nil { - objectMap["properties"] = mcup.ManagedClusterUpgradeProfileProperties - } - return json.Marshal(objectMap) -} - // UnmarshalJSON is the custom unmarshaler for ManagedClusterUpgradeProfile struct. func (mcup *ManagedClusterUpgradeProfile) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage @@ -1318,24 +1300,6 @@ type OrchestratorVersionProfileListResult struct { *OrchestratorVersionProfileProperties `json:"properties,omitempty"` } -// MarshalJSON is the custom marshaler for OrchestratorVersionProfileListResult. -func (ovplr OrchestratorVersionProfileListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ovplr.ID != nil { - objectMap["id"] = ovplr.ID - } - if ovplr.Name != nil { - objectMap["name"] = ovplr.Name - } - if ovplr.Type != nil { - objectMap["type"] = ovplr.Type - } - if ovplr.OrchestratorVersionProfileProperties != nil { - objectMap["properties"] = ovplr.OrchestratorVersionProfileProperties - } - return json.Marshal(objectMap) -} - // UnmarshalJSON is the custom unmarshaler for OrchestratorVersionProfileListResult struct. func (ovplr *OrchestratorVersionProfileListResult) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage