diff --git a/services/containerservice/mgmt/2018-03-31/containerservice/managedclusters.go b/services/containerservice/mgmt/2018-03-31/containerservice/managedclusters.go index 809290b656fd..22242acefbfe 100644 --- a/services/containerservice/mgmt/2018-03-31/containerservice/managedclusters.go +++ b/services/containerservice/mgmt/2018-03-31/containerservice/managedclusters.go @@ -965,14 +965,13 @@ func (client ManagedClustersClient) ResetAADProfileSender(req *http.Request) (fu // ResetAADProfileResponder handles the response to the ResetAADProfile request. The method always // closes the http.Response Body. -func (client ManagedClustersClient) ResetAADProfileResponder(resp *http.Response) (result ManagedCluster, err error) { +func (client ManagedClustersClient) ResetAADProfileResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } @@ -1053,14 +1052,13 @@ func (client ManagedClustersClient) ResetServicePrincipalProfileSender(req *http // ResetServicePrincipalProfileResponder handles the response to the ResetServicePrincipalProfile request. The method always // closes the http.Response Body. -func (client ManagedClustersClient) ResetServicePrincipalProfileResponder(resp *http.Response) (result ManagedCluster, err error) { +func (client ManagedClustersClient) ResetServicePrincipalProfileResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } diff --git a/services/containerservice/mgmt/2018-03-31/containerservice/models.go b/services/containerservice/mgmt/2018-03-31/containerservice/models.go index 42f40fbf556e..29b97b40794c 100644 --- a/services/containerservice/mgmt/2018-03-31/containerservice/models.go +++ b/services/containerservice/mgmt/2018-03-31/containerservice/models.go @@ -671,7 +671,8 @@ type CredentialResult struct { // CredentialResults the list of credential result response. type CredentialResults struct { autorest.Response `json:"-"` - Kubeconfigs *[]CredentialResult `json:"kubeconfigs,omitempty"` + // Kubeconfigs - Base64-encoded Kubernetes configuration file. + Kubeconfigs *[]CredentialResult `json:"kubeconfigs,omitempty"` } // CustomProfile properties to configure a custom container service cluster. @@ -1419,7 +1420,7 @@ type ManagedClustersResetAADProfileFuture struct { // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *ManagedClustersResetAADProfileFuture) Result(client ManagedClustersClient) (mc ManagedCluster, err error) { +func (future *ManagedClustersResetAADProfileFuture) Result(client ManagedClustersClient) (ar autorest.Response, err error) { var done bool done, err = future.Done(client) if err != nil { @@ -1430,13 +1431,7 @@ func (future *ManagedClustersResetAADProfileFuture) Result(client ManagedCluster err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersResetAADProfileFuture") return } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if mc.Response.Response, err = future.GetResult(sender); err == nil && mc.Response.Response.StatusCode != http.StatusNoContent { - mc, err = client.ResetAADProfileResponder(mc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersResetAADProfileFuture", "Result", mc.Response.Response, "Failure responding to request") - } - } + ar.Response = future.Response() return } @@ -1448,7 +1443,7 @@ type ManagedClustersResetServicePrincipalProfileFuture struct { // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *ManagedClustersResetServicePrincipalProfileFuture) Result(client ManagedClustersClient) (mc ManagedCluster, err error) { +func (future *ManagedClustersResetServicePrincipalProfileFuture) Result(client ManagedClustersClient) (ar autorest.Response, err error) { var done bool done, err = future.Done(client) if err != nil { @@ -1459,13 +1454,7 @@ func (future *ManagedClustersResetServicePrincipalProfileFuture) Result(client M err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersResetServicePrincipalProfileFuture") return } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if mc.Response.Response, err = future.GetResult(sender); err == nil && mc.Response.Response.StatusCode != http.StatusNoContent { - mc, err = client.ResetServicePrincipalProfileResponder(mc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersResetServicePrincipalProfileFuture", "Result", mc.Response.Response, "Failure responding to request") - } - } + ar.Response = future.Response() return } diff --git a/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/managedclusters.go b/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/managedclusters.go index 2b2eb4b07439..1798a253701d 100644 --- a/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/managedclusters.go +++ b/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/managedclusters.go @@ -965,14 +965,13 @@ func (client ManagedClustersClient) ResetAADProfileSender(req *http.Request) (fu // ResetAADProfileResponder handles the response to the ResetAADProfile request. The method always // closes the http.Response Body. -func (client ManagedClustersClient) ResetAADProfileResponder(resp *http.Response) (result ManagedCluster, err error) { +func (client ManagedClustersClient) ResetAADProfileResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } @@ -1053,14 +1052,13 @@ func (client ManagedClustersClient) ResetServicePrincipalProfileSender(req *http // ResetServicePrincipalProfileResponder handles the response to the ResetServicePrincipalProfile request. The method always // closes the http.Response Body. -func (client ManagedClustersClient) ResetServicePrincipalProfileResponder(resp *http.Response) (result ManagedCluster, err error) { +func (client ManagedClustersClient) ResetServicePrincipalProfileResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } diff --git a/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/models.go b/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/models.go index f21bf86f6178..0fac62150ef5 100644 --- a/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/models.go +++ b/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/models.go @@ -811,7 +811,8 @@ type CredentialResult struct { // CredentialResults the list of credential result response. type CredentialResults struct { autorest.Response `json:"-"` - Kubeconfigs *[]CredentialResult `json:"kubeconfigs,omitempty"` + // Kubeconfigs - Base64-encoded Kubernetes configuration file. + Kubeconfigs *[]CredentialResult `json:"kubeconfigs,omitempty"` } // CustomProfile properties to configure a custom container service cluster. @@ -1565,7 +1566,7 @@ type ManagedClustersResetAADProfileFuture struct { // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *ManagedClustersResetAADProfileFuture) Result(client ManagedClustersClient) (mc ManagedCluster, err error) { +func (future *ManagedClustersResetAADProfileFuture) Result(client ManagedClustersClient) (ar autorest.Response, err error) { var done bool done, err = future.Done(client) if err != nil { @@ -1576,13 +1577,7 @@ func (future *ManagedClustersResetAADProfileFuture) Result(client ManagedCluster err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersResetAADProfileFuture") return } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if mc.Response.Response, err = future.GetResult(sender); err == nil && mc.Response.Response.StatusCode != http.StatusNoContent { - mc, err = client.ResetAADProfileResponder(mc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersResetAADProfileFuture", "Result", mc.Response.Response, "Failure responding to request") - } - } + ar.Response = future.Response() return } @@ -1594,7 +1589,7 @@ type ManagedClustersResetServicePrincipalProfileFuture struct { // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *ManagedClustersResetServicePrincipalProfileFuture) Result(client ManagedClustersClient) (mc ManagedCluster, err error) { +func (future *ManagedClustersResetServicePrincipalProfileFuture) Result(client ManagedClustersClient) (ar autorest.Response, err error) { var done bool done, err = future.Done(client) if err != nil { @@ -1605,13 +1600,7 @@ func (future *ManagedClustersResetServicePrincipalProfileFuture) Result(client M err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersResetServicePrincipalProfileFuture") return } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if mc.Response.Response, err = future.GetResult(sender); err == nil && mc.Response.Response.StatusCode != http.StatusNoContent { - mc, err = client.ResetServicePrincipalProfileResponder(mc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersResetServicePrincipalProfileFuture", "Result", mc.Response.Response, "Failure responding to request") - } - } + ar.Response = future.Response() return } diff --git a/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/managedclusters.go b/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/managedclusters.go index 809290b656fd..22242acefbfe 100644 --- a/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/managedclusters.go +++ b/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/managedclusters.go @@ -965,14 +965,13 @@ func (client ManagedClustersClient) ResetAADProfileSender(req *http.Request) (fu // ResetAADProfileResponder handles the response to the ResetAADProfile request. The method always // closes the http.Response Body. -func (client ManagedClustersClient) ResetAADProfileResponder(resp *http.Response) (result ManagedCluster, err error) { +func (client ManagedClustersClient) ResetAADProfileResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } @@ -1053,14 +1052,13 @@ func (client ManagedClustersClient) ResetServicePrincipalProfileSender(req *http // ResetServicePrincipalProfileResponder handles the response to the ResetServicePrincipalProfile request. The method always // closes the http.Response Body. -func (client ManagedClustersClient) ResetServicePrincipalProfileResponder(resp *http.Response) (result ManagedCluster, err error) { +func (client ManagedClustersClient) ResetServicePrincipalProfileResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } diff --git a/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/models.go b/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/models.go index 1c2cb826b197..9d415dcb4e90 100644 --- a/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/models.go +++ b/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/models.go @@ -796,7 +796,8 @@ type CredentialResult struct { // CredentialResults the list of credential result response. type CredentialResults struct { autorest.Response `json:"-"` - Kubeconfigs *[]CredentialResult `json:"kubeconfigs,omitempty"` + // Kubeconfigs - Base64-encoded Kubernetes configuration file. + Kubeconfigs *[]CredentialResult `json:"kubeconfigs,omitempty"` } // CustomProfile properties to configure a custom container service cluster. @@ -1544,7 +1545,7 @@ type ManagedClustersResetAADProfileFuture struct { // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *ManagedClustersResetAADProfileFuture) Result(client ManagedClustersClient) (mc ManagedCluster, err error) { +func (future *ManagedClustersResetAADProfileFuture) Result(client ManagedClustersClient) (ar autorest.Response, err error) { var done bool done, err = future.Done(client) if err != nil { @@ -1555,13 +1556,7 @@ func (future *ManagedClustersResetAADProfileFuture) Result(client ManagedCluster err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersResetAADProfileFuture") return } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if mc.Response.Response, err = future.GetResult(sender); err == nil && mc.Response.Response.StatusCode != http.StatusNoContent { - mc, err = client.ResetAADProfileResponder(mc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersResetAADProfileFuture", "Result", mc.Response.Response, "Failure responding to request") - } - } + ar.Response = future.Response() return } @@ -1573,7 +1568,7 @@ type ManagedClustersResetServicePrincipalProfileFuture struct { // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *ManagedClustersResetServicePrincipalProfileFuture) Result(client ManagedClustersClient) (mc ManagedCluster, err error) { +func (future *ManagedClustersResetServicePrincipalProfileFuture) Result(client ManagedClustersClient) (ar autorest.Response, err error) { var done bool done, err = future.Done(client) if err != nil { @@ -1584,13 +1579,7 @@ func (future *ManagedClustersResetServicePrincipalProfileFuture) Result(client M err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersResetServicePrincipalProfileFuture") return } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if mc.Response.Response, err = future.GetResult(sender); err == nil && mc.Response.Response.StatusCode != http.StatusNoContent { - mc, err = client.ResetServicePrincipalProfileResponder(mc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersResetServicePrincipalProfileFuture", "Result", mc.Response.Response, "Failure responding to request") - } - } + ar.Response = future.Response() return }