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..7c91e1d8a27b 100644 --- a/services/containerservice/mgmt/2018-03-31/containerservice/models.go +++ b/services/containerservice/mgmt/2018-03-31/containerservice/models.go @@ -1419,7 +1419,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 +1430,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 +1442,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 +1453,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..b3c5dfa00979 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 @@ -1565,7 +1565,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 +1576,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 +1588,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 +1599,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..3aedb15f3512 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 @@ -1544,7 +1544,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 +1555,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 +1567,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 +1578,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 }