From 00e0e69c92d59f72882601f5ce77e9e7758dedfa Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 27 Jun 2019 13:45:04 -0700 Subject: [PATCH] [AutoPR netapp/resource-manager] NetApp update swagger for R4.5 (#5123) * Generated from 3eda898774dd0ae7491c1a38535c18dd42489c18 Changing the protocolTypes example * Generated from 3774c22dc6a9601494bd6d033406b97cb403a688 Fix params structure * Generated from fa202ee43cd1263e159ae365977dc2bdb54eb4e3 Fix Swaggers to get the diff working * Generated from 69314a717548234e92ed30fd6fb6caff58b5855b Reverting accidental netapp.json changes --- .../netapp/mgmt/2019-05-01/netapp/client.go | 18 ++++++------------ .../2019-05-01/netapp/netappapi/interfaces.go | 4 ++-- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/services/netapp/mgmt/2019-05-01/netapp/client.go b/services/netapp/mgmt/2019-05-01/netapp/client.go index 1187b7a4b214..a8290eb76d50 100644 --- a/services/netapp/mgmt/2019-05-01/netapp/client.go +++ b/services/netapp/mgmt/2019-05-01/netapp/client.go @@ -56,9 +56,8 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { // CheckFilePathAvailability check if a file path is available. // Parameters: -// body - file path availability request. // location - the location -func (client BaseClient) CheckFilePathAvailability(ctx context.Context, body interface{}, location string) (result ResourceNameAvailability, err error) { +func (client BaseClient) CheckFilePathAvailability(ctx context.Context, location string) (result ResourceNameAvailability, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CheckFilePathAvailability") defer func() { @@ -69,7 +68,7 @@ func (client BaseClient) CheckFilePathAvailability(ctx context.Context, body int tracing.EndSpan(ctx, sc, err) }() } - req, err := client.CheckFilePathAvailabilityPreparer(ctx, body, location) + req, err := client.CheckFilePathAvailabilityPreparer(ctx, location) if err != nil { err = autorest.NewErrorWithError(err, "netapp.BaseClient", "CheckFilePathAvailability", nil, "Failure preparing request") return @@ -91,7 +90,7 @@ func (client BaseClient) CheckFilePathAvailability(ctx context.Context, body int } // CheckFilePathAvailabilityPreparer prepares the CheckFilePathAvailability request. -func (client BaseClient) CheckFilePathAvailabilityPreparer(ctx context.Context, body interface{}, location string) (*http.Request, error) { +func (client BaseClient) CheckFilePathAvailabilityPreparer(ctx context.Context, location string) (*http.Request, error) { pathParameters := map[string]interface{}{ "location": autorest.Encode("path", location), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -103,11 +102,9 @@ func (client BaseClient) CheckFilePathAvailabilityPreparer(ctx context.Context, } preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkFilePathAvailability", pathParameters), - autorest.WithJSON(body), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -134,9 +131,8 @@ func (client BaseClient) CheckFilePathAvailabilityResponder(resp *http.Response) // CheckNameAvailability check if a resource name is available. // Parameters: -// body - name availability request. // location - the location -func (client BaseClient) CheckNameAvailability(ctx context.Context, body interface{}, location string) (result ResourceNameAvailability, err error) { +func (client BaseClient) CheckNameAvailability(ctx context.Context, location string) (result ResourceNameAvailability, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CheckNameAvailability") defer func() { @@ -147,7 +143,7 @@ func (client BaseClient) CheckNameAvailability(ctx context.Context, body interfa tracing.EndSpan(ctx, sc, err) }() } - req, err := client.CheckNameAvailabilityPreparer(ctx, body, location) + req, err := client.CheckNameAvailabilityPreparer(ctx, location) if err != nil { err = autorest.NewErrorWithError(err, "netapp.BaseClient", "CheckNameAvailability", nil, "Failure preparing request") return @@ -169,7 +165,7 @@ func (client BaseClient) CheckNameAvailability(ctx context.Context, body interfa } // CheckNameAvailabilityPreparer prepares the CheckNameAvailability request. -func (client BaseClient) CheckNameAvailabilityPreparer(ctx context.Context, body interface{}, location string) (*http.Request, error) { +func (client BaseClient) CheckNameAvailabilityPreparer(ctx context.Context, location string) (*http.Request, error) { pathParameters := map[string]interface{}{ "location": autorest.Encode("path", location), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -181,11 +177,9 @@ func (client BaseClient) CheckNameAvailabilityPreparer(ctx context.Context, body } preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkNameAvailability", pathParameters), - autorest.WithJSON(body), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } diff --git a/services/netapp/mgmt/2019-05-01/netapp/netappapi/interfaces.go b/services/netapp/mgmt/2019-05-01/netapp/netappapi/interfaces.go index 1fc55ed6f478..fc2e3b040373 100644 --- a/services/netapp/mgmt/2019-05-01/netapp/netappapi/interfaces.go +++ b/services/netapp/mgmt/2019-05-01/netapp/netappapi/interfaces.go @@ -24,8 +24,8 @@ import ( // BaseClientAPI contains the set of methods on the BaseClient type. type BaseClientAPI interface { - CheckFilePathAvailability(ctx context.Context, body interface{}, location string) (result netapp.ResourceNameAvailability, err error) - CheckNameAvailability(ctx context.Context, body interface{}, location string) (result netapp.ResourceNameAvailability, err error) + CheckFilePathAvailability(ctx context.Context, location string) (result netapp.ResourceNameAvailability, err error) + CheckNameAvailability(ctx context.Context, location string) (result netapp.ResourceNameAvailability, err error) } var _ BaseClientAPI = (*netapp.BaseClient)(nil)