Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queues: specifying a path parameter #4

Merged
merged 3 commits into from
Aug 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions storage/2018-03-28/queue/queues/properties_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,25 @@ type StorageServicePropertiesResponse struct {
// SetServiceProperties gets the properties for this queue
func (client Client) GetServiceProperties(ctx context.Context, accountName string) (result StorageServicePropertiesResponse, err error) {
if accountName == "" {
return result, validation.NewError("queues.Client", "SetServiceProperties", "`accountName` cannot be an empty string.")
return result, validation.NewError("queues.Client", "GetServiceProperties", "`accountName` cannot be an empty string.")
}

req, err := client.GetServicePropertiesPreparer(ctx, accountName)
if err != nil {
err = autorest.NewErrorWithError(err, "queues.Client", "SetServiceProperties", nil, "Failure preparing request")
err = autorest.NewErrorWithError(err, "queues.Client", "GetServiceProperties", nil, "Failure preparing request")
return
}

resp, err := client.GetServicePropertiesSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "queues.Client", "SetServiceProperties", resp, "Failure sending request")
err = autorest.NewErrorWithError(err, "queues.Client", "GetServiceProperties", resp, "Failure sending request")
return
}

result, err = client.GetServicePropertiesResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "queues.Client", "SetServiceProperties", resp, "Failure responding to request")
err = autorest.NewErrorWithError(err, "queues.Client", "GetServiceProperties", resp, "Failure responding to request")
return
}

Expand All @@ -58,6 +58,7 @@ func (client Client) GetServicePropertiesPreparer(ctx context.Context, accountNa
autorest.AsContentType("application/xml; charset=utf-8"),
autorest.AsGet(),
autorest.WithBaseURL(endpoints.GetQueueEndpoint(client.BaseURI, accountName)),
autorest.WithPath("/"),
autorest.WithQueryParameters(queryParameters),
autorest.WithHeaders(headers))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
Expand Down
9 changes: 5 additions & 4 deletions storage/2018-11-09/queue/queues/properties_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,25 @@ type StorageServicePropertiesResponse struct {
// SetServiceProperties gets the properties for this queue
func (client Client) GetServiceProperties(ctx context.Context, accountName string) (result StorageServicePropertiesResponse, err error) {
if accountName == "" {
return result, validation.NewError("queues.Client", "SetServiceProperties", "`accountName` cannot be an empty string.")
return result, validation.NewError("queues.Client", "GetServiceProperties", "`accountName` cannot be an empty string.")
}

req, err := client.GetServicePropertiesPreparer(ctx, accountName)
if err != nil {
err = autorest.NewErrorWithError(err, "queues.Client", "SetServiceProperties", nil, "Failure preparing request")
err = autorest.NewErrorWithError(err, "queues.Client", "GetServiceProperties", nil, "Failure preparing request")
return
}

resp, err := client.GetServicePropertiesSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "queues.Client", "SetServiceProperties", resp, "Failure sending request")
err = autorest.NewErrorWithError(err, "queues.Client", "GetServiceProperties", resp, "Failure sending request")
return
}

result, err = client.GetServicePropertiesResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "queues.Client", "SetServiceProperties", resp, "Failure responding to request")
err = autorest.NewErrorWithError(err, "queues.Client", "GetServiceProperties", resp, "Failure responding to request")
return
}

Expand All @@ -58,6 +58,7 @@ func (client Client) GetServicePropertiesPreparer(ctx context.Context, accountNa
autorest.AsContentType("application/xml; charset=utf-8"),
autorest.AsGet(),
autorest.WithBaseURL(endpoints.GetQueueEndpoint(client.BaseURI, accountName)),
autorest.WithPath("/"),
autorest.WithQueryParameters(queryParameters),
autorest.WithHeaders(headers))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
Expand Down
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package version

const Number = "v0.0.1"
const Number = "v0.3.1"