diff --git a/services/sql/mgmt/2014-04-01/sql/backuplongtermretentionpolicies.go b/services/sql/mgmt/2014-04-01/sql/backuplongtermretentionpolicies.go deleted file mode 100644 index b57d1fae216e..000000000000 --- a/services/sql/mgmt/2014-04-01/sql/backuplongtermretentionpolicies.go +++ /dev/null @@ -1,296 +0,0 @@ -package sql - -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// BackupLongTermRetentionPoliciesClient 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 BackupLongTermRetentionPoliciesClient struct { - BaseClient -} - -// NewBackupLongTermRetentionPoliciesClient creates an instance of the BackupLongTermRetentionPoliciesClient client. -func NewBackupLongTermRetentionPoliciesClient(subscriptionID string) BackupLongTermRetentionPoliciesClient { - return NewBackupLongTermRetentionPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewBackupLongTermRetentionPoliciesClientWithBaseURI creates an instance of the BackupLongTermRetentionPoliciesClient -// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI -// (sovereign clouds, Azure stack). -func NewBackupLongTermRetentionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) BackupLongTermRetentionPoliciesClient { - return BackupLongTermRetentionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a database backup long term retention policy -// Parameters: -// resourceGroupName - 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 - the name of the server. -// databaseName - the name of the database -// parameters - the required parameters to update a backup long term retention policy -func (client BackupLongTermRetentionPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters BackupLongTermRetentionPolicy) (result BackupLongTermRetentionPoliciesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BackupLongTermRetentionPoliciesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.BackupLongTermRetentionPolicyProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.BackupLongTermRetentionPolicyProperties.RecoveryServicesBackupPolicyResourceID", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("sql.BackupLongTermRetentionPoliciesClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client BackupLongTermRetentionPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters BackupLongTermRetentionPolicy) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "backupLongTermRetentionPolicyName": autorest.Encode("path", "Default"), - "databaseName": autorest.Encode("path", databaseName), - "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, - } - - parameters.Location = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{backupLongTermRetentionPolicyName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client BackupLongTermRetentionPoliciesClient) CreateOrUpdateSender(req *http.Request) (future BackupLongTermRetentionPoliciesCreateOrUpdateFuture, err error) { - var resp *http.Response - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client BackupLongTermRetentionPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result BackupLongTermRetentionPolicy, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get returns a database backup long term retention policy -// Parameters: -// resourceGroupName - 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 - the name of the server. -// databaseName - the name of the database. -func (client BackupLongTermRetentionPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result BackupLongTermRetentionPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BackupLongTermRetentionPoliciesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesClient", "Get", resp, "Failure responding to request") - } - - return -} - -// GetPreparer prepares the Get request. -func (client BackupLongTermRetentionPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "backupLongTermRetentionPolicyName": autorest.Encode("path", "Default"), - "databaseName": autorest.Encode("path", databaseName), - "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}/databases/{databaseName}/backupLongTermRetentionPolicies/{backupLongTermRetentionPolicyName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client BackupLongTermRetentionPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client BackupLongTermRetentionPoliciesClient) GetResponder(resp *http.Response) (result BackupLongTermRetentionPolicy, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByDatabase returns a database backup long term retention policy -// Parameters: -// resourceGroupName - 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 - the name of the server. -// databaseName - the name of the database. -func (client BackupLongTermRetentionPoliciesClient) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result BackupLongTermRetentionPolicyListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BackupLongTermRetentionPoliciesClient.ListByDatabase") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListByDatabasePreparer(ctx, resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesClient", "ListByDatabase", nil, "Failure preparing request") - return - } - - resp, err := client.ListByDatabaseSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesClient", "ListByDatabase", resp, "Failure sending request") - return - } - - result, err = client.ListByDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesClient", "ListByDatabase", resp, "Failure responding to request") - } - - return -} - -// ListByDatabasePreparer prepares the ListByDatabase request. -func (client BackupLongTermRetentionPoliciesClient) ListByDatabasePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "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}/databases/{databaseName}/backupLongTermRetentionPolicies", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByDatabaseSender sends the ListByDatabase request. The method will close the -// http.Response Body if it receives an error. -func (client BackupLongTermRetentionPoliciesClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByDatabaseResponder handles the response to the ListByDatabase request. The method always -// closes the http.Response Body. -func (client BackupLongTermRetentionPoliciesClient) ListByDatabaseResponder(resp *http.Response) (result BackupLongTermRetentionPolicyListResult, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/services/sql/mgmt/2014-04-01/sql/backuplongtermretentionvaults.go b/services/sql/mgmt/2014-04-01/sql/backuplongtermretentionvaults.go deleted file mode 100644 index 10fc3dc60777..000000000000 --- a/services/sql/mgmt/2014-04-01/sql/backuplongtermretentionvaults.go +++ /dev/null @@ -1,290 +0,0 @@ -package sql - -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// BackupLongTermRetentionVaultsClient 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 BackupLongTermRetentionVaultsClient struct { - BaseClient -} - -// NewBackupLongTermRetentionVaultsClient creates an instance of the BackupLongTermRetentionVaultsClient client. -func NewBackupLongTermRetentionVaultsClient(subscriptionID string) BackupLongTermRetentionVaultsClient { - return NewBackupLongTermRetentionVaultsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewBackupLongTermRetentionVaultsClientWithBaseURI creates an instance of the BackupLongTermRetentionVaultsClient -// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI -// (sovereign clouds, Azure stack). -func NewBackupLongTermRetentionVaultsClientWithBaseURI(baseURI string, subscriptionID string) BackupLongTermRetentionVaultsClient { - return BackupLongTermRetentionVaultsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate updates a server backup long term retention vault -// Parameters: -// resourceGroupName - 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 - the name of the server. -// parameters - the required parameters to update a backup long term retention vault -func (client BackupLongTermRetentionVaultsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters BackupLongTermRetentionVault) (result BackupLongTermRetentionVaultsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BackupLongTermRetentionVaultsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.BackupLongTermRetentionVaultProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.BackupLongTermRetentionVaultProperties.RecoveryServicesVaultResourceID", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("sql.BackupLongTermRetentionVaultsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client BackupLongTermRetentionVaultsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, parameters BackupLongTermRetentionVault) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "backupLongTermRetentionVaultName": autorest.Encode("path", "RegisteredVault"), - "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, - } - - parameters.Location = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/backupLongTermRetentionVaults/{backupLongTermRetentionVaultName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client BackupLongTermRetentionVaultsClient) CreateOrUpdateSender(req *http.Request) (future BackupLongTermRetentionVaultsCreateOrUpdateFuture, err error) { - var resp *http.Response - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client BackupLongTermRetentionVaultsClient) CreateOrUpdateResponder(resp *http.Response) (result BackupLongTermRetentionVault, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get gets a server backup long term retention vault -// Parameters: -// resourceGroupName - 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 - the name of the server. -func (client BackupLongTermRetentionVaultsClient) Get(ctx context.Context, resourceGroupName string, serverName string) (result BackupLongTermRetentionVault, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BackupLongTermRetentionVaultsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsClient", "Get", resp, "Failure responding to request") - } - - return -} - -// GetPreparer prepares the Get request. -func (client BackupLongTermRetentionVaultsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "backupLongTermRetentionVaultName": autorest.Encode("path", "RegisteredVault"), - "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}/backupLongTermRetentionVaults/{backupLongTermRetentionVaultName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client BackupLongTermRetentionVaultsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client BackupLongTermRetentionVaultsClient) GetResponder(resp *http.Response) (result BackupLongTermRetentionVault, 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 gets server backup long term retention vaults in a server -// Parameters: -// resourceGroupName - 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 - the name of the server. -func (client BackupLongTermRetentionVaultsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result BackupLongTermRetentionVaultListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BackupLongTermRetentionVaultsClient.ListByServer") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsClient", "ListByServer", resp, "Failure sending request") - return - } - - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsClient", "ListByServer", resp, "Failure responding to request") - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client BackupLongTermRetentionVaultsClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "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}/backupLongTermRetentionVaults", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client BackupLongTermRetentionVaultsClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client BackupLongTermRetentionVaultsClient) ListByServerResponder(resp *http.Response) (result BackupLongTermRetentionVaultListResult, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/services/sql/mgmt/2014-04-01/sql/capabilities.go b/services/sql/mgmt/2014-04-01/sql/capabilities.go index 3f4b4dc7aaf7..083d62ba797e 100644 --- a/services/sql/mgmt/2014-04-01/sql/capabilities.go +++ b/services/sql/mgmt/2014-04-01/sql/capabilities.go @@ -109,7 +109,6 @@ func (client CapabilitiesClient) ListByLocationSender(req *http.Request) (*http. func (client CapabilitiesClient) ListByLocationResponder(resp *http.Response) (result LocationCapabilities, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/databaseadvisors.go b/services/sql/mgmt/2014-04-01/sql/databaseadvisors.go index 9be05e37d845..d376a1bdfda4 100644 --- a/services/sql/mgmt/2014-04-01/sql/databaseadvisors.go +++ b/services/sql/mgmt/2014-04-01/sql/databaseadvisors.go @@ -122,7 +122,6 @@ func (client DatabaseAdvisorsClient) CreateOrUpdateSender(req *http.Request) (*h func (client DatabaseAdvisorsClient) CreateOrUpdateResponder(resp *http.Response) (result Advisor, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -203,7 +202,6 @@ func (client DatabaseAdvisorsClient) GetSender(req *http.Request) (*http.Respons func (client DatabaseAdvisorsClient) GetResponder(resp *http.Response) (result Advisor, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -282,7 +280,6 @@ func (client DatabaseAdvisorsClient) ListByDatabaseSender(req *http.Request) (*h func (client DatabaseAdvisorsClient) ListByDatabaseResponder(resp *http.Response) (result AdvisorListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/databaseconnectionpolicies.go b/services/sql/mgmt/2014-04-01/sql/databaseconnectionpolicies.go index 8a77aca868e6..ead47aaac098 100644 --- a/services/sql/mgmt/2014-04-01/sql/databaseconnectionpolicies.go +++ b/services/sql/mgmt/2014-04-01/sql/databaseconnectionpolicies.go @@ -122,7 +122,6 @@ func (client DatabaseConnectionPoliciesClient) CreateOrUpdateSender(req *http.Re func (client DatabaseConnectionPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result DatabaseConnectionPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -203,7 +202,6 @@ func (client DatabaseConnectionPoliciesClient) GetSender(req *http.Request) (*ht func (client DatabaseConnectionPoliciesClient) GetResponder(resp *http.Response) (result DatabaseConnectionPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/databases.go b/services/sql/mgmt/2014-04-01/sql/databases.go index 2c141929b3ea..6d9baa828e41 100644 --- a/services/sql/mgmt/2014-04-01/sql/databases.go +++ b/services/sql/mgmt/2014-04-01/sql/databases.go @@ -127,7 +127,6 @@ func (client DatabasesClient) CreateImportOperationSender(req *http.Request) (fu func (client DatabasesClient) CreateImportOperationResponder(resp *http.Response) (result ImportExportResponse, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -210,7 +209,6 @@ func (client DatabasesClient) CreateOrUpdateSender(req *http.Request) (future Da func (client DatabasesClient) CreateOrUpdateResponder(resp *http.Response) (result Database, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -289,7 +287,6 @@ func (client DatabasesClient) DeleteSender(req *http.Request) (*http.Response, e func (client DatabasesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -379,7 +376,6 @@ func (client DatabasesClient) ExportSender(req *http.Request) (future DatabasesE func (client DatabasesClient) ExportResponder(resp *http.Response) (result ImportExportResponse, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -463,7 +459,6 @@ func (client DatabasesClient) GetSender(req *http.Request) (*http.Response, erro func (client DatabasesClient) GetResponder(resp *http.Response) (result Database, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -544,7 +539,6 @@ func (client DatabasesClient) GetByElasticPoolSender(req *http.Request) (*http.R func (client DatabasesClient) GetByElasticPoolResponder(resp *http.Response) (result Database, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -625,7 +619,6 @@ func (client DatabasesClient) GetByRecommendedElasticPoolSender(req *http.Reques func (client DatabasesClient) GetByRecommendedElasticPoolResponder(resp *http.Response) (result Database, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -712,7 +705,6 @@ func (client DatabasesClient) ImportSender(req *http.Request) (future DatabasesI func (client DatabasesClient) ImportResponder(resp *http.Response) (result ImportExportResponse, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -791,7 +783,6 @@ func (client DatabasesClient) ListByElasticPoolSender(req *http.Request) (*http. func (client DatabasesClient) ListByElasticPoolResponder(resp *http.Response) (result DatabaseListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -870,7 +861,6 @@ func (client DatabasesClient) ListByRecommendedElasticPoolSender(req *http.Reque func (client DatabasesClient) ListByRecommendedElasticPoolResponder(resp *http.Response) (result DatabaseListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -956,7 +946,6 @@ func (client DatabasesClient) ListByServerSender(req *http.Request) (*http.Respo func (client DatabasesClient) ListByServerResponder(resp *http.Response) (result DatabaseListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1035,7 +1024,6 @@ func (client DatabasesClient) ListMetricDefinitionsSender(req *http.Request) (*h func (client DatabasesClient) ListMetricDefinitionsResponder(resp *http.Response) (result MetricDefinitionListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1116,7 +1104,6 @@ func (client DatabasesClient) ListMetricsSender(req *http.Request) (*http.Respon func (client DatabasesClient) ListMetricsResponder(resp *http.Response) (result MetricListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1195,7 +1182,6 @@ func (client DatabasesClient) PauseSender(req *http.Request) (future DatabasesPa func (client DatabasesClient) PauseResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByClosing()) result.Response = resp @@ -1273,7 +1259,6 @@ func (client DatabasesClient) ResumeSender(req *http.Request) (future DatabasesR func (client DatabasesClient) ResumeResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByClosing()) result.Response = resp @@ -1354,7 +1339,6 @@ func (client DatabasesClient) UpdateSender(req *http.Request) (future DatabasesU func (client DatabasesClient) UpdateResponder(resp *http.Response) (result Database, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/databasetableauditingpolicies.go b/services/sql/mgmt/2014-04-01/sql/databasetableauditingpolicies.go index 08248776a416..2486f2b26b42 100644 --- a/services/sql/mgmt/2014-04-01/sql/databasetableauditingpolicies.go +++ b/services/sql/mgmt/2014-04-01/sql/databasetableauditingpolicies.go @@ -122,7 +122,6 @@ func (client DatabaseTableAuditingPoliciesClient) CreateOrUpdateSender(req *http func (client DatabaseTableAuditingPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result DatabaseTableAuditingPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -202,7 +201,6 @@ func (client DatabaseTableAuditingPoliciesClient) GetSender(req *http.Request) ( func (client DatabaseTableAuditingPoliciesClient) GetResponder(resp *http.Response) (result DatabaseTableAuditingPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -281,7 +279,6 @@ func (client DatabaseTableAuditingPoliciesClient) ListByDatabaseSender(req *http func (client DatabaseTableAuditingPoliciesClient) ListByDatabaseResponder(resp *http.Response) (result DatabaseTableAuditingPolicyListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/databasethreatdetectionpolicies.go b/services/sql/mgmt/2014-04-01/sql/databasethreatdetectionpolicies.go index 36da1a27f9fb..33f6aafdecdf 100644 --- a/services/sql/mgmt/2014-04-01/sql/databasethreatdetectionpolicies.go +++ b/services/sql/mgmt/2014-04-01/sql/databasethreatdetectionpolicies.go @@ -120,7 +120,6 @@ func (client DatabaseThreatDetectionPoliciesClient) CreateOrUpdateSender(req *ht func (client DatabaseThreatDetectionPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result DatabaseSecurityAlertPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -200,7 +199,6 @@ func (client DatabaseThreatDetectionPoliciesClient) GetSender(req *http.Request) func (client DatabaseThreatDetectionPoliciesClient) GetResponder(resp *http.Response) (result DatabaseSecurityAlertPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/databaseusages.go b/services/sql/mgmt/2014-04-01/sql/databaseusages.go index f82b90e7f278..821f798cc4f8 100644 --- a/services/sql/mgmt/2014-04-01/sql/databaseusages.go +++ b/services/sql/mgmt/2014-04-01/sql/databaseusages.go @@ -114,7 +114,6 @@ func (client DatabaseUsagesClient) ListByDatabaseSender(req *http.Request) (*htt func (client DatabaseUsagesClient) ListByDatabaseResponder(resp *http.Response) (result DatabaseUsageListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/datamaskingpolicies.go b/services/sql/mgmt/2014-04-01/sql/datamaskingpolicies.go index f9c7ddaa04a4..78e7267705dd 100644 --- a/services/sql/mgmt/2014-04-01/sql/datamaskingpolicies.go +++ b/services/sql/mgmt/2014-04-01/sql/datamaskingpolicies.go @@ -121,7 +121,6 @@ func (client DataMaskingPoliciesClient) CreateOrUpdateSender(req *http.Request) func (client DataMaskingPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result DataMaskingPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -201,7 +200,6 @@ func (client DataMaskingPoliciesClient) GetSender(req *http.Request) (*http.Resp func (client DataMaskingPoliciesClient) GetResponder(resp *http.Response) (result DataMaskingPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/datamaskingrules.go b/services/sql/mgmt/2014-04-01/sql/datamaskingrules.go index ed1747512b69..3b18e7b024a4 100644 --- a/services/sql/mgmt/2014-04-01/sql/datamaskingrules.go +++ b/services/sql/mgmt/2014-04-01/sql/datamaskingrules.go @@ -134,7 +134,6 @@ func (client DataMaskingRulesClient) CreateOrUpdateSender(req *http.Request) (*h func (client DataMaskingRulesClient) CreateOrUpdateResponder(resp *http.Response) (result DataMaskingRule, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -214,7 +213,6 @@ func (client DataMaskingRulesClient) ListByDatabaseSender(req *http.Request) (*h func (client DataMaskingRulesClient) ListByDatabaseResponder(resp *http.Response) (result DataMaskingRuleListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/disasterrecoveryconfigurations.go b/services/sql/mgmt/2014-04-01/sql/disasterrecoveryconfigurations.go index 279ba880ce52..46ae3d19d93f 100644 --- a/services/sql/mgmt/2014-04-01/sql/disasterrecoveryconfigurations.go +++ b/services/sql/mgmt/2014-04-01/sql/disasterrecoveryconfigurations.go @@ -115,7 +115,6 @@ func (client DisasterRecoveryConfigurationsClient) CreateOrUpdateSender(req *htt func (client DisasterRecoveryConfigurationsClient) CreateOrUpdateResponder(resp *http.Response) (result DisasterRecoveryConfiguration, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -194,7 +193,6 @@ func (client DisasterRecoveryConfigurationsClient) DeleteSender(req *http.Reques func (client DisasterRecoveryConfigurationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -272,7 +270,6 @@ func (client DisasterRecoveryConfigurationsClient) FailoverSender(req *http.Requ func (client DisasterRecoveryConfigurationsClient) FailoverResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -351,7 +348,6 @@ func (client DisasterRecoveryConfigurationsClient) FailoverAllowDataLossSender(r func (client DisasterRecoveryConfigurationsClient) FailoverAllowDataLossResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -429,7 +425,6 @@ func (client DisasterRecoveryConfigurationsClient) GetSender(req *http.Request) func (client DisasterRecoveryConfigurationsClient) GetResponder(resp *http.Response) (result DisasterRecoveryConfiguration, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -506,7 +501,6 @@ func (client DisasterRecoveryConfigurationsClient) ListSender(req *http.Request) func (client DisasterRecoveryConfigurationsClient) ListResponder(resp *http.Response) (result DisasterRecoveryConfigurationListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/elasticpoolactivities.go b/services/sql/mgmt/2014-04-01/sql/elasticpoolactivities.go index 0e27c3b7d485..c268b9637370 100644 --- a/services/sql/mgmt/2014-04-01/sql/elasticpoolactivities.go +++ b/services/sql/mgmt/2014-04-01/sql/elasticpoolactivities.go @@ -115,7 +115,6 @@ func (client ElasticPoolActivitiesClient) ListByElasticPoolSender(req *http.Requ func (client ElasticPoolActivitiesClient) ListByElasticPoolResponder(resp *http.Response) (result ElasticPoolActivityListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/elasticpooldatabaseactivities.go b/services/sql/mgmt/2014-04-01/sql/elasticpooldatabaseactivities.go index ca9a2022f68f..8ef06f4105c6 100644 --- a/services/sql/mgmt/2014-04-01/sql/elasticpooldatabaseactivities.go +++ b/services/sql/mgmt/2014-04-01/sql/elasticpooldatabaseactivities.go @@ -115,7 +115,6 @@ func (client ElasticPoolDatabaseActivitiesClient) ListByElasticPoolSender(req *h func (client ElasticPoolDatabaseActivitiesClient) ListByElasticPoolResponder(resp *http.Response) (result ElasticPoolDatabaseActivityListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/elasticpools.go b/services/sql/mgmt/2014-04-01/sql/elasticpools.go index 160e902de4b7..f15e17be52b8 100644 --- a/services/sql/mgmt/2014-04-01/sql/elasticpools.go +++ b/services/sql/mgmt/2014-04-01/sql/elasticpools.go @@ -118,7 +118,6 @@ func (client ElasticPoolsClient) CreateOrUpdateSender(req *http.Request) (future func (client ElasticPoolsClient) CreateOrUpdateResponder(resp *http.Response) (result ElasticPool, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -197,7 +196,6 @@ func (client ElasticPoolsClient) DeleteSender(req *http.Request) (*http.Response func (client ElasticPoolsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -275,7 +273,6 @@ func (client ElasticPoolsClient) GetSender(req *http.Request) (*http.Response, e func (client ElasticPoolsClient) GetResponder(resp *http.Response) (result ElasticPool, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -352,7 +349,6 @@ func (client ElasticPoolsClient) ListByServerSender(req *http.Request) (*http.Re func (client ElasticPoolsClient) ListByServerResponder(resp *http.Response) (result ElasticPoolListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -431,7 +427,6 @@ func (client ElasticPoolsClient) ListMetricDefinitionsSender(req *http.Request) func (client ElasticPoolsClient) ListMetricDefinitionsResponder(resp *http.Response) (result MetricDefinitionListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -512,7 +507,6 @@ func (client ElasticPoolsClient) ListMetricsSender(req *http.Request) (*http.Res 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()) @@ -594,7 +588,6 @@ func (client ElasticPoolsClient) UpdateSender(req *http.Request) (future Elastic func (client ElasticPoolsClient) UpdateResponder(resp *http.Response) (result ElasticPool, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/enums.go b/services/sql/mgmt/2014-04-01/sql/enums.go new file mode 100644 index 000000000000..00a5e619656e --- /dev/null +++ b/services/sql/mgmt/2014-04-01/sql/enums.go @@ -0,0 +1,955 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// AdvisorStatus enumerates the values for advisor status. +type AdvisorStatus string + +const ( + // GA ... + GA AdvisorStatus = "GA" + // LimitedPublicPreview ... + LimitedPublicPreview AdvisorStatus = "LimitedPublicPreview" + // PrivatePreview ... + PrivatePreview AdvisorStatus = "PrivatePreview" + // PublicPreview ... + PublicPreview AdvisorStatus = "PublicPreview" +) + +// PossibleAdvisorStatusValues returns an array of possible values for the AdvisorStatus const type. +func PossibleAdvisorStatusValues() []AdvisorStatus { + return []AdvisorStatus{GA, LimitedPublicPreview, PrivatePreview, PublicPreview} +} + +// AuthenticationType enumerates the values for authentication type. +type AuthenticationType string + +const ( + // ADPassword ... + ADPassword AuthenticationType = "ADPassword" + // SQL ... + SQL AuthenticationType = "SQL" +) + +// PossibleAuthenticationTypeValues returns an array of possible values for the AuthenticationType const type. +func PossibleAuthenticationTypeValues() []AuthenticationType { + return []AuthenticationType{ADPassword, SQL} +} + +// AutoExecuteStatus enumerates the values for auto execute status. +type AutoExecuteStatus string + +const ( + // Default ... + Default AutoExecuteStatus = "Default" + // Disabled ... + Disabled AutoExecuteStatus = "Disabled" + // Enabled ... + Enabled AutoExecuteStatus = "Enabled" +) + +// PossibleAutoExecuteStatusValues returns an array of possible values for the AutoExecuteStatus const type. +func PossibleAutoExecuteStatusValues() []AutoExecuteStatus { + return []AutoExecuteStatus{Default, Disabled, Enabled} +} + +// CapabilityStatus enumerates the values for capability status. +type CapabilityStatus string + +const ( + // CapabilityStatusAvailable ... + CapabilityStatusAvailable CapabilityStatus = "Available" + // CapabilityStatusDefault ... + CapabilityStatusDefault CapabilityStatus = "Default" + // CapabilityStatusDisabled ... + CapabilityStatusDisabled CapabilityStatus = "Disabled" + // CapabilityStatusVisible ... + CapabilityStatusVisible CapabilityStatus = "Visible" +) + +// PossibleCapabilityStatusValues returns an array of possible values for the CapabilityStatus const type. +func PossibleCapabilityStatusValues() []CapabilityStatus { + return []CapabilityStatus{CapabilityStatusAvailable, CapabilityStatusDefault, CapabilityStatusDisabled, CapabilityStatusVisible} +} + +// CheckNameAvailabilityReason enumerates the values for check name availability reason. +type CheckNameAvailabilityReason string + +const ( + // AlreadyExists ... + AlreadyExists CheckNameAvailabilityReason = "AlreadyExists" + // Invalid ... + Invalid CheckNameAvailabilityReason = "Invalid" +) + +// PossibleCheckNameAvailabilityReasonValues returns an array of possible values for the CheckNameAvailabilityReason const type. +func PossibleCheckNameAvailabilityReasonValues() []CheckNameAvailabilityReason { + return []CheckNameAvailabilityReason{AlreadyExists, Invalid} +} + +// CreateMode enumerates the values for create mode. +type CreateMode string + +const ( + // CreateModeCopy ... + CreateModeCopy CreateMode = "Copy" + // CreateModeDefault ... + CreateModeDefault CreateMode = "Default" + // CreateModeNonReadableSecondary ... + CreateModeNonReadableSecondary CreateMode = "NonReadableSecondary" + // CreateModeOnlineSecondary ... + CreateModeOnlineSecondary CreateMode = "OnlineSecondary" + // CreateModePointInTimeRestore ... + CreateModePointInTimeRestore CreateMode = "PointInTimeRestore" + // CreateModeRecovery ... + CreateModeRecovery CreateMode = "Recovery" + // CreateModeRestore ... + CreateModeRestore CreateMode = "Restore" + // CreateModeRestoreLongTermRetentionBackup ... + CreateModeRestoreLongTermRetentionBackup CreateMode = "RestoreLongTermRetentionBackup" +) + +// PossibleCreateModeValues returns an array of possible values for the CreateMode const type. +func PossibleCreateModeValues() []CreateMode { + return []CreateMode{CreateModeCopy, CreateModeDefault, CreateModeNonReadableSecondary, CreateModeOnlineSecondary, CreateModePointInTimeRestore, CreateModeRecovery, CreateModeRestore, CreateModeRestoreLongTermRetentionBackup} +} + +// DatabaseEdition enumerates the values for database edition. +type DatabaseEdition string + +const ( + // Basic ... + Basic DatabaseEdition = "Basic" + // Business ... + Business DatabaseEdition = "Business" + // BusinessCritical ... + BusinessCritical DatabaseEdition = "BusinessCritical" + // DataWarehouse ... + DataWarehouse DatabaseEdition = "DataWarehouse" + // Free ... + Free DatabaseEdition = "Free" + // GeneralPurpose ... + GeneralPurpose DatabaseEdition = "GeneralPurpose" + // Hyperscale ... + Hyperscale DatabaseEdition = "Hyperscale" + // Premium ... + Premium DatabaseEdition = "Premium" + // PremiumRS ... + PremiumRS DatabaseEdition = "PremiumRS" + // Standard ... + Standard DatabaseEdition = "Standard" + // Stretch ... + Stretch DatabaseEdition = "Stretch" + // System ... + System DatabaseEdition = "System" + // System2 ... + System2 DatabaseEdition = "System2" + // Web ... + Web DatabaseEdition = "Web" +) + +// PossibleDatabaseEditionValues returns an array of possible values for the DatabaseEdition const type. +func PossibleDatabaseEditionValues() []DatabaseEdition { + return []DatabaseEdition{Basic, Business, BusinessCritical, DataWarehouse, Free, GeneralPurpose, Hyperscale, Premium, PremiumRS, Standard, Stretch, System, System2, Web} +} + +// DataMaskingFunction enumerates the values for data masking function. +type DataMaskingFunction string + +const ( + // DataMaskingFunctionCCN ... + DataMaskingFunctionCCN DataMaskingFunction = "CCN" + // DataMaskingFunctionDefault ... + DataMaskingFunctionDefault DataMaskingFunction = "Default" + // DataMaskingFunctionEmail ... + DataMaskingFunctionEmail DataMaskingFunction = "Email" + // DataMaskingFunctionNumber ... + DataMaskingFunctionNumber DataMaskingFunction = "Number" + // DataMaskingFunctionSSN ... + DataMaskingFunctionSSN DataMaskingFunction = "SSN" + // DataMaskingFunctionText ... + DataMaskingFunctionText DataMaskingFunction = "Text" +) + +// PossibleDataMaskingFunctionValues returns an array of possible values for the DataMaskingFunction const type. +func PossibleDataMaskingFunctionValues() []DataMaskingFunction { + return []DataMaskingFunction{DataMaskingFunctionCCN, DataMaskingFunctionDefault, DataMaskingFunctionEmail, DataMaskingFunctionNumber, DataMaskingFunctionSSN, DataMaskingFunctionText} +} + +// DataMaskingRuleState enumerates the values for data masking rule state. +type DataMaskingRuleState string + +const ( + // DataMaskingRuleStateDisabled ... + DataMaskingRuleStateDisabled DataMaskingRuleState = "Disabled" + // DataMaskingRuleStateEnabled ... + DataMaskingRuleStateEnabled DataMaskingRuleState = "Enabled" +) + +// PossibleDataMaskingRuleStateValues returns an array of possible values for the DataMaskingRuleState const type. +func PossibleDataMaskingRuleStateValues() []DataMaskingRuleState { + return []DataMaskingRuleState{DataMaskingRuleStateDisabled, DataMaskingRuleStateEnabled} +} + +// DataMaskingState enumerates the values for data masking state. +type DataMaskingState string + +const ( + // DataMaskingStateDisabled ... + DataMaskingStateDisabled DataMaskingState = "Disabled" + // DataMaskingStateEnabled ... + DataMaskingStateEnabled DataMaskingState = "Enabled" +) + +// PossibleDataMaskingStateValues returns an array of possible values for the DataMaskingState const type. +func PossibleDataMaskingStateValues() []DataMaskingState { + return []DataMaskingState{DataMaskingStateDisabled, DataMaskingStateEnabled} +} + +// DisasterRecoveryConfigurationAutoFailover enumerates the values for disaster recovery configuration auto +// failover. +type DisasterRecoveryConfigurationAutoFailover string + +const ( + // Off ... + Off DisasterRecoveryConfigurationAutoFailover = "Off" + // On ... + On DisasterRecoveryConfigurationAutoFailover = "On" +) + +// PossibleDisasterRecoveryConfigurationAutoFailoverValues returns an array of possible values for the DisasterRecoveryConfigurationAutoFailover const type. +func PossibleDisasterRecoveryConfigurationAutoFailoverValues() []DisasterRecoveryConfigurationAutoFailover { + return []DisasterRecoveryConfigurationAutoFailover{Off, On} +} + +// DisasterRecoveryConfigurationFailoverPolicy enumerates the values for disaster recovery configuration +// failover policy. +type DisasterRecoveryConfigurationFailoverPolicy string + +const ( + // Automatic ... + Automatic DisasterRecoveryConfigurationFailoverPolicy = "Automatic" + // Manual ... + Manual DisasterRecoveryConfigurationFailoverPolicy = "Manual" +) + +// PossibleDisasterRecoveryConfigurationFailoverPolicyValues returns an array of possible values for the DisasterRecoveryConfigurationFailoverPolicy const type. +func PossibleDisasterRecoveryConfigurationFailoverPolicyValues() []DisasterRecoveryConfigurationFailoverPolicy { + return []DisasterRecoveryConfigurationFailoverPolicy{Automatic, Manual} +} + +// DisasterRecoveryConfigurationRole enumerates the values for disaster recovery configuration role. +type DisasterRecoveryConfigurationRole string + +const ( + // None ... + None DisasterRecoveryConfigurationRole = "None" + // Primary ... + Primary DisasterRecoveryConfigurationRole = "Primary" + // Secondary ... + Secondary DisasterRecoveryConfigurationRole = "Secondary" +) + +// PossibleDisasterRecoveryConfigurationRoleValues returns an array of possible values for the DisasterRecoveryConfigurationRole const type. +func PossibleDisasterRecoveryConfigurationRoleValues() []DisasterRecoveryConfigurationRole { + return []DisasterRecoveryConfigurationRole{None, Primary, Secondary} +} + +// DisasterRecoveryConfigurationStatus enumerates the values for disaster recovery configuration status. +type DisasterRecoveryConfigurationStatus string + +const ( + // Creating ... + Creating DisasterRecoveryConfigurationStatus = "Creating" + // Dropping ... + Dropping DisasterRecoveryConfigurationStatus = "Dropping" + // FailingOver ... + FailingOver DisasterRecoveryConfigurationStatus = "FailingOver" + // Ready ... + Ready DisasterRecoveryConfigurationStatus = "Ready" +) + +// PossibleDisasterRecoveryConfigurationStatusValues returns an array of possible values for the DisasterRecoveryConfigurationStatus const type. +func PossibleDisasterRecoveryConfigurationStatusValues() []DisasterRecoveryConfigurationStatus { + return []DisasterRecoveryConfigurationStatus{Creating, Dropping, FailingOver, Ready} +} + +// ElasticPoolEdition enumerates the values for elastic pool edition. +type ElasticPoolEdition string + +const ( + // ElasticPoolEditionBasic ... + ElasticPoolEditionBasic ElasticPoolEdition = "Basic" + // ElasticPoolEditionBusinessCritical ... + ElasticPoolEditionBusinessCritical ElasticPoolEdition = "BusinessCritical" + // ElasticPoolEditionGeneralPurpose ... + ElasticPoolEditionGeneralPurpose ElasticPoolEdition = "GeneralPurpose" + // ElasticPoolEditionPremium ... + ElasticPoolEditionPremium ElasticPoolEdition = "Premium" + // ElasticPoolEditionStandard ... + ElasticPoolEditionStandard ElasticPoolEdition = "Standard" +) + +// PossibleElasticPoolEditionValues returns an array of possible values for the ElasticPoolEdition const type. +func PossibleElasticPoolEditionValues() []ElasticPoolEdition { + return []ElasticPoolEdition{ElasticPoolEditionBasic, ElasticPoolEditionBusinessCritical, ElasticPoolEditionGeneralPurpose, ElasticPoolEditionPremium, ElasticPoolEditionStandard} +} + +// ElasticPoolState enumerates the values for elastic pool state. +type ElasticPoolState string + +const ( + // ElasticPoolStateCreating ... + ElasticPoolStateCreating ElasticPoolState = "Creating" + // ElasticPoolStateDisabled ... + ElasticPoolStateDisabled ElasticPoolState = "Disabled" + // ElasticPoolStateReady ... + ElasticPoolStateReady ElasticPoolState = "Ready" +) + +// PossibleElasticPoolStateValues returns an array of possible values for the ElasticPoolState const type. +func PossibleElasticPoolStateValues() []ElasticPoolState { + return []ElasticPoolState{ElasticPoolStateCreating, ElasticPoolStateDisabled, ElasticPoolStateReady} +} + +// GeoBackupPolicyState enumerates the values for geo backup policy state. +type GeoBackupPolicyState string + +const ( + // GeoBackupPolicyStateDisabled ... + GeoBackupPolicyStateDisabled GeoBackupPolicyState = "Disabled" + // GeoBackupPolicyStateEnabled ... + GeoBackupPolicyStateEnabled GeoBackupPolicyState = "Enabled" +) + +// PossibleGeoBackupPolicyStateValues returns an array of possible values for the GeoBackupPolicyState const type. +func PossibleGeoBackupPolicyStateValues() []GeoBackupPolicyState { + return []GeoBackupPolicyState{GeoBackupPolicyStateDisabled, GeoBackupPolicyStateEnabled} +} + +// MaxSizeUnits enumerates the values for max size units. +type MaxSizeUnits string + +const ( + // Gigabytes ... + Gigabytes MaxSizeUnits = "Gigabytes" + // Megabytes ... + Megabytes MaxSizeUnits = "Megabytes" + // Petabytes ... + Petabytes MaxSizeUnits = "Petabytes" + // Terabytes ... + Terabytes MaxSizeUnits = "Terabytes" +) + +// PossibleMaxSizeUnitsValues returns an array of possible values for the MaxSizeUnits const type. +func PossibleMaxSizeUnitsValues() []MaxSizeUnits { + return []MaxSizeUnits{Gigabytes, Megabytes, Petabytes, Terabytes} +} + +// PerformanceLevelUnit enumerates the values for performance level unit. +type PerformanceLevelUnit string + +const ( + // DTU ... + DTU PerformanceLevelUnit = "DTU" +) + +// PossiblePerformanceLevelUnitValues returns an array of possible values for the PerformanceLevelUnit const type. +func PossiblePerformanceLevelUnitValues() []PerformanceLevelUnit { + return []PerformanceLevelUnit{DTU} +} + +// PrimaryAggregationType enumerates the values for primary aggregation type. +type PrimaryAggregationType string + +const ( + // PrimaryAggregationTypeAverage ... + PrimaryAggregationTypeAverage PrimaryAggregationType = "Average" + // PrimaryAggregationTypeCount ... + PrimaryAggregationTypeCount PrimaryAggregationType = "Count" + // PrimaryAggregationTypeMaximum ... + PrimaryAggregationTypeMaximum PrimaryAggregationType = "Maximum" + // PrimaryAggregationTypeMinimum ... + PrimaryAggregationTypeMinimum PrimaryAggregationType = "Minimum" + // PrimaryAggregationTypeNone ... + PrimaryAggregationTypeNone PrimaryAggregationType = "None" + // PrimaryAggregationTypeTotal ... + PrimaryAggregationTypeTotal PrimaryAggregationType = "Total" +) + +// PossiblePrimaryAggregationTypeValues returns an array of possible values for the PrimaryAggregationType const type. +func PossiblePrimaryAggregationTypeValues() []PrimaryAggregationType { + return []PrimaryAggregationType{PrimaryAggregationTypeAverage, PrimaryAggregationTypeCount, PrimaryAggregationTypeMaximum, PrimaryAggregationTypeMinimum, PrimaryAggregationTypeNone, PrimaryAggregationTypeTotal} +} + +// QueryAggregationFunction enumerates the values for query aggregation function. +type QueryAggregationFunction string + +const ( + // Avg ... + Avg QueryAggregationFunction = "avg" + // Max ... + Max QueryAggregationFunction = "max" + // Min ... + Min QueryAggregationFunction = "min" + // Sum ... + Sum QueryAggregationFunction = "sum" +) + +// PossibleQueryAggregationFunctionValues returns an array of possible values for the QueryAggregationFunction const type. +func PossibleQueryAggregationFunctionValues() []QueryAggregationFunction { + return []QueryAggregationFunction{Avg, Max, Min, Sum} +} + +// QueryExecutionType enumerates the values for query execution type. +type QueryExecutionType string + +const ( + // Aborted ... + Aborted QueryExecutionType = "aborted" + // Any ... + Any QueryExecutionType = "any" + // Exception ... + Exception QueryExecutionType = "exception" + // Irregular ... + Irregular QueryExecutionType = "irregular" + // Regular ... + Regular QueryExecutionType = "regular" +) + +// PossibleQueryExecutionTypeValues returns an array of possible values for the QueryExecutionType const type. +func PossibleQueryExecutionTypeValues() []QueryExecutionType { + return []QueryExecutionType{Aborted, Any, Exception, Irregular, Regular} +} + +// QueryMetricUnit enumerates the values for query metric unit. +type QueryMetricUnit string + +const ( + // KB ... + KB QueryMetricUnit = "KB" + // Microseconds ... + Microseconds QueryMetricUnit = "microseconds" + // Percentage ... + Percentage QueryMetricUnit = "percentage" +) + +// PossibleQueryMetricUnitValues returns an array of possible values for the QueryMetricUnit const type. +func PossibleQueryMetricUnitValues() []QueryMetricUnit { + return []QueryMetricUnit{KB, Microseconds, Percentage} +} + +// QueryObservedMetricType enumerates the values for query observed metric type. +type QueryObservedMetricType string + +const ( + // CPU ... + CPU QueryObservedMetricType = "cpu" + // Duration ... + Duration QueryObservedMetricType = "duration" + // ExecutionCount ... + ExecutionCount QueryObservedMetricType = "executionCount" + // Io ... + Io QueryObservedMetricType = "io" + // Logio ... + Logio QueryObservedMetricType = "logio" +) + +// PossibleQueryObservedMetricTypeValues returns an array of possible values for the QueryObservedMetricType const type. +func PossibleQueryObservedMetricTypeValues() []QueryObservedMetricType { + return []QueryObservedMetricType{CPU, Duration, ExecutionCount, Io, Logio} +} + +// ReadScale enumerates the values for read scale. +type ReadScale string + +const ( + // ReadScaleDisabled ... + ReadScaleDisabled ReadScale = "Disabled" + // ReadScaleEnabled ... + ReadScaleEnabled ReadScale = "Enabled" +) + +// PossibleReadScaleValues returns an array of possible values for the ReadScale const type. +func PossibleReadScaleValues() []ReadScale { + return []ReadScale{ReadScaleDisabled, ReadScaleEnabled} +} + +// RecommendedIndexAction enumerates the values for recommended index action. +type RecommendedIndexAction string + +const ( + // Create ... + Create RecommendedIndexAction = "Create" + // Drop ... + Drop RecommendedIndexAction = "Drop" + // Rebuild ... + Rebuild RecommendedIndexAction = "Rebuild" +) + +// PossibleRecommendedIndexActionValues returns an array of possible values for the RecommendedIndexAction const type. +func PossibleRecommendedIndexActionValues() []RecommendedIndexAction { + return []RecommendedIndexAction{Create, Drop, Rebuild} +} + +// RecommendedIndexState enumerates the values for recommended index state. +type RecommendedIndexState string + +const ( + // Active ... + Active RecommendedIndexState = "Active" + // Blocked ... + Blocked RecommendedIndexState = "Blocked" + // Executing ... + Executing RecommendedIndexState = "Executing" + // Expired ... + Expired RecommendedIndexState = "Expired" + // Ignored ... + Ignored RecommendedIndexState = "Ignored" + // Pending ... + Pending RecommendedIndexState = "Pending" + // PendingRevert ... + PendingRevert RecommendedIndexState = "Pending Revert" + // Reverted ... + Reverted RecommendedIndexState = "Reverted" + // Reverting ... + Reverting RecommendedIndexState = "Reverting" + // Success ... + Success RecommendedIndexState = "Success" + // Verifying ... + Verifying RecommendedIndexState = "Verifying" +) + +// PossibleRecommendedIndexStateValues returns an array of possible values for the RecommendedIndexState const type. +func PossibleRecommendedIndexStateValues() []RecommendedIndexState { + return []RecommendedIndexState{Active, Blocked, Executing, Expired, Ignored, Pending, PendingRevert, Reverted, Reverting, Success, Verifying} +} + +// RecommendedIndexType enumerates the values for recommended index type. +type RecommendedIndexType string + +const ( + // CLUSTERED ... + CLUSTERED RecommendedIndexType = "CLUSTERED" + // CLUSTEREDCOLUMNSTORE ... + CLUSTEREDCOLUMNSTORE RecommendedIndexType = "CLUSTERED COLUMNSTORE" + // COLUMNSTORE ... + COLUMNSTORE RecommendedIndexType = "COLUMNSTORE" + // NONCLUSTERED ... + NONCLUSTERED RecommendedIndexType = "NONCLUSTERED" +) + +// PossibleRecommendedIndexTypeValues returns an array of possible values for the RecommendedIndexType const type. +func PossibleRecommendedIndexTypeValues() []RecommendedIndexType { + return []RecommendedIndexType{CLUSTERED, CLUSTEREDCOLUMNSTORE, COLUMNSTORE, NONCLUSTERED} +} + +// ReplicationRole enumerates the values for replication role. +type ReplicationRole string + +const ( + // ReplicationRoleCopy ... + ReplicationRoleCopy ReplicationRole = "Copy" + // ReplicationRoleNonReadableSecondary ... + ReplicationRoleNonReadableSecondary ReplicationRole = "NonReadableSecondary" + // ReplicationRolePrimary ... + ReplicationRolePrimary ReplicationRole = "Primary" + // ReplicationRoleSecondary ... + ReplicationRoleSecondary ReplicationRole = "Secondary" + // ReplicationRoleSource ... + ReplicationRoleSource ReplicationRole = "Source" +) + +// PossibleReplicationRoleValues returns an array of possible values for the ReplicationRole const type. +func PossibleReplicationRoleValues() []ReplicationRole { + return []ReplicationRole{ReplicationRoleCopy, ReplicationRoleNonReadableSecondary, ReplicationRolePrimary, ReplicationRoleSecondary, ReplicationRoleSource} +} + +// ReplicationState enumerates the values for replication state. +type ReplicationState string + +const ( + // CATCHUP ... + CATCHUP ReplicationState = "CATCH_UP" + // PENDING ... + PENDING ReplicationState = "PENDING" + // SEEDING ... + SEEDING ReplicationState = "SEEDING" + // SUSPENDED ... + SUSPENDED ReplicationState = "SUSPENDED" +) + +// PossibleReplicationStateValues returns an array of possible values for the ReplicationState const type. +func PossibleReplicationStateValues() []ReplicationState { + return []ReplicationState{CATCHUP, PENDING, SEEDING, SUSPENDED} +} + +// RestorePointType enumerates the values for restore point type. +type RestorePointType string + +const ( + // CONTINUOUS ... + CONTINUOUS RestorePointType = "CONTINUOUS" + // DISCRETE ... + DISCRETE RestorePointType = "DISCRETE" +) + +// PossibleRestorePointTypeValues returns an array of possible values for the RestorePointType const type. +func PossibleRestorePointTypeValues() []RestorePointType { + return []RestorePointType{CONTINUOUS, DISCRETE} +} + +// SampleName enumerates the values for sample name. +type SampleName string + +const ( + // AdventureWorksLT ... + AdventureWorksLT SampleName = "AdventureWorksLT" +) + +// PossibleSampleNameValues returns an array of possible values for the SampleName const type. +func PossibleSampleNameValues() []SampleName { + return []SampleName{AdventureWorksLT} +} + +// SecurityAlertPolicyEmailAccountAdmins enumerates the values for security alert policy email account admins. +type SecurityAlertPolicyEmailAccountAdmins string + +const ( + // SecurityAlertPolicyEmailAccountAdminsDisabled ... + SecurityAlertPolicyEmailAccountAdminsDisabled SecurityAlertPolicyEmailAccountAdmins = "Disabled" + // SecurityAlertPolicyEmailAccountAdminsEnabled ... + SecurityAlertPolicyEmailAccountAdminsEnabled SecurityAlertPolicyEmailAccountAdmins = "Enabled" +) + +// PossibleSecurityAlertPolicyEmailAccountAdminsValues returns an array of possible values for the SecurityAlertPolicyEmailAccountAdmins const type. +func PossibleSecurityAlertPolicyEmailAccountAdminsValues() []SecurityAlertPolicyEmailAccountAdmins { + return []SecurityAlertPolicyEmailAccountAdmins{SecurityAlertPolicyEmailAccountAdminsDisabled, SecurityAlertPolicyEmailAccountAdminsEnabled} +} + +// SecurityAlertPolicyState enumerates the values for security alert policy state. +type SecurityAlertPolicyState string + +const ( + // SecurityAlertPolicyStateDisabled ... + SecurityAlertPolicyStateDisabled SecurityAlertPolicyState = "Disabled" + // SecurityAlertPolicyStateEnabled ... + SecurityAlertPolicyStateEnabled SecurityAlertPolicyState = "Enabled" + // SecurityAlertPolicyStateNew ... + SecurityAlertPolicyStateNew SecurityAlertPolicyState = "New" +) + +// PossibleSecurityAlertPolicyStateValues returns an array of possible values for the SecurityAlertPolicyState const type. +func PossibleSecurityAlertPolicyStateValues() []SecurityAlertPolicyState { + return []SecurityAlertPolicyState{SecurityAlertPolicyStateDisabled, SecurityAlertPolicyStateEnabled, SecurityAlertPolicyStateNew} +} + +// SecurityAlertPolicyUseServerDefault enumerates the values for security alert policy use server default. +type SecurityAlertPolicyUseServerDefault string + +const ( + // SecurityAlertPolicyUseServerDefaultDisabled ... + SecurityAlertPolicyUseServerDefaultDisabled SecurityAlertPolicyUseServerDefault = "Disabled" + // SecurityAlertPolicyUseServerDefaultEnabled ... + SecurityAlertPolicyUseServerDefaultEnabled SecurityAlertPolicyUseServerDefault = "Enabled" +) + +// PossibleSecurityAlertPolicyUseServerDefaultValues returns an array of possible values for the SecurityAlertPolicyUseServerDefault const type. +func PossibleSecurityAlertPolicyUseServerDefaultValues() []SecurityAlertPolicyUseServerDefault { + return []SecurityAlertPolicyUseServerDefault{SecurityAlertPolicyUseServerDefaultDisabled, SecurityAlertPolicyUseServerDefaultEnabled} +} + +// ServerConnectionType enumerates the values for server connection type. +type ServerConnectionType string + +const ( + // ServerConnectionTypeDefault ... + ServerConnectionTypeDefault ServerConnectionType = "Default" + // ServerConnectionTypeProxy ... + ServerConnectionTypeProxy ServerConnectionType = "Proxy" + // ServerConnectionTypeRedirect ... + ServerConnectionTypeRedirect ServerConnectionType = "Redirect" +) + +// PossibleServerConnectionTypeValues returns an array of possible values for the ServerConnectionType const type. +func PossibleServerConnectionTypeValues() []ServerConnectionType { + return []ServerConnectionType{ServerConnectionTypeDefault, ServerConnectionTypeProxy, ServerConnectionTypeRedirect} +} + +// ServerState enumerates the values for server state. +type ServerState string + +const ( + // ServerStateDisabled ... + ServerStateDisabled ServerState = "Disabled" + // ServerStateReady ... + ServerStateReady ServerState = "Ready" +) + +// PossibleServerStateValues returns an array of possible values for the ServerState const type. +func PossibleServerStateValues() []ServerState { + return []ServerState{ServerStateDisabled, ServerStateReady} +} + +// ServerVersion enumerates the values for server version. +type ServerVersion string + +const ( + // OneTwoFullStopZero ... + OneTwoFullStopZero ServerVersion = "12.0" + // TwoFullStopZero ... + TwoFullStopZero ServerVersion = "2.0" +) + +// PossibleServerVersionValues returns an array of possible values for the ServerVersion const type. +func PossibleServerVersionValues() []ServerVersion { + return []ServerVersion{OneTwoFullStopZero, TwoFullStopZero} +} + +// ServiceObjectiveName enumerates the values for service objective name. +type ServiceObjectiveName string + +const ( + // ServiceObjectiveNameBasic ... + ServiceObjectiveNameBasic ServiceObjectiveName = "Basic" + // ServiceObjectiveNameDS100 ... + ServiceObjectiveNameDS100 ServiceObjectiveName = "DS100" + // ServiceObjectiveNameDS1000 ... + ServiceObjectiveNameDS1000 ServiceObjectiveName = "DS1000" + // ServiceObjectiveNameDS1200 ... + ServiceObjectiveNameDS1200 ServiceObjectiveName = "DS1200" + // ServiceObjectiveNameDS1500 ... + ServiceObjectiveNameDS1500 ServiceObjectiveName = "DS1500" + // ServiceObjectiveNameDS200 ... + ServiceObjectiveNameDS200 ServiceObjectiveName = "DS200" + // ServiceObjectiveNameDS2000 ... + ServiceObjectiveNameDS2000 ServiceObjectiveName = "DS2000" + // ServiceObjectiveNameDS300 ... + ServiceObjectiveNameDS300 ServiceObjectiveName = "DS300" + // ServiceObjectiveNameDS400 ... + ServiceObjectiveNameDS400 ServiceObjectiveName = "DS400" + // ServiceObjectiveNameDS500 ... + ServiceObjectiveNameDS500 ServiceObjectiveName = "DS500" + // ServiceObjectiveNameDS600 ... + ServiceObjectiveNameDS600 ServiceObjectiveName = "DS600" + // ServiceObjectiveNameDW100 ... + ServiceObjectiveNameDW100 ServiceObjectiveName = "DW100" + // ServiceObjectiveNameDW1000 ... + ServiceObjectiveNameDW1000 ServiceObjectiveName = "DW1000" + // ServiceObjectiveNameDW10000c ... + ServiceObjectiveNameDW10000c ServiceObjectiveName = "DW10000c" + // ServiceObjectiveNameDW1000c ... + ServiceObjectiveNameDW1000c ServiceObjectiveName = "DW1000c" + // ServiceObjectiveNameDW1200 ... + ServiceObjectiveNameDW1200 ServiceObjectiveName = "DW1200" + // ServiceObjectiveNameDW1500 ... + ServiceObjectiveNameDW1500 ServiceObjectiveName = "DW1500" + // ServiceObjectiveNameDW15000c ... + ServiceObjectiveNameDW15000c ServiceObjectiveName = "DW15000c" + // ServiceObjectiveNameDW1500c ... + ServiceObjectiveNameDW1500c ServiceObjectiveName = "DW1500c" + // ServiceObjectiveNameDW200 ... + ServiceObjectiveNameDW200 ServiceObjectiveName = "DW200" + // ServiceObjectiveNameDW2000 ... + ServiceObjectiveNameDW2000 ServiceObjectiveName = "DW2000" + // ServiceObjectiveNameDW2000c ... + ServiceObjectiveNameDW2000c ServiceObjectiveName = "DW2000c" + // ServiceObjectiveNameDW2500c ... + ServiceObjectiveNameDW2500c ServiceObjectiveName = "DW2500c" + // ServiceObjectiveNameDW300 ... + ServiceObjectiveNameDW300 ServiceObjectiveName = "DW300" + // ServiceObjectiveNameDW3000 ... + ServiceObjectiveNameDW3000 ServiceObjectiveName = "DW3000" + // ServiceObjectiveNameDW30000c ... + ServiceObjectiveNameDW30000c ServiceObjectiveName = "DW30000c" + // ServiceObjectiveNameDW3000c ... + ServiceObjectiveNameDW3000c ServiceObjectiveName = "DW3000c" + // ServiceObjectiveNameDW400 ... + ServiceObjectiveNameDW400 ServiceObjectiveName = "DW400" + // ServiceObjectiveNameDW500 ... + ServiceObjectiveNameDW500 ServiceObjectiveName = "DW500" + // ServiceObjectiveNameDW5000c ... + ServiceObjectiveNameDW5000c ServiceObjectiveName = "DW5000c" + // ServiceObjectiveNameDW600 ... + ServiceObjectiveNameDW600 ServiceObjectiveName = "DW600" + // ServiceObjectiveNameDW6000 ... + ServiceObjectiveNameDW6000 ServiceObjectiveName = "DW6000" + // ServiceObjectiveNameDW6000c ... + ServiceObjectiveNameDW6000c ServiceObjectiveName = "DW6000c" + // ServiceObjectiveNameDW7500c ... + ServiceObjectiveNameDW7500c ServiceObjectiveName = "DW7500c" + // ServiceObjectiveNameElasticPool ... + ServiceObjectiveNameElasticPool ServiceObjectiveName = "ElasticPool" + // ServiceObjectiveNameFree ... + ServiceObjectiveNameFree ServiceObjectiveName = "Free" + // ServiceObjectiveNameP1 ... + ServiceObjectiveNameP1 ServiceObjectiveName = "P1" + // ServiceObjectiveNameP11 ... + ServiceObjectiveNameP11 ServiceObjectiveName = "P11" + // ServiceObjectiveNameP15 ... + ServiceObjectiveNameP15 ServiceObjectiveName = "P15" + // ServiceObjectiveNameP2 ... + ServiceObjectiveNameP2 ServiceObjectiveName = "P2" + // ServiceObjectiveNameP3 ... + ServiceObjectiveNameP3 ServiceObjectiveName = "P3" + // ServiceObjectiveNameP4 ... + ServiceObjectiveNameP4 ServiceObjectiveName = "P4" + // ServiceObjectiveNameP6 ... + ServiceObjectiveNameP6 ServiceObjectiveName = "P6" + // ServiceObjectiveNamePRS1 ... + ServiceObjectiveNamePRS1 ServiceObjectiveName = "PRS1" + // ServiceObjectiveNamePRS2 ... + ServiceObjectiveNamePRS2 ServiceObjectiveName = "PRS2" + // ServiceObjectiveNamePRS4 ... + ServiceObjectiveNamePRS4 ServiceObjectiveName = "PRS4" + // ServiceObjectiveNamePRS6 ... + ServiceObjectiveNamePRS6 ServiceObjectiveName = "PRS6" + // ServiceObjectiveNameS0 ... + ServiceObjectiveNameS0 ServiceObjectiveName = "S0" + // ServiceObjectiveNameS1 ... + ServiceObjectiveNameS1 ServiceObjectiveName = "S1" + // ServiceObjectiveNameS12 ... + ServiceObjectiveNameS12 ServiceObjectiveName = "S12" + // ServiceObjectiveNameS2 ... + ServiceObjectiveNameS2 ServiceObjectiveName = "S2" + // ServiceObjectiveNameS3 ... + ServiceObjectiveNameS3 ServiceObjectiveName = "S3" + // ServiceObjectiveNameS4 ... + ServiceObjectiveNameS4 ServiceObjectiveName = "S4" + // ServiceObjectiveNameS6 ... + ServiceObjectiveNameS6 ServiceObjectiveName = "S6" + // ServiceObjectiveNameS7 ... + ServiceObjectiveNameS7 ServiceObjectiveName = "S7" + // ServiceObjectiveNameS9 ... + ServiceObjectiveNameS9 ServiceObjectiveName = "S9" + // ServiceObjectiveNameSystem ... + ServiceObjectiveNameSystem ServiceObjectiveName = "System" + // ServiceObjectiveNameSystem0 ... + ServiceObjectiveNameSystem0 ServiceObjectiveName = "System0" + // ServiceObjectiveNameSystem1 ... + ServiceObjectiveNameSystem1 ServiceObjectiveName = "System1" + // ServiceObjectiveNameSystem2 ... + ServiceObjectiveNameSystem2 ServiceObjectiveName = "System2" + // ServiceObjectiveNameSystem2L ... + ServiceObjectiveNameSystem2L ServiceObjectiveName = "System2L" + // ServiceObjectiveNameSystem3 ... + ServiceObjectiveNameSystem3 ServiceObjectiveName = "System3" + // ServiceObjectiveNameSystem3L ... + ServiceObjectiveNameSystem3L ServiceObjectiveName = "System3L" + // ServiceObjectiveNameSystem4 ... + ServiceObjectiveNameSystem4 ServiceObjectiveName = "System4" + // ServiceObjectiveNameSystem4L ... + ServiceObjectiveNameSystem4L ServiceObjectiveName = "System4L" +) + +// PossibleServiceObjectiveNameValues returns an array of possible values for the ServiceObjectiveName const type. +func PossibleServiceObjectiveNameValues() []ServiceObjectiveName { + return []ServiceObjectiveName{ServiceObjectiveNameBasic, ServiceObjectiveNameDS100, ServiceObjectiveNameDS1000, ServiceObjectiveNameDS1200, ServiceObjectiveNameDS1500, ServiceObjectiveNameDS200, ServiceObjectiveNameDS2000, ServiceObjectiveNameDS300, ServiceObjectiveNameDS400, ServiceObjectiveNameDS500, ServiceObjectiveNameDS600, ServiceObjectiveNameDW100, ServiceObjectiveNameDW1000, ServiceObjectiveNameDW10000c, ServiceObjectiveNameDW1000c, ServiceObjectiveNameDW1200, ServiceObjectiveNameDW1500, ServiceObjectiveNameDW15000c, ServiceObjectiveNameDW1500c, ServiceObjectiveNameDW200, ServiceObjectiveNameDW2000, ServiceObjectiveNameDW2000c, ServiceObjectiveNameDW2500c, ServiceObjectiveNameDW300, ServiceObjectiveNameDW3000, ServiceObjectiveNameDW30000c, ServiceObjectiveNameDW3000c, ServiceObjectiveNameDW400, ServiceObjectiveNameDW500, ServiceObjectiveNameDW5000c, ServiceObjectiveNameDW600, ServiceObjectiveNameDW6000, ServiceObjectiveNameDW6000c, ServiceObjectiveNameDW7500c, ServiceObjectiveNameElasticPool, ServiceObjectiveNameFree, ServiceObjectiveNameP1, ServiceObjectiveNameP11, ServiceObjectiveNameP15, ServiceObjectiveNameP2, ServiceObjectiveNameP3, ServiceObjectiveNameP4, ServiceObjectiveNameP6, ServiceObjectiveNamePRS1, ServiceObjectiveNamePRS2, ServiceObjectiveNamePRS4, ServiceObjectiveNamePRS6, ServiceObjectiveNameS0, ServiceObjectiveNameS1, ServiceObjectiveNameS12, ServiceObjectiveNameS2, ServiceObjectiveNameS3, ServiceObjectiveNameS4, ServiceObjectiveNameS6, ServiceObjectiveNameS7, ServiceObjectiveNameS9, ServiceObjectiveNameSystem, ServiceObjectiveNameSystem0, ServiceObjectiveNameSystem1, ServiceObjectiveNameSystem2, ServiceObjectiveNameSystem2L, ServiceObjectiveNameSystem3, ServiceObjectiveNameSystem3L, ServiceObjectiveNameSystem4, ServiceObjectiveNameSystem4L} +} + +// StorageKeyType enumerates the values for storage key type. +type StorageKeyType string + +const ( + // SharedAccessKey ... + SharedAccessKey StorageKeyType = "SharedAccessKey" + // StorageAccessKey ... + StorageAccessKey StorageKeyType = "StorageAccessKey" +) + +// PossibleStorageKeyTypeValues returns an array of possible values for the StorageKeyType const type. +func PossibleStorageKeyTypeValues() []StorageKeyType { + return []StorageKeyType{SharedAccessKey, StorageAccessKey} +} + +// TransparentDataEncryptionActivityStatus enumerates the values for transparent data encryption activity +// status. +type TransparentDataEncryptionActivityStatus string + +const ( + // Decrypting ... + Decrypting TransparentDataEncryptionActivityStatus = "Decrypting" + // Encrypting ... + Encrypting TransparentDataEncryptionActivityStatus = "Encrypting" +) + +// PossibleTransparentDataEncryptionActivityStatusValues returns an array of possible values for the TransparentDataEncryptionActivityStatus const type. +func PossibleTransparentDataEncryptionActivityStatusValues() []TransparentDataEncryptionActivityStatus { + return []TransparentDataEncryptionActivityStatus{Decrypting, Encrypting} +} + +// TransparentDataEncryptionStatus enumerates the values for transparent data encryption status. +type TransparentDataEncryptionStatus string + +const ( + // TransparentDataEncryptionStatusDisabled ... + TransparentDataEncryptionStatusDisabled TransparentDataEncryptionStatus = "Disabled" + // TransparentDataEncryptionStatusEnabled ... + TransparentDataEncryptionStatusEnabled TransparentDataEncryptionStatus = "Enabled" +) + +// PossibleTransparentDataEncryptionStatusValues returns an array of possible values for the TransparentDataEncryptionStatus const type. +func PossibleTransparentDataEncryptionStatusValues() []TransparentDataEncryptionStatus { + return []TransparentDataEncryptionStatus{TransparentDataEncryptionStatusDisabled, TransparentDataEncryptionStatusEnabled} +} + +// UnitDefinitionType enumerates the values for unit definition type. +type UnitDefinitionType string + +const ( + // Bytes ... + Bytes UnitDefinitionType = "Bytes" + // BytesPerSecond ... + BytesPerSecond UnitDefinitionType = "BytesPerSecond" + // Count ... + Count UnitDefinitionType = "Count" + // CountPerSecond ... + CountPerSecond UnitDefinitionType = "CountPerSecond" + // Percent ... + Percent UnitDefinitionType = "Percent" + // Seconds ... + Seconds UnitDefinitionType = "Seconds" +) + +// PossibleUnitDefinitionTypeValues returns an array of possible values for the UnitDefinitionType const type. +func PossibleUnitDefinitionTypeValues() []UnitDefinitionType { + return []UnitDefinitionType{Bytes, BytesPerSecond, Count, CountPerSecond, Percent, Seconds} +} + +// UnitType enumerates the values for unit type. +type UnitType string + +const ( + // UnitTypeBytes ... + UnitTypeBytes UnitType = "bytes" + // UnitTypeBytesPerSecond ... + UnitTypeBytesPerSecond UnitType = "bytesPerSecond" + // UnitTypeCount ... + UnitTypeCount UnitType = "count" + // UnitTypeCountPerSecond ... + UnitTypeCountPerSecond UnitType = "countPerSecond" + // UnitTypePercent ... + UnitTypePercent UnitType = "percent" + // UnitTypeSeconds ... + UnitTypeSeconds UnitType = "seconds" +) + +// PossibleUnitTypeValues returns an array of possible values for the UnitType const type. +func PossibleUnitTypeValues() []UnitType { + return []UnitType{UnitTypeBytes, UnitTypeBytesPerSecond, UnitTypeCount, UnitTypeCountPerSecond, UnitTypePercent, UnitTypeSeconds} +} diff --git a/services/sql/mgmt/2014-04-01/sql/extensions.go b/services/sql/mgmt/2014-04-01/sql/extensions.go index c3e131d82d83..fb62ad907274 100644 --- a/services/sql/mgmt/2014-04-01/sql/extensions.go +++ b/services/sql/mgmt/2014-04-01/sql/extensions.go @@ -115,7 +115,6 @@ func (client ExtensionsClient) GetSender(req *http.Request) (*http.Response, err func (client ExtensionsClient) GetResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp @@ -193,7 +192,6 @@ func (client ExtensionsClient) ListByDatabaseSender(req *http.Request) (*http.Re func (client ExtensionsClient) ListByDatabaseResponder(resp *http.Response) (result ExtensionListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/firewallrules.go b/services/sql/mgmt/2014-04-01/sql/firewallrules.go index 8fef2be5ebd2..abe6eb6e3678 100644 --- a/services/sql/mgmt/2014-04-01/sql/firewallrules.go +++ b/services/sql/mgmt/2014-04-01/sql/firewallrules.go @@ -129,7 +129,6 @@ func (client FirewallRulesClient) CreateOrUpdateSender(req *http.Request) (*http func (client FirewallRulesClient) CreateOrUpdateResponder(resp *http.Response) (result FirewallRule, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -208,7 +207,6 @@ func (client FirewallRulesClient) DeleteSender(req *http.Request) (*http.Respons func (client FirewallRulesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -286,7 +284,6 @@ func (client FirewallRulesClient) GetSender(req *http.Request) (*http.Response, func (client FirewallRulesClient) GetResponder(resp *http.Response) (result FirewallRule, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -363,7 +360,6 @@ func (client FirewallRulesClient) ListByServerSender(req *http.Request) (*http.R func (client FirewallRulesClient) ListByServerResponder(resp *http.Response) (result FirewallRuleListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/geobackuppolicies.go b/services/sql/mgmt/2014-04-01/sql/geobackuppolicies.go index 71844b90b9bf..e9abc2b3fc93 100644 --- a/services/sql/mgmt/2014-04-01/sql/geobackuppolicies.go +++ b/services/sql/mgmt/2014-04-01/sql/geobackuppolicies.go @@ -128,7 +128,6 @@ func (client GeoBackupPoliciesClient) CreateOrUpdateSender(req *http.Request) (* func (client GeoBackupPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result GeoBackupPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -208,7 +207,6 @@ func (client GeoBackupPoliciesClient) GetSender(req *http.Request) (*http.Respon func (client GeoBackupPoliciesClient) GetResponder(resp *http.Response) (result GeoBackupPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -287,7 +285,6 @@ func (client GeoBackupPoliciesClient) ListByDatabaseSender(req *http.Request) (* func (client GeoBackupPoliciesClient) ListByDatabaseResponder(resp *http.Response) (result GeoBackupPolicyListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/models.go b/services/sql/mgmt/2014-04-01/sql/models.go index c98749074733..7ad045b00b55 100644 --- a/services/sql/mgmt/2014-04-01/sql/models.go +++ b/services/sql/mgmt/2014-04-01/sql/models.go @@ -30,958 +30,6 @@ import ( // The package's fully qualified name. const fqdn = "github.com/Azure/azure-sdk-for-go/services/sql/mgmt/2014-04-01/sql" -// AdvisorStatus enumerates the values for advisor status. -type AdvisorStatus string - -const ( - // GA ... - GA AdvisorStatus = "GA" - // LimitedPublicPreview ... - LimitedPublicPreview AdvisorStatus = "LimitedPublicPreview" - // PrivatePreview ... - PrivatePreview AdvisorStatus = "PrivatePreview" - // PublicPreview ... - PublicPreview AdvisorStatus = "PublicPreview" -) - -// PossibleAdvisorStatusValues returns an array of possible values for the AdvisorStatus const type. -func PossibleAdvisorStatusValues() []AdvisorStatus { - return []AdvisorStatus{GA, LimitedPublicPreview, PrivatePreview, PublicPreview} -} - -// AuthenticationType enumerates the values for authentication type. -type AuthenticationType string - -const ( - // ADPassword ... - ADPassword AuthenticationType = "ADPassword" - // SQL ... - SQL AuthenticationType = "SQL" -) - -// PossibleAuthenticationTypeValues returns an array of possible values for the AuthenticationType const type. -func PossibleAuthenticationTypeValues() []AuthenticationType { - return []AuthenticationType{ADPassword, SQL} -} - -// AutoExecuteStatus enumerates the values for auto execute status. -type AutoExecuteStatus string - -const ( - // Default ... - Default AutoExecuteStatus = "Default" - // Disabled ... - Disabled AutoExecuteStatus = "Disabled" - // Enabled ... - Enabled AutoExecuteStatus = "Enabled" -) - -// PossibleAutoExecuteStatusValues returns an array of possible values for the AutoExecuteStatus const type. -func PossibleAutoExecuteStatusValues() []AutoExecuteStatus { - return []AutoExecuteStatus{Default, Disabled, Enabled} -} - -// BackupLongTermRetentionPolicyState enumerates the values for backup long term retention policy state. -type BackupLongTermRetentionPolicyState string - -const ( - // BackupLongTermRetentionPolicyStateDisabled ... - BackupLongTermRetentionPolicyStateDisabled BackupLongTermRetentionPolicyState = "Disabled" - // BackupLongTermRetentionPolicyStateEnabled ... - BackupLongTermRetentionPolicyStateEnabled BackupLongTermRetentionPolicyState = "Enabled" -) - -// PossibleBackupLongTermRetentionPolicyStateValues returns an array of possible values for the BackupLongTermRetentionPolicyState const type. -func PossibleBackupLongTermRetentionPolicyStateValues() []BackupLongTermRetentionPolicyState { - return []BackupLongTermRetentionPolicyState{BackupLongTermRetentionPolicyStateDisabled, BackupLongTermRetentionPolicyStateEnabled} -} - -// CapabilityStatus enumerates the values for capability status. -type CapabilityStatus string - -const ( - // CapabilityStatusAvailable ... - CapabilityStatusAvailable CapabilityStatus = "Available" - // CapabilityStatusDefault ... - CapabilityStatusDefault CapabilityStatus = "Default" - // CapabilityStatusDisabled ... - CapabilityStatusDisabled CapabilityStatus = "Disabled" - // CapabilityStatusVisible ... - CapabilityStatusVisible CapabilityStatus = "Visible" -) - -// PossibleCapabilityStatusValues returns an array of possible values for the CapabilityStatus const type. -func PossibleCapabilityStatusValues() []CapabilityStatus { - return []CapabilityStatus{CapabilityStatusAvailable, CapabilityStatusDefault, CapabilityStatusDisabled, CapabilityStatusVisible} -} - -// CheckNameAvailabilityReason enumerates the values for check name availability reason. -type CheckNameAvailabilityReason string - -const ( - // AlreadyExists ... - AlreadyExists CheckNameAvailabilityReason = "AlreadyExists" - // Invalid ... - Invalid CheckNameAvailabilityReason = "Invalid" -) - -// PossibleCheckNameAvailabilityReasonValues returns an array of possible values for the CheckNameAvailabilityReason const type. -func PossibleCheckNameAvailabilityReasonValues() []CheckNameAvailabilityReason { - return []CheckNameAvailabilityReason{AlreadyExists, Invalid} -} - -// CreateMode enumerates the values for create mode. -type CreateMode string - -const ( - // CreateModeCopy ... - CreateModeCopy CreateMode = "Copy" - // CreateModeDefault ... - CreateModeDefault CreateMode = "Default" - // CreateModeNonReadableSecondary ... - CreateModeNonReadableSecondary CreateMode = "NonReadableSecondary" - // CreateModeOnlineSecondary ... - CreateModeOnlineSecondary CreateMode = "OnlineSecondary" - // CreateModePointInTimeRestore ... - CreateModePointInTimeRestore CreateMode = "PointInTimeRestore" - // CreateModeRecovery ... - CreateModeRecovery CreateMode = "Recovery" - // CreateModeRestore ... - CreateModeRestore CreateMode = "Restore" - // CreateModeRestoreLongTermRetentionBackup ... - CreateModeRestoreLongTermRetentionBackup CreateMode = "RestoreLongTermRetentionBackup" -) - -// PossibleCreateModeValues returns an array of possible values for the CreateMode const type. -func PossibleCreateModeValues() []CreateMode { - return []CreateMode{CreateModeCopy, CreateModeDefault, CreateModeNonReadableSecondary, CreateModeOnlineSecondary, CreateModePointInTimeRestore, CreateModeRecovery, CreateModeRestore, CreateModeRestoreLongTermRetentionBackup} -} - -// DatabaseEdition enumerates the values for database edition. -type DatabaseEdition string - -const ( - // Basic ... - Basic DatabaseEdition = "Basic" - // Business ... - Business DatabaseEdition = "Business" - // BusinessCritical ... - BusinessCritical DatabaseEdition = "BusinessCritical" - // DataWarehouse ... - DataWarehouse DatabaseEdition = "DataWarehouse" - // Free ... - Free DatabaseEdition = "Free" - // GeneralPurpose ... - GeneralPurpose DatabaseEdition = "GeneralPurpose" - // Hyperscale ... - Hyperscale DatabaseEdition = "Hyperscale" - // Premium ... - Premium DatabaseEdition = "Premium" - // PremiumRS ... - PremiumRS DatabaseEdition = "PremiumRS" - // Standard ... - Standard DatabaseEdition = "Standard" - // Stretch ... - Stretch DatabaseEdition = "Stretch" - // System ... - System DatabaseEdition = "System" - // System2 ... - System2 DatabaseEdition = "System2" - // Web ... - Web DatabaseEdition = "Web" -) - -// PossibleDatabaseEditionValues returns an array of possible values for the DatabaseEdition const type. -func PossibleDatabaseEditionValues() []DatabaseEdition { - return []DatabaseEdition{Basic, Business, BusinessCritical, DataWarehouse, Free, GeneralPurpose, Hyperscale, Premium, PremiumRS, Standard, Stretch, System, System2, Web} -} - -// DataMaskingFunction enumerates the values for data masking function. -type DataMaskingFunction string - -const ( - // DataMaskingFunctionCCN ... - DataMaskingFunctionCCN DataMaskingFunction = "CCN" - // DataMaskingFunctionDefault ... - DataMaskingFunctionDefault DataMaskingFunction = "Default" - // DataMaskingFunctionEmail ... - DataMaskingFunctionEmail DataMaskingFunction = "Email" - // DataMaskingFunctionNumber ... - DataMaskingFunctionNumber DataMaskingFunction = "Number" - // DataMaskingFunctionSSN ... - DataMaskingFunctionSSN DataMaskingFunction = "SSN" - // DataMaskingFunctionText ... - DataMaskingFunctionText DataMaskingFunction = "Text" -) - -// PossibleDataMaskingFunctionValues returns an array of possible values for the DataMaskingFunction const type. -func PossibleDataMaskingFunctionValues() []DataMaskingFunction { - return []DataMaskingFunction{DataMaskingFunctionCCN, DataMaskingFunctionDefault, DataMaskingFunctionEmail, DataMaskingFunctionNumber, DataMaskingFunctionSSN, DataMaskingFunctionText} -} - -// DataMaskingRuleState enumerates the values for data masking rule state. -type DataMaskingRuleState string - -const ( - // DataMaskingRuleStateDisabled ... - DataMaskingRuleStateDisabled DataMaskingRuleState = "Disabled" - // DataMaskingRuleStateEnabled ... - DataMaskingRuleStateEnabled DataMaskingRuleState = "Enabled" -) - -// PossibleDataMaskingRuleStateValues returns an array of possible values for the DataMaskingRuleState const type. -func PossibleDataMaskingRuleStateValues() []DataMaskingRuleState { - return []DataMaskingRuleState{DataMaskingRuleStateDisabled, DataMaskingRuleStateEnabled} -} - -// DataMaskingState enumerates the values for data masking state. -type DataMaskingState string - -const ( - // DataMaskingStateDisabled ... - DataMaskingStateDisabled DataMaskingState = "Disabled" - // DataMaskingStateEnabled ... - DataMaskingStateEnabled DataMaskingState = "Enabled" -) - -// PossibleDataMaskingStateValues returns an array of possible values for the DataMaskingState const type. -func PossibleDataMaskingStateValues() []DataMaskingState { - return []DataMaskingState{DataMaskingStateDisabled, DataMaskingStateEnabled} -} - -// DisasterRecoveryConfigurationAutoFailover enumerates the values for disaster recovery configuration auto -// failover. -type DisasterRecoveryConfigurationAutoFailover string - -const ( - // Off ... - Off DisasterRecoveryConfigurationAutoFailover = "Off" - // On ... - On DisasterRecoveryConfigurationAutoFailover = "On" -) - -// PossibleDisasterRecoveryConfigurationAutoFailoverValues returns an array of possible values for the DisasterRecoveryConfigurationAutoFailover const type. -func PossibleDisasterRecoveryConfigurationAutoFailoverValues() []DisasterRecoveryConfigurationAutoFailover { - return []DisasterRecoveryConfigurationAutoFailover{Off, On} -} - -// DisasterRecoveryConfigurationFailoverPolicy enumerates the values for disaster recovery configuration -// failover policy. -type DisasterRecoveryConfigurationFailoverPolicy string - -const ( - // Automatic ... - Automatic DisasterRecoveryConfigurationFailoverPolicy = "Automatic" - // Manual ... - Manual DisasterRecoveryConfigurationFailoverPolicy = "Manual" -) - -// PossibleDisasterRecoveryConfigurationFailoverPolicyValues returns an array of possible values for the DisasterRecoveryConfigurationFailoverPolicy const type. -func PossibleDisasterRecoveryConfigurationFailoverPolicyValues() []DisasterRecoveryConfigurationFailoverPolicy { - return []DisasterRecoveryConfigurationFailoverPolicy{Automatic, Manual} -} - -// DisasterRecoveryConfigurationRole enumerates the values for disaster recovery configuration role. -type DisasterRecoveryConfigurationRole string - -const ( - // None ... - None DisasterRecoveryConfigurationRole = "None" - // Primary ... - Primary DisasterRecoveryConfigurationRole = "Primary" - // Secondary ... - Secondary DisasterRecoveryConfigurationRole = "Secondary" -) - -// PossibleDisasterRecoveryConfigurationRoleValues returns an array of possible values for the DisasterRecoveryConfigurationRole const type. -func PossibleDisasterRecoveryConfigurationRoleValues() []DisasterRecoveryConfigurationRole { - return []DisasterRecoveryConfigurationRole{None, Primary, Secondary} -} - -// DisasterRecoveryConfigurationStatus enumerates the values for disaster recovery configuration status. -type DisasterRecoveryConfigurationStatus string - -const ( - // Creating ... - Creating DisasterRecoveryConfigurationStatus = "Creating" - // Dropping ... - Dropping DisasterRecoveryConfigurationStatus = "Dropping" - // FailingOver ... - FailingOver DisasterRecoveryConfigurationStatus = "FailingOver" - // Ready ... - Ready DisasterRecoveryConfigurationStatus = "Ready" -) - -// PossibleDisasterRecoveryConfigurationStatusValues returns an array of possible values for the DisasterRecoveryConfigurationStatus const type. -func PossibleDisasterRecoveryConfigurationStatusValues() []DisasterRecoveryConfigurationStatus { - return []DisasterRecoveryConfigurationStatus{Creating, Dropping, FailingOver, Ready} -} - -// ElasticPoolEdition enumerates the values for elastic pool edition. -type ElasticPoolEdition string - -const ( - // ElasticPoolEditionBasic ... - ElasticPoolEditionBasic ElasticPoolEdition = "Basic" - // ElasticPoolEditionBusinessCritical ... - ElasticPoolEditionBusinessCritical ElasticPoolEdition = "BusinessCritical" - // ElasticPoolEditionGeneralPurpose ... - ElasticPoolEditionGeneralPurpose ElasticPoolEdition = "GeneralPurpose" - // ElasticPoolEditionPremium ... - ElasticPoolEditionPremium ElasticPoolEdition = "Premium" - // ElasticPoolEditionStandard ... - ElasticPoolEditionStandard ElasticPoolEdition = "Standard" -) - -// PossibleElasticPoolEditionValues returns an array of possible values for the ElasticPoolEdition const type. -func PossibleElasticPoolEditionValues() []ElasticPoolEdition { - return []ElasticPoolEdition{ElasticPoolEditionBasic, ElasticPoolEditionBusinessCritical, ElasticPoolEditionGeneralPurpose, ElasticPoolEditionPremium, ElasticPoolEditionStandard} -} - -// ElasticPoolState enumerates the values for elastic pool state. -type ElasticPoolState string - -const ( - // ElasticPoolStateCreating ... - ElasticPoolStateCreating ElasticPoolState = "Creating" - // ElasticPoolStateDisabled ... - ElasticPoolStateDisabled ElasticPoolState = "Disabled" - // ElasticPoolStateReady ... - ElasticPoolStateReady ElasticPoolState = "Ready" -) - -// PossibleElasticPoolStateValues returns an array of possible values for the ElasticPoolState const type. -func PossibleElasticPoolStateValues() []ElasticPoolState { - return []ElasticPoolState{ElasticPoolStateCreating, ElasticPoolStateDisabled, ElasticPoolStateReady} -} - -// GeoBackupPolicyState enumerates the values for geo backup policy state. -type GeoBackupPolicyState string - -const ( - // GeoBackupPolicyStateDisabled ... - GeoBackupPolicyStateDisabled GeoBackupPolicyState = "Disabled" - // GeoBackupPolicyStateEnabled ... - GeoBackupPolicyStateEnabled GeoBackupPolicyState = "Enabled" -) - -// PossibleGeoBackupPolicyStateValues returns an array of possible values for the GeoBackupPolicyState const type. -func PossibleGeoBackupPolicyStateValues() []GeoBackupPolicyState { - return []GeoBackupPolicyState{GeoBackupPolicyStateDisabled, GeoBackupPolicyStateEnabled} -} - -// MaxSizeUnits enumerates the values for max size units. -type MaxSizeUnits string - -const ( - // Gigabytes ... - Gigabytes MaxSizeUnits = "Gigabytes" - // Megabytes ... - Megabytes MaxSizeUnits = "Megabytes" - // Petabytes ... - Petabytes MaxSizeUnits = "Petabytes" - // Terabytes ... - Terabytes MaxSizeUnits = "Terabytes" -) - -// PossibleMaxSizeUnitsValues returns an array of possible values for the MaxSizeUnits const type. -func PossibleMaxSizeUnitsValues() []MaxSizeUnits { - return []MaxSizeUnits{Gigabytes, Megabytes, Petabytes, Terabytes} -} - -// PerformanceLevelUnit enumerates the values for performance level unit. -type PerformanceLevelUnit string - -const ( - // DTU ... - DTU PerformanceLevelUnit = "DTU" -) - -// PossiblePerformanceLevelUnitValues returns an array of possible values for the PerformanceLevelUnit const type. -func PossiblePerformanceLevelUnitValues() []PerformanceLevelUnit { - return []PerformanceLevelUnit{DTU} -} - -// PrimaryAggregationType enumerates the values for primary aggregation type. -type PrimaryAggregationType string - -const ( - // PrimaryAggregationTypeAverage ... - PrimaryAggregationTypeAverage PrimaryAggregationType = "Average" - // PrimaryAggregationTypeCount ... - PrimaryAggregationTypeCount PrimaryAggregationType = "Count" - // PrimaryAggregationTypeMaximum ... - PrimaryAggregationTypeMaximum PrimaryAggregationType = "Maximum" - // PrimaryAggregationTypeMinimum ... - PrimaryAggregationTypeMinimum PrimaryAggregationType = "Minimum" - // PrimaryAggregationTypeNone ... - PrimaryAggregationTypeNone PrimaryAggregationType = "None" - // PrimaryAggregationTypeTotal ... - PrimaryAggregationTypeTotal PrimaryAggregationType = "Total" -) - -// PossiblePrimaryAggregationTypeValues returns an array of possible values for the PrimaryAggregationType const type. -func PossiblePrimaryAggregationTypeValues() []PrimaryAggregationType { - return []PrimaryAggregationType{PrimaryAggregationTypeAverage, PrimaryAggregationTypeCount, PrimaryAggregationTypeMaximum, PrimaryAggregationTypeMinimum, PrimaryAggregationTypeNone, PrimaryAggregationTypeTotal} -} - -// QueryAggregationFunction enumerates the values for query aggregation function. -type QueryAggregationFunction string - -const ( - // Avg ... - Avg QueryAggregationFunction = "avg" - // Max ... - Max QueryAggregationFunction = "max" - // Min ... - Min QueryAggregationFunction = "min" - // Sum ... - Sum QueryAggregationFunction = "sum" -) - -// PossibleQueryAggregationFunctionValues returns an array of possible values for the QueryAggregationFunction const type. -func PossibleQueryAggregationFunctionValues() []QueryAggregationFunction { - return []QueryAggregationFunction{Avg, Max, Min, Sum} -} - -// QueryExecutionType enumerates the values for query execution type. -type QueryExecutionType string - -const ( - // Aborted ... - Aborted QueryExecutionType = "aborted" - // Any ... - Any QueryExecutionType = "any" - // Exception ... - Exception QueryExecutionType = "exception" - // Irregular ... - Irregular QueryExecutionType = "irregular" - // Regular ... - Regular QueryExecutionType = "regular" -) - -// PossibleQueryExecutionTypeValues returns an array of possible values for the QueryExecutionType const type. -func PossibleQueryExecutionTypeValues() []QueryExecutionType { - return []QueryExecutionType{Aborted, Any, Exception, Irregular, Regular} -} - -// QueryMetricUnit enumerates the values for query metric unit. -type QueryMetricUnit string - -const ( - // KB ... - KB QueryMetricUnit = "KB" - // Microseconds ... - Microseconds QueryMetricUnit = "microseconds" - // Percentage ... - Percentage QueryMetricUnit = "percentage" -) - -// PossibleQueryMetricUnitValues returns an array of possible values for the QueryMetricUnit const type. -func PossibleQueryMetricUnitValues() []QueryMetricUnit { - return []QueryMetricUnit{KB, Microseconds, Percentage} -} - -// QueryObservedMetricType enumerates the values for query observed metric type. -type QueryObservedMetricType string - -const ( - // CPU ... - CPU QueryObservedMetricType = "cpu" - // Duration ... - Duration QueryObservedMetricType = "duration" - // ExecutionCount ... - ExecutionCount QueryObservedMetricType = "executionCount" - // Io ... - Io QueryObservedMetricType = "io" - // Logio ... - Logio QueryObservedMetricType = "logio" -) - -// PossibleQueryObservedMetricTypeValues returns an array of possible values for the QueryObservedMetricType const type. -func PossibleQueryObservedMetricTypeValues() []QueryObservedMetricType { - return []QueryObservedMetricType{CPU, Duration, ExecutionCount, Io, Logio} -} - -// ReadScale enumerates the values for read scale. -type ReadScale string - -const ( - // ReadScaleDisabled ... - ReadScaleDisabled ReadScale = "Disabled" - // ReadScaleEnabled ... - ReadScaleEnabled ReadScale = "Enabled" -) - -// PossibleReadScaleValues returns an array of possible values for the ReadScale const type. -func PossibleReadScaleValues() []ReadScale { - return []ReadScale{ReadScaleDisabled, ReadScaleEnabled} -} - -// RecommendedIndexAction enumerates the values for recommended index action. -type RecommendedIndexAction string - -const ( - // Create ... - Create RecommendedIndexAction = "Create" - // Drop ... - Drop RecommendedIndexAction = "Drop" - // Rebuild ... - Rebuild RecommendedIndexAction = "Rebuild" -) - -// PossibleRecommendedIndexActionValues returns an array of possible values for the RecommendedIndexAction const type. -func PossibleRecommendedIndexActionValues() []RecommendedIndexAction { - return []RecommendedIndexAction{Create, Drop, Rebuild} -} - -// RecommendedIndexState enumerates the values for recommended index state. -type RecommendedIndexState string - -const ( - // Active ... - Active RecommendedIndexState = "Active" - // Blocked ... - Blocked RecommendedIndexState = "Blocked" - // Executing ... - Executing RecommendedIndexState = "Executing" - // Expired ... - Expired RecommendedIndexState = "Expired" - // Ignored ... - Ignored RecommendedIndexState = "Ignored" - // Pending ... - Pending RecommendedIndexState = "Pending" - // PendingRevert ... - PendingRevert RecommendedIndexState = "Pending Revert" - // Reverted ... - Reverted RecommendedIndexState = "Reverted" - // Reverting ... - Reverting RecommendedIndexState = "Reverting" - // Success ... - Success RecommendedIndexState = "Success" - // Verifying ... - Verifying RecommendedIndexState = "Verifying" -) - -// PossibleRecommendedIndexStateValues returns an array of possible values for the RecommendedIndexState const type. -func PossibleRecommendedIndexStateValues() []RecommendedIndexState { - return []RecommendedIndexState{Active, Blocked, Executing, Expired, Ignored, Pending, PendingRevert, Reverted, Reverting, Success, Verifying} -} - -// RecommendedIndexType enumerates the values for recommended index type. -type RecommendedIndexType string - -const ( - // CLUSTERED ... - CLUSTERED RecommendedIndexType = "CLUSTERED" - // CLUSTEREDCOLUMNSTORE ... - CLUSTEREDCOLUMNSTORE RecommendedIndexType = "CLUSTERED COLUMNSTORE" - // COLUMNSTORE ... - COLUMNSTORE RecommendedIndexType = "COLUMNSTORE" - // NONCLUSTERED ... - NONCLUSTERED RecommendedIndexType = "NONCLUSTERED" -) - -// PossibleRecommendedIndexTypeValues returns an array of possible values for the RecommendedIndexType const type. -func PossibleRecommendedIndexTypeValues() []RecommendedIndexType { - return []RecommendedIndexType{CLUSTERED, CLUSTEREDCOLUMNSTORE, COLUMNSTORE, NONCLUSTERED} -} - -// ReplicationRole enumerates the values for replication role. -type ReplicationRole string - -const ( - // ReplicationRoleCopy ... - ReplicationRoleCopy ReplicationRole = "Copy" - // ReplicationRoleNonReadableSecondary ... - ReplicationRoleNonReadableSecondary ReplicationRole = "NonReadableSecondary" - // ReplicationRolePrimary ... - ReplicationRolePrimary ReplicationRole = "Primary" - // ReplicationRoleSecondary ... - ReplicationRoleSecondary ReplicationRole = "Secondary" - // ReplicationRoleSource ... - ReplicationRoleSource ReplicationRole = "Source" -) - -// PossibleReplicationRoleValues returns an array of possible values for the ReplicationRole const type. -func PossibleReplicationRoleValues() []ReplicationRole { - return []ReplicationRole{ReplicationRoleCopy, ReplicationRoleNonReadableSecondary, ReplicationRolePrimary, ReplicationRoleSecondary, ReplicationRoleSource} -} - -// ReplicationState enumerates the values for replication state. -type ReplicationState string - -const ( - // CATCHUP ... - CATCHUP ReplicationState = "CATCH_UP" - // PENDING ... - PENDING ReplicationState = "PENDING" - // SEEDING ... - SEEDING ReplicationState = "SEEDING" - // SUSPENDED ... - SUSPENDED ReplicationState = "SUSPENDED" -) - -// PossibleReplicationStateValues returns an array of possible values for the ReplicationState const type. -func PossibleReplicationStateValues() []ReplicationState { - return []ReplicationState{CATCHUP, PENDING, SEEDING, SUSPENDED} -} - -// RestorePointType enumerates the values for restore point type. -type RestorePointType string - -const ( - // CONTINUOUS ... - CONTINUOUS RestorePointType = "CONTINUOUS" - // DISCRETE ... - DISCRETE RestorePointType = "DISCRETE" -) - -// PossibleRestorePointTypeValues returns an array of possible values for the RestorePointType const type. -func PossibleRestorePointTypeValues() []RestorePointType { - return []RestorePointType{CONTINUOUS, DISCRETE} -} - -// SampleName enumerates the values for sample name. -type SampleName string - -const ( - // AdventureWorksLT ... - AdventureWorksLT SampleName = "AdventureWorksLT" -) - -// PossibleSampleNameValues returns an array of possible values for the SampleName const type. -func PossibleSampleNameValues() []SampleName { - return []SampleName{AdventureWorksLT} -} - -// SecurityAlertPolicyEmailAccountAdmins enumerates the values for security alert policy email account admins. -type SecurityAlertPolicyEmailAccountAdmins string - -const ( - // SecurityAlertPolicyEmailAccountAdminsDisabled ... - SecurityAlertPolicyEmailAccountAdminsDisabled SecurityAlertPolicyEmailAccountAdmins = "Disabled" - // SecurityAlertPolicyEmailAccountAdminsEnabled ... - SecurityAlertPolicyEmailAccountAdminsEnabled SecurityAlertPolicyEmailAccountAdmins = "Enabled" -) - -// PossibleSecurityAlertPolicyEmailAccountAdminsValues returns an array of possible values for the SecurityAlertPolicyEmailAccountAdmins const type. -func PossibleSecurityAlertPolicyEmailAccountAdminsValues() []SecurityAlertPolicyEmailAccountAdmins { - return []SecurityAlertPolicyEmailAccountAdmins{SecurityAlertPolicyEmailAccountAdminsDisabled, SecurityAlertPolicyEmailAccountAdminsEnabled} -} - -// SecurityAlertPolicyState enumerates the values for security alert policy state. -type SecurityAlertPolicyState string - -const ( - // SecurityAlertPolicyStateDisabled ... - SecurityAlertPolicyStateDisabled SecurityAlertPolicyState = "Disabled" - // SecurityAlertPolicyStateEnabled ... - SecurityAlertPolicyStateEnabled SecurityAlertPolicyState = "Enabled" - // SecurityAlertPolicyStateNew ... - SecurityAlertPolicyStateNew SecurityAlertPolicyState = "New" -) - -// PossibleSecurityAlertPolicyStateValues returns an array of possible values for the SecurityAlertPolicyState const type. -func PossibleSecurityAlertPolicyStateValues() []SecurityAlertPolicyState { - return []SecurityAlertPolicyState{SecurityAlertPolicyStateDisabled, SecurityAlertPolicyStateEnabled, SecurityAlertPolicyStateNew} -} - -// SecurityAlertPolicyUseServerDefault enumerates the values for security alert policy use server default. -type SecurityAlertPolicyUseServerDefault string - -const ( - // SecurityAlertPolicyUseServerDefaultDisabled ... - SecurityAlertPolicyUseServerDefaultDisabled SecurityAlertPolicyUseServerDefault = "Disabled" - // SecurityAlertPolicyUseServerDefaultEnabled ... - SecurityAlertPolicyUseServerDefaultEnabled SecurityAlertPolicyUseServerDefault = "Enabled" -) - -// PossibleSecurityAlertPolicyUseServerDefaultValues returns an array of possible values for the SecurityAlertPolicyUseServerDefault const type. -func PossibleSecurityAlertPolicyUseServerDefaultValues() []SecurityAlertPolicyUseServerDefault { - return []SecurityAlertPolicyUseServerDefault{SecurityAlertPolicyUseServerDefaultDisabled, SecurityAlertPolicyUseServerDefaultEnabled} -} - -// ServerConnectionType enumerates the values for server connection type. -type ServerConnectionType string - -const ( - // ServerConnectionTypeDefault ... - ServerConnectionTypeDefault ServerConnectionType = "Default" - // ServerConnectionTypeProxy ... - ServerConnectionTypeProxy ServerConnectionType = "Proxy" - // ServerConnectionTypeRedirect ... - ServerConnectionTypeRedirect ServerConnectionType = "Redirect" -) - -// PossibleServerConnectionTypeValues returns an array of possible values for the ServerConnectionType const type. -func PossibleServerConnectionTypeValues() []ServerConnectionType { - return []ServerConnectionType{ServerConnectionTypeDefault, ServerConnectionTypeProxy, ServerConnectionTypeRedirect} -} - -// ServerState enumerates the values for server state. -type ServerState string - -const ( - // ServerStateDisabled ... - ServerStateDisabled ServerState = "Disabled" - // ServerStateReady ... - ServerStateReady ServerState = "Ready" -) - -// PossibleServerStateValues returns an array of possible values for the ServerState const type. -func PossibleServerStateValues() []ServerState { - return []ServerState{ServerStateDisabled, ServerStateReady} -} - -// ServerVersion enumerates the values for server version. -type ServerVersion string - -const ( - // OneTwoFullStopZero ... - OneTwoFullStopZero ServerVersion = "12.0" - // TwoFullStopZero ... - TwoFullStopZero ServerVersion = "2.0" -) - -// PossibleServerVersionValues returns an array of possible values for the ServerVersion const type. -func PossibleServerVersionValues() []ServerVersion { - return []ServerVersion{OneTwoFullStopZero, TwoFullStopZero} -} - -// ServiceObjectiveName enumerates the values for service objective name. -type ServiceObjectiveName string - -const ( - // ServiceObjectiveNameBasic ... - ServiceObjectiveNameBasic ServiceObjectiveName = "Basic" - // ServiceObjectiveNameDS100 ... - ServiceObjectiveNameDS100 ServiceObjectiveName = "DS100" - // ServiceObjectiveNameDS1000 ... - ServiceObjectiveNameDS1000 ServiceObjectiveName = "DS1000" - // ServiceObjectiveNameDS1200 ... - ServiceObjectiveNameDS1200 ServiceObjectiveName = "DS1200" - // ServiceObjectiveNameDS1500 ... - ServiceObjectiveNameDS1500 ServiceObjectiveName = "DS1500" - // ServiceObjectiveNameDS200 ... - ServiceObjectiveNameDS200 ServiceObjectiveName = "DS200" - // ServiceObjectiveNameDS2000 ... - ServiceObjectiveNameDS2000 ServiceObjectiveName = "DS2000" - // ServiceObjectiveNameDS300 ... - ServiceObjectiveNameDS300 ServiceObjectiveName = "DS300" - // ServiceObjectiveNameDS400 ... - ServiceObjectiveNameDS400 ServiceObjectiveName = "DS400" - // ServiceObjectiveNameDS500 ... - ServiceObjectiveNameDS500 ServiceObjectiveName = "DS500" - // ServiceObjectiveNameDS600 ... - ServiceObjectiveNameDS600 ServiceObjectiveName = "DS600" - // ServiceObjectiveNameDW100 ... - ServiceObjectiveNameDW100 ServiceObjectiveName = "DW100" - // ServiceObjectiveNameDW1000 ... - ServiceObjectiveNameDW1000 ServiceObjectiveName = "DW1000" - // ServiceObjectiveNameDW10000c ... - ServiceObjectiveNameDW10000c ServiceObjectiveName = "DW10000c" - // ServiceObjectiveNameDW1000c ... - ServiceObjectiveNameDW1000c ServiceObjectiveName = "DW1000c" - // ServiceObjectiveNameDW1200 ... - ServiceObjectiveNameDW1200 ServiceObjectiveName = "DW1200" - // ServiceObjectiveNameDW1500 ... - ServiceObjectiveNameDW1500 ServiceObjectiveName = "DW1500" - // ServiceObjectiveNameDW15000c ... - ServiceObjectiveNameDW15000c ServiceObjectiveName = "DW15000c" - // ServiceObjectiveNameDW1500c ... - ServiceObjectiveNameDW1500c ServiceObjectiveName = "DW1500c" - // ServiceObjectiveNameDW200 ... - ServiceObjectiveNameDW200 ServiceObjectiveName = "DW200" - // ServiceObjectiveNameDW2000 ... - ServiceObjectiveNameDW2000 ServiceObjectiveName = "DW2000" - // ServiceObjectiveNameDW2000c ... - ServiceObjectiveNameDW2000c ServiceObjectiveName = "DW2000c" - // ServiceObjectiveNameDW2500c ... - ServiceObjectiveNameDW2500c ServiceObjectiveName = "DW2500c" - // ServiceObjectiveNameDW300 ... - ServiceObjectiveNameDW300 ServiceObjectiveName = "DW300" - // ServiceObjectiveNameDW3000 ... - ServiceObjectiveNameDW3000 ServiceObjectiveName = "DW3000" - // ServiceObjectiveNameDW30000c ... - ServiceObjectiveNameDW30000c ServiceObjectiveName = "DW30000c" - // ServiceObjectiveNameDW3000c ... - ServiceObjectiveNameDW3000c ServiceObjectiveName = "DW3000c" - // ServiceObjectiveNameDW400 ... - ServiceObjectiveNameDW400 ServiceObjectiveName = "DW400" - // ServiceObjectiveNameDW500 ... - ServiceObjectiveNameDW500 ServiceObjectiveName = "DW500" - // ServiceObjectiveNameDW5000c ... - ServiceObjectiveNameDW5000c ServiceObjectiveName = "DW5000c" - // ServiceObjectiveNameDW600 ... - ServiceObjectiveNameDW600 ServiceObjectiveName = "DW600" - // ServiceObjectiveNameDW6000 ... - ServiceObjectiveNameDW6000 ServiceObjectiveName = "DW6000" - // ServiceObjectiveNameDW6000c ... - ServiceObjectiveNameDW6000c ServiceObjectiveName = "DW6000c" - // ServiceObjectiveNameDW7500c ... - ServiceObjectiveNameDW7500c ServiceObjectiveName = "DW7500c" - // ServiceObjectiveNameElasticPool ... - ServiceObjectiveNameElasticPool ServiceObjectiveName = "ElasticPool" - // ServiceObjectiveNameFree ... - ServiceObjectiveNameFree ServiceObjectiveName = "Free" - // ServiceObjectiveNameP1 ... - ServiceObjectiveNameP1 ServiceObjectiveName = "P1" - // ServiceObjectiveNameP11 ... - ServiceObjectiveNameP11 ServiceObjectiveName = "P11" - // ServiceObjectiveNameP15 ... - ServiceObjectiveNameP15 ServiceObjectiveName = "P15" - // ServiceObjectiveNameP2 ... - ServiceObjectiveNameP2 ServiceObjectiveName = "P2" - // ServiceObjectiveNameP3 ... - ServiceObjectiveNameP3 ServiceObjectiveName = "P3" - // ServiceObjectiveNameP4 ... - ServiceObjectiveNameP4 ServiceObjectiveName = "P4" - // ServiceObjectiveNameP6 ... - ServiceObjectiveNameP6 ServiceObjectiveName = "P6" - // ServiceObjectiveNamePRS1 ... - ServiceObjectiveNamePRS1 ServiceObjectiveName = "PRS1" - // ServiceObjectiveNamePRS2 ... - ServiceObjectiveNamePRS2 ServiceObjectiveName = "PRS2" - // ServiceObjectiveNamePRS4 ... - ServiceObjectiveNamePRS4 ServiceObjectiveName = "PRS4" - // ServiceObjectiveNamePRS6 ... - ServiceObjectiveNamePRS6 ServiceObjectiveName = "PRS6" - // ServiceObjectiveNameS0 ... - ServiceObjectiveNameS0 ServiceObjectiveName = "S0" - // ServiceObjectiveNameS1 ... - ServiceObjectiveNameS1 ServiceObjectiveName = "S1" - // ServiceObjectiveNameS12 ... - ServiceObjectiveNameS12 ServiceObjectiveName = "S12" - // ServiceObjectiveNameS2 ... - ServiceObjectiveNameS2 ServiceObjectiveName = "S2" - // ServiceObjectiveNameS3 ... - ServiceObjectiveNameS3 ServiceObjectiveName = "S3" - // ServiceObjectiveNameS4 ... - ServiceObjectiveNameS4 ServiceObjectiveName = "S4" - // ServiceObjectiveNameS6 ... - ServiceObjectiveNameS6 ServiceObjectiveName = "S6" - // ServiceObjectiveNameS7 ... - ServiceObjectiveNameS7 ServiceObjectiveName = "S7" - // ServiceObjectiveNameS9 ... - ServiceObjectiveNameS9 ServiceObjectiveName = "S9" - // ServiceObjectiveNameSystem ... - ServiceObjectiveNameSystem ServiceObjectiveName = "System" - // ServiceObjectiveNameSystem0 ... - ServiceObjectiveNameSystem0 ServiceObjectiveName = "System0" - // ServiceObjectiveNameSystem1 ... - ServiceObjectiveNameSystem1 ServiceObjectiveName = "System1" - // ServiceObjectiveNameSystem2 ... - ServiceObjectiveNameSystem2 ServiceObjectiveName = "System2" - // ServiceObjectiveNameSystem2L ... - ServiceObjectiveNameSystem2L ServiceObjectiveName = "System2L" - // ServiceObjectiveNameSystem3 ... - ServiceObjectiveNameSystem3 ServiceObjectiveName = "System3" - // ServiceObjectiveNameSystem3L ... - ServiceObjectiveNameSystem3L ServiceObjectiveName = "System3L" - // ServiceObjectiveNameSystem4 ... - ServiceObjectiveNameSystem4 ServiceObjectiveName = "System4" - // ServiceObjectiveNameSystem4L ... - ServiceObjectiveNameSystem4L ServiceObjectiveName = "System4L" -) - -// PossibleServiceObjectiveNameValues returns an array of possible values for the ServiceObjectiveName const type. -func PossibleServiceObjectiveNameValues() []ServiceObjectiveName { - return []ServiceObjectiveName{ServiceObjectiveNameBasic, ServiceObjectiveNameDS100, ServiceObjectiveNameDS1000, ServiceObjectiveNameDS1200, ServiceObjectiveNameDS1500, ServiceObjectiveNameDS200, ServiceObjectiveNameDS2000, ServiceObjectiveNameDS300, ServiceObjectiveNameDS400, ServiceObjectiveNameDS500, ServiceObjectiveNameDS600, ServiceObjectiveNameDW100, ServiceObjectiveNameDW1000, ServiceObjectiveNameDW10000c, ServiceObjectiveNameDW1000c, ServiceObjectiveNameDW1200, ServiceObjectiveNameDW1500, ServiceObjectiveNameDW15000c, ServiceObjectiveNameDW1500c, ServiceObjectiveNameDW200, ServiceObjectiveNameDW2000, ServiceObjectiveNameDW2000c, ServiceObjectiveNameDW2500c, ServiceObjectiveNameDW300, ServiceObjectiveNameDW3000, ServiceObjectiveNameDW30000c, ServiceObjectiveNameDW3000c, ServiceObjectiveNameDW400, ServiceObjectiveNameDW500, ServiceObjectiveNameDW5000c, ServiceObjectiveNameDW600, ServiceObjectiveNameDW6000, ServiceObjectiveNameDW6000c, ServiceObjectiveNameDW7500c, ServiceObjectiveNameElasticPool, ServiceObjectiveNameFree, ServiceObjectiveNameP1, ServiceObjectiveNameP11, ServiceObjectiveNameP15, ServiceObjectiveNameP2, ServiceObjectiveNameP3, ServiceObjectiveNameP4, ServiceObjectiveNameP6, ServiceObjectiveNamePRS1, ServiceObjectiveNamePRS2, ServiceObjectiveNamePRS4, ServiceObjectiveNamePRS6, ServiceObjectiveNameS0, ServiceObjectiveNameS1, ServiceObjectiveNameS12, ServiceObjectiveNameS2, ServiceObjectiveNameS3, ServiceObjectiveNameS4, ServiceObjectiveNameS6, ServiceObjectiveNameS7, ServiceObjectiveNameS9, ServiceObjectiveNameSystem, ServiceObjectiveNameSystem0, ServiceObjectiveNameSystem1, ServiceObjectiveNameSystem2, ServiceObjectiveNameSystem2L, ServiceObjectiveNameSystem3, ServiceObjectiveNameSystem3L, ServiceObjectiveNameSystem4, ServiceObjectiveNameSystem4L} -} - -// StorageKeyType enumerates the values for storage key type. -type StorageKeyType string - -const ( - // SharedAccessKey ... - SharedAccessKey StorageKeyType = "SharedAccessKey" - // StorageAccessKey ... - StorageAccessKey StorageKeyType = "StorageAccessKey" -) - -// PossibleStorageKeyTypeValues returns an array of possible values for the StorageKeyType const type. -func PossibleStorageKeyTypeValues() []StorageKeyType { - return []StorageKeyType{SharedAccessKey, StorageAccessKey} -} - -// TransparentDataEncryptionActivityStatus enumerates the values for transparent data encryption activity -// status. -type TransparentDataEncryptionActivityStatus string - -const ( - // Decrypting ... - Decrypting TransparentDataEncryptionActivityStatus = "Decrypting" - // Encrypting ... - Encrypting TransparentDataEncryptionActivityStatus = "Encrypting" -) - -// PossibleTransparentDataEncryptionActivityStatusValues returns an array of possible values for the TransparentDataEncryptionActivityStatus const type. -func PossibleTransparentDataEncryptionActivityStatusValues() []TransparentDataEncryptionActivityStatus { - return []TransparentDataEncryptionActivityStatus{Decrypting, Encrypting} -} - -// TransparentDataEncryptionStatus enumerates the values for transparent data encryption status. -type TransparentDataEncryptionStatus string - -const ( - // TransparentDataEncryptionStatusDisabled ... - TransparentDataEncryptionStatusDisabled TransparentDataEncryptionStatus = "Disabled" - // TransparentDataEncryptionStatusEnabled ... - TransparentDataEncryptionStatusEnabled TransparentDataEncryptionStatus = "Enabled" -) - -// PossibleTransparentDataEncryptionStatusValues returns an array of possible values for the TransparentDataEncryptionStatus const type. -func PossibleTransparentDataEncryptionStatusValues() []TransparentDataEncryptionStatus { - return []TransparentDataEncryptionStatus{TransparentDataEncryptionStatusDisabled, TransparentDataEncryptionStatusEnabled} -} - -// UnitDefinitionType enumerates the values for unit definition type. -type UnitDefinitionType string - -const ( - // Bytes ... - Bytes UnitDefinitionType = "Bytes" - // BytesPerSecond ... - BytesPerSecond UnitDefinitionType = "BytesPerSecond" - // Count ... - Count UnitDefinitionType = "Count" - // CountPerSecond ... - CountPerSecond UnitDefinitionType = "CountPerSecond" - // Percent ... - Percent UnitDefinitionType = "Percent" - // Seconds ... - Seconds UnitDefinitionType = "Seconds" -) - -// PossibleUnitDefinitionTypeValues returns an array of possible values for the UnitDefinitionType const type. -func PossibleUnitDefinitionTypeValues() []UnitDefinitionType { - return []UnitDefinitionType{Bytes, BytesPerSecond, Count, CountPerSecond, Percent, Seconds} -} - -// UnitType enumerates the values for unit type. -type UnitType string - -const ( - // UnitTypeBytes ... - UnitTypeBytes UnitType = "bytes" - // UnitTypeBytesPerSecond ... - UnitTypeBytesPerSecond UnitType = "bytesPerSecond" - // UnitTypeCount ... - UnitTypeCount UnitType = "count" - // UnitTypeCountPerSecond ... - UnitTypeCountPerSecond UnitType = "countPerSecond" - // UnitTypePercent ... - UnitTypePercent UnitType = "percent" - // UnitTypeSeconds ... - UnitTypeSeconds UnitType = "seconds" -) - -// PossibleUnitTypeValues returns an array of possible values for the UnitType const type. -func PossibleUnitTypeValues() []UnitType { - return []UnitType{UnitTypeBytes, UnitTypeBytesPerSecond, UnitTypeCount, UnitTypeCountPerSecond, UnitTypePercent, UnitTypeSeconds} -} - // Advisor database Advisor. type Advisor struct { autorest.Response `json:"-"` @@ -1096,261 +144,15 @@ type AdvisorProperties struct { LastChecked *date.Time `json:"lastChecked,omitempty"` } -// BackupLongTermRetentionPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type BackupLongTermRetentionPoliciesCreateOrUpdateFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *BackupLongTermRetentionPoliciesCreateOrUpdateFuture) Result(client BackupLongTermRetentionPoliciesClient) (bltrp BackupLongTermRetentionPolicy, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("sql.BackupLongTermRetentionPoliciesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if bltrp.Response.Response, err = future.GetResult(sender); err == nil && bltrp.Response.Response.StatusCode != http.StatusNoContent { - bltrp, err = client.CreateOrUpdateResponder(bltrp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesCreateOrUpdateFuture", "Result", bltrp.Response.Response, "Failure responding to request") - } - } - return -} - -// BackupLongTermRetentionPolicy a backup long term retention policy -type BackupLongTermRetentionPolicy struct { - autorest.Response `json:"-"` - // Location - READ-ONLY; The geo-location where the resource lives - Location *string `json:"location,omitempty"` - // BackupLongTermRetentionPolicyProperties - The properties of the backup long term retention policy - *BackupLongTermRetentionPolicyProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for BackupLongTermRetentionPolicy. -func (bltrp BackupLongTermRetentionPolicy) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for AdvisorProperties. +func (ap AdvisorProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if bltrp.BackupLongTermRetentionPolicyProperties != nil { - objectMap["properties"] = bltrp.BackupLongTermRetentionPolicyProperties + if ap.AutoExecuteValue != "" { + objectMap["autoExecuteValue"] = ap.AutoExecuteValue } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for BackupLongTermRetentionPolicy struct. -func (bltrp *BackupLongTermRetentionPolicy) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - bltrp.Location = &location - } - case "properties": - if v != nil { - var backupLongTermRetentionPolicyProperties BackupLongTermRetentionPolicyProperties - err = json.Unmarshal(*v, &backupLongTermRetentionPolicyProperties) - if err != nil { - return err - } - bltrp.BackupLongTermRetentionPolicyProperties = &backupLongTermRetentionPolicyProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - bltrp.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - bltrp.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - bltrp.Type = &typeVar - } - } - } - - return nil -} - -// BackupLongTermRetentionPolicyListResult represents the response to a list long-term retention policies -// request. -type BackupLongTermRetentionPolicyListResult struct { - autorest.Response `json:"-"` - // Value - The list of long-term retention policies in the database. - Value *[]BackupLongTermRetentionPolicy `json:"value,omitempty"` -} - -// BackupLongTermRetentionPolicyProperties the properties of a backup long term retention policy -type BackupLongTermRetentionPolicyProperties struct { - // State - The status of the backup long term retention policy. Possible values include: 'BackupLongTermRetentionPolicyStateDisabled', 'BackupLongTermRetentionPolicyStateEnabled' - State BackupLongTermRetentionPolicyState `json:"state,omitempty"` - // RecoveryServicesBackupPolicyResourceID - The azure recovery services backup protection policy resource id - RecoveryServicesBackupPolicyResourceID *string `json:"recoveryServicesBackupPolicyResourceId,omitempty"` -} - -// BackupLongTermRetentionVault a backup long term retention vault -type BackupLongTermRetentionVault struct { - autorest.Response `json:"-"` - // Location - READ-ONLY; The geo-location where the resource lives - Location *string `json:"location,omitempty"` - // BackupLongTermRetentionVaultProperties - The properties of the backup long term retention vault - *BackupLongTermRetentionVaultProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for BackupLongTermRetentionVault. -func (bltrv BackupLongTermRetentionVault) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if bltrv.BackupLongTermRetentionVaultProperties != nil { - objectMap["properties"] = bltrv.BackupLongTermRetentionVaultProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for BackupLongTermRetentionVault struct. -func (bltrv *BackupLongTermRetentionVault) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - bltrv.Location = &location - } - case "properties": - if v != nil { - var backupLongTermRetentionVaultProperties BackupLongTermRetentionVaultProperties - err = json.Unmarshal(*v, &backupLongTermRetentionVaultProperties) - if err != nil { - return err - } - bltrv.BackupLongTermRetentionVaultProperties = &backupLongTermRetentionVaultProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - bltrv.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - bltrv.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - bltrv.Type = &typeVar - } - } - } - - return nil -} - -// BackupLongTermRetentionVaultListResult represents the response to a list vaults request. -type BackupLongTermRetentionVaultListResult struct { - autorest.Response `json:"-"` - // Value - The list of vaults in the server. - Value *[]BackupLongTermRetentionVault `json:"value,omitempty"` -} - -// BackupLongTermRetentionVaultProperties the properties of a backup long term retention vault. -type BackupLongTermRetentionVaultProperties struct { - // RecoveryServicesVaultResourceID - The azure recovery services vault resource id - RecoveryServicesVaultResourceID *string `json:"recoveryServicesVaultResourceId,omitempty"` -} - -// BackupLongTermRetentionVaultsCreateOrUpdateFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type BackupLongTermRetentionVaultsCreateOrUpdateFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *BackupLongTermRetentionVaultsCreateOrUpdateFuture) Result(client BackupLongTermRetentionVaultsClient) (bltrv BackupLongTermRetentionVault, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("sql.BackupLongTermRetentionVaultsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if bltrv.Response.Response, err = future.GetResult(sender); err == nil && bltrv.Response.Response.StatusCode != http.StatusNoContent { - bltrv, err = client.CreateOrUpdateResponder(bltrv.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsCreateOrUpdateFuture", "Result", bltrv.Response.Response, "Failure responding to request") - } - } - return -} - // CheckNameAvailabilityRequest a request to check whether the specified name for a resource is available. type CheckNameAvailabilityRequest struct { // Name - The name whose availability is to be checked. @@ -1359,8 +161,7 @@ type CheckNameAvailabilityRequest struct { Type *string `json:"type,omitempty"` } -// CheckNameAvailabilityResponse a response indicating whether the specified name for a resource is -// available. +// CheckNameAvailabilityResponse a response indicating whether the specified name for a resource is available. type CheckNameAvailabilityResponse struct { autorest.Response `json:"-"` // Available - READ-ONLY; True if the name is available, otherwise false. @@ -1693,6 +494,54 @@ type DatabaseProperties struct { ZoneRedundant *bool `json:"zoneRedundant,omitempty"` } +// MarshalJSON is the custom marshaler for DatabaseProperties. +func (dp DatabaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dp.Collation != nil { + objectMap["collation"] = dp.Collation + } + if dp.CreateMode != "" { + objectMap["createMode"] = dp.CreateMode + } + if dp.SourceDatabaseID != nil { + objectMap["sourceDatabaseId"] = dp.SourceDatabaseID + } + if dp.SourceDatabaseDeletionDate != nil { + objectMap["sourceDatabaseDeletionDate"] = dp.SourceDatabaseDeletionDate + } + if dp.RestorePointInTime != nil { + objectMap["restorePointInTime"] = dp.RestorePointInTime + } + if dp.RecoveryServicesRecoveryPointResourceID != nil { + objectMap["recoveryServicesRecoveryPointResourceId"] = dp.RecoveryServicesRecoveryPointResourceID + } + if dp.Edition != "" { + objectMap["edition"] = dp.Edition + } + if dp.MaxSizeBytes != nil { + objectMap["maxSizeBytes"] = dp.MaxSizeBytes + } + if dp.RequestedServiceObjectiveID != nil { + objectMap["requestedServiceObjectiveId"] = dp.RequestedServiceObjectiveID + } + if dp.RequestedServiceObjectiveName != "" { + objectMap["requestedServiceObjectiveName"] = dp.RequestedServiceObjectiveName + } + if dp.ElasticPoolName != nil { + objectMap["elasticPoolName"] = dp.ElasticPoolName + } + if dp.ReadScale != "" { + objectMap["readScale"] = dp.ReadScale + } + if dp.SampleName != "" { + objectMap["sampleName"] = dp.SampleName + } + if dp.ZoneRedundant != nil { + objectMap["zoneRedundant"] = dp.ZoneRedundant + } + return json.Marshal(objectMap) +} + // DatabasesCreateImportOperationFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type DatabasesCreateImportOperationFuture struct { @@ -1869,8 +718,7 @@ type DatabaseSecurityAlertPolicyProperties struct { UseServerDefault SecurityAlertPolicyUseServerDefault `json:"useServerDefault,omitempty"` } -// DatabasesExportFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// DatabasesExportFuture an abstraction for monitoring and retrieving the results of a long-running operation. type DatabasesExportFuture struct { azure.Future } @@ -1898,8 +746,7 @@ func (future *DatabasesExportFuture) Result(client DatabasesClient) (ier ImportE return } -// DatabasesImportFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// DatabasesImportFuture an abstraction for monitoring and retrieving the results of a long-running operation. type DatabasesImportFuture struct { azure.Future } @@ -1927,8 +774,7 @@ func (future *DatabasesImportFuture) Result(client DatabasesClient) (ier ImportE return } -// DatabasesPauseFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// DatabasesPauseFuture an abstraction for monitoring and retrieving the results of a long-running operation. type DatabasesPauseFuture struct { azure.Future } @@ -1950,8 +796,7 @@ func (future *DatabasesPauseFuture) Result(client DatabasesClient) (ar autorest. return } -// DatabasesResumeFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// DatabasesResumeFuture an abstraction for monitoring and retrieving the results of a long-running operation. type DatabasesResumeFuture struct { azure.Future } @@ -1973,8 +818,7 @@ func (future *DatabasesResumeFuture) Result(client DatabasesClient) (ar autorest return } -// DatabasesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// DatabasesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. type DatabasesUpdateFuture struct { azure.Future } @@ -2351,6 +1195,18 @@ type DataMaskingPolicyProperties struct { MaskingLevel *string `json:"maskingLevel,omitempty"` } +// MarshalJSON is the custom marshaler for DataMaskingPolicyProperties. +func (dmpp DataMaskingPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dmpp.DataMaskingState != "" { + objectMap["dataMaskingState"] = dmpp.DataMaskingState + } + if dmpp.ExemptPrincipals != nil { + objectMap["exemptPrincipals"] = dmpp.ExemptPrincipals + } + return json.Marshal(objectMap) +} + // DataMaskingRule represents a database data masking rule. type DataMaskingRule struct { autorest.Response `json:"-"` @@ -2481,6 +1337,45 @@ type DataMaskingRuleProperties struct { ReplacementString *string `json:"replacementString,omitempty"` } +// MarshalJSON is the custom marshaler for DataMaskingRuleProperties. +func (dmrp DataMaskingRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dmrp.AliasName != nil { + objectMap["aliasName"] = dmrp.AliasName + } + if dmrp.RuleState != "" { + objectMap["ruleState"] = dmrp.RuleState + } + if dmrp.SchemaName != nil { + objectMap["schemaName"] = dmrp.SchemaName + } + if dmrp.TableName != nil { + objectMap["tableName"] = dmrp.TableName + } + if dmrp.ColumnName != nil { + objectMap["columnName"] = dmrp.ColumnName + } + if dmrp.MaskingFunction != "" { + objectMap["maskingFunction"] = dmrp.MaskingFunction + } + if dmrp.NumberFrom != nil { + objectMap["numberFrom"] = dmrp.NumberFrom + } + if dmrp.NumberTo != nil { + objectMap["numberTo"] = dmrp.NumberTo + } + if dmrp.PrefixSize != nil { + objectMap["prefixSize"] = dmrp.PrefixSize + } + if dmrp.SuffixSize != nil { + objectMap["suffixSize"] = dmrp.SuffixSize + } + if dmrp.ReplacementString != nil { + objectMap["replacementString"] = dmrp.ReplacementString + } + return json.Marshal(objectMap) +} + // DisasterRecoveryConfiguration represents a disaster recovery configuration. type DisasterRecoveryConfiguration struct { autorest.Response `json:"-"` @@ -2565,8 +1460,8 @@ func (drc *DisasterRecoveryConfiguration) UnmarshalJSON(body []byte) error { return nil } -// DisasterRecoveryConfigurationListResult represents the response to a List disaster recovery -// configuration request. +// DisasterRecoveryConfigurationListResult represents the response to a List disaster recovery configuration +// request. type DisasterRecoveryConfigurationListResult struct { autorest.Response `json:"-"` // Value - The list of disaster recovery configurations housed under the server. @@ -2591,8 +1486,23 @@ type DisasterRecoveryConfigurationProperties struct { Role DisasterRecoveryConfigurationRole `json:"role,omitempty"` } -// DisasterRecoveryConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. +// MarshalJSON is the custom marshaler for DisasterRecoveryConfigurationProperties. +func (drcp DisasterRecoveryConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if drcp.AutoFailover != "" { + objectMap["autoFailover"] = drcp.AutoFailover + } + if drcp.FailoverPolicy != "" { + objectMap["failoverPolicy"] = drcp.FailoverPolicy + } + if drcp.PartnerServerID != nil { + objectMap["partnerServerId"] = drcp.PartnerServerID + } + return json.Marshal(objectMap) +} + +// DisasterRecoveryConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. type DisasterRecoveryConfigurationsCreateOrUpdateFuture struct { azure.Future } @@ -2643,8 +1553,8 @@ func (future *DisasterRecoveryConfigurationsDeleteFuture) Result(client Disaster return } -// DisasterRecoveryConfigurationsFailoverAllowDataLossFuture an abstraction for monitoring and retrieving -// the results of a long-running operation. +// DisasterRecoveryConfigurationsFailoverAllowDataLossFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. type DisasterRecoveryConfigurationsFailoverAllowDataLossFuture struct { azure.Future } @@ -2666,8 +1576,8 @@ func (future *DisasterRecoveryConfigurationsFailoverAllowDataLossFuture) Result( return } -// DisasterRecoveryConfigurationsFailoverFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. +// DisasterRecoveryConfigurationsFailoverFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type DisasterRecoveryConfigurationsFailoverFuture struct { azure.Future } @@ -3153,8 +2063,32 @@ type ElasticPoolProperties struct { ZoneRedundant *bool `json:"zoneRedundant,omitempty"` } -// ElasticPoolsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. +// MarshalJSON is the custom marshaler for ElasticPoolProperties. +func (epp ElasticPoolProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if epp.Edition != "" { + objectMap["edition"] = epp.Edition + } + if epp.Dtu != nil { + objectMap["dtu"] = epp.Dtu + } + if epp.DatabaseDtuMax != nil { + objectMap["databaseDtuMax"] = epp.DatabaseDtuMax + } + if epp.DatabaseDtuMin != nil { + objectMap["databaseDtuMin"] = epp.DatabaseDtuMin + } + if epp.StorageMB != nil { + objectMap["storageMB"] = epp.StorageMB + } + if epp.ZoneRedundant != nil { + objectMap["zoneRedundant"] = epp.ZoneRedundant + } + return json.Marshal(objectMap) +} + +// ElasticPoolsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type ElasticPoolsCreateOrUpdateFuture struct { azure.Future } @@ -3540,6 +2474,15 @@ type GeoBackupPolicyProperties struct { StorageType *string `json:"storageType,omitempty"` } +// MarshalJSON is the custom marshaler for GeoBackupPolicyProperties. +func (gbpp GeoBackupPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gbpp.State != "" { + objectMap["state"] = gbpp.State + } + return json.Marshal(objectMap) +} + // ImportExportResponse response for Import/Export Get operation. type ImportExportResponse struct { autorest.Response `json:"-"` @@ -3882,8 +2825,8 @@ type OperationImpact struct { ChangeValueRelative *float64 `json:"changeValueRelative,omitempty"` } -// OperationListResult result of the request to list SQL operations. It contains a list of operations and a -// URL link to get the next set of results. +// OperationListResult result of the request to list SQL operations. It contains a list of operations and a URL +// link to get the next set of results. type OperationListResult struct { autorest.Response `json:"-"` // Value - List of SQL operations supported by the SQL resource provider. @@ -4037,8 +2980,8 @@ func (rep *RecommendedElasticPool) UnmarshalJSON(body []byte) error { return nil } -// RecommendedElasticPoolListMetricsResult represents the response to a list recommended elastic pool -// metrics request. +// RecommendedElasticPoolListMetricsResult represents the response to a list recommended elastic pool metrics +// request. type RecommendedElasticPoolListMetricsResult struct { autorest.Response `json:"-"` // Value - The list of recommended elastic pools metrics. @@ -4088,6 +3031,24 @@ type RecommendedElasticPoolProperties struct { Metrics *[]RecommendedElasticPoolMetric `json:"metrics,omitempty"` } +// MarshalJSON is the custom marshaler for RecommendedElasticPoolProperties. +func (repp RecommendedElasticPoolProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if repp.Dtu != nil { + objectMap["dtu"] = repp.Dtu + } + if repp.DatabaseDtuMin != nil { + objectMap["databaseDtuMin"] = repp.DatabaseDtuMin + } + if repp.DatabaseDtuMax != nil { + objectMap["databaseDtuMax"] = repp.DatabaseDtuMax + } + if repp.StorageMB != nil { + objectMap["storageMB"] = repp.StorageMB + } + return json.Marshal(objectMap) +} + // RecommendedIndex represents a database recommended index. type RecommendedIndex struct { // RecommendedIndexProperties - READ-ONLY; The properties representing the resource. @@ -4392,8 +3353,8 @@ type ReplicationLinkProperties struct { ReplicationState ReplicationState `json:"replicationState,omitempty"` } -// ReplicationLinksFailoverAllowDataLossFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. +// ReplicationLinksFailoverAllowDataLossFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type ReplicationLinksFailoverAllowDataLossFuture struct { azure.Future } @@ -4415,8 +3376,8 @@ func (future *ReplicationLinksFailoverAllowDataLossFuture) Result(client Replica return } -// ReplicationLinksFailoverFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. +// ReplicationLinksFailoverFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type ReplicationLinksFailoverFuture struct { azure.Future } @@ -4438,6 +3399,29 @@ func (future *ReplicationLinksFailoverFuture) Result(client ReplicationLinksClie return } +// ReplicationLinksUnlinkFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ReplicationLinksUnlinkFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationLinksUnlinkFuture) Result(client ReplicationLinksClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ReplicationLinksUnlinkFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("sql.ReplicationLinksUnlinkFuture") + return + } + ar.Response = future.Response() + return +} + // Resource ARM resource. type Resource struct { // ID - READ-ONLY; Resource ID. @@ -4852,8 +3836,8 @@ func (saaa *ServerAzureADAdministrator) UnmarshalJSON(body []byte) error { return nil } -// ServerAzureADAdministratorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. +// ServerAzureADAdministratorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. type ServerAzureADAdministratorsCreateOrUpdateFuture struct { azure.Future } @@ -5020,8 +4004,17 @@ type ServerCommunicationLinkProperties struct { PartnerServer *string `json:"partnerServer,omitempty"` } -// ServerCommunicationLinksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. +// MarshalJSON is the custom marshaler for ServerCommunicationLinkProperties. +func (sclp ServerCommunicationLinkProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sclp.PartnerServer != nil { + objectMap["partnerServer"] = sclp.PartnerServer + } + return json.Marshal(objectMap) +} + +// ServerCommunicationLinksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type ServerCommunicationLinksCreateOrUpdateFuture struct { azure.Future } @@ -5175,6 +4168,21 @@ type ServerProperties struct { State ServerState `json:"state,omitempty"` } +// MarshalJSON is the custom marshaler for ServerProperties. +func (sp ServerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sp.Version != "" { + objectMap["version"] = sp.Version + } + if sp.AdministratorLogin != nil { + objectMap["administratorLogin"] = sp.AdministratorLogin + } + if sp.AdministratorLoginPassword != nil { + objectMap["administratorLoginPassword"] = sp.AdministratorLoginPassword + } + return json.Marshal(objectMap) +} + // ServerTableAuditingPolicy a server table auditing policy. type ServerTableAuditingPolicy struct { autorest.Response `json:"-"` @@ -6017,3 +5025,9 @@ type TransparentDataEncryptionProperties struct { // Status - The status of the database transparent data encryption. Possible values include: 'TransparentDataEncryptionStatusEnabled', 'TransparentDataEncryptionStatusDisabled' Status TransparentDataEncryptionStatus `json:"status,omitempty"` } + +// UnlinkParameters represents the parameters for Unlink Replication Link request. +type UnlinkParameters struct { + // ForcedTermination - Determines whether link will be terminated in a forced or a friendly way. + ForcedTermination *bool `json:"forcedTermination,omitempty"` +} diff --git a/services/sql/mgmt/2014-04-01/sql/operations.go b/services/sql/mgmt/2014-04-01/sql/operations.go index e60ede1effd8..e0b8c8d03a31 100644 --- a/services/sql/mgmt/2014-04-01/sql/operations.go +++ b/services/sql/mgmt/2014-04-01/sql/operations.go @@ -102,7 +102,6 @@ func (client OperationsClient) ListSender(req *http.Request) (*http.Response, er func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/queries.go b/services/sql/mgmt/2014-04-01/sql/queries.go index 08ac02c695cb..4465bb00080d 100644 --- a/services/sql/mgmt/2014-04-01/sql/queries.go +++ b/services/sql/mgmt/2014-04-01/sql/queries.go @@ -114,7 +114,6 @@ func (client QueriesClient) ListByDatabaseSender(req *http.Request) (*http.Respo func (client QueriesClient) ListByDatabaseResponder(resp *http.Response) (result TopQueriesListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/querystatistics.go b/services/sql/mgmt/2014-04-01/sql/querystatistics.go index de125b3891d9..0f8a9dfa5ed8 100644 --- a/services/sql/mgmt/2014-04-01/sql/querystatistics.go +++ b/services/sql/mgmt/2014-04-01/sql/querystatistics.go @@ -116,7 +116,6 @@ func (client QueryStatisticsClient) ListByQuerySender(req *http.Request) (*http. func (client QueryStatisticsClient) ListByQueryResponder(resp *http.Response) (result QueryStatisticListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/querytexts.go b/services/sql/mgmt/2014-04-01/sql/querytexts.go index 5fdf6f0faa94..c8dbaf098bfc 100644 --- a/services/sql/mgmt/2014-04-01/sql/querytexts.go +++ b/services/sql/mgmt/2014-04-01/sql/querytexts.go @@ -116,7 +116,6 @@ func (client QueryTextsClient) ListByQuerySender(req *http.Request) (*http.Respo func (client QueryTextsClient) ListByQueryResponder(resp *http.Response) (result QueryTextListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/recommendedelasticpools.go b/services/sql/mgmt/2014-04-01/sql/recommendedelasticpools.go index 2b760a8c2218..d53e3e5f998c 100644 --- a/services/sql/mgmt/2014-04-01/sql/recommendedelasticpools.go +++ b/services/sql/mgmt/2014-04-01/sql/recommendedelasticpools.go @@ -115,7 +115,6 @@ func (client RecommendedElasticPoolsClient) GetSender(req *http.Request) (*http. func (client RecommendedElasticPoolsClient) GetResponder(resp *http.Response) (result RecommendedElasticPool, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -192,7 +191,6 @@ func (client RecommendedElasticPoolsClient) ListByServerSender(req *http.Request func (client RecommendedElasticPoolsClient) ListByServerResponder(resp *http.Response) (result RecommendedElasticPoolListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -271,7 +269,6 @@ func (client RecommendedElasticPoolsClient) ListMetricsSender(req *http.Request) func (client RecommendedElasticPoolsClient) ListMetricsResponder(resp *http.Response) (result RecommendedElasticPoolListMetricsResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/recoverabledatabases.go b/services/sql/mgmt/2014-04-01/sql/recoverabledatabases.go index 86922b509923..b0975e5b0da6 100644 --- a/services/sql/mgmt/2014-04-01/sql/recoverabledatabases.go +++ b/services/sql/mgmt/2014-04-01/sql/recoverabledatabases.go @@ -115,7 +115,6 @@ func (client RecoverableDatabasesClient) GetSender(req *http.Request) (*http.Res func (client RecoverableDatabasesClient) GetResponder(resp *http.Response) (result RecoverableDatabase, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -192,7 +191,6 @@ func (client RecoverableDatabasesClient) ListByServerSender(req *http.Request) ( func (client RecoverableDatabasesClient) ListByServerResponder(resp *http.Response) (result RecoverableDatabaseListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/replicationlinks.go b/services/sql/mgmt/2014-04-01/sql/replicationlinks.go index 2e64c7f1a21d..e494bf72327a 100644 --- a/services/sql/mgmt/2014-04-01/sql/replicationlinks.go +++ b/services/sql/mgmt/2014-04-01/sql/replicationlinks.go @@ -117,7 +117,6 @@ func (client ReplicationLinksClient) DeleteSender(req *http.Request) (*http.Resp func (client ReplicationLinksClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -197,7 +196,6 @@ func (client ReplicationLinksClient) FailoverSender(req *http.Request) (future R func (client ReplicationLinksClient) FailoverResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -278,7 +276,6 @@ func (client ReplicationLinksClient) FailoverAllowDataLossSender(req *http.Reque func (client ReplicationLinksClient) FailoverAllowDataLossResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -358,7 +355,6 @@ func (client ReplicationLinksClient) GetSender(req *http.Request) (*http.Respons func (client ReplicationLinksClient) GetResponder(resp *http.Response) (result ReplicationLink, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -437,10 +433,91 @@ func (client ReplicationLinksClient) ListByDatabaseSender(req *http.Request) (*h func (client ReplicationLinksClient) ListByDatabaseResponder(resp *http.Response) (result ReplicationLinkListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } + +// Unlink deletes a database replication link in forced or friendly way. +// Parameters: +// resourceGroupName - 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 - the name of the server. +// databaseName - the name of the database that has the replication link to be failed over. +// linkID - the ID of the replication link to be failed over. +// parameters - the required parameters for unlinking replication link. +func (client ReplicationLinksClient) Unlink(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string, parameters UnlinkParameters) (result ReplicationLinksUnlinkFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationLinksClient.Unlink") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UnlinkPreparer(ctx, resourceGroupName, serverName, databaseName, linkID, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "Unlink", nil, "Failure preparing request") + return + } + + result, err = client.UnlinkSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "Unlink", result.Response(), "Failure sending request") + return + } + + return +} + +// UnlinkPreparer prepares the Unlink request. +func (client ReplicationLinksClient) UnlinkPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string, parameters UnlinkParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "linkId": autorest.Encode("path", linkID), + "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.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/unlink", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UnlinkSender sends the Unlink request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationLinksClient) UnlinkSender(req *http.Request) (future ReplicationLinksUnlinkFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UnlinkResponder handles the response to the Unlink request. The method always +// closes the http.Response Body. +func (client ReplicationLinksClient) UnlinkResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/sql/mgmt/2014-04-01/sql/restorabledroppeddatabases.go b/services/sql/mgmt/2014-04-01/sql/restorabledroppeddatabases.go index 2dc9d5092bb2..8408a78330ec 100644 --- a/services/sql/mgmt/2014-04-01/sql/restorabledroppeddatabases.go +++ b/services/sql/mgmt/2014-04-01/sql/restorabledroppeddatabases.go @@ -116,7 +116,6 @@ func (client RestorableDroppedDatabasesClient) GetSender(req *http.Request) (*ht func (client RestorableDroppedDatabasesClient) GetResponder(resp *http.Response) (result RestorableDroppedDatabase, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -193,7 +192,6 @@ func (client RestorableDroppedDatabasesClient) ListByServerSender(req *http.Requ func (client RestorableDroppedDatabasesClient) ListByServerResponder(resp *http.Response) (result RestorableDroppedDatabaseListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/restorepoints.go b/services/sql/mgmt/2014-04-01/sql/restorepoints.go index d0e5a91bba10..a18775e573b4 100644 --- a/services/sql/mgmt/2014-04-01/sql/restorepoints.go +++ b/services/sql/mgmt/2014-04-01/sql/restorepoints.go @@ -114,7 +114,6 @@ func (client RestorePointsClient) ListByDatabaseSender(req *http.Request) (*http func (client RestorePointsClient) ListByDatabaseResponder(resp *http.Response) (result RestorePointListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/serveradvisors.go b/services/sql/mgmt/2014-04-01/sql/serveradvisors.go index 108294048942..ea22e00553bb 100644 --- a/services/sql/mgmt/2014-04-01/sql/serveradvisors.go +++ b/services/sql/mgmt/2014-04-01/sql/serveradvisors.go @@ -119,7 +119,6 @@ func (client ServerAdvisorsClient) CreateOrUpdateSender(req *http.Request) (*htt func (client ServerAdvisorsClient) CreateOrUpdateResponder(resp *http.Response) (result Advisor, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -198,7 +197,6 @@ func (client ServerAdvisorsClient) GetSender(req *http.Request) (*http.Response, func (client ServerAdvisorsClient) GetResponder(resp *http.Response) (result Advisor, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -275,7 +273,6 @@ func (client ServerAdvisorsClient) ListByServerSender(req *http.Request) (*http. func (client ServerAdvisorsClient) ListByServerResponder(resp *http.Response) (result AdvisorListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -359,7 +356,6 @@ func (client ServerAdvisorsClient) UpdateSender(req *http.Request) (*http.Respon func (client ServerAdvisorsClient) UpdateResponder(resp *http.Response) (result Advisor, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/serverazureadadministrators.go b/services/sql/mgmt/2014-04-01/sql/serverazureadadministrators.go index 23ca6dc735d2..4916ffa36355 100644 --- a/services/sql/mgmt/2014-04-01/sql/serverazureadadministrators.go +++ b/services/sql/mgmt/2014-04-01/sql/serverazureadadministrators.go @@ -130,7 +130,6 @@ func (client ServerAzureADAdministratorsClient) CreateOrUpdateSender(req *http.R func (client ServerAzureADAdministratorsClient) CreateOrUpdateResponder(resp *http.Response) (result ServerAzureADAdministrator, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -208,7 +207,6 @@ func (client ServerAzureADAdministratorsClient) DeleteSender(req *http.Request) func (client ServerAzureADAdministratorsClient) DeleteResponder(resp *http.Response) (result ServerAzureADAdministrator, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -286,7 +284,6 @@ func (client ServerAzureADAdministratorsClient) GetSender(req *http.Request) (*h func (client ServerAzureADAdministratorsClient) GetResponder(resp *http.Response) (result ServerAzureADAdministrator, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -363,7 +360,6 @@ func (client ServerAzureADAdministratorsClient) ListByServerSender(req *http.Req func (client ServerAzureADAdministratorsClient) ListByServerResponder(resp *http.Response) (result ServerAdministratorListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/servercommunicationlinks.go b/services/sql/mgmt/2014-04-01/sql/servercommunicationlinks.go index 30df09b8309f..0c5fce09ef4c 100644 --- a/services/sql/mgmt/2014-04-01/sql/servercommunicationlinks.go +++ b/services/sql/mgmt/2014-04-01/sql/servercommunicationlinks.go @@ -128,7 +128,6 @@ func (client ServerCommunicationLinksClient) CreateOrUpdateSender(req *http.Requ func (client ServerCommunicationLinksClient) CreateOrUpdateResponder(resp *http.Response) (result ServerCommunicationLink, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -207,7 +206,6 @@ func (client ServerCommunicationLinksClient) DeleteSender(req *http.Request) (*h func (client ServerCommunicationLinksClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp @@ -285,7 +283,6 @@ func (client ServerCommunicationLinksClient) GetSender(req *http.Request) (*http func (client ServerCommunicationLinksClient) GetResponder(resp *http.Response) (result ServerCommunicationLink, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -362,7 +359,6 @@ func (client ServerCommunicationLinksClient) ListByServerSender(req *http.Reques func (client ServerCommunicationLinksClient) ListByServerResponder(resp *http.Response) (result ServerCommunicationLinkListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/serverconnectionpolicies.go b/services/sql/mgmt/2014-04-01/sql/serverconnectionpolicies.go index 759b36815fff..21095382288f 100644 --- a/services/sql/mgmt/2014-04-01/sql/serverconnectionpolicies.go +++ b/services/sql/mgmt/2014-04-01/sql/serverconnectionpolicies.go @@ -119,7 +119,6 @@ func (client ServerConnectionPoliciesClient) CreateOrUpdateSender(req *http.Requ func (client ServerConnectionPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ServerConnectionPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -197,7 +196,6 @@ func (client ServerConnectionPoliciesClient) GetSender(req *http.Request) (*http func (client ServerConnectionPoliciesClient) GetResponder(resp *http.Response) (result ServerConnectionPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/servers.go b/services/sql/mgmt/2014-04-01/sql/servers.go index f2a1c3314878..f72a4520bf99 100644 --- a/services/sql/mgmt/2014-04-01/sql/servers.go +++ b/services/sql/mgmt/2014-04-01/sql/servers.go @@ -118,7 +118,6 @@ func (client ServersClient) CheckNameAvailabilitySender(req *http.Request) (*htt func (client ServersClient) CheckNameAvailabilityResponder(resp *http.Response) (result CheckNameAvailabilityResponse, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -199,7 +198,6 @@ func (client ServersClient) CreateOrUpdateSender(req *http.Request) (*http.Respo func (client ServersClient) CreateOrUpdateResponder(resp *http.Response) (result Server, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -276,7 +274,6 @@ func (client ServersClient) DeleteSender(req *http.Request) (*http.Response, err func (client ServersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -352,7 +349,6 @@ func (client ServersClient) GetSender(req *http.Request) (*http.Response, error) func (client ServersClient) GetResponder(resp *http.Response) (result Server, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -423,7 +419,6 @@ func (client ServersClient) ListSender(req *http.Request) (*http.Response, error func (client ServersClient) ListResponder(resp *http.Response) (result ServerListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -498,7 +493,6 @@ func (client ServersClient) ListByResourceGroupSender(req *http.Request) (*http. func (client ServersClient) ListByResourceGroupResponder(resp *http.Response) (result ServerListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -578,7 +572,6 @@ func (client ServersClient) UpdateSender(req *http.Request) (*http.Response, err func (client ServersClient) UpdateResponder(resp *http.Response) (result Server, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/servertableauditingpolicies.go b/services/sql/mgmt/2014-04-01/sql/servertableauditingpolicies.go index b61dddb7c9e8..b0d6ae1f1084 100644 --- a/services/sql/mgmt/2014-04-01/sql/servertableauditingpolicies.go +++ b/services/sql/mgmt/2014-04-01/sql/servertableauditingpolicies.go @@ -120,7 +120,6 @@ func (client ServerTableAuditingPoliciesClient) CreateOrUpdateSender(req *http.R func (client ServerTableAuditingPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ServerTableAuditingPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -198,7 +197,6 @@ func (client ServerTableAuditingPoliciesClient) GetSender(req *http.Request) (*h func (client ServerTableAuditingPoliciesClient) GetResponder(resp *http.Response) (result ServerTableAuditingPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -275,7 +273,6 @@ func (client ServerTableAuditingPoliciesClient) ListByServerSender(req *http.Req func (client ServerTableAuditingPoliciesClient) ListByServerResponder(resp *http.Response) (result ServerTableAuditingPolicyListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/serverusages.go b/services/sql/mgmt/2014-04-01/sql/serverusages.go index 910e9c77c733..b91950ee0677 100644 --- a/services/sql/mgmt/2014-04-01/sql/serverusages.go +++ b/services/sql/mgmt/2014-04-01/sql/serverusages.go @@ -112,7 +112,6 @@ func (client ServerUsagesClient) ListByServerSender(req *http.Request) (*http.Re func (client ServerUsagesClient) ListByServerResponder(resp *http.Response) (result ServerUsageListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/serviceobjectives.go b/services/sql/mgmt/2014-04-01/sql/serviceobjectives.go index 73bf12ea6fd1..5b0d17d9ae87 100644 --- a/services/sql/mgmt/2014-04-01/sql/serviceobjectives.go +++ b/services/sql/mgmt/2014-04-01/sql/serviceobjectives.go @@ -115,7 +115,6 @@ func (client ServiceObjectivesClient) GetSender(req *http.Request) (*http.Respon func (client ServiceObjectivesClient) GetResponder(resp *http.Response) (result ServiceObjective, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -192,7 +191,6 @@ func (client ServiceObjectivesClient) ListByServerSender(req *http.Request) (*ht func (client ServiceObjectivesClient) ListByServerResponder(resp *http.Response) (result ServiceObjectiveListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/servicetieradvisors.go b/services/sql/mgmt/2014-04-01/sql/servicetieradvisors.go index be905902a104..e21177193bb9 100644 --- a/services/sql/mgmt/2014-04-01/sql/servicetieradvisors.go +++ b/services/sql/mgmt/2014-04-01/sql/servicetieradvisors.go @@ -117,7 +117,6 @@ func (client ServiceTierAdvisorsClient) GetSender(req *http.Request) (*http.Resp func (client ServiceTierAdvisorsClient) GetResponder(resp *http.Response) (result ServiceTierAdvisor, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -196,7 +195,6 @@ func (client ServiceTierAdvisorsClient) ListByDatabaseSender(req *http.Request) func (client ServiceTierAdvisorsClient) ListByDatabaseResponder(resp *http.Response) (result ServiceTierAdvisorListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/sqlapi/interfaces.go b/services/sql/mgmt/2014-04-01/sql/sqlapi/interfaces.go index 0e49e81fd8b6..efc9318b1229 100644 --- a/services/sql/mgmt/2014-04-01/sql/sqlapi/interfaces.go +++ b/services/sql/mgmt/2014-04-01/sql/sqlapi/interfaces.go @@ -42,24 +42,6 @@ type DatabaseAdvisorsClientAPI interface { var _ DatabaseAdvisorsClientAPI = (*sql.DatabaseAdvisorsClient)(nil) -// BackupLongTermRetentionPoliciesClientAPI contains the set of methods on the BackupLongTermRetentionPoliciesClient type. -type BackupLongTermRetentionPoliciesClientAPI interface { - CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters sql.BackupLongTermRetentionPolicy) (result sql.BackupLongTermRetentionPoliciesCreateOrUpdateFuture, err error) - Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.BackupLongTermRetentionPolicy, err error) - ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.BackupLongTermRetentionPolicyListResult, err error) -} - -var _ BackupLongTermRetentionPoliciesClientAPI = (*sql.BackupLongTermRetentionPoliciesClient)(nil) - -// BackupLongTermRetentionVaultsClientAPI contains the set of methods on the BackupLongTermRetentionVaultsClient type. -type BackupLongTermRetentionVaultsClientAPI interface { - CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters sql.BackupLongTermRetentionVault) (result sql.BackupLongTermRetentionVaultsCreateOrUpdateFuture, err error) - Get(ctx context.Context, resourceGroupName string, serverName string) (result sql.BackupLongTermRetentionVault, err error) - ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.BackupLongTermRetentionVaultListResult, err error) -} - -var _ BackupLongTermRetentionVaultsClientAPI = (*sql.BackupLongTermRetentionVaultsClient)(nil) - // RecoverableDatabasesClientAPI contains the set of methods on the RecoverableDatabasesClient type. type RecoverableDatabasesClientAPI interface { Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.RecoverableDatabase, err error) @@ -253,6 +235,7 @@ type ReplicationLinksClientAPI interface { FailoverAllowDataLoss(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string) (result sql.ReplicationLinksFailoverAllowDataLossFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string) (result sql.ReplicationLink, err error) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.ReplicationLinkListResult, err error) + Unlink(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string, parameters sql.UnlinkParameters) (result sql.ReplicationLinksUnlinkFuture, err error) } var _ ReplicationLinksClientAPI = (*sql.ReplicationLinksClient)(nil) diff --git a/services/sql/mgmt/2014-04-01/sql/transparentdataencryptionactivities.go b/services/sql/mgmt/2014-04-01/sql/transparentdataencryptionactivities.go index 0d6d552acbe9..3ddbfabd7144 100644 --- a/services/sql/mgmt/2014-04-01/sql/transparentdataencryptionactivities.go +++ b/services/sql/mgmt/2014-04-01/sql/transparentdataencryptionactivities.go @@ -117,7 +117,6 @@ func (client TransparentDataEncryptionActivitiesClient) ListByConfigurationSende func (client TransparentDataEncryptionActivitiesClient) ListByConfigurationResponder(resp *http.Response) (result TransparentDataEncryptionActivityListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/transparentdataencryptionconfigurations.go b/services/sql/mgmt/2014-04-01/sql/transparentdataencryptionconfigurations.go index d19c4ad4ef98..9d260b3d82fa 100644 --- a/services/sql/mgmt/2014-04-01/sql/transparentdataencryptionconfigurations.go +++ b/services/sql/mgmt/2014-04-01/sql/transparentdataencryptionconfigurations.go @@ -117,7 +117,6 @@ func (client TransparentDataEncryptionConfigurationsClient) ListByDatabaseSender func (client TransparentDataEncryptionConfigurationsClient) ListByDatabaseResponder(resp *http.Response) (result TransparentDataEncryptionListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/transparentdataencryptions.go b/services/sql/mgmt/2014-04-01/sql/transparentdataencryptions.go index 97462bdbf405..8b488f97380a 100644 --- a/services/sql/mgmt/2014-04-01/sql/transparentdataencryptions.go +++ b/services/sql/mgmt/2014-04-01/sql/transparentdataencryptions.go @@ -120,7 +120,6 @@ func (client TransparentDataEncryptionsClient) CreateOrUpdateSender(req *http.Re func (client TransparentDataEncryptionsClient) CreateOrUpdateResponder(resp *http.Response) (result TransparentDataEncryption, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -200,7 +199,6 @@ func (client TransparentDataEncryptionsClient) GetSender(req *http.Request) (*ht func (client TransparentDataEncryptionsClient) GetResponder(resp *http.Response) (result TransparentDataEncryption, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/sql/mgmt/2014-04-01/sql/version.go b/services/sql/mgmt/2014-04-01/sql/version.go index d4cf5ce60908..fdba0e466ba5 100644 --- a/services/sql/mgmt/2014-04-01/sql/version.go +++ b/services/sql/mgmt/2014-04-01/sql/version.go @@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + version.Number + " sql/2014-04-01" + return "Azure-SDK-For-Go/" + Version() + " sql/2014-04-01" } // Version returns the semantic version (see http://semver.org) of the client.