From 85d0f3037a1effbb50b18e0d5f1a0a0293e60cce Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Mon, 2 Mar 2020 09:28:43 +0000 Subject: [PATCH] Generated from 84d9da8a4797fc8976dae8a0a1aac0387bc29821 1. Adding nested "properties":{ "properties": { for ARM template. 2. updating examples. --- .../mgmt/2019-04-01/reservations/client.go | 6 ++---- .../mgmt/2019-04-01/reservations/operation.go | 3 +-- .../mgmt/2019-04-01/reservations/order.go | 12 ++++------- .../2019-04-01/reservations/reservation.go | 21 +++++++------------ 4 files changed, 14 insertions(+), 28 deletions(-) diff --git a/services/preview/reservations/mgmt/2019-04-01/reservations/client.go b/services/preview/reservations/mgmt/2019-04-01/reservations/client.go index cea283d7eefb..0621cb0250bd 100644 --- a/services/preview/reservations/mgmt/2019-04-01/reservations/client.go +++ b/services/preview/reservations/mgmt/2019-04-01/reservations/client.go @@ -111,8 +111,7 @@ func (client BaseClient) GetAppliedReservationListPreparer(ctx context.Context, // GetAppliedReservationListSender sends the GetAppliedReservationList request. The method will close the // http.Response Body if it receives an error. func (client BaseClient) GetAppliedReservationListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetAppliedReservationListResponder handles the response to the GetAppliedReservationList request. The method always @@ -192,8 +191,7 @@ func (client BaseClient) GetCatalogPreparer(ctx context.Context, subscriptionID // GetCatalogSender sends the GetCatalog request. The method will close the // http.Response Body if it receives an error. func (client BaseClient) GetCatalogSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetCatalogResponder handles the response to the GetCatalog request. The method always diff --git a/services/preview/reservations/mgmt/2019-04-01/reservations/operation.go b/services/preview/reservations/mgmt/2019-04-01/reservations/operation.go index c6ecac5cb406..735c8ed79c27 100644 --- a/services/preview/reservations/mgmt/2019-04-01/reservations/operation.go +++ b/services/preview/reservations/mgmt/2019-04-01/reservations/operation.go @@ -93,8 +93,7 @@ func (client OperationClient) ListPreparer(ctx context.Context) (*http.Request, // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client OperationClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // ListResponder handles the response to the List request. The method always diff --git a/services/preview/reservations/mgmt/2019-04-01/reservations/order.go b/services/preview/reservations/mgmt/2019-04-01/reservations/order.go index 4d398076f5ff..5fcc99fbe8b4 100644 --- a/services/preview/reservations/mgmt/2019-04-01/reservations/order.go +++ b/services/preview/reservations/mgmt/2019-04-01/reservations/order.go @@ -96,8 +96,7 @@ func (client OrderClient) CalculatePreparer(ctx context.Context, body PurchaseRe // CalculateSender sends the Calculate request. The method will close the // http.Response Body if it receives an error. func (client OrderClient) CalculateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // CalculateResponder handles the response to the Calculate request. The method always @@ -174,8 +173,7 @@ func (client OrderClient) GetPreparer(ctx context.Context, reservationOrderID st // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client OrderClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // GetResponder handles the response to the Get request. The method always @@ -243,8 +241,7 @@ func (client OrderClient) ListPreparer(ctx context.Context) (*http.Request, erro // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client OrderClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // ListResponder handles the response to the List request. The method always @@ -351,9 +348,8 @@ func (client OrderClient) PurchasePreparer(ctx context.Context, reservationOrder // PurchaseSender sends the Purchase request. The method will close the // http.Response Body if it receives an error. func (client OrderClient) PurchaseSender(req *http.Request) (future OrderPurchaseFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) if err != nil { return } diff --git a/services/preview/reservations/mgmt/2019-04-01/reservations/reservation.go b/services/preview/reservations/mgmt/2019-04-01/reservations/reservation.go index 381dc93ecbf7..f51a715d60f2 100644 --- a/services/preview/reservations/mgmt/2019-04-01/reservations/reservation.go +++ b/services/preview/reservations/mgmt/2019-04-01/reservations/reservation.go @@ -103,9 +103,8 @@ func (client Client) AvailableScopesPreparer(ctx context.Context, reservationOrd // AvailableScopesSender sends the AvailableScopes request. The method will close the // http.Response Body if it receives an error. func (client Client) AvailableScopesSender(req *http.Request) (future ReservationAvailableScopesFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) if err != nil { return } @@ -189,8 +188,7 @@ func (client Client) GetPreparer(ctx context.Context, reservationID string, rese // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client Client) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // GetResponder handles the response to the Get request. The method always @@ -264,8 +262,7 @@ func (client Client) ListPreparer(ctx context.Context, reservationOrderID string // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client Client) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // ListResponder handles the response to the List request. The method always @@ -378,8 +375,7 @@ func (client Client) ListRevisionsPreparer(ctx context.Context, reservationID st // ListRevisionsSender sends the ListRevisions request. The method will close the // http.Response Body if it receives an error. func (client Client) ListRevisionsSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // ListRevisionsResponder handles the response to the ListRevisions request. The method always @@ -487,9 +483,8 @@ func (client Client) MergePreparer(ctx context.Context, reservationOrderID strin // MergeSender sends the Merge request. The method will close the // http.Response Body if it receives an error. func (client Client) MergeSender(req *http.Request) (future ReservationMergeFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) if err != nil { return } @@ -564,9 +559,8 @@ func (client Client) SplitPreparer(ctx context.Context, reservationOrderID strin // SplitSender sends the Split request. The method will close the // http.Response Body if it receives an error. func (client Client) SplitSender(req *http.Request) (future SplitFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) if err != nil { return } @@ -643,9 +637,8 @@ func (client Client) UpdatePreparer(ctx context.Context, reservationOrderID stri // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client Client) UpdateSender(req *http.Request) (future ReservationUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) if err != nil { return }