vendor: update all dependencies to latest versions

This commit is contained in:
Nick Craig-Wood
2017-09-30 15:27:27 +01:00
parent 911d121bb9
commit b017fcfe9a
3048 changed files with 537055 additions and 189679 deletions
+151 -213
View File
@@ -14,9 +14,8 @@ package sql
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/Azure/go-autorest/autorest"
@@ -24,10 +23,9 @@ import (
"net/http"
)
// ElasticPoolsClient is the the Azure SQL Database management API provides a
// RESTful set of web services that interact with Azure SQL Database services
// to manage your databases. The API enables you to create, retrieve, update,
// and delete databases.
// ElasticPoolsClient is the the Azure SQL Database management API provides a RESTful set of web services that interact
// with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and
// delete databases.
type ElasticPoolsClient struct {
ManagementClient
}
@@ -37,22 +35,19 @@ func NewElasticPoolsClient(subscriptionID string) ElasticPoolsClient {
return NewElasticPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewElasticPoolsClientWithBaseURI creates an instance of the
// ElasticPoolsClient client.
// NewElasticPoolsClientWithBaseURI creates an instance of the ElasticPoolsClient client.
func NewElasticPoolsClientWithBaseURI(baseURI string, subscriptionID string) ElasticPoolsClient {
return ElasticPoolsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CreateOrUpdate creates a new elastic pool or updates an existing elastic
// pool. This method may poll for completion. Polling can be canceled by
// passing the cancel channel argument. The channel will be used to cancel
// polling and any outstanding HTTP requests.
// CreateOrUpdate creates a new elastic pool or updates an existing elastic pool. This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group that contains the
// resource. You can obtain this value from the Azure Resource Manager API or
// the portal. serverName is the name of the server. elasticPoolName is the
// name of the elastic pool to be operated on (updated or created). parameters
// is the required parameters for creating or updating an elastic pool.
// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the
// Azure Resource Manager API or the portal. serverName is the name of the server. elasticPoolName is the name of the
// elastic pool to be operated on (updated or created). parameters is the required parameters for creating or updating
// an elastic pool.
func (client ElasticPoolsClient) CreateOrUpdate(resourceGroupName string, serverName string, elasticPoolName string, parameters ElasticPool, cancel <-chan struct{}) (<-chan ElasticPool, <-chan error) {
resultChan := make(chan ElasticPool, 1)
errChan := make(chan error, 1)
@@ -60,8 +55,10 @@ func (client ElasticPoolsClient) CreateOrUpdate(resourceGroupName string, server
var err error
var result ElasticPool
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -133,10 +130,9 @@ func (client ElasticPoolsClient) CreateOrUpdateResponder(resp *http.Response) (r
// Delete deletes the elastic pool.
//
// resourceGroupName is the name of the resource group that contains the
// resource. You can obtain this value from the Azure Resource Manager API or
// the portal. serverName is the name of the server. elasticPoolName is the
// name of the elastic pool to be deleted.
// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the
// Azure Resource Manager API or the portal. serverName is the name of the server. elasticPoolName is the name of the
// elastic pool to be deleted.
func (client ElasticPoolsClient) Delete(resourceGroupName string, serverName string, elasticPoolName string) (result autorest.Response, err error) {
req, err := client.DeletePreparer(resourceGroupName, serverName, elasticPoolName)
if err != nil {
@@ -201,10 +197,9 @@ func (client ElasticPoolsClient) DeleteResponder(resp *http.Response) (result au
// Get gets an elastic pool.
//
// resourceGroupName is the name of the resource group that contains the
// resource. You can obtain this value from the Azure Resource Manager API or
// the portal. serverName is the name of the server. elasticPoolName is the
// name of the elastic pool to be retrieved.
// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the
// Azure Resource Manager API or the portal. serverName is the name of the server. elasticPoolName is the name of the
// elastic pool to be retrieved.
func (client ElasticPoolsClient) Get(resourceGroupName string, serverName string, elasticPoolName string) (result ElasticPool, err error) {
req, err := client.GetPreparer(resourceGroupName, serverName, elasticPoolName)
if err != nil {
@@ -268,151 +263,10 @@ func (client ElasticPoolsClient) GetResponder(resp *http.Response) (result Elast
return
}
// GetDatabase gets a database inside of an elastic pool.
//
// resourceGroupName is the name of the resource group that contains the
// resource. You can obtain this value from the Azure Resource Manager API or
// the portal. serverName is the name of the server. elasticPoolName is the
// name of the elastic pool to be retrieved. databaseName is the name of the
// database to be retrieved.
func (client ElasticPoolsClient) GetDatabase(resourceGroupName string, serverName string, elasticPoolName string, databaseName string) (result Database, err error) {
req, err := client.GetDatabasePreparer(resourceGroupName, serverName, elasticPoolName, databaseName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "GetDatabase", nil, "Failure preparing request")
return
}
resp, err := client.GetDatabaseSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "GetDatabase", resp, "Failure sending request")
return
}
result, err = client.GetDatabaseResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "GetDatabase", resp, "Failure responding to request")
}
return
}
// GetDatabasePreparer prepares the GetDatabase request.
func (client ElasticPoolsClient) GetDatabasePreparer(resourceGroupName string, serverName string, elasticPoolName string, databaseName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"databaseName": autorest.Encode("path", databaseName),
"elasticPoolName": autorest.Encode("path", elasticPoolName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"serverName": autorest.Encode("path", serverName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2014-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases/{databaseName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// GetDatabaseSender sends the GetDatabase request. The method will close the
// http.Response Body if it receives an error.
func (client ElasticPoolsClient) GetDatabaseSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetDatabaseResponder handles the response to the GetDatabase request. The method always
// closes the http.Response Body.
func (client ElasticPoolsClient) GetDatabaseResponder(resp *http.Response) (result Database, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// ListActivity returns elastic pool activities.
//
// resourceGroupName is the name of the resource group that contains the
// resource. You can obtain this value from the Azure Resource Manager API or
// the portal. serverName is the name of the server. elasticPoolName is the
// name of the elastic pool for which to get the current activity.
func (client ElasticPoolsClient) ListActivity(resourceGroupName string, serverName string, elasticPoolName string) (result ElasticPoolActivityListResult, err error) {
req, err := client.ListActivityPreparer(resourceGroupName, serverName, elasticPoolName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListActivity", nil, "Failure preparing request")
return
}
resp, err := client.ListActivitySender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListActivity", resp, "Failure sending request")
return
}
result, err = client.ListActivityResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListActivity", resp, "Failure responding to request")
}
return
}
// ListActivityPreparer prepares the ListActivity request.
func (client ElasticPoolsClient) ListActivityPreparer(resourceGroupName string, serverName string, elasticPoolName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"elasticPoolName": autorest.Encode("path", elasticPoolName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"serverName": autorest.Encode("path", serverName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2014-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolActivity", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// ListActivitySender sends the ListActivity request. The method will close the
// http.Response Body if it receives an error.
func (client ElasticPoolsClient) ListActivitySender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// ListActivityResponder handles the response to the ListActivity request. The method always
// closes the http.Response Body.
func (client ElasticPoolsClient) ListActivityResponder(resp *http.Response) (result ElasticPoolActivityListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// ListByServer returns a list of elastic pools in a server.
//
// resourceGroupName is the name of the resource group that contains the
// resource. You can obtain this value from the Azure Resource Manager API or
// the portal. serverName is the name of the server.
// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the
// Azure Resource Manager API or the portal. serverName is the name of the server.
func (client ElasticPoolsClient) ListByServer(resourceGroupName string, serverName string) (result ElasticPoolListResult, err error) {
req, err := client.ListByServerPreparer(resourceGroupName, serverName)
if err != nil {
@@ -475,37 +329,35 @@ func (client ElasticPoolsClient) ListByServerResponder(resp *http.Response) (res
return
}
// ListDatabaseActivity returns activity on databases inside of an elastic
// pool.
// ListMetricDefinitions returns elastic pool metric definitions.
//
// resourceGroupName is the name of the resource group that contains the
// resource. You can obtain this value from the Azure Resource Manager API or
// the portal. serverName is the name of the server. elasticPoolName is the
// name of the elastic pool.
func (client ElasticPoolsClient) ListDatabaseActivity(resourceGroupName string, serverName string, elasticPoolName string) (result ElasticPoolDatabaseActivityListResult, err error) {
req, err := client.ListDatabaseActivityPreparer(resourceGroupName, serverName, elasticPoolName)
// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the
// Azure Resource Manager API or the portal. serverName is the name of the server. elasticPoolName is the name of the
// elastic pool.
func (client ElasticPoolsClient) ListMetricDefinitions(resourceGroupName string, serverName string, elasticPoolName string) (result MetricDefinitionListResult, err error) {
req, err := client.ListMetricDefinitionsPreparer(resourceGroupName, serverName, elasticPoolName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListDatabaseActivity", nil, "Failure preparing request")
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListMetricDefinitions", nil, "Failure preparing request")
return
}
resp, err := client.ListDatabaseActivitySender(req)
resp, err := client.ListMetricDefinitionsSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListDatabaseActivity", resp, "Failure sending request")
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListMetricDefinitions", resp, "Failure sending request")
return
}
result, err = client.ListDatabaseActivityResponder(resp)
result, err = client.ListMetricDefinitionsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListDatabaseActivity", resp, "Failure responding to request")
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListMetricDefinitions", resp, "Failure responding to request")
}
return
}
// ListDatabaseActivityPreparer prepares the ListDatabaseActivity request.
func (client ElasticPoolsClient) ListDatabaseActivityPreparer(resourceGroupName string, serverName string, elasticPoolName string) (*http.Request, error) {
// ListMetricDefinitionsPreparer prepares the ListMetricDefinitions request.
func (client ElasticPoolsClient) ListMetricDefinitionsPreparer(resourceGroupName string, serverName string, elasticPoolName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"elasticPoolName": autorest.Encode("path", elasticPoolName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
@@ -521,20 +373,20 @@ func (client ElasticPoolsClient) ListDatabaseActivityPreparer(resourceGroupName
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolDatabaseActivity", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metricDefinitions", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// ListDatabaseActivitySender sends the ListDatabaseActivity request. The method will close the
// ListMetricDefinitionsSender sends the ListMetricDefinitions request. The method will close the
// http.Response Body if it receives an error.
func (client ElasticPoolsClient) ListDatabaseActivitySender(req *http.Request) (*http.Response, error) {
func (client ElasticPoolsClient) ListMetricDefinitionsSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// ListDatabaseActivityResponder handles the response to the ListDatabaseActivity request. The method always
// ListMetricDefinitionsResponder handles the response to the ListMetricDefinitions request. The method always
// closes the http.Response Body.
func (client ElasticPoolsClient) ListDatabaseActivityResponder(resp *http.Response) (result ElasticPoolDatabaseActivityListResult, err error) {
func (client ElasticPoolsClient) ListMetricDefinitionsResponder(resp *http.Response) (result MetricDefinitionListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
@@ -545,36 +397,118 @@ func (client ElasticPoolsClient) ListDatabaseActivityResponder(resp *http.Respon
return
}
// ListDatabases returns a list of databases in an elastic pool.
// ListMetrics returns elastic pool metrics.
//
// resourceGroupName is the name of the resource group that contains the
// resource. You can obtain this value from the Azure Resource Manager API or
// the portal. serverName is the name of the server. elasticPoolName is the
// name of the elastic pool to be retrieved.
func (client ElasticPoolsClient) ListDatabases(resourceGroupName string, serverName string, elasticPoolName string) (result DatabaseListResult, err error) {
req, err := client.ListDatabasesPreparer(resourceGroupName, serverName, elasticPoolName)
// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the
// Azure Resource Manager API or the portal. serverName is the name of the server. elasticPoolName is the name of the
// elastic pool. filter is an OData filter expression that describes a subset of metrics to return.
func (client ElasticPoolsClient) ListMetrics(resourceGroupName string, serverName string, elasticPoolName string, filter string) (result MetricListResult, err error) {
req, err := client.ListMetricsPreparer(resourceGroupName, serverName, elasticPoolName, filter)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListDatabases", nil, "Failure preparing request")
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListMetrics", nil, "Failure preparing request")
return
}
resp, err := client.ListDatabasesSender(req)
resp, err := client.ListMetricsSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListDatabases", resp, "Failure sending request")
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListMetrics", resp, "Failure sending request")
return
}
result, err = client.ListDatabasesResponder(resp)
result, err = client.ListMetricsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListDatabases", resp, "Failure responding to request")
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListMetrics", resp, "Failure responding to request")
}
return
}
// ListDatabasesPreparer prepares the ListDatabases request.
func (client ElasticPoolsClient) ListDatabasesPreparer(resourceGroupName string, serverName string, elasticPoolName string) (*http.Request, error) {
// ListMetricsPreparer prepares the ListMetrics request.
func (client ElasticPoolsClient) ListMetricsPreparer(resourceGroupName string, serverName string, elasticPoolName string, filter string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"elasticPoolName": autorest.Encode("path", elasticPoolName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"serverName": autorest.Encode("path", serverName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2014-04-01"
queryParameters := map[string]interface{}{
"$filter": autorest.Encode("query", filter),
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metrics", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// ListMetricsSender sends the ListMetrics request. The method will close the
// http.Response Body if it receives an error.
func (client ElasticPoolsClient) ListMetricsSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// ListMetricsResponder handles the response to the ListMetrics request. The method always
// closes the http.Response Body.
func (client ElasticPoolsClient) ListMetricsResponder(resp *http.Response) (result MetricListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// Update updates an existing elastic pool. This method may poll for completion. Polling can be canceled by passing the
// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the
// Azure Resource Manager API or the portal. serverName is the name of the server. elasticPoolName is the name of the
// elastic pool to be updated. parameters is the required parameters for updating an elastic pool.
func (client ElasticPoolsClient) Update(resourceGroupName string, serverName string, elasticPoolName string, parameters ElasticPoolUpdate, cancel <-chan struct{}) (<-chan ElasticPool, <-chan error) {
resultChan := make(chan ElasticPool, 1)
errChan := make(chan error, 1)
go func() {
var err error
var result ElasticPool
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
close(resultChan)
close(errChan)
}()
req, err := client.UpdatePreparer(resourceGroupName, serverName, elasticPoolName, parameters, cancel)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "Update", nil, "Failure preparing request")
return
}
resp, err := client.UpdateSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "Update", resp, "Failure sending request")
return
}
result, err = client.UpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "Update", resp, "Failure responding to request")
}
}()
return resultChan, errChan
}
// UpdatePreparer prepares the Update request.
func (client ElasticPoolsClient) UpdatePreparer(resourceGroupName string, serverName string, elasticPoolName string, parameters ElasticPoolUpdate, cancel <-chan struct{}) (*http.Request, error) {
pathParameters := map[string]interface{}{
"elasticPoolName": autorest.Encode("path", elasticPoolName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
@@ -588,26 +522,30 @@ func (client ElasticPoolsClient) ListDatabasesPreparer(resourceGroupName string,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.AsJSON(),
autorest.AsPatch(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}", pathParameters),
autorest.WithJSON(parameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
return preparer.Prepare(&http.Request{Cancel: cancel})
}
// ListDatabasesSender sends the ListDatabases request. The method will close the
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ElasticPoolsClient) ListDatabasesSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
func (client ElasticPoolsClient) UpdateSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client,
req,
azure.DoPollForAsynchronous(client.PollingDelay))
}
// ListDatabasesResponder handles the response to the ListDatabases request. The method always
// UpdateResponder handles the response to the Update request. The method always
// closes the http.Response Body.
func (client ElasticPoolsClient) ListDatabasesResponder(resp *http.Response) (result DatabaseListResult, err error) {
func (client ElasticPoolsClient) UpdateResponder(resp *http.Response) (result ElasticPool, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}