From 7a432b6baccdf0b612460c0cbec70e194f4971dc Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Fri, 12 Jun 2020 03:32:49 +0000 Subject: [PATCH] Generated from d7ea88292b478ae72e998f9689f49cc74f8c2ff6 fixes --- .../sql/backuplongtermretentionpolicies.go | 3 - .../sql/backupshorttermretentionpolicies.go | 4 - .../preview/sql/mgmt/v3.0/sql/capabilities.go | 1 - .../mgmt/v3.0/sql/databaseautomatictuning.go | 2 - .../v3.0/sql/databaseblobauditingpolicies.go | 3 - .../sql/mgmt/v3.0/sql/databaseoperations.go | 2 - .../preview/sql/mgmt/v3.0/sql/databases.go | 16 - .../sql/databasethreatdetectionpolicies.go | 2 - .../sql/mgmt/v3.0/sql/databaseusages.go | 1 - ...asevulnerabilityassessmentrulebaselines.go | 3 - .../sql/databasevulnerabilityassessments.go | 4 - .../databasevulnerabilityassessmentscans.go | 4 - .../sql/mgmt/v3.0/sql/datamaskingpolicies.go | 2 - .../sql/mgmt/v3.0/sql/datamaskingrules.go | 2 - .../mgmt/v3.0/sql/elasticpoolactivities.go | 1 - .../v3.0/sql/elasticpooldatabaseactivities.go | 1 - .../mgmt/v3.0/sql/elasticpooloperations.go | 2 - .../preview/sql/mgmt/v3.0/sql/elasticpools.go | 8 - .../sql/mgmt/v3.0/sql/encryptionprotectors.go | 4 - .../extendeddatabaseblobauditingpolicies.go | 118 ++- .../sql/extendedserverblobauditingpolicies.go | 116 ++- .../sql/mgmt/v3.0/sql/failovergroups.go | 7 - .../sql/mgmt/v3.0/sql/firewallrules.go | 4 - .../sql/mgmt/v3.0/sql/geobackuppolicies.go | 3 - .../mgmt/v3.0/sql/instancefailovergroups.go | 6 - .../sql/mgmt/v3.0/sql/instancepools.go | 6 - .../preview/sql/mgmt/v3.0/sql/jobagents.go | 5 - .../sql/mgmt/v3.0/sql/jobcredentials.go | 4 - .../sql/mgmt/v3.0/sql/jobexecutions.go | 6 - services/preview/sql/mgmt/v3.0/sql/jobs.go | 4 - .../sql/mgmt/v3.0/sql/jobstepexecutions.go | 2 - .../preview/sql/mgmt/v3.0/sql/jobsteps.go | 6 - .../sql/mgmt/v3.0/sql/jobtargetexecutions.go | 3 - .../sql/mgmt/v3.0/sql/jobtargetgroups.go | 4 - .../preview/sql/mgmt/v3.0/sql/jobversions.go | 2 - .../mgmt/v3.0/sql/longtermretentionbackups.go | 10 - ...longtermretentionmanagedinstancebackups.go | 10 - ...managedbackupshorttermretentionpolicies.go | 4 - .../v3.0/sql/manageddatabaserestoredetails.go | 124 +++ .../sql/mgmt/v3.0/sql/manageddatabases.go | 7 - .../manageddatabasesecurityalertpolicies.go | 3 - .../sql/manageddatabasesensitivitylabels.go | 7 - ...asevulnerabilityassessmentrulebaselines.go | 3 - ...manageddatabasevulnerabilityassessments.go | 4 - ...geddatabasevulnerabilityassessmentscans.go | 4 - .../v3.0/sql/managedinstanceadministrators.go | 4 - .../managedinstanceencryptionprotectors.go | 4 - .../sql/mgmt/v3.0/sql/managedinstancekeys.go | 4 - ...anagedinstancelongtermretentionpolicies.go | 3 - .../v3.0/sql/managedinstanceoperations.go | 313 ++++++++ .../sql/mgmt/v3.0/sql/managedinstances.go | 93 ++- .../sql/managedinstancetdecertificates.go | 1 - ...managedinstancevulnerabilityassessments.go | 4 - ...atabasebackupshorttermretentionpolicies.go | 4 - .../sql/managedserversecurityalertpolicies.go | 3 - services/preview/sql/mgmt/v3.0/sql/models.go | 754 +++++++++++++++++- .../preview/sql/mgmt/v3.0/sql/operations.go | 1 - .../v3.0/sql/privateendpointconnections.go | 4 - .../sql/mgmt/v3.0/sql/privatelinkresources.go | 2 - .../mgmt/v3.0/sql/recommendedelasticpools.go | 3 - .../sql/mgmt/v3.0/sql/recoverabledatabases.go | 2 - .../v3.0/sql/recoverablemanageddatabases.go | 2 - .../sql/mgmt/v3.0/sql/replicationlinks.go | 87 +- .../v3.0/sql/restorabledroppeddatabases.go | 2 - .../sql/restorabledroppedmanageddatabases.go | 2 - .../sql/mgmt/v3.0/sql/restorepoints.go | 4 - .../sql/mgmt/v3.0/sql/sensitivitylabels.go | 7 - .../mgmt/v3.0/sql/serverautomatictuning.go | 2 - .../v3.0/sql/serverazureadadministrators.go | 5 - .../v3.0/sql/serverblobauditingpolicies.go | 3 - .../mgmt/v3.0/sql/servercommunicationlinks.go | 4 - .../mgmt/v3.0/sql/serverconnectionpolicies.go | 2 - .../sql/mgmt/v3.0/sql/serverdnsaliases.go | 5 - .../preview/sql/mgmt/v3.0/sql/serverkeys.go | 4 - services/preview/sql/mgmt/v3.0/sql/servers.go | 7 - .../v3.0/sql/serversecurityalertpolicies.go | 3 - .../preview/sql/mgmt/v3.0/sql/serverusages.go | 1 - .../sql/servervulnerabilityassessments.go | 4 - .../sql/mgmt/v3.0/sql/serviceobjectives.go | 2 - .../sql/mgmt/v3.0/sql/servicetieradvisors.go | 2 - .../sql/mgmt/v3.0/sql/sqlapi/interfaces.go | 95 ++- .../sql/mgmt/v3.0/sql/subscriptionusages.go | 2 - .../preview/sql/mgmt/v3.0/sql/syncagents.go | 6 - .../preview/sql/mgmt/v3.0/sql/syncgroups.go | 33 +- .../preview/sql/mgmt/v3.0/sql/syncmembers.go | 21 +- .../sql/mgmt/v3.0/sql/tdecertificates.go | 1 - .../transparentdataencryptionactivities.go | 1 - .../v3.0/sql/transparentdataencryptions.go | 2 - services/preview/sql/mgmt/v3.0/sql/usages.go | 1 - services/preview/sql/mgmt/v3.0/sql/version.go | 2 +- .../sql/mgmt/v3.0/sql/virtualclusters.go | 5 - .../sql/mgmt/v3.0/sql/virtualnetworkrules.go | 4 - .../sql/mgmt/v3.0/sql/workloadclassifiers.go | 4 - .../sql/mgmt/v3.0/sql/workloadgroups.go | 4 - 94 files changed, 1661 insertions(+), 404 deletions(-) create mode 100644 services/preview/sql/mgmt/v3.0/sql/manageddatabaserestoredetails.go create mode 100644 services/preview/sql/mgmt/v3.0/sql/managedinstanceoperations.go diff --git a/services/preview/sql/mgmt/v3.0/sql/backuplongtermretentionpolicies.go b/services/preview/sql/mgmt/v3.0/sql/backuplongtermretentionpolicies.go index c3803ac4fde4..7773814477a9 100644 --- a/services/preview/sql/mgmt/v3.0/sql/backuplongtermretentionpolicies.go +++ b/services/preview/sql/mgmt/v3.0/sql/backuplongtermretentionpolicies.go @@ -119,7 +119,6 @@ func (client BackupLongTermRetentionPoliciesClient) CreateOrUpdateSender(req *ht func (client BackupLongTermRetentionPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result BackupLongTermRetentionPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -199,7 +198,6 @@ func (client BackupLongTermRetentionPoliciesClient) GetSender(req *http.Request) 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()) @@ -278,7 +276,6 @@ func (client BackupLongTermRetentionPoliciesClient) ListByDatabaseSender(req *ht func (client BackupLongTermRetentionPoliciesClient) ListByDatabaseResponder(resp *http.Response) (result BackupLongTermRetentionPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/backupshorttermretentionpolicies.go b/services/preview/sql/mgmt/v3.0/sql/backupshorttermretentionpolicies.go index c6e76b1c2543..00cf3aceafd4 100644 --- a/services/preview/sql/mgmt/v3.0/sql/backupshorttermretentionpolicies.go +++ b/services/preview/sql/mgmt/v3.0/sql/backupshorttermretentionpolicies.go @@ -119,7 +119,6 @@ func (client BackupShortTermRetentionPoliciesClient) CreateOrUpdateSender(req *h func (client BackupShortTermRetentionPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result BackupShortTermRetentionPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -199,7 +198,6 @@ func (client BackupShortTermRetentionPoliciesClient) GetSender(req *http.Request func (client BackupShortTermRetentionPoliciesClient) GetResponder(resp *http.Response) (result BackupShortTermRetentionPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -279,7 +277,6 @@ func (client BackupShortTermRetentionPoliciesClient) ListByDatabaseSender(req *h func (client BackupShortTermRetentionPoliciesClient) ListByDatabaseResponder(resp *http.Response) (result BackupShortTermRetentionPolicyListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -399,7 +396,6 @@ func (client BackupShortTermRetentionPoliciesClient) UpdateSender(req *http.Requ func (client BackupShortTermRetentionPoliciesClient) UpdateResponder(resp *http.Response) (result BackupShortTermRetentionPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/capabilities.go b/services/preview/sql/mgmt/v3.0/sql/capabilities.go index ffa9f76321b5..7e7fa384a75b 100644 --- a/services/preview/sql/mgmt/v3.0/sql/capabilities.go +++ b/services/preview/sql/mgmt/v3.0/sql/capabilities.go @@ -113,7 +113,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/preview/sql/mgmt/v3.0/sql/databaseautomatictuning.go b/services/preview/sql/mgmt/v3.0/sql/databaseautomatictuning.go index 42b99d999d61..8abcf1d63d05 100644 --- a/services/preview/sql/mgmt/v3.0/sql/databaseautomatictuning.go +++ b/services/preview/sql/mgmt/v3.0/sql/databaseautomatictuning.go @@ -115,7 +115,6 @@ func (client DatabaseAutomaticTuningClient) GetSender(req *http.Request) (*http. func (client DatabaseAutomaticTuningClient) GetResponder(resp *http.Response) (result DatabaseAutomaticTuning, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -197,7 +196,6 @@ func (client DatabaseAutomaticTuningClient) UpdateSender(req *http.Request) (*ht func (client DatabaseAutomaticTuningClient) UpdateResponder(resp *http.Response) (result DatabaseAutomaticTuning, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/databaseblobauditingpolicies.go b/services/preview/sql/mgmt/v3.0/sql/databaseblobauditingpolicies.go index 101b0c6e7b8c..84de27b4ccb3 100644 --- a/services/preview/sql/mgmt/v3.0/sql/databaseblobauditingpolicies.go +++ b/services/preview/sql/mgmt/v3.0/sql/databaseblobauditingpolicies.go @@ -120,7 +120,6 @@ func (client DatabaseBlobAuditingPoliciesClient) CreateOrUpdateSender(req *http. func (client DatabaseBlobAuditingPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result DatabaseBlobAuditingPolicy, 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 DatabaseBlobAuditingPoliciesClient) GetSender(req *http.Request) (* func (client DatabaseBlobAuditingPoliciesClient) GetResponder(resp *http.Response) (result DatabaseBlobAuditingPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -280,7 +278,6 @@ func (client DatabaseBlobAuditingPoliciesClient) ListByDatabaseSender(req *http. func (client DatabaseBlobAuditingPoliciesClient) ListByDatabaseResponder(resp *http.Response) (result DatabaseBlobAuditingPolicyListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/databaseoperations.go b/services/preview/sql/mgmt/v3.0/sql/databaseoperations.go index d24458d4d986..f1287f3f3db2 100644 --- a/services/preview/sql/mgmt/v3.0/sql/databaseoperations.go +++ b/services/preview/sql/mgmt/v3.0/sql/databaseoperations.go @@ -118,7 +118,6 @@ func (client DatabaseOperationsClient) CancelSender(req *http.Request) (*http.Re func (client DatabaseOperationsClient) CancelResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp @@ -197,7 +196,6 @@ func (client DatabaseOperationsClient) ListByDatabaseSender(req *http.Request) ( func (client DatabaseOperationsClient) ListByDatabaseResponder(resp *http.Response) (result DatabaseOperationListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/databases.go b/services/preview/sql/mgmt/v3.0/sql/databases.go index 1fc55f7621dd..eea215b232fb 100644 --- a/services/preview/sql/mgmt/v3.0/sql/databases.go +++ b/services/preview/sql/mgmt/v3.0/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()) @@ -222,7 +221,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()) @@ -301,7 +299,6 @@ func (client DatabasesClient) DeleteSender(req *http.Request) (future DatabasesD func (client DatabasesClient) 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 @@ -391,7 +388,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()) @@ -474,7 +470,6 @@ func (client DatabasesClient) FailoverSender(req *http.Request) (future Database func (client DatabasesClient) FailoverResponder(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 @@ -552,7 +547,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()) @@ -639,7 +633,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()) @@ -719,7 +712,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()) @@ -834,7 +826,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()) @@ -950,7 +941,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()) @@ -1031,7 +1021,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()) @@ -1110,7 +1099,6 @@ func (client DatabasesClient) PauseSender(req *http.Request) (future DatabasesPa func (client DatabasesClient) PauseResponder(resp *http.Response) (result Database, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1198,7 +1186,6 @@ func (client DatabasesClient) RenameSender(req *http.Request) (*http.Response, e func (client DatabasesClient) RenameResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp @@ -1276,7 +1263,6 @@ func (client DatabasesClient) ResumeSender(req *http.Request) (future DatabasesR func (client DatabasesClient) ResumeResponder(resp *http.Response) (result Database, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1358,7 +1344,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()) @@ -1437,7 +1422,6 @@ func (client DatabasesClient) UpgradeDataWarehouseSender(req *http.Request) (fut func (client DatabasesClient) UpgradeDataWarehouseResponder(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 diff --git a/services/preview/sql/mgmt/v3.0/sql/databasethreatdetectionpolicies.go b/services/preview/sql/mgmt/v3.0/sql/databasethreatdetectionpolicies.go index 36da1a27f9fb..33f6aafdecdf 100644 --- a/services/preview/sql/mgmt/v3.0/sql/databasethreatdetectionpolicies.go +++ b/services/preview/sql/mgmt/v3.0/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/preview/sql/mgmt/v3.0/sql/databaseusages.go b/services/preview/sql/mgmt/v3.0/sql/databaseusages.go index f82b90e7f278..821f798cc4f8 100644 --- a/services/preview/sql/mgmt/v3.0/sql/databaseusages.go +++ b/services/preview/sql/mgmt/v3.0/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/preview/sql/mgmt/v3.0/sql/databasevulnerabilityassessmentrulebaselines.go b/services/preview/sql/mgmt/v3.0/sql/databasevulnerabilityassessmentrulebaselines.go index 0ee1b703e23d..332d33b4825c 100644 --- a/services/preview/sql/mgmt/v3.0/sql/databasevulnerabilityassessmentrulebaselines.go +++ b/services/preview/sql/mgmt/v3.0/sql/databasevulnerabilityassessmentrulebaselines.go @@ -133,7 +133,6 @@ func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdateS func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdateResponder(resp *http.Response) (result DatabaseVulnerabilityAssessmentRuleBaseline, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -218,7 +217,6 @@ func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) DeleteSender(re func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp @@ -302,7 +300,6 @@ func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) GetSender(req * func (client DatabaseVulnerabilityAssessmentRuleBaselinesClient) GetResponder(resp *http.Response) (result DatabaseVulnerabilityAssessmentRuleBaseline, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/databasevulnerabilityassessments.go b/services/preview/sql/mgmt/v3.0/sql/databasevulnerabilityassessments.go index 0691069e0a96..d9df78094701 100644 --- a/services/preview/sql/mgmt/v3.0/sql/databasevulnerabilityassessments.go +++ b/services/preview/sql/mgmt/v3.0/sql/databasevulnerabilityassessments.go @@ -119,7 +119,6 @@ func (client DatabaseVulnerabilityAssessmentsClient) CreateOrUpdateSender(req *h func (client DatabaseVulnerabilityAssessmentsClient) CreateOrUpdateResponder(resp *http.Response) (result DatabaseVulnerabilityAssessment, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -199,7 +198,6 @@ func (client DatabaseVulnerabilityAssessmentsClient) DeleteSender(req *http.Requ func (client DatabaseVulnerabilityAssessmentsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp @@ -278,7 +276,6 @@ func (client DatabaseVulnerabilityAssessmentsClient) GetSender(req *http.Request func (client DatabaseVulnerabilityAssessmentsClient) GetResponder(resp *http.Response) (result DatabaseVulnerabilityAssessment, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -358,7 +355,6 @@ func (client DatabaseVulnerabilityAssessmentsClient) ListByDatabaseSender(req *h func (client DatabaseVulnerabilityAssessmentsClient) ListByDatabaseResponder(resp *http.Response) (result DatabaseVulnerabilityAssessmentListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/databasevulnerabilityassessmentscans.go b/services/preview/sql/mgmt/v3.0/sql/databasevulnerabilityassessmentscans.go index b839bd389d39..99496d4ce3e4 100644 --- a/services/preview/sql/mgmt/v3.0/sql/databasevulnerabilityassessmentscans.go +++ b/services/preview/sql/mgmt/v3.0/sql/databasevulnerabilityassessmentscans.go @@ -119,7 +119,6 @@ func (client DatabaseVulnerabilityAssessmentScansClient) ExportSender(req *http. func (client DatabaseVulnerabilityAssessmentScansClient) ExportResponder(resp *http.Response) (result DatabaseVulnerabilityAssessmentScansExport, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -201,7 +200,6 @@ func (client DatabaseVulnerabilityAssessmentScansClient) GetSender(req *http.Req func (client DatabaseVulnerabilityAssessmentScansClient) GetResponder(resp *http.Response) (result VulnerabilityAssessmentScanRecord, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -283,7 +281,6 @@ func (client DatabaseVulnerabilityAssessmentScansClient) InitiateScanSender(req func (client DatabaseVulnerabilityAssessmentScansClient) InitiateScanResponder(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 @@ -363,7 +360,6 @@ func (client DatabaseVulnerabilityAssessmentScansClient) ListByDatabaseSender(re func (client DatabaseVulnerabilityAssessmentScansClient) ListByDatabaseResponder(resp *http.Response) (result VulnerabilityAssessmentScanRecordListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/datamaskingpolicies.go b/services/preview/sql/mgmt/v3.0/sql/datamaskingpolicies.go index f9c7ddaa04a4..78e7267705dd 100644 --- a/services/preview/sql/mgmt/v3.0/sql/datamaskingpolicies.go +++ b/services/preview/sql/mgmt/v3.0/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/preview/sql/mgmt/v3.0/sql/datamaskingrules.go b/services/preview/sql/mgmt/v3.0/sql/datamaskingrules.go index ed1747512b69..3b18e7b024a4 100644 --- a/services/preview/sql/mgmt/v3.0/sql/datamaskingrules.go +++ b/services/preview/sql/mgmt/v3.0/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/preview/sql/mgmt/v3.0/sql/elasticpoolactivities.go b/services/preview/sql/mgmt/v3.0/sql/elasticpoolactivities.go index 0e27c3b7d485..c268b9637370 100644 --- a/services/preview/sql/mgmt/v3.0/sql/elasticpoolactivities.go +++ b/services/preview/sql/mgmt/v3.0/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/preview/sql/mgmt/v3.0/sql/elasticpooldatabaseactivities.go b/services/preview/sql/mgmt/v3.0/sql/elasticpooldatabaseactivities.go index ca9a2022f68f..8ef06f4105c6 100644 --- a/services/preview/sql/mgmt/v3.0/sql/elasticpooldatabaseactivities.go +++ b/services/preview/sql/mgmt/v3.0/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/preview/sql/mgmt/v3.0/sql/elasticpooloperations.go b/services/preview/sql/mgmt/v3.0/sql/elasticpooloperations.go index db793bb7a62b..e6cd16e5bc1d 100644 --- a/services/preview/sql/mgmt/v3.0/sql/elasticpooloperations.go +++ b/services/preview/sql/mgmt/v3.0/sql/elasticpooloperations.go @@ -117,7 +117,6 @@ func (client ElasticPoolOperationsClient) CancelSender(req *http.Request) (*http func (client ElasticPoolOperationsClient) CancelResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp @@ -195,7 +194,6 @@ func (client ElasticPoolOperationsClient) ListByElasticPoolSender(req *http.Requ func (client ElasticPoolOperationsClient) ListByElasticPoolResponder(resp *http.Response) (result ElasticPoolOperationListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/elasticpools.go b/services/preview/sql/mgmt/v3.0/sql/elasticpools.go index de9283e00a56..4ab170231fae 100644 --- a/services/preview/sql/mgmt/v3.0/sql/elasticpools.go +++ b/services/preview/sql/mgmt/v3.0/sql/elasticpools.go @@ -126,7 +126,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()) @@ -205,7 +204,6 @@ func (client ElasticPoolsClient) DeleteSender(req *http.Request) (future Elastic func (client ElasticPoolsClient) 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 @@ -283,7 +281,6 @@ func (client ElasticPoolsClient) FailoverSender(req *http.Request) (future Elast func (client ElasticPoolsClient) FailoverResponder(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 @@ -361,7 +358,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()) @@ -443,7 +439,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()) @@ -559,7 +554,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()) @@ -640,7 +634,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()) @@ -722,7 +715,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/preview/sql/mgmt/v3.0/sql/encryptionprotectors.go b/services/preview/sql/mgmt/v3.0/sql/encryptionprotectors.go index 01026f2537e2..f8f07b230727 100644 --- a/services/preview/sql/mgmt/v3.0/sql/encryptionprotectors.go +++ b/services/preview/sql/mgmt/v3.0/sql/encryptionprotectors.go @@ -119,7 +119,6 @@ func (client EncryptionProtectorsClient) CreateOrUpdateSender(req *http.Request) func (client EncryptionProtectorsClient) CreateOrUpdateResponder(resp *http.Response) (result EncryptionProtector, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -197,7 +196,6 @@ func (client EncryptionProtectorsClient) GetSender(req *http.Request) (*http.Res func (client EncryptionProtectorsClient) GetResponder(resp *http.Response) (result EncryptionProtector, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -275,7 +273,6 @@ func (client EncryptionProtectorsClient) ListByServerSender(req *http.Request) ( func (client EncryptionProtectorsClient) ListByServerResponder(resp *http.Response) (result EncryptionProtectorListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -390,7 +387,6 @@ func (client EncryptionProtectorsClient) RevalidateSender(req *http.Request) (fu func (client EncryptionProtectorsClient) RevalidateResponder(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 diff --git a/services/preview/sql/mgmt/v3.0/sql/extendeddatabaseblobauditingpolicies.go b/services/preview/sql/mgmt/v3.0/sql/extendeddatabaseblobauditingpolicies.go index bbe1db0b5511..cf720116d90e 100644 --- a/services/preview/sql/mgmt/v3.0/sql/extendeddatabaseblobauditingpolicies.go +++ b/services/preview/sql/mgmt/v3.0/sql/extendeddatabaseblobauditingpolicies.go @@ -120,7 +120,6 @@ func (client ExtendedDatabaseBlobAuditingPoliciesClient) CreateOrUpdateSender(re func (client ExtendedDatabaseBlobAuditingPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ExtendedDatabaseBlobAuditingPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -200,10 +199,125 @@ func (client ExtendedDatabaseBlobAuditingPoliciesClient) GetSender(req *http.Req func (client ExtendedDatabaseBlobAuditingPoliciesClient) GetResponder(resp *http.Response) (result ExtendedDatabaseBlobAuditingPolicy, 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 lists extended auditing settings of a database. +// 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 ExtendedDatabaseBlobAuditingPoliciesClient) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result ExtendedDatabaseBlobAuditingPolicyListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedDatabaseBlobAuditingPoliciesClient.ListByDatabase") + defer func() { + sc := -1 + if result.edbaplr.Response.Response != nil { + sc = result.edbaplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByDatabaseNextResults + req, err := client.ListByDatabasePreparer(ctx, resourceGroupName, serverName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ExtendedDatabaseBlobAuditingPoliciesClient", "ListByDatabase", nil, "Failure preparing request") + return + } + + resp, err := client.ListByDatabaseSender(req) + if err != nil { + result.edbaplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ExtendedDatabaseBlobAuditingPoliciesClient", "ListByDatabase", resp, "Failure sending request") + return + } + + result.edbaplr, err = client.ListByDatabaseResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ExtendedDatabaseBlobAuditingPoliciesClient", "ListByDatabase", resp, "Failure responding to request") + } + + return +} + +// ListByDatabasePreparer prepares the ListByDatabase request. +func (client ExtendedDatabaseBlobAuditingPoliciesClient) 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 = "2017-03-01-preview" + 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}/extendedAuditingSettings", 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 ExtendedDatabaseBlobAuditingPoliciesClient) 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 ExtendedDatabaseBlobAuditingPoliciesClient) ListByDatabaseResponder(resp *http.Response) (result ExtendedDatabaseBlobAuditingPolicyListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByDatabaseNextResults retrieves the next set of results, if any. +func (client ExtendedDatabaseBlobAuditingPoliciesClient) listByDatabaseNextResults(ctx context.Context, lastResults ExtendedDatabaseBlobAuditingPolicyListResult) (result ExtendedDatabaseBlobAuditingPolicyListResult, err error) { + req, err := lastResults.extendedDatabaseBlobAuditingPolicyListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "sql.ExtendedDatabaseBlobAuditingPoliciesClient", "listByDatabaseNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByDatabaseSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "sql.ExtendedDatabaseBlobAuditingPoliciesClient", "listByDatabaseNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByDatabaseResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ExtendedDatabaseBlobAuditingPoliciesClient", "listByDatabaseNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByDatabaseComplete enumerates all values, automatically crossing page boundaries as required. +func (client ExtendedDatabaseBlobAuditingPoliciesClient) ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result ExtendedDatabaseBlobAuditingPolicyListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedDatabaseBlobAuditingPoliciesClient.ListByDatabase") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByDatabase(ctx, resourceGroupName, serverName, databaseName) + return +} diff --git a/services/preview/sql/mgmt/v3.0/sql/extendedserverblobauditingpolicies.go b/services/preview/sql/mgmt/v3.0/sql/extendedserverblobauditingpolicies.go index 1cd842295c5f..4df8daee4b7c 100644 --- a/services/preview/sql/mgmt/v3.0/sql/extendedserverblobauditingpolicies.go +++ b/services/preview/sql/mgmt/v3.0/sql/extendedserverblobauditingpolicies.go @@ -118,7 +118,6 @@ func (client ExtendedServerBlobAuditingPoliciesClient) CreateOrUpdateSender(req func (client ExtendedServerBlobAuditingPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ExtendedServerBlobAuditingPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -196,10 +195,123 @@ func (client ExtendedServerBlobAuditingPoliciesClient) GetSender(req *http.Reque func (client ExtendedServerBlobAuditingPoliciesClient) GetResponder(resp *http.Response) (result ExtendedServerBlobAuditingPolicy, 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 lists extended auditing settings of 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 ExtendedServerBlobAuditingPoliciesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result ExtendedServerBlobAuditingPolicyListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedServerBlobAuditingPoliciesClient.ListByServer") + defer func() { + sc := -1 + if result.esbaplr.Response.Response != nil { + sc = result.esbaplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByServerNextResults + req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ExtendedServerBlobAuditingPoliciesClient", "ListByServer", nil, "Failure preparing request") + return + } + + resp, err := client.ListByServerSender(req) + if err != nil { + result.esbaplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ExtendedServerBlobAuditingPoliciesClient", "ListByServer", resp, "Failure sending request") + return + } + + result.esbaplr, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ExtendedServerBlobAuditingPoliciesClient", "ListByServer", resp, "Failure responding to request") + } + + return +} + +// ListByServerPreparer prepares the ListByServer request. +func (client ExtendedServerBlobAuditingPoliciesClient) 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 = "2017-03-01-preview" + 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}/extendedAuditingSettings", 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 ExtendedServerBlobAuditingPoliciesClient) 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 ExtendedServerBlobAuditingPoliciesClient) ListByServerResponder(resp *http.Response) (result ExtendedServerBlobAuditingPolicyListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByServerNextResults retrieves the next set of results, if any. +func (client ExtendedServerBlobAuditingPoliciesClient) listByServerNextResults(ctx context.Context, lastResults ExtendedServerBlobAuditingPolicyListResult) (result ExtendedServerBlobAuditingPolicyListResult, err error) { + req, err := lastResults.extendedServerBlobAuditingPolicyListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "sql.ExtendedServerBlobAuditingPoliciesClient", "listByServerNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByServerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "sql.ExtendedServerBlobAuditingPoliciesClient", "listByServerNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ExtendedServerBlobAuditingPoliciesClient", "listByServerNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. +func (client ExtendedServerBlobAuditingPoliciesClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result ExtendedServerBlobAuditingPolicyListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedServerBlobAuditingPoliciesClient.ListByServer") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByServer(ctx, resourceGroupName, serverName) + return +} diff --git a/services/preview/sql/mgmt/v3.0/sql/failovergroups.go b/services/preview/sql/mgmt/v3.0/sql/failovergroups.go index 5c65ec6b1340..99233707e25b 100644 --- a/services/preview/sql/mgmt/v3.0/sql/failovergroups.go +++ b/services/preview/sql/mgmt/v3.0/sql/failovergroups.go @@ -128,7 +128,6 @@ func (client FailoverGroupsClient) CreateOrUpdateSender(req *http.Request) (futu func (client FailoverGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result FailoverGroup, 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 FailoverGroupsClient) DeleteSender(req *http.Request) (future Failo func (client FailoverGroupsClient) 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 @@ -285,7 +283,6 @@ func (client FailoverGroupsClient) FailoverSender(req *http.Request) (future Fai func (client FailoverGroupsClient) FailoverResponder(resp *http.Response) (result FailoverGroup, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -365,7 +362,6 @@ func (client FailoverGroupsClient) ForceFailoverAllowDataLossSender(req *http.Re func (client FailoverGroupsClient) ForceFailoverAllowDataLossResponder(resp *http.Response) (result FailoverGroup, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -444,7 +440,6 @@ func (client FailoverGroupsClient) GetSender(req *http.Request) (*http.Response, func (client FailoverGroupsClient) GetResponder(resp *http.Response) (result FailoverGroup, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -522,7 +517,6 @@ func (client FailoverGroupsClient) ListByServerSender(req *http.Request) (*http. func (client FailoverGroupsClient) ListByServerResponder(resp *http.Response) (result FailoverGroupListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -641,7 +635,6 @@ func (client FailoverGroupsClient) UpdateSender(req *http.Request) (future Failo func (client FailoverGroupsClient) UpdateResponder(resp *http.Response) (result FailoverGroup, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/firewallrules.go b/services/preview/sql/mgmt/v3.0/sql/firewallrules.go index 8fef2be5ebd2..abe6eb6e3678 100644 --- a/services/preview/sql/mgmt/v3.0/sql/firewallrules.go +++ b/services/preview/sql/mgmt/v3.0/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/preview/sql/mgmt/v3.0/sql/geobackuppolicies.go b/services/preview/sql/mgmt/v3.0/sql/geobackuppolicies.go index 71844b90b9bf..e9abc2b3fc93 100644 --- a/services/preview/sql/mgmt/v3.0/sql/geobackuppolicies.go +++ b/services/preview/sql/mgmt/v3.0/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/preview/sql/mgmt/v3.0/sql/instancefailovergroups.go b/services/preview/sql/mgmt/v3.0/sql/instancefailovergroups.go index 42b704b19812..4cd2d1aafbdd 100644 --- a/services/preview/sql/mgmt/v3.0/sql/instancefailovergroups.go +++ b/services/preview/sql/mgmt/v3.0/sql/instancefailovergroups.go @@ -129,7 +129,6 @@ func (client InstanceFailoverGroupsClient) CreateOrUpdateSender(req *http.Reques func (client InstanceFailoverGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result InstanceFailoverGroup, 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 InstanceFailoverGroupsClient) DeleteSender(req *http.Request) (futu func (client InstanceFailoverGroupsClient) 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 @@ -286,7 +284,6 @@ func (client InstanceFailoverGroupsClient) FailoverSender(req *http.Request) (fu func (client InstanceFailoverGroupsClient) FailoverResponder(resp *http.Response) (result InstanceFailoverGroup, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -366,7 +363,6 @@ func (client InstanceFailoverGroupsClient) ForceFailoverAllowDataLossSender(req func (client InstanceFailoverGroupsClient) ForceFailoverAllowDataLossResponder(resp *http.Response) (result InstanceFailoverGroup, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -445,7 +441,6 @@ func (client InstanceFailoverGroupsClient) GetSender(req *http.Request) (*http.R func (client InstanceFailoverGroupsClient) GetResponder(resp *http.Response) (result InstanceFailoverGroup, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -523,7 +518,6 @@ func (client InstanceFailoverGroupsClient) ListByLocationSender(req *http.Reques func (client InstanceFailoverGroupsClient) ListByLocationResponder(resp *http.Response) (result InstanceFailoverGroupListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/instancepools.go b/services/preview/sql/mgmt/v3.0/sql/instancepools.go index b524989eaabc..783e4f864f6e 100644 --- a/services/preview/sql/mgmt/v3.0/sql/instancepools.go +++ b/services/preview/sql/mgmt/v3.0/sql/instancepools.go @@ -127,7 +127,6 @@ func (client InstancePoolsClient) CreateOrUpdateSender(req *http.Request) (futur func (client InstancePoolsClient) CreateOrUpdateResponder(resp *http.Response) (result InstancePool, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -204,7 +203,6 @@ func (client InstancePoolsClient) DeleteSender(req *http.Request) (future Instan func (client InstancePoolsClient) 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 @@ -280,7 +278,6 @@ func (client InstancePoolsClient) GetSender(req *http.Request) (*http.Response, func (client InstancePoolsClient) GetResponder(resp *http.Response) (result InstancePool, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -352,7 +349,6 @@ func (client InstancePoolsClient) ListSender(req *http.Request) (*http.Response, func (client InstancePoolsClient) ListResponder(resp *http.Response) (result InstancePoolListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -465,7 +461,6 @@ func (client InstancePoolsClient) ListByResourceGroupSender(req *http.Request) ( func (client InstancePoolsClient) ListByResourceGroupResponder(resp *http.Response) (result InstancePoolListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -582,7 +577,6 @@ func (client InstancePoolsClient) UpdateSender(req *http.Request) (future Instan func (client InstancePoolsClient) UpdateResponder(resp *http.Response) (result InstancePool, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/jobagents.go b/services/preview/sql/mgmt/v3.0/sql/jobagents.go index 05b52aa243b8..e6120d280214 100644 --- a/services/preview/sql/mgmt/v3.0/sql/jobagents.go +++ b/services/preview/sql/mgmt/v3.0/sql/jobagents.go @@ -127,7 +127,6 @@ func (client JobAgentsClient) CreateOrUpdateSender(req *http.Request) (future Jo func (client JobAgentsClient) CreateOrUpdateResponder(resp *http.Response) (result JobAgent, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -206,7 +205,6 @@ func (client JobAgentsClient) DeleteSender(req *http.Request) (future JobAgentsD func (client JobAgentsClient) 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 @@ -284,7 +282,6 @@ func (client JobAgentsClient) GetSender(req *http.Request) (*http.Response, erro func (client JobAgentsClient) GetResponder(resp *http.Response) (result JobAgent, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -362,7 +359,6 @@ func (client JobAgentsClient) ListByServerSender(req *http.Request) (*http.Respo func (client JobAgentsClient) ListByServerResponder(resp *http.Response) (result JobAgentListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -481,7 +477,6 @@ func (client JobAgentsClient) UpdateSender(req *http.Request) (future JobAgentsU func (client JobAgentsClient) UpdateResponder(resp *http.Response) (result JobAgent, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/jobcredentials.go b/services/preview/sql/mgmt/v3.0/sql/jobcredentials.go index 4245de3a3454..df43e370bbe6 100644 --- a/services/preview/sql/mgmt/v3.0/sql/jobcredentials.go +++ b/services/preview/sql/mgmt/v3.0/sql/jobcredentials.go @@ -129,7 +129,6 @@ func (client JobCredentialsClient) CreateOrUpdateSender(req *http.Request) (*htt func (client JobCredentialsClient) CreateOrUpdateResponder(resp *http.Response) (result JobCredential, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -210,7 +209,6 @@ func (client JobCredentialsClient) DeleteSender(req *http.Request) (*http.Respon func (client JobCredentialsClient) 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 @@ -290,7 +288,6 @@ func (client JobCredentialsClient) GetSender(req *http.Request) (*http.Response, func (client JobCredentialsClient) GetResponder(resp *http.Response) (result JobCredential, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -370,7 +367,6 @@ func (client JobCredentialsClient) ListByAgentSender(req *http.Request) (*http.R func (client JobCredentialsClient) ListByAgentResponder(resp *http.Response) (result JobCredentialListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/jobexecutions.go b/services/preview/sql/mgmt/v3.0/sql/jobexecutions.go index c5c3099a6e1f..8d6090c52ff3 100644 --- a/services/preview/sql/mgmt/v3.0/sql/jobexecutions.go +++ b/services/preview/sql/mgmt/v3.0/sql/jobexecutions.go @@ -120,7 +120,6 @@ func (client JobExecutionsClient) CancelSender(req *http.Request) (*http.Respons func (client JobExecutionsClient) CancelResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp @@ -200,7 +199,6 @@ func (client JobExecutionsClient) CreateSender(req *http.Request) (future JobExe func (client JobExecutionsClient) CreateResponder(resp *http.Response) (result JobExecution, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -283,7 +281,6 @@ func (client JobExecutionsClient) CreateOrUpdateSender(req *http.Request) (futur func (client JobExecutionsClient) CreateOrUpdateResponder(resp *http.Response) (result JobExecution, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -366,7 +363,6 @@ func (client JobExecutionsClient) GetSender(req *http.Request) (*http.Response, func (client JobExecutionsClient) GetResponder(resp *http.Response) (result JobExecution, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -474,7 +470,6 @@ func (client JobExecutionsClient) ListByAgentSender(req *http.Request) (*http.Re func (client JobExecutionsClient) ListByAgentResponder(resp *http.Response) (result JobExecutionListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -621,7 +616,6 @@ func (client JobExecutionsClient) ListByJobSender(req *http.Request) (*http.Resp func (client JobExecutionsClient) ListByJobResponder(resp *http.Response) (result JobExecutionListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/jobs.go b/services/preview/sql/mgmt/v3.0/sql/jobs.go index b21350226dcb..485360e2fcb4 100644 --- a/services/preview/sql/mgmt/v3.0/sql/jobs.go +++ b/services/preview/sql/mgmt/v3.0/sql/jobs.go @@ -119,7 +119,6 @@ func (client JobsClient) CreateOrUpdateSender(req *http.Request) (*http.Response func (client JobsClient) CreateOrUpdateResponder(resp *http.Response) (result Job, 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 JobsClient) DeleteSender(req *http.Request) (*http.Response, error) func (client JobsClient) 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 @@ -280,7 +278,6 @@ func (client JobsClient) GetSender(req *http.Request) (*http.Response, error) { func (client JobsClient) GetResponder(resp *http.Response) (result Job, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -360,7 +357,6 @@ func (client JobsClient) ListByAgentSender(req *http.Request) (*http.Response, e func (client JobsClient) ListByAgentResponder(resp *http.Response) (result JobListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/jobstepexecutions.go b/services/preview/sql/mgmt/v3.0/sql/jobstepexecutions.go index 77c4fead3ab0..c522be18248c 100644 --- a/services/preview/sql/mgmt/v3.0/sql/jobstepexecutions.go +++ b/services/preview/sql/mgmt/v3.0/sql/jobstepexecutions.go @@ -123,7 +123,6 @@ func (client JobStepExecutionsClient) GetSender(req *http.Request) (*http.Respon func (client JobStepExecutionsClient) GetResponder(resp *http.Response) (result JobExecution, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -235,7 +234,6 @@ func (client JobStepExecutionsClient) ListByJobExecutionSender(req *http.Request func (client JobStepExecutionsClient) ListByJobExecutionResponder(resp *http.Response) (result JobExecutionListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/jobsteps.go b/services/preview/sql/mgmt/v3.0/sql/jobsteps.go index 63f7814a5096..8e24003435b6 100644 --- a/services/preview/sql/mgmt/v3.0/sql/jobsteps.go +++ b/services/preview/sql/mgmt/v3.0/sql/jobsteps.go @@ -139,7 +139,6 @@ func (client JobStepsClient) CreateOrUpdateSender(req *http.Request) (*http.Resp func (client JobStepsClient) CreateOrUpdateResponder(resp *http.Response) (result JobStep, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -222,7 +221,6 @@ func (client JobStepsClient) DeleteSender(req *http.Request) (*http.Response, er func (client JobStepsClient) 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 @@ -304,7 +302,6 @@ func (client JobStepsClient) GetSender(req *http.Request) (*http.Response, error func (client JobStepsClient) GetResponder(resp *http.Response) (result JobStep, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -389,7 +386,6 @@ func (client JobStepsClient) GetByVersionSender(req *http.Request) (*http.Respon func (client JobStepsClient) GetByVersionResponder(resp *http.Response) (result JobStep, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -471,7 +467,6 @@ func (client JobStepsClient) ListByJobSender(req *http.Request) (*http.Response, func (client JobStepsClient) ListByJobResponder(resp *http.Response) (result JobStepListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -592,7 +587,6 @@ func (client JobStepsClient) ListByVersionSender(req *http.Request) (*http.Respo func (client JobStepsClient) ListByVersionResponder(resp *http.Response) (result JobStepListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/jobtargetexecutions.go b/services/preview/sql/mgmt/v3.0/sql/jobtargetexecutions.go index 7bdaaf4b0b0a..518beb1a39d4 100644 --- a/services/preview/sql/mgmt/v3.0/sql/jobtargetexecutions.go +++ b/services/preview/sql/mgmt/v3.0/sql/jobtargetexecutions.go @@ -125,7 +125,6 @@ func (client JobTargetExecutionsClient) GetSender(req *http.Request) (*http.Resp func (client JobTargetExecutionsClient) GetResponder(resp *http.Response) (result JobExecution, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -237,7 +236,6 @@ func (client JobTargetExecutionsClient) ListByJobExecutionSender(req *http.Reque func (client JobTargetExecutionsClient) ListByJobExecutionResponder(resp *http.Response) (result JobExecutionListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -388,7 +386,6 @@ func (client JobTargetExecutionsClient) ListByStepSender(req *http.Request) (*ht func (client JobTargetExecutionsClient) ListByStepResponder(resp *http.Response) (result JobExecutionListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/jobtargetgroups.go b/services/preview/sql/mgmt/v3.0/sql/jobtargetgroups.go index aad24dda5789..189078097185 100644 --- a/services/preview/sql/mgmt/v3.0/sql/jobtargetgroups.go +++ b/services/preview/sql/mgmt/v3.0/sql/jobtargetgroups.go @@ -127,7 +127,6 @@ func (client JobTargetGroupsClient) CreateOrUpdateSender(req *http.Request) (*ht func (client JobTargetGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result JobTargetGroup, 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 JobTargetGroupsClient) DeleteSender(req *http.Request) (*http.Respo func (client JobTargetGroupsClient) 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 @@ -288,7 +286,6 @@ func (client JobTargetGroupsClient) GetSender(req *http.Request) (*http.Response func (client JobTargetGroupsClient) GetResponder(resp *http.Response) (result JobTargetGroup, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -368,7 +365,6 @@ func (client JobTargetGroupsClient) ListByAgentSender(req *http.Request) (*http. func (client JobTargetGroupsClient) ListByAgentResponder(resp *http.Response) (result JobTargetGroupListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/jobversions.go b/services/preview/sql/mgmt/v3.0/sql/jobversions.go index 277f4c98e1b1..ac748e7a49aa 100644 --- a/services/preview/sql/mgmt/v3.0/sql/jobversions.go +++ b/services/preview/sql/mgmt/v3.0/sql/jobversions.go @@ -118,7 +118,6 @@ func (client JobVersionsClient) GetSender(req *http.Request) (*http.Response, er func (client JobVersionsClient) GetResponder(resp *http.Response) (result JobVersion, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -200,7 +199,6 @@ func (client JobVersionsClient) ListByJobSender(req *http.Request) (*http.Respon func (client JobVersionsClient) ListByJobResponder(resp *http.Response) (result JobVersionListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/longtermretentionbackups.go b/services/preview/sql/mgmt/v3.0/sql/longtermretentionbackups.go index 826fb046f889..2b60e282318c 100644 --- a/services/preview/sql/mgmt/v3.0/sql/longtermretentionbackups.go +++ b/services/preview/sql/mgmt/v3.0/sql/longtermretentionbackups.go @@ -116,7 +116,6 @@ func (client LongTermRetentionBackupsClient) DeleteSender(req *http.Request) (fu func (client LongTermRetentionBackupsClient) DeleteResponder(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 @@ -198,7 +197,6 @@ func (client LongTermRetentionBackupsClient) DeleteByResourceGroupSender(req *ht func (client LongTermRetentionBackupsClient) DeleteByResourceGroupResponder(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 @@ -277,7 +275,6 @@ func (client LongTermRetentionBackupsClient) GetSender(req *http.Request) (*http func (client LongTermRetentionBackupsClient) GetResponder(resp *http.Response) (result LongTermRetentionBackup, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -360,7 +357,6 @@ func (client LongTermRetentionBackupsClient) GetByResourceGroupSender(req *http. func (client LongTermRetentionBackupsClient) GetByResourceGroupResponder(resp *http.Response) (result LongTermRetentionBackup, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -447,7 +443,6 @@ func (client LongTermRetentionBackupsClient) ListByDatabaseSender(req *http.Requ func (client LongTermRetentionBackupsClient) ListByDatabaseResponder(resp *http.Response) (result LongTermRetentionBackupListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -567,7 +562,6 @@ func (client LongTermRetentionBackupsClient) ListByLocationSender(req *http.Requ func (client LongTermRetentionBackupsClient) ListByLocationResponder(resp *http.Response) (result LongTermRetentionBackupListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -694,7 +688,6 @@ func (client LongTermRetentionBackupsClient) ListByResourceGroupDatabaseSender(r func (client LongTermRetentionBackupsClient) ListByResourceGroupDatabaseResponder(resp *http.Response) (result LongTermRetentionBackupListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -817,7 +810,6 @@ func (client LongTermRetentionBackupsClient) ListByResourceGroupLocationSender(r func (client LongTermRetentionBackupsClient) ListByResourceGroupLocationResponder(resp *http.Response) (result LongTermRetentionBackupListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -942,7 +934,6 @@ func (client LongTermRetentionBackupsClient) ListByResourceGroupServerSender(req func (client LongTermRetentionBackupsClient) ListByResourceGroupServerResponder(resp *http.Response) (result LongTermRetentionBackupListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1064,7 +1055,6 @@ func (client LongTermRetentionBackupsClient) ListByServerSender(req *http.Reques func (client LongTermRetentionBackupsClient) ListByServerResponder(resp *http.Response) (result LongTermRetentionBackupListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/longtermretentionmanagedinstancebackups.go b/services/preview/sql/mgmt/v3.0/sql/longtermretentionmanagedinstancebackups.go index 6a10ccb40b10..4a8dc4571874 100644 --- a/services/preview/sql/mgmt/v3.0/sql/longtermretentionmanagedinstancebackups.go +++ b/services/preview/sql/mgmt/v3.0/sql/longtermretentionmanagedinstancebackups.go @@ -117,7 +117,6 @@ func (client LongTermRetentionManagedInstanceBackupsClient) DeleteSender(req *ht func (client LongTermRetentionManagedInstanceBackupsClient) DeleteResponder(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 @@ -199,7 +198,6 @@ func (client LongTermRetentionManagedInstanceBackupsClient) DeleteByResourceGrou func (client LongTermRetentionManagedInstanceBackupsClient) DeleteByResourceGroupResponder(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 @@ -278,7 +276,6 @@ func (client LongTermRetentionManagedInstanceBackupsClient) GetSender(req *http. func (client LongTermRetentionManagedInstanceBackupsClient) GetResponder(resp *http.Response) (result ManagedInstanceLongTermRetentionBackup, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -361,7 +358,6 @@ func (client LongTermRetentionManagedInstanceBackupsClient) GetByResourceGroupSe func (client LongTermRetentionManagedInstanceBackupsClient) GetByResourceGroupResponder(resp *http.Response) (result ManagedInstanceLongTermRetentionBackup, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -448,7 +444,6 @@ func (client LongTermRetentionManagedInstanceBackupsClient) ListByDatabaseSender func (client LongTermRetentionManagedInstanceBackupsClient) ListByDatabaseResponder(resp *http.Response) (result ManagedInstanceLongTermRetentionBackupListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -570,7 +565,6 @@ func (client LongTermRetentionManagedInstanceBackupsClient) ListByInstanceSender func (client LongTermRetentionManagedInstanceBackupsClient) ListByInstanceResponder(resp *http.Response) (result ManagedInstanceLongTermRetentionBackupListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -690,7 +684,6 @@ func (client LongTermRetentionManagedInstanceBackupsClient) ListByLocationSender func (client LongTermRetentionManagedInstanceBackupsClient) ListByLocationResponder(resp *http.Response) (result ManagedInstanceLongTermRetentionBackupListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -817,7 +810,6 @@ func (client LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupD func (client LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupDatabaseResponder(resp *http.Response) (result ManagedInstanceLongTermRetentionBackupListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -942,7 +934,6 @@ func (client LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupI func (client LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupInstanceResponder(resp *http.Response) (result ManagedInstanceLongTermRetentionBackupListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1065,7 +1056,6 @@ func (client LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupL func (client LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupLocationResponder(resp *http.Response) (result ManagedInstanceLongTermRetentionBackupListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/managedbackupshorttermretentionpolicies.go b/services/preview/sql/mgmt/v3.0/sql/managedbackupshorttermretentionpolicies.go index 0ac74aa49ed6..e47068419d79 100644 --- a/services/preview/sql/mgmt/v3.0/sql/managedbackupshorttermretentionpolicies.go +++ b/services/preview/sql/mgmt/v3.0/sql/managedbackupshorttermretentionpolicies.go @@ -120,7 +120,6 @@ func (client ManagedBackupShortTermRetentionPoliciesClient) CreateOrUpdateSender func (client ManagedBackupShortTermRetentionPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ManagedBackupShortTermRetentionPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -200,7 +199,6 @@ func (client ManagedBackupShortTermRetentionPoliciesClient) GetSender(req *http. func (client ManagedBackupShortTermRetentionPoliciesClient) GetResponder(resp *http.Response) (result ManagedBackupShortTermRetentionPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -280,7 +278,6 @@ func (client ManagedBackupShortTermRetentionPoliciesClient) ListByDatabaseSender func (client ManagedBackupShortTermRetentionPoliciesClient) ListByDatabaseResponder(resp *http.Response) (result ManagedBackupShortTermRetentionPolicyListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -400,7 +397,6 @@ func (client ManagedBackupShortTermRetentionPoliciesClient) UpdateSender(req *ht func (client ManagedBackupShortTermRetentionPoliciesClient) UpdateResponder(resp *http.Response) (result ManagedBackupShortTermRetentionPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/manageddatabaserestoredetails.go b/services/preview/sql/mgmt/v3.0/sql/manageddatabaserestoredetails.go new file mode 100644 index 000000000000..88c4fd8e9686 --- /dev/null +++ b/services/preview/sql/mgmt/v3.0/sql/manageddatabaserestoredetails.go @@ -0,0 +1,124 @@ +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/tracing" + "net/http" +) + +// ManagedDatabaseRestoreDetailsClient 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 ManagedDatabaseRestoreDetailsClient struct { + BaseClient +} + +// NewManagedDatabaseRestoreDetailsClient creates an instance of the ManagedDatabaseRestoreDetailsClient client. +func NewManagedDatabaseRestoreDetailsClient(subscriptionID string) ManagedDatabaseRestoreDetailsClient { + return NewManagedDatabaseRestoreDetailsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewManagedDatabaseRestoreDetailsClientWithBaseURI creates an instance of the ManagedDatabaseRestoreDetailsClient +// 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 NewManagedDatabaseRestoreDetailsClientWithBaseURI(baseURI string, subscriptionID string) ManagedDatabaseRestoreDetailsClient { + return ManagedDatabaseRestoreDetailsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets managed database restore details. +// 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. +// managedInstanceName - the name of the managed instance. +// databaseName - the name of the database. +func (client ManagedDatabaseRestoreDetailsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result ManagedDatabaseRestoreDetailsResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedDatabaseRestoreDetailsClient.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, managedInstanceName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseRestoreDetailsClient", "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.ManagedDatabaseRestoreDetailsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ManagedDatabaseRestoreDetailsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ManagedDatabaseRestoreDetailsClient) GetPreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "managedInstanceName": autorest.Encode("path", managedInstanceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "restoreDetailsName": autorest.Encode("path", "Default"), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01-preview" + 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/managedInstances/{managedInstanceName}/databases/{databaseName}/restoreDetails/{restoreDetailsName}", 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 ManagedDatabaseRestoreDetailsClient) 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 ManagedDatabaseRestoreDetailsClient) GetResponder(resp *http.Response) (result ManagedDatabaseRestoreDetailsResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/sql/mgmt/v3.0/sql/manageddatabases.go b/services/preview/sql/mgmt/v3.0/sql/manageddatabases.go index 0b5f800e2926..9a36302e525d 100644 --- a/services/preview/sql/mgmt/v3.0/sql/manageddatabases.go +++ b/services/preview/sql/mgmt/v3.0/sql/manageddatabases.go @@ -125,7 +125,6 @@ func (client ManagedDatabasesClient) CompleteRestoreSender(req *http.Request) (f func (client ManagedDatabasesClient) CompleteRestoreResponder(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 @@ -206,7 +205,6 @@ func (client ManagedDatabasesClient) CreateOrUpdateSender(req *http.Request) (fu func (client ManagedDatabasesClient) CreateOrUpdateResponder(resp *http.Response) (result ManagedDatabase, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -285,7 +283,6 @@ func (client ManagedDatabasesClient) DeleteSender(req *http.Request) (future Man func (client ManagedDatabasesClient) 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 @@ -363,7 +360,6 @@ func (client ManagedDatabasesClient) GetSender(req *http.Request) (*http.Respons func (client ManagedDatabasesClient) GetResponder(resp *http.Response) (result ManagedDatabase, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -441,7 +437,6 @@ func (client ManagedDatabasesClient) ListByInstanceSender(req *http.Request) (*h func (client ManagedDatabasesClient) ListByInstanceResponder(resp *http.Response) (result ManagedDatabaseListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -556,7 +551,6 @@ func (client ManagedDatabasesClient) ListInaccessibleByInstanceSender(req *http. func (client ManagedDatabasesClient) ListInaccessibleByInstanceResponder(resp *http.Response) (result ManagedDatabaseListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -675,7 +669,6 @@ func (client ManagedDatabasesClient) UpdateSender(req *http.Request) (future Man func (client ManagedDatabasesClient) UpdateResponder(resp *http.Response) (result ManagedDatabase, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/manageddatabasesecurityalertpolicies.go b/services/preview/sql/mgmt/v3.0/sql/manageddatabasesecurityalertpolicies.go index c861ff71f52d..245bd4812e40 100644 --- a/services/preview/sql/mgmt/v3.0/sql/manageddatabasesecurityalertpolicies.go +++ b/services/preview/sql/mgmt/v3.0/sql/manageddatabasesecurityalertpolicies.go @@ -120,7 +120,6 @@ func (client ManagedDatabaseSecurityAlertPoliciesClient) CreateOrUpdateSender(re func (client ManagedDatabaseSecurityAlertPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ManagedDatabaseSecurityAlertPolicy, 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 ManagedDatabaseSecurityAlertPoliciesClient) GetSender(req *http.Req func (client ManagedDatabaseSecurityAlertPoliciesClient) GetResponder(resp *http.Response) (result ManagedDatabaseSecurityAlertPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -280,7 +278,6 @@ func (client ManagedDatabaseSecurityAlertPoliciesClient) ListByDatabaseSender(re func (client ManagedDatabaseSecurityAlertPoliciesClient) ListByDatabaseResponder(resp *http.Response) (result ManagedDatabaseSecurityAlertPolicyListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/manageddatabasesensitivitylabels.go b/services/preview/sql/mgmt/v3.0/sql/manageddatabasesensitivitylabels.go index 23f59744b76e..6e8a24197b73 100644 --- a/services/preview/sql/mgmt/v3.0/sql/manageddatabasesensitivitylabels.go +++ b/services/preview/sql/mgmt/v3.0/sql/manageddatabasesensitivitylabels.go @@ -125,7 +125,6 @@ func (client ManagedDatabaseSensitivityLabelsClient) CreateOrUpdateSender(req *h func (client ManagedDatabaseSensitivityLabelsClient) CreateOrUpdateResponder(resp *http.Response) (result SensitivityLabel, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -211,7 +210,6 @@ func (client ManagedDatabaseSensitivityLabelsClient) DeleteSender(req *http.Requ func (client ManagedDatabaseSensitivityLabelsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp @@ -296,7 +294,6 @@ func (client ManagedDatabaseSensitivityLabelsClient) DisableRecommendationSender func (client ManagedDatabaseSensitivityLabelsClient) DisableRecommendationResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp @@ -382,7 +379,6 @@ func (client ManagedDatabaseSensitivityLabelsClient) EnableRecommendationSender( func (client ManagedDatabaseSensitivityLabelsClient) EnableRecommendationResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp @@ -468,7 +464,6 @@ func (client ManagedDatabaseSensitivityLabelsClient) GetSender(req *http.Request func (client ManagedDatabaseSensitivityLabelsClient) GetResponder(resp *http.Response) (result SensitivityLabel, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -552,7 +547,6 @@ func (client ManagedDatabaseSensitivityLabelsClient) ListCurrentByDatabaseSender func (client ManagedDatabaseSensitivityLabelsClient) ListCurrentByDatabaseResponder(resp *http.Response) (result SensitivityLabelListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -680,7 +674,6 @@ func (client ManagedDatabaseSensitivityLabelsClient) ListRecommendedByDatabaseSe func (client ManagedDatabaseSensitivityLabelsClient) ListRecommendedByDatabaseResponder(resp *http.Response) (result SensitivityLabelListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/manageddatabasevulnerabilityassessmentrulebaselines.go b/services/preview/sql/mgmt/v3.0/sql/manageddatabasevulnerabilityassessmentrulebaselines.go index 799a171dc44c..c6e4a8530c60 100644 --- a/services/preview/sql/mgmt/v3.0/sql/manageddatabasevulnerabilityassessmentrulebaselines.go +++ b/services/preview/sql/mgmt/v3.0/sql/manageddatabasevulnerabilityassessmentrulebaselines.go @@ -133,7 +133,6 @@ func (client ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOr func (client ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdateResponder(resp *http.Response) (result DatabaseVulnerabilityAssessmentRuleBaseline, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -218,7 +217,6 @@ func (client ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) DeleteSe func (client ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp @@ -302,7 +300,6 @@ func (client ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) GetSende func (client ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) GetResponder(resp *http.Response) (result DatabaseVulnerabilityAssessmentRuleBaseline, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/manageddatabasevulnerabilityassessments.go b/services/preview/sql/mgmt/v3.0/sql/manageddatabasevulnerabilityassessments.go index 4c97e57746b1..923fedbc549f 100644 --- a/services/preview/sql/mgmt/v3.0/sql/manageddatabasevulnerabilityassessments.go +++ b/services/preview/sql/mgmt/v3.0/sql/manageddatabasevulnerabilityassessments.go @@ -120,7 +120,6 @@ func (client ManagedDatabaseVulnerabilityAssessmentsClient) CreateOrUpdateSender func (client ManagedDatabaseVulnerabilityAssessmentsClient) CreateOrUpdateResponder(resp *http.Response) (result DatabaseVulnerabilityAssessment, 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 ManagedDatabaseVulnerabilityAssessmentsClient) DeleteSender(req *ht func (client ManagedDatabaseVulnerabilityAssessmentsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp @@ -279,7 +277,6 @@ func (client ManagedDatabaseVulnerabilityAssessmentsClient) GetSender(req *http. func (client ManagedDatabaseVulnerabilityAssessmentsClient) GetResponder(resp *http.Response) (result DatabaseVulnerabilityAssessment, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -359,7 +356,6 @@ func (client ManagedDatabaseVulnerabilityAssessmentsClient) ListByDatabaseSender func (client ManagedDatabaseVulnerabilityAssessmentsClient) ListByDatabaseResponder(resp *http.Response) (result DatabaseVulnerabilityAssessmentListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/manageddatabasevulnerabilityassessmentscans.go b/services/preview/sql/mgmt/v3.0/sql/manageddatabasevulnerabilityassessmentscans.go index 6e132751427d..84c96097c29e 100644 --- a/services/preview/sql/mgmt/v3.0/sql/manageddatabasevulnerabilityassessmentscans.go +++ b/services/preview/sql/mgmt/v3.0/sql/manageddatabasevulnerabilityassessmentscans.go @@ -119,7 +119,6 @@ func (client ManagedDatabaseVulnerabilityAssessmentScansClient) ExportSender(req func (client ManagedDatabaseVulnerabilityAssessmentScansClient) ExportResponder(resp *http.Response) (result DatabaseVulnerabilityAssessmentScansExport, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -201,7 +200,6 @@ func (client ManagedDatabaseVulnerabilityAssessmentScansClient) GetSender(req *h func (client ManagedDatabaseVulnerabilityAssessmentScansClient) GetResponder(resp *http.Response) (result VulnerabilityAssessmentScanRecord, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -283,7 +281,6 @@ func (client ManagedDatabaseVulnerabilityAssessmentScansClient) InitiateScanSend func (client ManagedDatabaseVulnerabilityAssessmentScansClient) InitiateScanResponder(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 @@ -363,7 +360,6 @@ func (client ManagedDatabaseVulnerabilityAssessmentScansClient) ListByDatabaseSe func (client ManagedDatabaseVulnerabilityAssessmentScansClient) ListByDatabaseResponder(resp *http.Response) (result VulnerabilityAssessmentScanRecordListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/managedinstanceadministrators.go b/services/preview/sql/mgmt/v3.0/sql/managedinstanceadministrators.go index 7f99204180de..e0b8f4fe18ef 100644 --- a/services/preview/sql/mgmt/v3.0/sql/managedinstanceadministrators.go +++ b/services/preview/sql/mgmt/v3.0/sql/managedinstanceadministrators.go @@ -128,7 +128,6 @@ func (client ManagedInstanceAdministratorsClient) CreateOrUpdateSender(req *http func (client ManagedInstanceAdministratorsClient) CreateOrUpdateResponder(resp *http.Response) (result ManagedInstanceAdministrator, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -206,7 +205,6 @@ func (client ManagedInstanceAdministratorsClient) DeleteSender(req *http.Request func (client ManagedInstanceAdministratorsClient) DeleteResponder(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 @@ -283,7 +281,6 @@ func (client ManagedInstanceAdministratorsClient) GetSender(req *http.Request) ( func (client ManagedInstanceAdministratorsClient) GetResponder(resp *http.Response) (result ManagedInstanceAdministrator, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -361,7 +358,6 @@ func (client ManagedInstanceAdministratorsClient) ListByInstanceSender(req *http func (client ManagedInstanceAdministratorsClient) ListByInstanceResponder(resp *http.Response) (result ManagedInstanceAdministratorListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/managedinstanceencryptionprotectors.go b/services/preview/sql/mgmt/v3.0/sql/managedinstanceencryptionprotectors.go index 7f2a9ffe4743..f37e849b51e4 100644 --- a/services/preview/sql/mgmt/v3.0/sql/managedinstanceencryptionprotectors.go +++ b/services/preview/sql/mgmt/v3.0/sql/managedinstanceencryptionprotectors.go @@ -119,7 +119,6 @@ func (client ManagedInstanceEncryptionProtectorsClient) CreateOrUpdateSender(req func (client ManagedInstanceEncryptionProtectorsClient) CreateOrUpdateResponder(resp *http.Response) (result ManagedInstanceEncryptionProtector, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -197,7 +196,6 @@ func (client ManagedInstanceEncryptionProtectorsClient) GetSender(req *http.Requ func (client ManagedInstanceEncryptionProtectorsClient) GetResponder(resp *http.Response) (result ManagedInstanceEncryptionProtector, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -275,7 +273,6 @@ func (client ManagedInstanceEncryptionProtectorsClient) ListByInstanceSender(req func (client ManagedInstanceEncryptionProtectorsClient) ListByInstanceResponder(resp *http.Response) (result ManagedInstanceEncryptionProtectorListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -390,7 +387,6 @@ func (client ManagedInstanceEncryptionProtectorsClient) RevalidateSender(req *ht func (client ManagedInstanceEncryptionProtectorsClient) RevalidateResponder(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 diff --git a/services/preview/sql/mgmt/v3.0/sql/managedinstancekeys.go b/services/preview/sql/mgmt/v3.0/sql/managedinstancekeys.go index e411ea9d6fc6..bddbd2733998 100644 --- a/services/preview/sql/mgmt/v3.0/sql/managedinstancekeys.go +++ b/services/preview/sql/mgmt/v3.0/sql/managedinstancekeys.go @@ -119,7 +119,6 @@ func (client ManagedInstanceKeysClient) CreateOrUpdateSender(req *http.Request) func (client ManagedInstanceKeysClient) CreateOrUpdateResponder(resp *http.Response) (result ManagedInstanceKey, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -198,7 +197,6 @@ func (client ManagedInstanceKeysClient) DeleteSender(req *http.Request) (future func (client ManagedInstanceKeysClient) 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 @@ -276,7 +274,6 @@ func (client ManagedInstanceKeysClient) GetSender(req *http.Request) (*http.Resp func (client ManagedInstanceKeysClient) GetResponder(resp *http.Response) (result ManagedInstanceKey, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -358,7 +355,6 @@ func (client ManagedInstanceKeysClient) ListByInstanceSender(req *http.Request) func (client ManagedInstanceKeysClient) ListByInstanceResponder(resp *http.Response) (result ManagedInstanceKeyListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/managedinstancelongtermretentionpolicies.go b/services/preview/sql/mgmt/v3.0/sql/managedinstancelongtermretentionpolicies.go index c27fe8371738..1034ec38bdfd 100644 --- a/services/preview/sql/mgmt/v3.0/sql/managedinstancelongtermretentionpolicies.go +++ b/services/preview/sql/mgmt/v3.0/sql/managedinstancelongtermretentionpolicies.go @@ -120,7 +120,6 @@ func (client ManagedInstanceLongTermRetentionPoliciesClient) CreateOrUpdateSende func (client ManagedInstanceLongTermRetentionPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ManagedInstanceLongTermRetentionPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -200,7 +199,6 @@ func (client ManagedInstanceLongTermRetentionPoliciesClient) GetSender(req *http func (client ManagedInstanceLongTermRetentionPoliciesClient) GetResponder(resp *http.Response) (result ManagedInstanceLongTermRetentionPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -280,7 +278,6 @@ func (client ManagedInstanceLongTermRetentionPoliciesClient) ListByDatabaseSende func (client ManagedInstanceLongTermRetentionPoliciesClient) ListByDatabaseResponder(resp *http.Response) (result ManagedInstanceLongTermRetentionPolicyListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/managedinstanceoperations.go b/services/preview/sql/mgmt/v3.0/sql/managedinstanceoperations.go new file mode 100644 index 000000000000..642439c08a5e --- /dev/null +++ b/services/preview/sql/mgmt/v3.0/sql/managedinstanceoperations.go @@ -0,0 +1,313 @@ +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/tracing" + "github.com/satori/go.uuid" + "net/http" +) + +// ManagedInstanceOperationsClient 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 ManagedInstanceOperationsClient struct { + BaseClient +} + +// NewManagedInstanceOperationsClient creates an instance of the ManagedInstanceOperationsClient client. +func NewManagedInstanceOperationsClient(subscriptionID string) ManagedInstanceOperationsClient { + return NewManagedInstanceOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewManagedInstanceOperationsClientWithBaseURI creates an instance of the ManagedInstanceOperationsClient 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 NewManagedInstanceOperationsClientWithBaseURI(baseURI string, subscriptionID string) ManagedInstanceOperationsClient { + return ManagedInstanceOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Cancel cancels the asynchronous operation on the managed instance. +// 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. +// managedInstanceName - the name of the managed instance. +func (client ManagedInstanceOperationsClient) Cancel(ctx context.Context, resourceGroupName string, managedInstanceName string, operationID uuid.UUID) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceOperationsClient.Cancel") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CancelPreparer(ctx, resourceGroupName, managedInstanceName, operationID) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ManagedInstanceOperationsClient", "Cancel", nil, "Failure preparing request") + return + } + + resp, err := client.CancelSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "sql.ManagedInstanceOperationsClient", "Cancel", resp, "Failure sending request") + return + } + + result, err = client.CancelResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ManagedInstanceOperationsClient", "Cancel", resp, "Failure responding to request") + } + + return +} + +// CancelPreparer prepares the Cancel request. +func (client ManagedInstanceOperationsClient) CancelPreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, operationID uuid.UUID) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "managedInstanceName": autorest.Encode("path", managedInstanceName), + "operationId": autorest.Encode("path", operationID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations/{operationId}/cancel", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CancelSender sends the Cancel request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedInstanceOperationsClient) CancelSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CancelResponder handles the response to the Cancel request. The method always +// closes the http.Response Body. +func (client ManagedInstanceOperationsClient) CancelResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a management operation on a managed instance. +// 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. +// managedInstanceName - the name of the managed instance. +func (client ManagedInstanceOperationsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, operationID uuid.UUID) (result ManagedInstanceOperation, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceOperationsClient.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, managedInstanceName, operationID) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ManagedInstanceOperationsClient", "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.ManagedInstanceOperationsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ManagedInstanceOperationsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ManagedInstanceOperationsClient) GetPreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, operationID uuid.UUID) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "managedInstanceName": autorest.Encode("path", managedInstanceName), + "operationId": autorest.Encode("path", operationID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01-preview" + 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/managedInstances/{managedInstanceName}/operations/{operationId}", 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 ManagedInstanceOperationsClient) 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 ManagedInstanceOperationsClient) GetResponder(resp *http.Response) (result ManagedInstanceOperation, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByManagedInstance gets a list of operations performed on the managed instance. +// 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. +// managedInstanceName - the name of the managed instance. +func (client ManagedInstanceOperationsClient) ListByManagedInstance(ctx context.Context, resourceGroupName string, managedInstanceName string) (result ManagedInstanceOperationListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceOperationsClient.ListByManagedInstance") + defer func() { + sc := -1 + if result.miolr.Response.Response != nil { + sc = result.miolr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByManagedInstanceNextResults + req, err := client.ListByManagedInstancePreparer(ctx, resourceGroupName, managedInstanceName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ManagedInstanceOperationsClient", "ListByManagedInstance", nil, "Failure preparing request") + return + } + + resp, err := client.ListByManagedInstanceSender(req) + if err != nil { + result.miolr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ManagedInstanceOperationsClient", "ListByManagedInstance", resp, "Failure sending request") + return + } + + result.miolr, err = client.ListByManagedInstanceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ManagedInstanceOperationsClient", "ListByManagedInstance", resp, "Failure responding to request") + } + + return +} + +// ListByManagedInstancePreparer prepares the ListByManagedInstance request. +func (client ManagedInstanceOperationsClient) ListByManagedInstancePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "managedInstanceName": autorest.Encode("path", managedInstanceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01-preview" + 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/managedInstances/{managedInstanceName}/operations", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByManagedInstanceSender sends the ListByManagedInstance request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedInstanceOperationsClient) ListByManagedInstanceSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByManagedInstanceResponder handles the response to the ListByManagedInstance request. The method always +// closes the http.Response Body. +func (client ManagedInstanceOperationsClient) ListByManagedInstanceResponder(resp *http.Response) (result ManagedInstanceOperationListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByManagedInstanceNextResults retrieves the next set of results, if any. +func (client ManagedInstanceOperationsClient) listByManagedInstanceNextResults(ctx context.Context, lastResults ManagedInstanceOperationListResult) (result ManagedInstanceOperationListResult, err error) { + req, err := lastResults.managedInstanceOperationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "sql.ManagedInstanceOperationsClient", "listByManagedInstanceNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByManagedInstanceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "sql.ManagedInstanceOperationsClient", "listByManagedInstanceNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByManagedInstanceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ManagedInstanceOperationsClient", "listByManagedInstanceNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByManagedInstanceComplete enumerates all values, automatically crossing page boundaries as required. +func (client ManagedInstanceOperationsClient) ListByManagedInstanceComplete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result ManagedInstanceOperationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceOperationsClient.ListByManagedInstance") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByManagedInstance(ctx, resourceGroupName, managedInstanceName) + return +} diff --git a/services/preview/sql/mgmt/v3.0/sql/managedinstances.go b/services/preview/sql/mgmt/v3.0/sql/managedinstances.go index 7c3f70dd188d..f25258c02656 100644 --- a/services/preview/sql/mgmt/v3.0/sql/managedinstances.go +++ b/services/preview/sql/mgmt/v3.0/sql/managedinstances.go @@ -124,7 +124,6 @@ func (client ManagedInstancesClient) CreateOrUpdateSender(req *http.Request) (fu func (client ManagedInstancesClient) CreateOrUpdateResponder(resp *http.Response) (result ManagedInstance, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -201,13 +200,98 @@ func (client ManagedInstancesClient) DeleteSender(req *http.Request) (future Man func (client ManagedInstancesClient) 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 return } +// Failover failovers a managed instance. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// managedInstanceName - the name of the managed instance. +// replicaType - the type of replica to be failed over. +func (client ManagedInstancesClient) Failover(ctx context.Context, resourceGroupName string, managedInstanceName string, replicaType ReplicaType) (result ManagedInstancesFailoverFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstancesClient.Failover") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("sql.ManagedInstancesClient", "Failover", err.Error()) + } + + req, err := client.FailoverPreparer(ctx, resourceGroupName, managedInstanceName, replicaType) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "Failover", nil, "Failure preparing request") + return + } + + result, err = client.FailoverSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "Failover", result.Response(), "Failure sending request") + return + } + + return +} + +// FailoverPreparer prepares the Failover request. +func (client ManagedInstancesClient) FailoverPreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, replicaType ReplicaType) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "managedInstanceName": autorest.Encode("path", managedInstanceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(string(replicaType)) > 0 { + queryParameters["replicaType"] = autorest.Encode("query", replicaType) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/failover", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// FailoverSender sends the Failover request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedInstancesClient) FailoverSender(req *http.Request) (future ManagedInstancesFailoverFuture, 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 +} + +// FailoverResponder handles the response to the Failover request. The method always +// closes the http.Response Body. +func (client ManagedInstancesClient) FailoverResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + // Get gets a managed instance. // Parameters: // resourceGroupName - the name of the resource group that contains the resource. You can obtain this value @@ -277,7 +361,6 @@ func (client ManagedInstancesClient) GetSender(req *http.Request) (*http.Respons func (client ManagedInstancesClient) GetResponder(resp *http.Response) (result ManagedInstance, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -349,7 +432,6 @@ func (client ManagedInstancesClient) ListSender(req *http.Request) (*http.Respon func (client ManagedInstancesClient) ListResponder(resp *http.Response) (result ManagedInstanceListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -464,7 +546,6 @@ func (client ManagedInstancesClient) ListByInstancePoolSender(req *http.Request) func (client ManagedInstancesClient) ListByInstancePoolResponder(resp *http.Response) (result ManagedInstanceListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -577,7 +658,6 @@ func (client ManagedInstancesClient) ListByResourceGroupSender(req *http.Request func (client ManagedInstancesClient) ListByResourceGroupResponder(resp *http.Response) (result ManagedInstanceListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -694,7 +774,6 @@ func (client ManagedInstancesClient) UpdateSender(req *http.Request) (future Man func (client ManagedInstancesClient) UpdateResponder(resp *http.Response) (result ManagedInstance, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/managedinstancetdecertificates.go b/services/preview/sql/mgmt/v3.0/sql/managedinstancetdecertificates.go index d5c166d30ef4..8d6951a02db8 100644 --- a/services/preview/sql/mgmt/v3.0/sql/managedinstancetdecertificates.go +++ b/services/preview/sql/mgmt/v3.0/sql/managedinstancetdecertificates.go @@ -124,7 +124,6 @@ func (client ManagedInstanceTdeCertificatesClient) CreateSender(req *http.Reques func (client ManagedInstanceTdeCertificatesClient) CreateResponder(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 diff --git a/services/preview/sql/mgmt/v3.0/sql/managedinstancevulnerabilityassessments.go b/services/preview/sql/mgmt/v3.0/sql/managedinstancevulnerabilityassessments.go index e5ac1184ccfd..384eece8c944 100644 --- a/services/preview/sql/mgmt/v3.0/sql/managedinstancevulnerabilityassessments.go +++ b/services/preview/sql/mgmt/v3.0/sql/managedinstancevulnerabilityassessments.go @@ -126,7 +126,6 @@ func (client ManagedInstanceVulnerabilityAssessmentsClient) CreateOrUpdateSender func (client ManagedInstanceVulnerabilityAssessmentsClient) CreateOrUpdateResponder(resp *http.Response) (result ManagedInstanceVulnerabilityAssessment, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -204,7 +203,6 @@ func (client ManagedInstanceVulnerabilityAssessmentsClient) DeleteSender(req *ht func (client ManagedInstanceVulnerabilityAssessmentsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp @@ -281,7 +279,6 @@ func (client ManagedInstanceVulnerabilityAssessmentsClient) GetSender(req *http. func (client ManagedInstanceVulnerabilityAssessmentsClient) GetResponder(resp *http.Response) (result ManagedInstanceVulnerabilityAssessment, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -359,7 +356,6 @@ func (client ManagedInstanceVulnerabilityAssessmentsClient) ListByInstanceSender func (client ManagedInstanceVulnerabilityAssessmentsClient) ListByInstanceResponder(resp *http.Response) (result ManagedInstanceVulnerabilityAssessmentListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/managedrestorabledroppeddatabasebackupshorttermretentionpolicies.go b/services/preview/sql/mgmt/v3.0/sql/managedrestorabledroppeddatabasebackupshorttermretentionpolicies.go index 61fd755db3a0..7adb0e1fc8a2 100644 --- a/services/preview/sql/mgmt/v3.0/sql/managedrestorabledroppeddatabasebackupshorttermretentionpolicies.go +++ b/services/preview/sql/mgmt/v3.0/sql/managedrestorabledroppeddatabasebackupshorttermretentionpolicies.go @@ -119,7 +119,6 @@ func (client ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesCli func (client ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ManagedBackupShortTermRetentionPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -198,7 +197,6 @@ func (client ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesCli func (client ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) GetResponder(resp *http.Response) (result ManagedBackupShortTermRetentionPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -277,7 +275,6 @@ func (client ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesCli func (client ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) ListByRestorableDroppedDatabaseResponder(resp *http.Response) (result ManagedBackupShortTermRetentionPolicyListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -396,7 +393,6 @@ func (client ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesCli func (client ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) UpdateResponder(resp *http.Response) (result ManagedBackupShortTermRetentionPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/managedserversecurityalertpolicies.go b/services/preview/sql/mgmt/v3.0/sql/managedserversecurityalertpolicies.go index d3a41c458ab7..6a90cdba7bca 100644 --- a/services/preview/sql/mgmt/v3.0/sql/managedserversecurityalertpolicies.go +++ b/services/preview/sql/mgmt/v3.0/sql/managedserversecurityalertpolicies.go @@ -118,7 +118,6 @@ func (client ManagedServerSecurityAlertPoliciesClient) CreateOrUpdateSender(req func (client ManagedServerSecurityAlertPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ManagedServerSecurityAlertPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -196,7 +195,6 @@ func (client ManagedServerSecurityAlertPoliciesClient) GetSender(req *http.Reque func (client ManagedServerSecurityAlertPoliciesClient) GetResponder(resp *http.Response) (result ManagedServerSecurityAlertPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -274,7 +272,6 @@ func (client ManagedServerSecurityAlertPoliciesClient) ListByInstanceSender(req func (client ManagedServerSecurityAlertPoliciesClient) ListByInstanceResponder(resp *http.Response) (result ManagedServerSecurityAlertPolicyListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/models.go b/services/preview/sql/mgmt/v3.0/sql/models.go index e4406b3b7b3e..ccba7929133c 100644 --- a/services/preview/sql/mgmt/v3.0/sql/models.go +++ b/services/preview/sql/mgmt/v3.0/sql/models.go @@ -1434,6 +1434,21 @@ func PossibleServerKeyTypeValues() []ServerKeyType { return []ServerKeyType{AzureKeyVault, ServiceManaged} } +// ServerPublicNetworkAccess enumerates the values for server public network access. +type ServerPublicNetworkAccess string + +const ( + // ServerPublicNetworkAccessDisabled ... + ServerPublicNetworkAccessDisabled ServerPublicNetworkAccess = "Disabled" + // ServerPublicNetworkAccessEnabled ... + ServerPublicNetworkAccessEnabled ServerPublicNetworkAccess = "Enabled" +) + +// PossibleServerPublicNetworkAccessValues returns an array of possible values for the ServerPublicNetworkAccess const type. +func PossibleServerPublicNetworkAccessValues() []ServerPublicNetworkAccess { + return []ServerPublicNetworkAccess{ServerPublicNetworkAccessDisabled, ServerPublicNetworkAccessEnabled} +} + // ServiceObjectiveName enumerates the values for service objective name. type ServiceObjectiveName string @@ -3039,7 +3054,12 @@ type DatabaseBlobAuditingPolicyProperties struct { State BlobAuditingPolicyState `json:"state,omitempty"` // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required. StorageEndpoint *string `json:"storageEndpoint,omitempty"` - // StorageAccountAccessKey - Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, storageAccountAccessKey is required. + // StorageAccountAccessKey - Specifies the identifier key of the auditing storage account. + // If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. + // Prerequisites for using managed identity authentication: + // 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + // 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. + // For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355) StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` // RetentionDays - Specifies the number of days to keep in the audit logs in the storage account. RetentionDays *int32 `json:"retentionDays,omitempty"` @@ -3578,7 +3598,7 @@ type DatabaseProperties struct { CatalogCollation CatalogCollationType `json:"catalogCollation,omitempty"` // ZoneRedundant - Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. ZoneRedundant *bool `json:"zoneRedundant,omitempty"` - // LicenseType - The license type to apply for this database. Possible values include: 'LicenseIncluded', 'BasePrice' + // LicenseType - The license type to apply for this database. `LicenseIncluded` if you need a license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit. Possible values include: 'LicenseIncluded', 'BasePrice' LicenseType DatabaseLicenseType `json:"licenseType,omitempty"` // MaxLogSizeBytes - READ-ONLY; The max log size for this database. MaxLogSizeBytes *int64 `json:"maxLogSizeBytes,omitempty"` @@ -6222,6 +6242,154 @@ func (edbap *ExtendedDatabaseBlobAuditingPolicy) UnmarshalJSON(body []byte) erro return nil } +// ExtendedDatabaseBlobAuditingPolicyListResult a list of database extended auditing settings. +type ExtendedDatabaseBlobAuditingPolicyListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]ExtendedDatabaseBlobAuditingPolicy `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExtendedDatabaseBlobAuditingPolicyListResultIterator provides access to a complete listing of +// ExtendedDatabaseBlobAuditingPolicy values. +type ExtendedDatabaseBlobAuditingPolicyListResultIterator struct { + i int + page ExtendedDatabaseBlobAuditingPolicyListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ExtendedDatabaseBlobAuditingPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedDatabaseBlobAuditingPolicyListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ExtendedDatabaseBlobAuditingPolicyListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ExtendedDatabaseBlobAuditingPolicyListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ExtendedDatabaseBlobAuditingPolicyListResultIterator) Response() ExtendedDatabaseBlobAuditingPolicyListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ExtendedDatabaseBlobAuditingPolicyListResultIterator) Value() ExtendedDatabaseBlobAuditingPolicy { + if !iter.page.NotDone() { + return ExtendedDatabaseBlobAuditingPolicy{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ExtendedDatabaseBlobAuditingPolicyListResultIterator type. +func NewExtendedDatabaseBlobAuditingPolicyListResultIterator(page ExtendedDatabaseBlobAuditingPolicyListResultPage) ExtendedDatabaseBlobAuditingPolicyListResultIterator { + return ExtendedDatabaseBlobAuditingPolicyListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (edbaplr ExtendedDatabaseBlobAuditingPolicyListResult) IsEmpty() bool { + return edbaplr.Value == nil || len(*edbaplr.Value) == 0 +} + +// extendedDatabaseBlobAuditingPolicyListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (edbaplr ExtendedDatabaseBlobAuditingPolicyListResult) extendedDatabaseBlobAuditingPolicyListResultPreparer(ctx context.Context) (*http.Request, error) { + if edbaplr.NextLink == nil || len(to.String(edbaplr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(edbaplr.NextLink))) +} + +// ExtendedDatabaseBlobAuditingPolicyListResultPage contains a page of ExtendedDatabaseBlobAuditingPolicy +// values. +type ExtendedDatabaseBlobAuditingPolicyListResultPage struct { + fn func(context.Context, ExtendedDatabaseBlobAuditingPolicyListResult) (ExtendedDatabaseBlobAuditingPolicyListResult, error) + edbaplr ExtendedDatabaseBlobAuditingPolicyListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ExtendedDatabaseBlobAuditingPolicyListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedDatabaseBlobAuditingPolicyListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.edbaplr) + if err != nil { + return err + } + page.edbaplr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ExtendedDatabaseBlobAuditingPolicyListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ExtendedDatabaseBlobAuditingPolicyListResultPage) NotDone() bool { + return !page.edbaplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ExtendedDatabaseBlobAuditingPolicyListResultPage) Response() ExtendedDatabaseBlobAuditingPolicyListResult { + return page.edbaplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ExtendedDatabaseBlobAuditingPolicyListResultPage) Values() []ExtendedDatabaseBlobAuditingPolicy { + if page.edbaplr.IsEmpty() { + return nil + } + return *page.edbaplr.Value +} + +// Creates a new instance of the ExtendedDatabaseBlobAuditingPolicyListResultPage type. +func NewExtendedDatabaseBlobAuditingPolicyListResultPage(getNextPage func(context.Context, ExtendedDatabaseBlobAuditingPolicyListResult) (ExtendedDatabaseBlobAuditingPolicyListResult, error)) ExtendedDatabaseBlobAuditingPolicyListResultPage { + return ExtendedDatabaseBlobAuditingPolicyListResultPage{fn: getNextPage} +} + // ExtendedDatabaseBlobAuditingPolicyProperties properties of an extended database blob auditing policy. type ExtendedDatabaseBlobAuditingPolicyProperties struct { // PredicateExpression - Specifies condition of where clause when creating an audit. @@ -6230,7 +6398,12 @@ type ExtendedDatabaseBlobAuditingPolicyProperties struct { State BlobAuditingPolicyState `json:"state,omitempty"` // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required. StorageEndpoint *string `json:"storageEndpoint,omitempty"` - // StorageAccountAccessKey - Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, storageAccountAccessKey is required. + // StorageAccountAccessKey - Specifies the identifier key of the auditing storage account. + // If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. + // Prerequisites for using managed identity authentication: + // 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + // 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. + // For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355) StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` // RetentionDays - Specifies the number of days to keep in the audit logs in the storage account. RetentionDays *int32 `json:"retentionDays,omitempty"` @@ -6415,6 +6588,154 @@ func (esbap *ExtendedServerBlobAuditingPolicy) UnmarshalJSON(body []byte) error return nil } +// ExtendedServerBlobAuditingPolicyListResult a list of server extended auditing settings. +type ExtendedServerBlobAuditingPolicyListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]ExtendedServerBlobAuditingPolicy `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExtendedServerBlobAuditingPolicyListResultIterator provides access to a complete listing of +// ExtendedServerBlobAuditingPolicy values. +type ExtendedServerBlobAuditingPolicyListResultIterator struct { + i int + page ExtendedServerBlobAuditingPolicyListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ExtendedServerBlobAuditingPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedServerBlobAuditingPolicyListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ExtendedServerBlobAuditingPolicyListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ExtendedServerBlobAuditingPolicyListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ExtendedServerBlobAuditingPolicyListResultIterator) Response() ExtendedServerBlobAuditingPolicyListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ExtendedServerBlobAuditingPolicyListResultIterator) Value() ExtendedServerBlobAuditingPolicy { + if !iter.page.NotDone() { + return ExtendedServerBlobAuditingPolicy{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ExtendedServerBlobAuditingPolicyListResultIterator type. +func NewExtendedServerBlobAuditingPolicyListResultIterator(page ExtendedServerBlobAuditingPolicyListResultPage) ExtendedServerBlobAuditingPolicyListResultIterator { + return ExtendedServerBlobAuditingPolicyListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (esbaplr ExtendedServerBlobAuditingPolicyListResult) IsEmpty() bool { + return esbaplr.Value == nil || len(*esbaplr.Value) == 0 +} + +// extendedServerBlobAuditingPolicyListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (esbaplr ExtendedServerBlobAuditingPolicyListResult) extendedServerBlobAuditingPolicyListResultPreparer(ctx context.Context) (*http.Request, error) { + if esbaplr.NextLink == nil || len(to.String(esbaplr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(esbaplr.NextLink))) +} + +// ExtendedServerBlobAuditingPolicyListResultPage contains a page of ExtendedServerBlobAuditingPolicy +// values. +type ExtendedServerBlobAuditingPolicyListResultPage struct { + fn func(context.Context, ExtendedServerBlobAuditingPolicyListResult) (ExtendedServerBlobAuditingPolicyListResult, error) + esbaplr ExtendedServerBlobAuditingPolicyListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ExtendedServerBlobAuditingPolicyListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedServerBlobAuditingPolicyListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.esbaplr) + if err != nil { + return err + } + page.esbaplr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ExtendedServerBlobAuditingPolicyListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ExtendedServerBlobAuditingPolicyListResultPage) NotDone() bool { + return !page.esbaplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ExtendedServerBlobAuditingPolicyListResultPage) Response() ExtendedServerBlobAuditingPolicyListResult { + return page.esbaplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ExtendedServerBlobAuditingPolicyListResultPage) Values() []ExtendedServerBlobAuditingPolicy { + if page.esbaplr.IsEmpty() { + return nil + } + return *page.esbaplr.Value +} + +// Creates a new instance of the ExtendedServerBlobAuditingPolicyListResultPage type. +func NewExtendedServerBlobAuditingPolicyListResultPage(getNextPage func(context.Context, ExtendedServerBlobAuditingPolicyListResult) (ExtendedServerBlobAuditingPolicyListResult, error)) ExtendedServerBlobAuditingPolicyListResultPage { + return ExtendedServerBlobAuditingPolicyListResultPage{fn: getNextPage} +} + // ExtendedServerBlobAuditingPolicyProperties properties of an extended server blob auditing policy. type ExtendedServerBlobAuditingPolicyProperties struct { // PredicateExpression - Specifies condition of where clause when creating an audit. @@ -6423,7 +6744,12 @@ type ExtendedServerBlobAuditingPolicyProperties struct { State BlobAuditingPolicyState `json:"state,omitempty"` // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required. StorageEndpoint *string `json:"storageEndpoint,omitempty"` - // StorageAccountAccessKey - Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, storageAccountAccessKey is required. + // StorageAccountAccessKey - Specifies the identifier key of the auditing storage account. + // If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. + // Prerequisites for using managed identity authentication: + // 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + // 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. + // For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355) StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` // RetentionDays - Specifies the number of days to keep in the audit logs in the storage account. RetentionDays *int32 `json:"retentionDays,omitempty"` @@ -11084,7 +11410,7 @@ type ManagedDatabaseProperties struct { DefaultSecondaryLocation *string `json:"defaultSecondaryLocation,omitempty"` // CatalogCollation - Collation of the metadata catalog. Possible values include: 'DATABASEDEFAULT', 'SQLLatin1GeneralCP1CIAS' CatalogCollation CatalogCollationType `json:"catalogCollation,omitempty"` - // CreateMode - Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. Possible values include: 'ManagedDatabaseCreateModeDefault', 'ManagedDatabaseCreateModeRestoreExternalBackup', 'ManagedDatabaseCreateModePointInTimeRestore', 'ManagedDatabaseCreateModeRecovery', 'ManagedDatabaseCreateModeRestoreLongTermRetentionBackup' + // CreateMode - Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required). Possible values include: 'ManagedDatabaseCreateModeDefault', 'ManagedDatabaseCreateModeRestoreExternalBackup', 'ManagedDatabaseCreateModePointInTimeRestore', 'ManagedDatabaseCreateModeRecovery', 'ManagedDatabaseCreateModeRestoreLongTermRetentionBackup' CreateMode ManagedDatabaseCreateMode `json:"createMode,omitempty"` // StorageContainerURI - Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored. StorageContainerURI *string `json:"storageContainerUri,omitempty"` @@ -11102,6 +11428,103 @@ type ManagedDatabaseProperties struct { LongTermRetentionBackupResourceID *string `json:"longTermRetentionBackupResourceId,omitempty"` } +// ManagedDatabaseRestoreDetailsProperties the managed database's restore details properties. +type ManagedDatabaseRestoreDetailsProperties struct { + // Status - READ-ONLY; Restore status. + Status *string `json:"status,omitempty"` + // CurrentRestoringFileName - READ-ONLY; Current restoring file name. + CurrentRestoringFileName *string `json:"currentRestoringFileName,omitempty"` + // LastRestoredFileName - READ-ONLY; Last restored file name. + LastRestoredFileName *string `json:"lastRestoredFileName,omitempty"` + // LastRestoredFileTime - READ-ONLY; Last restored file time. + LastRestoredFileTime *date.Time `json:"lastRestoredFileTime,omitempty"` + // PercentCompleted - READ-ONLY; Percent completed. + PercentCompleted *float64 `json:"percentCompleted,omitempty"` + // UnrestorableFiles - READ-ONLY; List of unrestorable files. + UnrestorableFiles *[]string `json:"unrestorableFiles,omitempty"` + // NumberOfFilesDetected - READ-ONLY; Number of files detected. + NumberOfFilesDetected *int64 `json:"numberOfFilesDetected,omitempty"` + // LastUploadedFileName - READ-ONLY; Last uploaded file name. + LastUploadedFileName *string `json:"lastUploadedFileName,omitempty"` + // LastUploadedFileTime - READ-ONLY; Last uploaded file time. + LastUploadedFileTime *date.Time `json:"lastUploadedFileTime,omitempty"` + // BlockReason - READ-ONLY; The reason why restore is in Blocked state. + BlockReason *string `json:"blockReason,omitempty"` +} + +// ManagedDatabaseRestoreDetailsResult a managed database restore details. +type ManagedDatabaseRestoreDetailsResult struct { + autorest.Response `json:"-"` + // ManagedDatabaseRestoreDetailsProperties - Resource properties. + *ManagedDatabaseRestoreDetailsProperties `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 ManagedDatabaseRestoreDetailsResult. +func (mdrdr ManagedDatabaseRestoreDetailsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mdrdr.ManagedDatabaseRestoreDetailsProperties != nil { + objectMap["properties"] = mdrdr.ManagedDatabaseRestoreDetailsProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ManagedDatabaseRestoreDetailsResult struct. +func (mdrdr *ManagedDatabaseRestoreDetailsResult) 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 "properties": + if v != nil { + var managedDatabaseRestoreDetailsProperties ManagedDatabaseRestoreDetailsProperties + err = json.Unmarshal(*v, &managedDatabaseRestoreDetailsProperties) + if err != nil { + return err + } + mdrdr.ManagedDatabaseRestoreDetailsProperties = &managedDatabaseRestoreDetailsProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + mdrdr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + mdrdr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + mdrdr.Type = &typeVar + } + } + } + + return nil +} + // ManagedDatabasesCompleteRestoreFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type ManagedDatabasesCompleteRestoreFuture struct { @@ -13168,6 +13591,256 @@ func NewManagedInstanceLongTermRetentionPolicyListResultPage(getNextPage func(co return ManagedInstanceLongTermRetentionPolicyListResultPage{fn: getNextPage} } +// ManagedInstanceOperation a managed instance operation. +type ManagedInstanceOperation struct { + autorest.Response `json:"-"` + // ManagedInstanceOperationProperties - Resource properties. + *ManagedInstanceOperationProperties `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 ManagedInstanceOperation. +func (mio ManagedInstanceOperation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mio.ManagedInstanceOperationProperties != nil { + objectMap["properties"] = mio.ManagedInstanceOperationProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ManagedInstanceOperation struct. +func (mio *ManagedInstanceOperation) 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 "properties": + if v != nil { + var managedInstanceOperationProperties ManagedInstanceOperationProperties + err = json.Unmarshal(*v, &managedInstanceOperationProperties) + if err != nil { + return err + } + mio.ManagedInstanceOperationProperties = &managedInstanceOperationProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + mio.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + mio.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + mio.Type = &typeVar + } + } + } + + return nil +} + +// ManagedInstanceOperationListResult the response to a list managed instance operations request +type ManagedInstanceOperationListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]ManagedInstanceOperation `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ManagedInstanceOperationListResultIterator provides access to a complete listing of +// ManagedInstanceOperation values. +type ManagedInstanceOperationListResultIterator struct { + i int + page ManagedInstanceOperationListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ManagedInstanceOperationListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceOperationListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ManagedInstanceOperationListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ManagedInstanceOperationListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ManagedInstanceOperationListResultIterator) Response() ManagedInstanceOperationListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ManagedInstanceOperationListResultIterator) Value() ManagedInstanceOperation { + if !iter.page.NotDone() { + return ManagedInstanceOperation{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ManagedInstanceOperationListResultIterator type. +func NewManagedInstanceOperationListResultIterator(page ManagedInstanceOperationListResultPage) ManagedInstanceOperationListResultIterator { + return ManagedInstanceOperationListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (miolr ManagedInstanceOperationListResult) IsEmpty() bool { + return miolr.Value == nil || len(*miolr.Value) == 0 +} + +// managedInstanceOperationListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (miolr ManagedInstanceOperationListResult) managedInstanceOperationListResultPreparer(ctx context.Context) (*http.Request, error) { + if miolr.NextLink == nil || len(to.String(miolr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(miolr.NextLink))) +} + +// ManagedInstanceOperationListResultPage contains a page of ManagedInstanceOperation values. +type ManagedInstanceOperationListResultPage struct { + fn func(context.Context, ManagedInstanceOperationListResult) (ManagedInstanceOperationListResult, error) + miolr ManagedInstanceOperationListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ManagedInstanceOperationListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceOperationListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.miolr) + if err != nil { + return err + } + page.miolr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ManagedInstanceOperationListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ManagedInstanceOperationListResultPage) NotDone() bool { + return !page.miolr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ManagedInstanceOperationListResultPage) Response() ManagedInstanceOperationListResult { + return page.miolr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ManagedInstanceOperationListResultPage) Values() []ManagedInstanceOperation { + if page.miolr.IsEmpty() { + return nil + } + return *page.miolr.Value +} + +// Creates a new instance of the ManagedInstanceOperationListResultPage type. +func NewManagedInstanceOperationListResultPage(getNextPage func(context.Context, ManagedInstanceOperationListResult) (ManagedInstanceOperationListResult, error)) ManagedInstanceOperationListResultPage { + return ManagedInstanceOperationListResultPage{fn: getNextPage} +} + +// ManagedInstanceOperationProperties the properties of a managed instance operation. +type ManagedInstanceOperationProperties struct { + // ManagedInstanceName - READ-ONLY; The name of the managed instance the operation is being performed on. + ManagedInstanceName *string `json:"managedInstanceName,omitempty"` + // Operation - READ-ONLY; The name of operation. + Operation *string `json:"operation,omitempty"` + // OperationFriendlyName - READ-ONLY; The friendly name of operation. + OperationFriendlyName *string `json:"operationFriendlyName,omitempty"` + // PercentComplete - READ-ONLY; The percentage of the operation completed. + PercentComplete *int32 `json:"percentComplete,omitempty"` + // StartTime - READ-ONLY; The operation start time. + StartTime *date.Time `json:"startTime,omitempty"` + // State - READ-ONLY; The operation state. Possible values include: 'ManagementOperationStatePending', 'ManagementOperationStateInProgress', 'ManagementOperationStateSucceeded', 'ManagementOperationStateFailed', 'ManagementOperationStateCancelInProgress', 'ManagementOperationStateCancelled' + State ManagementOperationState `json:"state,omitempty"` + // ErrorCode - READ-ONLY; The operation error code. + ErrorCode *int32 `json:"errorCode,omitempty"` + // ErrorDescription - READ-ONLY; The operation error description. + ErrorDescription *string `json:"errorDescription,omitempty"` + // ErrorSeverity - READ-ONLY; The operation error severity. + ErrorSeverity *int32 `json:"errorSeverity,omitempty"` + // IsUserError - READ-ONLY; Whether or not the error is a user error. + IsUserError *bool `json:"isUserError,omitempty"` + // EstimatedCompletionTime - READ-ONLY; The estimated completion time of the operation. + EstimatedCompletionTime *date.Time `json:"estimatedCompletionTime,omitempty"` + // Description - READ-ONLY; The operation description. + Description *string `json:"description,omitempty"` + // IsCancellable - READ-ONLY; Whether the operation can be cancelled. + IsCancellable *bool `json:"isCancellable,omitempty"` +} + // ManagedInstancePairInfo pairs of Managed Instances in the failover group. type ManagedInstancePairInfo struct { // PrimaryManagedInstanceID - Id of Primary Managed Instance in pair. @@ -13223,6 +13896,10 @@ type ManagedInstanceProperties struct { TimezoneID *string `json:"timezoneId,omitempty"` // InstancePoolID - The Id of the instance pool this managed server belongs to. InstancePoolID *string `json:"instancePoolId,omitempty"` + // MaintenanceConfigurationID - Specifies maintenance configuration id to apply to this managed instance. + MaintenanceConfigurationID *string `json:"maintenanceConfigurationId,omitempty"` + // MinimalTLSVersion - Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2' + MinimalTLSVersion *string `json:"minimalTlsVersion,omitempty"` } // ManagedInstancesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a @@ -13277,6 +13954,29 @@ func (future *ManagedInstancesDeleteFuture) Result(client ManagedInstancesClient return } +// ManagedInstancesFailoverFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ManagedInstancesFailoverFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ManagedInstancesFailoverFuture) Result(client ManagedInstancesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ManagedInstancesFailoverFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("sql.ManagedInstancesFailoverFuture") + return + } + ar.Response = future.Response() + return +} + // ManagedInstancesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running // operation. type ManagedInstancesUpdateFuture struct { @@ -15491,6 +16191,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. @@ -16886,7 +17609,12 @@ type ServerBlobAuditingPolicyProperties struct { State BlobAuditingPolicyState `json:"state,omitempty"` // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required. StorageEndpoint *string `json:"storageEndpoint,omitempty"` - // StorageAccountAccessKey - Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, storageAccountAccessKey is required. + // StorageAccountAccessKey - Specifies the identifier key of the auditing storage account. + // If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. + // Prerequisites for using managed identity authentication: + // 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + // 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. + // For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355) StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` // RetentionDays - Specifies the number of days to keep in the audit logs in the storage account. RetentionDays *int32 `json:"retentionDays,omitempty"` @@ -17995,6 +18723,8 @@ type ServerProperties struct { PrivateEndpointConnections *[]ServerPrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` // MinimalTLSVersion - Minimal TLS version. Allowed values: '1.0', '1.1', '1.2' MinimalTLSVersion *string `json:"minimalTlsVersion,omitempty"` + // PublicNetworkAccess - Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'ServerPublicNetworkAccessEnabled', 'ServerPublicNetworkAccessDisabled' + PublicNetworkAccess ServerPublicNetworkAccess `json:"publicNetworkAccess,omitempty"` } // ServersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running @@ -20282,6 +21012,8 @@ type SyncGroupProperties struct { SyncState SyncGroupState `json:"syncState,omitempty"` // Schema - Sync schema of the sync group. Schema *SyncGroupSchema `json:"schema,omitempty"` + // UsePrivateLinkConnection - If use private link connection is enabled. + UsePrivateLinkConnection *bool `json:"usePrivateLinkConnection,omitempty"` } // SyncGroupSchema properties of sync group schema. @@ -20641,6 +21373,10 @@ type SyncMemberProperties struct { SyncAgentID *string `json:"syncAgentId,omitempty"` // SQLServerDatabaseID - SQL Server database id of the sync member. SQLServerDatabaseID *uuid.UUID `json:"sqlServerDatabaseId,omitempty"` + // SyncMemberAzureDatabaseResourceID - ARM resource id of the sync member logical database, for sync members in Azure. + SyncMemberAzureDatabaseResourceID *string `json:"syncMemberAzureDatabaseResourceId,omitempty"` + // UsePrivateLinkConnection - Whether to use private link connection. + UsePrivateLinkConnection *bool `json:"usePrivateLinkConnection,omitempty"` // ServerName - Server name of the member database in the sync member ServerName *string `json:"serverName,omitempty"` // DatabaseName - Database name of the member database in the sync member. @@ -21078,6 +21814,12 @@ type TransparentDataEncryptionProperties struct { 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"` +} + // Usage ARM usage. type Usage struct { // ID - READ-ONLY; Resource ID. diff --git a/services/preview/sql/mgmt/v3.0/sql/operations.go b/services/preview/sql/mgmt/v3.0/sql/operations.go index 273be2b91611..aa4ebbea92da 100644 --- a/services/preview/sql/mgmt/v3.0/sql/operations.go +++ b/services/preview/sql/mgmt/v3.0/sql/operations.go @@ -103,7 +103,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/preview/sql/mgmt/v3.0/sql/privateendpointconnections.go b/services/preview/sql/mgmt/v3.0/sql/privateendpointconnections.go index 3f555874e251..343430e81b01 100644 --- a/services/preview/sql/mgmt/v3.0/sql/privateendpointconnections.go +++ b/services/preview/sql/mgmt/v3.0/sql/privateendpointconnections.go @@ -126,7 +126,6 @@ func (client PrivateEndpointConnectionsClient) CreateOrUpdateSender(req *http.Re func (client PrivateEndpointConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -204,7 +203,6 @@ func (client PrivateEndpointConnectionsClient) DeleteSender(req *http.Request) ( func (client PrivateEndpointConnectionsClient) 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 @@ -282,7 +280,6 @@ func (client PrivateEndpointConnectionsClient) GetSender(req *http.Request) (*ht func (client PrivateEndpointConnectionsClient) GetResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -360,7 +357,6 @@ func (client PrivateEndpointConnectionsClient) ListByServerSender(req *http.Requ func (client PrivateEndpointConnectionsClient) ListByServerResponder(resp *http.Response) (result PrivateEndpointConnectionListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/privatelinkresources.go b/services/preview/sql/mgmt/v3.0/sql/privatelinkresources.go index 3c6cca95e1d0..36577120fca4 100644 --- a/services/preview/sql/mgmt/v3.0/sql/privatelinkresources.go +++ b/services/preview/sql/mgmt/v3.0/sql/privatelinkresources.go @@ -115,7 +115,6 @@ func (client PrivateLinkResourcesClient) GetSender(req *http.Request) (*http.Res func (client PrivateLinkResourcesClient) GetResponder(resp *http.Response) (result PrivateLinkResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -193,7 +192,6 @@ func (client PrivateLinkResourcesClient) ListByServerSender(req *http.Request) ( func (client PrivateLinkResourcesClient) ListByServerResponder(resp *http.Response) (result PrivateLinkResourceListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/recommendedelasticpools.go b/services/preview/sql/mgmt/v3.0/sql/recommendedelasticpools.go index 2b760a8c2218..d53e3e5f998c 100644 --- a/services/preview/sql/mgmt/v3.0/sql/recommendedelasticpools.go +++ b/services/preview/sql/mgmt/v3.0/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/preview/sql/mgmt/v3.0/sql/recoverabledatabases.go b/services/preview/sql/mgmt/v3.0/sql/recoverabledatabases.go index 86922b509923..b0975e5b0da6 100644 --- a/services/preview/sql/mgmt/v3.0/sql/recoverabledatabases.go +++ b/services/preview/sql/mgmt/v3.0/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/preview/sql/mgmt/v3.0/sql/recoverablemanageddatabases.go b/services/preview/sql/mgmt/v3.0/sql/recoverablemanageddatabases.go index 79c46e48d4bf..c2868debfae5 100644 --- a/services/preview/sql/mgmt/v3.0/sql/recoverablemanageddatabases.go +++ b/services/preview/sql/mgmt/v3.0/sql/recoverablemanageddatabases.go @@ -114,7 +114,6 @@ func (client RecoverableManagedDatabasesClient) GetSender(req *http.Request) (*h func (client RecoverableManagedDatabasesClient) GetResponder(resp *http.Response) (result RecoverableManagedDatabase, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -192,7 +191,6 @@ func (client RecoverableManagedDatabasesClient) ListByInstanceSender(req *http.R func (client RecoverableManagedDatabasesClient) ListByInstanceResponder(resp *http.Response) (result RecoverableManagedDatabaseListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/replicationlinks.go b/services/preview/sql/mgmt/v3.0/sql/replicationlinks.go index 2e64c7f1a21d..e494bf72327a 100644 --- a/services/preview/sql/mgmt/v3.0/sql/replicationlinks.go +++ b/services/preview/sql/mgmt/v3.0/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/preview/sql/mgmt/v3.0/sql/restorabledroppeddatabases.go b/services/preview/sql/mgmt/v3.0/sql/restorabledroppeddatabases.go index 2dc9d5092bb2..8408a78330ec 100644 --- a/services/preview/sql/mgmt/v3.0/sql/restorabledroppeddatabases.go +++ b/services/preview/sql/mgmt/v3.0/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/preview/sql/mgmt/v3.0/sql/restorabledroppedmanageddatabases.go b/services/preview/sql/mgmt/v3.0/sql/restorabledroppedmanageddatabases.go index e4b9f4e806f0..c11ca1a44e0e 100644 --- a/services/preview/sql/mgmt/v3.0/sql/restorabledroppedmanageddatabases.go +++ b/services/preview/sql/mgmt/v3.0/sql/restorabledroppedmanageddatabases.go @@ -115,7 +115,6 @@ func (client RestorableDroppedManagedDatabasesClient) GetSender(req *http.Reques func (client RestorableDroppedManagedDatabasesClient) GetResponder(resp *http.Response) (result RestorableDroppedManagedDatabase, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -193,7 +192,6 @@ func (client RestorableDroppedManagedDatabasesClient) ListByInstanceSender(req * func (client RestorableDroppedManagedDatabasesClient) ListByInstanceResponder(resp *http.Response) (result RestorableDroppedManagedDatabaseListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/restorepoints.go b/services/preview/sql/mgmt/v3.0/sql/restorepoints.go index 00a0749c3d7d..b643a2f185ea 100644 --- a/services/preview/sql/mgmt/v3.0/sql/restorepoints.go +++ b/services/preview/sql/mgmt/v3.0/sql/restorepoints.go @@ -124,7 +124,6 @@ func (client RestorePointsClient) CreateSender(req *http.Request) (future Restor func (client RestorePointsClient) CreateResponder(resp *http.Response) (result RestorePoint, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -205,7 +204,6 @@ func (client RestorePointsClient) DeleteSender(req *http.Request) (*http.Respons func (client RestorePointsClient) 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 RestorePointsClient) GetSender(req *http.Request) (*http.Response, func (client RestorePointsClient) GetResponder(resp *http.Response) (result RestorePoint, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -364,7 +361,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/preview/sql/mgmt/v3.0/sql/sensitivitylabels.go b/services/preview/sql/mgmt/v3.0/sql/sensitivitylabels.go index 098b9b8fb2cb..94e113d8b3a6 100644 --- a/services/preview/sql/mgmt/v3.0/sql/sensitivitylabels.go +++ b/services/preview/sql/mgmt/v3.0/sql/sensitivitylabels.go @@ -125,7 +125,6 @@ func (client SensitivityLabelsClient) CreateOrUpdateSender(req *http.Request) (* func (client SensitivityLabelsClient) CreateOrUpdateResponder(resp *http.Response) (result SensitivityLabel, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -211,7 +210,6 @@ func (client SensitivityLabelsClient) DeleteSender(req *http.Request) (*http.Res func (client SensitivityLabelsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp @@ -296,7 +294,6 @@ func (client SensitivityLabelsClient) DisableRecommendationSender(req *http.Requ func (client SensitivityLabelsClient) DisableRecommendationResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp @@ -382,7 +379,6 @@ func (client SensitivityLabelsClient) EnableRecommendationSender(req *http.Reque func (client SensitivityLabelsClient) EnableRecommendationResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp @@ -468,7 +464,6 @@ func (client SensitivityLabelsClient) GetSender(req *http.Request) (*http.Respon func (client SensitivityLabelsClient) GetResponder(resp *http.Response) (result SensitivityLabel, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -552,7 +547,6 @@ func (client SensitivityLabelsClient) ListCurrentByDatabaseSender(req *http.Requ func (client SensitivityLabelsClient) ListCurrentByDatabaseResponder(resp *http.Response) (result SensitivityLabelListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -680,7 +674,6 @@ func (client SensitivityLabelsClient) ListRecommendedByDatabaseSender(req *http. func (client SensitivityLabelsClient) ListRecommendedByDatabaseResponder(resp *http.Response) (result SensitivityLabelListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/serverautomatictuning.go b/services/preview/sql/mgmt/v3.0/sql/serverautomatictuning.go index 25ed321a6d1f..5b4391b7d85a 100644 --- a/services/preview/sql/mgmt/v3.0/sql/serverautomatictuning.go +++ b/services/preview/sql/mgmt/v3.0/sql/serverautomatictuning.go @@ -113,7 +113,6 @@ func (client ServerAutomaticTuningClient) GetSender(req *http.Request) (*http.Re func (client ServerAutomaticTuningClient) GetResponder(resp *http.Response) (result ServerAutomaticTuning, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -193,7 +192,6 @@ func (client ServerAutomaticTuningClient) UpdateSender(req *http.Request) (*http func (client ServerAutomaticTuningClient) UpdateResponder(resp *http.Response) (result ServerAutomaticTuning, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/serverazureadadministrators.go b/services/preview/sql/mgmt/v3.0/sql/serverazureadadministrators.go index 3482a77999ce..386c83d7fc43 100644 --- a/services/preview/sql/mgmt/v3.0/sql/serverazureadadministrators.go +++ b/services/preview/sql/mgmt/v3.0/sql/serverazureadadministrators.go @@ -128,7 +128,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()) @@ -206,7 +205,6 @@ func (client ServerAzureADAdministratorsClient) DeleteSender(req *http.Request) func (client ServerAzureADAdministratorsClient) 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 @@ -282,7 +280,6 @@ func (client ServerAzureADAdministratorsClient) DisableAzureADOnlyAuthentication func (client ServerAzureADAdministratorsClient) DisableAzureADOnlyAuthenticationResponder(resp *http.Response) (result ServerAzureADAdministrator, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -360,7 +357,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()) @@ -438,7 +434,6 @@ func (client ServerAzureADAdministratorsClient) ListByServerSender(req *http.Req func (client ServerAzureADAdministratorsClient) ListByServerResponder(resp *http.Response) (result AdministratorListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/serverblobauditingpolicies.go b/services/preview/sql/mgmt/v3.0/sql/serverblobauditingpolicies.go index 12ca165a47aa..6a59dd8b03fb 100644 --- a/services/preview/sql/mgmt/v3.0/sql/serverblobauditingpolicies.go +++ b/services/preview/sql/mgmt/v3.0/sql/serverblobauditingpolicies.go @@ -117,7 +117,6 @@ func (client ServerBlobAuditingPoliciesClient) CreateOrUpdateSender(req *http.Re func (client ServerBlobAuditingPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ServerBlobAuditingPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -195,7 +194,6 @@ func (client ServerBlobAuditingPoliciesClient) GetSender(req *http.Request) (*ht func (client ServerBlobAuditingPoliciesClient) GetResponder(resp *http.Response) (result ServerBlobAuditingPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -273,7 +271,6 @@ func (client ServerBlobAuditingPoliciesClient) ListByServerSender(req *http.Requ func (client ServerBlobAuditingPoliciesClient) ListByServerResponder(resp *http.Response) (result ServerBlobAuditingPolicyListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/servercommunicationlinks.go b/services/preview/sql/mgmt/v3.0/sql/servercommunicationlinks.go index 30df09b8309f..0c5fce09ef4c 100644 --- a/services/preview/sql/mgmt/v3.0/sql/servercommunicationlinks.go +++ b/services/preview/sql/mgmt/v3.0/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/preview/sql/mgmt/v3.0/sql/serverconnectionpolicies.go b/services/preview/sql/mgmt/v3.0/sql/serverconnectionpolicies.go index 759b36815fff..21095382288f 100644 --- a/services/preview/sql/mgmt/v3.0/sql/serverconnectionpolicies.go +++ b/services/preview/sql/mgmt/v3.0/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/preview/sql/mgmt/v3.0/sql/serverdnsaliases.go b/services/preview/sql/mgmt/v3.0/sql/serverdnsaliases.go index 621e124bf9cf..5f44101a9b66 100644 --- a/services/preview/sql/mgmt/v3.0/sql/serverdnsaliases.go +++ b/services/preview/sql/mgmt/v3.0/sql/serverdnsaliases.go @@ -117,7 +117,6 @@ func (client ServerDNSAliasesClient) AcquireSender(req *http.Request) (future Se func (client ServerDNSAliasesClient) AcquireResponder(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 @@ -195,7 +194,6 @@ func (client ServerDNSAliasesClient) CreateOrUpdateSender(req *http.Request) (fu func (client ServerDNSAliasesClient) CreateOrUpdateResponder(resp *http.Response) (result ServerDNSAlias, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -274,7 +272,6 @@ func (client ServerDNSAliasesClient) DeleteSender(req *http.Request) (future Ser func (client ServerDNSAliasesClient) 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 @@ -352,7 +349,6 @@ func (client ServerDNSAliasesClient) GetSender(req *http.Request) (*http.Respons func (client ServerDNSAliasesClient) GetResponder(resp *http.Response) (result ServerDNSAlias, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -430,7 +426,6 @@ func (client ServerDNSAliasesClient) ListByServerSender(req *http.Request) (*htt func (client ServerDNSAliasesClient) ListByServerResponder(resp *http.Response) (result ServerDNSAliasListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/serverkeys.go b/services/preview/sql/mgmt/v3.0/sql/serverkeys.go index 2bbabd86b317..4266fbaf006a 100644 --- a/services/preview/sql/mgmt/v3.0/sql/serverkeys.go +++ b/services/preview/sql/mgmt/v3.0/sql/serverkeys.go @@ -121,7 +121,6 @@ func (client ServerKeysClient) CreateOrUpdateSender(req *http.Request) (future S func (client ServerKeysClient) CreateOrUpdateResponder(resp *http.Response) (result ServerKey, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -200,7 +199,6 @@ func (client ServerKeysClient) DeleteSender(req *http.Request) (future ServerKey func (client ServerKeysClient) 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 @@ -278,7 +276,6 @@ func (client ServerKeysClient) GetSender(req *http.Request) (*http.Response, err func (client ServerKeysClient) GetResponder(resp *http.Response) (result ServerKey, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -356,7 +353,6 @@ func (client ServerKeysClient) ListByServerSender(req *http.Request) (*http.Resp func (client ServerKeysClient) ListByServerResponder(resp *http.Response) (result ServerKeyListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/servers.go b/services/preview/sql/mgmt/v3.0/sql/servers.go index 798989e9d054..36f035b0f0ab 100644 --- a/services/preview/sql/mgmt/v3.0/sql/servers.go +++ b/services/preview/sql/mgmt/v3.0/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) (future Serv func (client ServersClient) CreateOrUpdateResponder(resp *http.Response) (result Server, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -276,7 +274,6 @@ func (client ServersClient) DeleteSender(req *http.Request) (future ServersDelet func (client ServersClient) 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 @@ -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()) @@ -424,7 +420,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()) @@ -537,7 +532,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()) @@ -654,7 +648,6 @@ func (client ServersClient) UpdateSender(req *http.Request) (future ServersUpdat func (client ServersClient) UpdateResponder(resp *http.Response) (result Server, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/serversecurityalertpolicies.go b/services/preview/sql/mgmt/v3.0/sql/serversecurityalertpolicies.go index a12e8968dc4f..190868d07963 100644 --- a/services/preview/sql/mgmt/v3.0/sql/serversecurityalertpolicies.go +++ b/services/preview/sql/mgmt/v3.0/sql/serversecurityalertpolicies.go @@ -117,7 +117,6 @@ func (client ServerSecurityAlertPoliciesClient) CreateOrUpdateSender(req *http.R func (client ServerSecurityAlertPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ServerSecurityAlertPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -195,7 +194,6 @@ func (client ServerSecurityAlertPoliciesClient) GetSender(req *http.Request) (*h func (client ServerSecurityAlertPoliciesClient) GetResponder(resp *http.Response) (result ServerSecurityAlertPolicy, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -273,7 +271,6 @@ func (client ServerSecurityAlertPoliciesClient) ListByServerSender(req *http.Req func (client ServerSecurityAlertPoliciesClient) ListByServerResponder(resp *http.Response) (result LogicalServerSecurityAlertPolicyListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/serverusages.go b/services/preview/sql/mgmt/v3.0/sql/serverusages.go index 910e9c77c733..b91950ee0677 100644 --- a/services/preview/sql/mgmt/v3.0/sql/serverusages.go +++ b/services/preview/sql/mgmt/v3.0/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/preview/sql/mgmt/v3.0/sql/servervulnerabilityassessments.go b/services/preview/sql/mgmt/v3.0/sql/servervulnerabilityassessments.go index a4a9c38b404c..a6ea28cd5bc1 100644 --- a/services/preview/sql/mgmt/v3.0/sql/servervulnerabilityassessments.go +++ b/services/preview/sql/mgmt/v3.0/sql/servervulnerabilityassessments.go @@ -125,7 +125,6 @@ func (client ServerVulnerabilityAssessmentsClient) CreateOrUpdateSender(req *htt func (client ServerVulnerabilityAssessmentsClient) CreateOrUpdateResponder(resp *http.Response) (result ServerVulnerabilityAssessment, 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 ServerVulnerabilityAssessmentsClient) DeleteSender(req *http.Reques func (client ServerVulnerabilityAssessmentsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp @@ -280,7 +278,6 @@ func (client ServerVulnerabilityAssessmentsClient) GetSender(req *http.Request) func (client ServerVulnerabilityAssessmentsClient) GetResponder(resp *http.Response) (result ServerVulnerabilityAssessment, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -358,7 +355,6 @@ func (client ServerVulnerabilityAssessmentsClient) ListByServerSender(req *http. func (client ServerVulnerabilityAssessmentsClient) ListByServerResponder(resp *http.Response) (result ServerVulnerabilityAssessmentListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/serviceobjectives.go b/services/preview/sql/mgmt/v3.0/sql/serviceobjectives.go index 73bf12ea6fd1..5b0d17d9ae87 100644 --- a/services/preview/sql/mgmt/v3.0/sql/serviceobjectives.go +++ b/services/preview/sql/mgmt/v3.0/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/preview/sql/mgmt/v3.0/sql/servicetieradvisors.go b/services/preview/sql/mgmt/v3.0/sql/servicetieradvisors.go index be905902a104..e21177193bb9 100644 --- a/services/preview/sql/mgmt/v3.0/sql/servicetieradvisors.go +++ b/services/preview/sql/mgmt/v3.0/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/preview/sql/mgmt/v3.0/sql/sqlapi/interfaces.go b/services/preview/sql/mgmt/v3.0/sql/sqlapi/interfaces.go index 37350848541c..75ad9a551f2f 100644 --- a/services/preview/sql/mgmt/v3.0/sql/sqlapi/interfaces.go +++ b/services/preview/sql/mgmt/v3.0/sql/sqlapi/interfaces.go @@ -147,6 +147,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) @@ -286,42 +287,6 @@ type SyncAgentsClientAPI interface { var _ SyncAgentsClientAPI = (*sql.SyncAgentsClient)(nil) -// SyncGroupsClientAPI contains the set of methods on the SyncGroupsClient type. -type SyncGroupsClientAPI interface { - CancelSync(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result autorest.Response, err error) - CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, parameters sql.SyncGroup) (result sql.SyncGroupsCreateOrUpdateFuture, err error) - Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncGroupsDeleteFuture, err error) - Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncGroup, err error) - ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.SyncGroupListResultPage, err error) - ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.SyncGroupListResultIterator, err error) - ListHubSchemas(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncFullSchemaPropertiesListResultPage, err error) - ListHubSchemasComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncFullSchemaPropertiesListResultIterator, err error) - ListLogs(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, startTime string, endTime string, typeParameter string, continuationToken string) (result sql.SyncGroupLogListResultPage, err error) - ListLogsComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, startTime string, endTime string, typeParameter string, continuationToken string) (result sql.SyncGroupLogListResultIterator, err error) - ListSyncDatabaseIds(ctx context.Context, locationName string) (result sql.SyncDatabaseIDListResultPage, err error) - ListSyncDatabaseIdsComplete(ctx context.Context, locationName string) (result sql.SyncDatabaseIDListResultIterator, err error) - RefreshHubSchema(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncGroupsRefreshHubSchemaFuture, err error) - TriggerSync(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result autorest.Response, err error) - Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, parameters sql.SyncGroup) (result sql.SyncGroupsUpdateFuture, err error) -} - -var _ SyncGroupsClientAPI = (*sql.SyncGroupsClient)(nil) - -// SyncMembersClientAPI contains the set of methods on the SyncMembersClient type. -type SyncMembersClientAPI interface { - CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, parameters sql.SyncMember) (result sql.SyncMembersCreateOrUpdateFuture, err error) - Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result sql.SyncMembersDeleteFuture, err error) - Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result sql.SyncMember, err error) - ListBySyncGroup(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncMemberListResultPage, err error) - ListBySyncGroupComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncMemberListResultIterator, err error) - ListMemberSchemas(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result sql.SyncFullSchemaPropertiesListResultPage, err error) - ListMemberSchemasComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result sql.SyncFullSchemaPropertiesListResultIterator, err error) - RefreshMemberSchema(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result sql.SyncMembersRefreshMemberSchemaFuture, err error) - Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, parameters sql.SyncMember) (result sql.SyncMembersUpdateFuture, err error) -} - -var _ SyncMembersClientAPI = (*sql.SyncMembersClient)(nil) - // SubscriptionUsagesClientAPI contains the set of methods on the SubscriptionUsagesClient type. type SubscriptionUsagesClientAPI interface { Get(ctx context.Context, locationName string, usageName string) (result sql.SubscriptionUsage, err error) @@ -359,6 +324,8 @@ var _ VirtualNetworkRulesClientAPI = (*sql.VirtualNetworkRulesClient)(nil) type ExtendedDatabaseBlobAuditingPoliciesClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters sql.ExtendedDatabaseBlobAuditingPolicy) (result sql.ExtendedDatabaseBlobAuditingPolicy, err error) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.ExtendedDatabaseBlobAuditingPolicy, err error) + ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.ExtendedDatabaseBlobAuditingPolicyListResultPage, err error) + ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.ExtendedDatabaseBlobAuditingPolicyListResultIterator, err error) } var _ ExtendedDatabaseBlobAuditingPoliciesClientAPI = (*sql.ExtendedDatabaseBlobAuditingPoliciesClient)(nil) @@ -367,6 +334,8 @@ var _ ExtendedDatabaseBlobAuditingPoliciesClientAPI = (*sql.ExtendedDatabaseBlob type ExtendedServerBlobAuditingPoliciesClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters sql.ExtendedServerBlobAuditingPolicy) (result sql.ExtendedServerBlobAuditingPoliciesCreateOrUpdateFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string) (result sql.ExtendedServerBlobAuditingPolicy, err error) + ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.ExtendedServerBlobAuditingPolicyListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.ExtendedServerBlobAuditingPolicyListResultIterator, err error) } var _ ExtendedServerBlobAuditingPoliciesClientAPI = (*sql.ExtendedServerBlobAuditingPoliciesClient)(nil) @@ -853,6 +822,7 @@ var _ UsagesClientAPI = (*sql.UsagesClient)(nil) type ManagedInstancesClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters sql.ManagedInstance) (result sql.ManagedInstancesCreateOrUpdateFuture, err error) Delete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstancesDeleteFuture, err error) + Failover(ctx context.Context, resourceGroupName string, managedInstanceName string, replicaType sql.ReplicaType) (result sql.ManagedInstancesFailoverFuture, err error) Get(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstance, err error) List(ctx context.Context) (result sql.ManagedInstanceListResultPage, err error) ListComplete(ctx context.Context) (result sql.ManagedInstanceListResultIterator, err error) @@ -961,6 +931,13 @@ type WorkloadClassifiersClientAPI interface { var _ WorkloadClassifiersClientAPI = (*sql.WorkloadClassifiersClient)(nil) +// ManagedDatabaseRestoreDetailsClientAPI contains the set of methods on the ManagedDatabaseRestoreDetailsClient type. +type ManagedDatabaseRestoreDetailsClientAPI interface { + Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result sql.ManagedDatabaseRestoreDetailsResult, err error) +} + +var _ ManagedDatabaseRestoreDetailsClientAPI = (*sql.ManagedDatabaseRestoreDetailsClient)(nil) + // ManagedDatabasesClientAPI contains the set of methods on the ManagedDatabasesClient type. type ManagedDatabasesClientAPI interface { CompleteRestore(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters sql.CompleteDatabaseRestoreDefinition) (result sql.ManagedDatabasesCompleteRestoreFuture, err error) @@ -987,3 +964,49 @@ type ServerAzureADAdministratorsClientAPI interface { } var _ ServerAzureADAdministratorsClientAPI = (*sql.ServerAzureADAdministratorsClient)(nil) + +// ManagedInstanceOperationsClientAPI contains the set of methods on the ManagedInstanceOperationsClient type. +type ManagedInstanceOperationsClientAPI interface { + Cancel(ctx context.Context, resourceGroupName string, managedInstanceName string, operationID uuid.UUID) (result autorest.Response, err error) + Get(ctx context.Context, resourceGroupName string, managedInstanceName string, operationID uuid.UUID) (result sql.ManagedInstanceOperation, err error) + ListByManagedInstance(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceOperationListResultPage, err error) + ListByManagedInstanceComplete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceOperationListResultIterator, err error) +} + +var _ ManagedInstanceOperationsClientAPI = (*sql.ManagedInstanceOperationsClient)(nil) + +// SyncGroupsClientAPI contains the set of methods on the SyncGroupsClient type. +type SyncGroupsClientAPI interface { + CancelSync(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result autorest.Response, err error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, parameters sql.SyncGroup) (result sql.SyncGroupsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncGroupsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncGroup, err error) + ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.SyncGroupListResultPage, err error) + ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.SyncGroupListResultIterator, err error) + ListHubSchemas(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncFullSchemaPropertiesListResultPage, err error) + ListHubSchemasComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncFullSchemaPropertiesListResultIterator, err error) + ListLogs(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, startTime string, endTime string, typeParameter string, continuationToken string) (result sql.SyncGroupLogListResultPage, err error) + ListLogsComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, startTime string, endTime string, typeParameter string, continuationToken string) (result sql.SyncGroupLogListResultIterator, err error) + ListSyncDatabaseIds(ctx context.Context, locationName string) (result sql.SyncDatabaseIDListResultPage, err error) + ListSyncDatabaseIdsComplete(ctx context.Context, locationName string) (result sql.SyncDatabaseIDListResultIterator, err error) + RefreshHubSchema(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncGroupsRefreshHubSchemaFuture, err error) + TriggerSync(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result autorest.Response, err error) + Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, parameters sql.SyncGroup) (result sql.SyncGroupsUpdateFuture, err error) +} + +var _ SyncGroupsClientAPI = (*sql.SyncGroupsClient)(nil) + +// SyncMembersClientAPI contains the set of methods on the SyncMembersClient type. +type SyncMembersClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, parameters sql.SyncMember) (result sql.SyncMembersCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result sql.SyncMembersDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result sql.SyncMember, err error) + ListBySyncGroup(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncMemberListResultPage, err error) + ListBySyncGroupComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncMemberListResultIterator, err error) + ListMemberSchemas(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result sql.SyncFullSchemaPropertiesListResultPage, err error) + ListMemberSchemasComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result sql.SyncFullSchemaPropertiesListResultIterator, err error) + RefreshMemberSchema(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result sql.SyncMembersRefreshMemberSchemaFuture, err error) + Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, parameters sql.SyncMember) (result sql.SyncMembersUpdateFuture, err error) +} + +var _ SyncMembersClientAPI = (*sql.SyncMembersClient)(nil) diff --git a/services/preview/sql/mgmt/v3.0/sql/subscriptionusages.go b/services/preview/sql/mgmt/v3.0/sql/subscriptionusages.go index 7778c83b8155..7aca8b4bb613 100644 --- a/services/preview/sql/mgmt/v3.0/sql/subscriptionusages.go +++ b/services/preview/sql/mgmt/v3.0/sql/subscriptionusages.go @@ -112,7 +112,6 @@ func (client SubscriptionUsagesClient) GetSender(req *http.Request) (*http.Respo func (client SubscriptionUsagesClient) GetResponder(resp *http.Response) (result SubscriptionUsage, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -187,7 +186,6 @@ func (client SubscriptionUsagesClient) ListByLocationSender(req *http.Request) ( func (client SubscriptionUsagesClient) ListByLocationResponder(resp *http.Response) (result SubscriptionUsageListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/syncagents.go b/services/preview/sql/mgmt/v3.0/sql/syncagents.go index bb50d6a47693..aca0c6091fba 100644 --- a/services/preview/sql/mgmt/v3.0/sql/syncagents.go +++ b/services/preview/sql/mgmt/v3.0/sql/syncagents.go @@ -117,7 +117,6 @@ func (client SyncAgentsClient) CreateOrUpdateSender(req *http.Request) (future S func (client SyncAgentsClient) CreateOrUpdateResponder(resp *http.Response) (result SyncAgent, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -196,7 +195,6 @@ func (client SyncAgentsClient) DeleteSender(req *http.Request) (future SyncAgent func (client SyncAgentsClient) 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 @@ -274,7 +272,6 @@ func (client SyncAgentsClient) GenerateKeySender(req *http.Request) (*http.Respo func (client SyncAgentsClient) GenerateKeyResponder(resp *http.Response) (result SyncAgentKeyProperties, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -353,7 +350,6 @@ func (client SyncAgentsClient) GetSender(req *http.Request) (*http.Response, err func (client SyncAgentsClient) GetResponder(resp *http.Response) (result SyncAgent, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -431,7 +427,6 @@ func (client SyncAgentsClient) ListByServerSender(req *http.Request) (*http.Resp func (client SyncAgentsClient) ListByServerResponder(resp *http.Response) (result SyncAgentListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -548,7 +543,6 @@ func (client SyncAgentsClient) ListLinkedDatabasesSender(req *http.Request) (*ht func (client SyncAgentsClient) ListLinkedDatabasesResponder(resp *http.Response) (result SyncAgentLinkedDatabaseListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/syncgroups.go b/services/preview/sql/mgmt/v3.0/sql/syncgroups.go index bd9c9ba699cf..c40081de3ecf 100644 --- a/services/preview/sql/mgmt/v3.0/sql/syncgroups.go +++ b/services/preview/sql/mgmt/v3.0/sql/syncgroups.go @@ -92,7 +92,7 @@ func (client SyncGroupsClient) CancelSyncPreparer(ctx context.Context, resourceG "syncGroupName": autorest.Encode("path", syncGroupName), } - const APIVersion = "2015-05-01-preview" + const APIVersion = "2019-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -116,7 +116,6 @@ func (client SyncGroupsClient) CancelSyncSender(req *http.Request) (*http.Respon func (client SyncGroupsClient) CancelSyncResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp @@ -167,7 +166,7 @@ func (client SyncGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resou "syncGroupName": autorest.Encode("path", syncGroupName), } - const APIVersion = "2015-05-01-preview" + const APIVersion = "2019-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -199,7 +198,6 @@ func (client SyncGroupsClient) CreateOrUpdateSender(req *http.Request) (future S func (client SyncGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result SyncGroup, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -250,7 +248,7 @@ func (client SyncGroupsClient) DeletePreparer(ctx context.Context, resourceGroup "syncGroupName": autorest.Encode("path", syncGroupName), } - const APIVersion = "2015-05-01-preview" + const APIVersion = "2019-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -280,7 +278,6 @@ func (client SyncGroupsClient) DeleteSender(req *http.Request) (future SyncGroup func (client SyncGroupsClient) 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 @@ -336,7 +333,7 @@ func (client SyncGroupsClient) GetPreparer(ctx context.Context, resourceGroupNam "syncGroupName": autorest.Encode("path", syncGroupName), } - const APIVersion = "2015-05-01-preview" + const APIVersion = "2019-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -360,7 +357,6 @@ func (client SyncGroupsClient) GetSender(req *http.Request) (*http.Response, err func (client SyncGroupsClient) GetResponder(resp *http.Response) (result SyncGroup, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -416,7 +412,7 @@ func (client SyncGroupsClient) ListByDatabasePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-05-01-preview" + const APIVersion = "2019-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -440,7 +436,6 @@ func (client SyncGroupsClient) ListByDatabaseSender(req *http.Request) (*http.Re func (client SyncGroupsClient) ListByDatabaseResponder(resp *http.Response) (result SyncGroupListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -535,7 +530,7 @@ func (client SyncGroupsClient) ListHubSchemasPreparer(ctx context.Context, resou "syncGroupName": autorest.Encode("path", syncGroupName), } - const APIVersion = "2015-05-01-preview" + const APIVersion = "2019-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -559,7 +554,6 @@ func (client SyncGroupsClient) ListHubSchemasSender(req *http.Request) (*http.Re func (client SyncGroupsClient) ListHubSchemasResponder(resp *http.Response) (result SyncFullSchemaPropertiesListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -658,7 +652,7 @@ func (client SyncGroupsClient) ListLogsPreparer(ctx context.Context, resourceGro "syncGroupName": autorest.Encode("path", syncGroupName), } - const APIVersion = "2015-05-01-preview" + const APIVersion = "2019-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, "endTime": autorest.Encode("query", endTime), @@ -688,7 +682,6 @@ func (client SyncGroupsClient) ListLogsSender(req *http.Request) (*http.Response func (client SyncGroupsClient) ListLogsResponder(resp *http.Response) (result SyncGroupLogListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -776,7 +769,7 @@ func (client SyncGroupsClient) ListSyncDatabaseIdsPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-05-01-preview" + const APIVersion = "2019-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -800,7 +793,6 @@ func (client SyncGroupsClient) ListSyncDatabaseIdsSender(req *http.Request) (*ht func (client SyncGroupsClient) ListSyncDatabaseIdsResponder(resp *http.Response) (result SyncDatabaseIDListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -888,7 +880,7 @@ func (client SyncGroupsClient) RefreshHubSchemaPreparer(ctx context.Context, res "syncGroupName": autorest.Encode("path", syncGroupName), } - const APIVersion = "2015-05-01-preview" + const APIVersion = "2019-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -918,7 +910,6 @@ func (client SyncGroupsClient) RefreshHubSchemaSender(req *http.Request) (future func (client SyncGroupsClient) RefreshHubSchemaResponder(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 @@ -974,7 +965,7 @@ func (client SyncGroupsClient) TriggerSyncPreparer(ctx context.Context, resource "syncGroupName": autorest.Encode("path", syncGroupName), } - const APIVersion = "2015-05-01-preview" + const APIVersion = "2019-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -998,7 +989,6 @@ func (client SyncGroupsClient) TriggerSyncSender(req *http.Request) (*http.Respo func (client SyncGroupsClient) TriggerSyncResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp @@ -1049,7 +1039,7 @@ func (client SyncGroupsClient) UpdatePreparer(ctx context.Context, resourceGroup "syncGroupName": autorest.Encode("path", syncGroupName), } - const APIVersion = "2015-05-01-preview" + const APIVersion = "2019-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1081,7 +1071,6 @@ func (client SyncGroupsClient) UpdateSender(req *http.Request) (future SyncGroup func (client SyncGroupsClient) UpdateResponder(resp *http.Response) (result SyncGroup, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/syncmembers.go b/services/preview/sql/mgmt/v3.0/sql/syncmembers.go index 78815b94ab31..5a5d547ab55b 100644 --- a/services/preview/sql/mgmt/v3.0/sql/syncmembers.go +++ b/services/preview/sql/mgmt/v3.0/sql/syncmembers.go @@ -89,7 +89,7 @@ func (client SyncMembersClient) CreateOrUpdatePreparer(ctx context.Context, reso "syncMemberName": autorest.Encode("path", syncMemberName), } - const APIVersion = "2015-05-01-preview" + const APIVersion = "2019-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -121,7 +121,6 @@ func (client SyncMembersClient) CreateOrUpdateSender(req *http.Request) (future func (client SyncMembersClient) CreateOrUpdateResponder(resp *http.Response) (result SyncMember, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -174,7 +173,7 @@ func (client SyncMembersClient) DeletePreparer(ctx context.Context, resourceGrou "syncMemberName": autorest.Encode("path", syncMemberName), } - const APIVersion = "2015-05-01-preview" + const APIVersion = "2019-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -204,7 +203,6 @@ func (client SyncMembersClient) DeleteSender(req *http.Request) (future SyncMemb func (client SyncMembersClient) 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 @@ -262,7 +260,7 @@ func (client SyncMembersClient) GetPreparer(ctx context.Context, resourceGroupNa "syncMemberName": autorest.Encode("path", syncMemberName), } - const APIVersion = "2015-05-01-preview" + const APIVersion = "2019-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -286,7 +284,6 @@ func (client SyncMembersClient) GetSender(req *http.Request) (*http.Response, er func (client SyncMembersClient) GetResponder(resp *http.Response) (result SyncMember, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -344,7 +341,7 @@ func (client SyncMembersClient) ListBySyncGroupPreparer(ctx context.Context, res "syncGroupName": autorest.Encode("path", syncGroupName), } - const APIVersion = "2015-05-01-preview" + const APIVersion = "2019-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -368,7 +365,6 @@ func (client SyncMembersClient) ListBySyncGroupSender(req *http.Request) (*http. func (client SyncMembersClient) ListBySyncGroupResponder(resp *http.Response) (result SyncMemberListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -465,7 +461,7 @@ func (client SyncMembersClient) ListMemberSchemasPreparer(ctx context.Context, r "syncMemberName": autorest.Encode("path", syncMemberName), } - const APIVersion = "2015-05-01-preview" + const APIVersion = "2019-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -489,7 +485,6 @@ func (client SyncMembersClient) ListMemberSchemasSender(req *http.Request) (*htt func (client SyncMembersClient) ListMemberSchemasResponder(resp *http.Response) (result SyncFullSchemaPropertiesListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -579,7 +574,7 @@ func (client SyncMembersClient) RefreshMemberSchemaPreparer(ctx context.Context, "syncMemberName": autorest.Encode("path", syncMemberName), } - const APIVersion = "2015-05-01-preview" + const APIVersion = "2019-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -609,7 +604,6 @@ func (client SyncMembersClient) RefreshMemberSchemaSender(req *http.Request) (fu func (client SyncMembersClient) RefreshMemberSchemaResponder(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 @@ -662,7 +656,7 @@ func (client SyncMembersClient) UpdatePreparer(ctx context.Context, resourceGrou "syncMemberName": autorest.Encode("path", syncMemberName), } - const APIVersion = "2015-05-01-preview" + const APIVersion = "2019-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -694,7 +688,6 @@ func (client SyncMembersClient) UpdateSender(req *http.Request) (future SyncMemb func (client SyncMembersClient) UpdateResponder(resp *http.Response) (result SyncMember, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/tdecertificates.go b/services/preview/sql/mgmt/v3.0/sql/tdecertificates.go index fc22aa9ef427..02bf245a35b5 100644 --- a/services/preview/sql/mgmt/v3.0/sql/tdecertificates.go +++ b/services/preview/sql/mgmt/v3.0/sql/tdecertificates.go @@ -123,7 +123,6 @@ func (client TdeCertificatesClient) CreateSender(req *http.Request) (future TdeC func (client TdeCertificatesClient) CreateResponder(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 diff --git a/services/preview/sql/mgmt/v3.0/sql/transparentdataencryptionactivities.go b/services/preview/sql/mgmt/v3.0/sql/transparentdataencryptionactivities.go index 0d6d552acbe9..3ddbfabd7144 100644 --- a/services/preview/sql/mgmt/v3.0/sql/transparentdataencryptionactivities.go +++ b/services/preview/sql/mgmt/v3.0/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/preview/sql/mgmt/v3.0/sql/transparentdataencryptions.go b/services/preview/sql/mgmt/v3.0/sql/transparentdataencryptions.go index 97462bdbf405..8b488f97380a 100644 --- a/services/preview/sql/mgmt/v3.0/sql/transparentdataencryptions.go +++ b/services/preview/sql/mgmt/v3.0/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/preview/sql/mgmt/v3.0/sql/usages.go b/services/preview/sql/mgmt/v3.0/sql/usages.go index 3d3f39be5e15..5a341c288a55 100644 --- a/services/preview/sql/mgmt/v3.0/sql/usages.go +++ b/services/preview/sql/mgmt/v3.0/sql/usages.go @@ -117,7 +117,6 @@ func (client UsagesClient) ListByInstancePoolSender(req *http.Request) (*http.Re func (client UsagesClient) ListByInstancePoolResponder(resp *http.Response) (result UsageListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/version.go b/services/preview/sql/mgmt/v3.0/sql/version.go index 61ab3b4372d6..08bce6ffa9a2 100644 --- a/services/preview/sql/mgmt/v3.0/sql/version.go +++ b/services/preview/sql/mgmt/v3.0/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/v3.0" + return "Azure-SDK-For-Go/" + Version() + " sql/v3.0" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/services/preview/sql/mgmt/v3.0/sql/virtualclusters.go b/services/preview/sql/mgmt/v3.0/sql/virtualclusters.go index 83c63c979e07..3f34d0bb7ec8 100644 --- a/services/preview/sql/mgmt/v3.0/sql/virtualclusters.go +++ b/services/preview/sql/mgmt/v3.0/sql/virtualclusters.go @@ -112,7 +112,6 @@ func (client VirtualClustersClient) DeleteSender(req *http.Request) (future Virt func (client VirtualClustersClient) 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 @@ -188,7 +187,6 @@ func (client VirtualClustersClient) GetSender(req *http.Request) (*http.Response func (client VirtualClustersClient) GetResponder(resp *http.Response) (result VirtualCluster, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -260,7 +258,6 @@ func (client VirtualClustersClient) ListSender(req *http.Request) (*http.Respons func (client VirtualClustersClient) ListResponder(resp *http.Response) (result VirtualClusterListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -373,7 +370,6 @@ func (client VirtualClustersClient) ListByResourceGroupSender(req *http.Request) func (client VirtualClustersClient) ListByResourceGroupResponder(resp *http.Response) (result VirtualClusterListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -490,7 +486,6 @@ func (client VirtualClustersClient) UpdateSender(req *http.Request) (future Virt func (client VirtualClustersClient) UpdateResponder(resp *http.Response) (result VirtualCluster, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/virtualnetworkrules.go b/services/preview/sql/mgmt/v3.0/sql/virtualnetworkrules.go index 4d1e82a0928e..626714d6d055 100644 --- a/services/preview/sql/mgmt/v3.0/sql/virtualnetworkrules.go +++ b/services/preview/sql/mgmt/v3.0/sql/virtualnetworkrules.go @@ -126,7 +126,6 @@ func (client VirtualNetworkRulesClient) CreateOrUpdateSender(req *http.Request) func (client VirtualNetworkRulesClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetworkRule, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -205,7 +204,6 @@ func (client VirtualNetworkRulesClient) DeleteSender(req *http.Request) (future func (client VirtualNetworkRulesClient) 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 @@ -283,7 +281,6 @@ func (client VirtualNetworkRulesClient) GetSender(req *http.Request) (*http.Resp func (client VirtualNetworkRulesClient) GetResponder(resp *http.Response) (result VirtualNetworkRule, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -361,7 +358,6 @@ func (client VirtualNetworkRulesClient) ListByServerSender(req *http.Request) (* func (client VirtualNetworkRulesClient) ListByServerResponder(resp *http.Response) (result VirtualNetworkRuleListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/workloadclassifiers.go b/services/preview/sql/mgmt/v3.0/sql/workloadclassifiers.go index 372c7204411b..43469ea15124 100644 --- a/services/preview/sql/mgmt/v3.0/sql/workloadclassifiers.go +++ b/services/preview/sql/mgmt/v3.0/sql/workloadclassifiers.go @@ -130,7 +130,6 @@ func (client WorkloadClassifiersClient) CreateOrUpdateSender(req *http.Request) func (client WorkloadClassifiersClient) CreateOrUpdateResponder(resp *http.Response) (result WorkloadClassifier, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -213,7 +212,6 @@ func (client WorkloadClassifiersClient) DeleteSender(req *http.Request) (future func (client WorkloadClassifiersClient) 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 @@ -295,7 +293,6 @@ func (client WorkloadClassifiersClient) GetSender(req *http.Request) (*http.Resp func (client WorkloadClassifiersClient) GetResponder(resp *http.Response) (result WorkloadClassifier, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -377,7 +374,6 @@ func (client WorkloadClassifiersClient) ListByWorkloadGroupSender(req *http.Requ func (client WorkloadClassifiersClient) ListByWorkloadGroupResponder(resp *http.Response) (result WorkloadClassifierListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/sql/mgmt/v3.0/sql/workloadgroups.go b/services/preview/sql/mgmt/v3.0/sql/workloadgroups.go index 8107618fba91..06c38b6a497e 100644 --- a/services/preview/sql/mgmt/v3.0/sql/workloadgroups.go +++ b/services/preview/sql/mgmt/v3.0/sql/workloadgroups.go @@ -130,7 +130,6 @@ func (client WorkloadGroupsClient) CreateOrUpdateSender(req *http.Request) (futu func (client WorkloadGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result WorkloadGroup, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -211,7 +210,6 @@ func (client WorkloadGroupsClient) DeleteSender(req *http.Request) (future Workl func (client WorkloadGroupsClient) 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 @@ -291,7 +289,6 @@ func (client WorkloadGroupsClient) GetSender(req *http.Request) (*http.Response, func (client WorkloadGroupsClient) GetResponder(resp *http.Response) (result WorkloadGroup, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -371,7 +368,6 @@ func (client WorkloadGroupsClient) ListByDatabaseSender(req *http.Request) (*htt func (client WorkloadGroupsClient) ListByDatabaseResponder(resp *http.Response) (result WorkloadGroupListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing())