diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/CHANGELOG.md b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/CHANGELOG.md index ff75fbd9cce8..3097eeb5641a 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/CHANGELOG.md +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/CHANGELOG.md @@ -1,5 +1,63 @@ # Release History +## 3.0.0 (2023-09-22) +### Breaking Changes + +- Function `*AzureVMWorkloadSAPHanaHSR.GetAzureVMWorkloadProtectableItem` has been removed +- Function `*AzureVMWorkloadSAPHanaHSR.GetWorkloadProtectableItem` has been removed +- Struct `AzureVMWorkloadSAPHanaHSR` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `AzureFileshareProtectedItem` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `AzureIaaSClassicComputeVMProtectedItem` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `AzureIaaSComputeVMProtectedItem` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `AzureIaaSVMProtectedItem` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `AzureSQLProtectedItem` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `AzureVMWorkloadProtectedItem` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `AzureVMWorkloadSAPHanaDBInstanceProtectedItem` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `AzureVMWorkloadSQLDatabaseProtectedItem` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `DPMProtectedItem` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `GenericProtectedItem` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `MabFileFolderProtectedItem` has been removed +- Field `ActionRequired` of struct `PrivateLinkServiceConnectionState` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `ProtectedItem` has been removed + +### Features Added + +- New value `SoftDeleteFeatureStateAlwaysON` added to enum type `SoftDeleteFeatureState` +- New enum type `VaultSubResourceType` with values `VaultSubResourceTypeAzureBackup`, `VaultSubResourceTypeAzureBackupSecondary`, `VaultSubResourceTypeAzureSiteRecovery` +- New function `*AzureVMWorkloadSAPHanaHSRProtectableItem.GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem` +- New function `*AzureVMWorkloadSAPHanaHSRProtectableItem.GetWorkloadProtectableItem() *WorkloadProtectableItem` +- New struct `AzureVMWorkloadSAPHanaHSRProtectableItem` +- New field `SoftDeleteRetentionPeriodInDays` in struct `AzureFileshareProtectedItem` +- New field `SoftDeleteRetentionPeriodInDays` in struct `AzureIaaSClassicComputeVMProtectedItem` +- New field `SoftDeleteRetentionPeriodInDays` in struct `AzureIaaSComputeVMProtectedItem` +- New field `SoftDeleteRetentionPeriodInDays` in struct `AzureIaaSVMProtectedItem` +- New field `SoftDeleteRetentionPeriodInDays` in struct `AzureSQLProtectedItem` +- New field `NodesList`, `SoftDeleteRetentionPeriodInDays` in struct `AzureVMWorkloadProtectedItem` +- New field `NodesList`, `SoftDeleteRetentionPeriodInDays` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` +- New field `IsProtectable` in struct `AzureVMWorkloadSAPAseSystemProtectableItem` +- New field `IsProtectable` in struct `AzureVMWorkloadSAPHanaDBInstance` +- New field `NodesList`, `SoftDeleteRetentionPeriodInDays` in struct `AzureVMWorkloadSAPHanaDBInstanceProtectedItem` +- New field `IsProtectable` in struct `AzureVMWorkloadSAPHanaDatabaseProtectableItem` +- New field `NodesList`, `SoftDeleteRetentionPeriodInDays` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` +- New field `IsProtectable` in struct `AzureVMWorkloadSAPHanaSystemProtectableItem` +- New field `IsProtectable`, `NodesList` in struct `AzureVMWorkloadSQLAvailabilityGroupProtectableItem` +- New field `IsProtectable` in struct `AzureVMWorkloadSQLDatabaseProtectableItem` +- New field `NodesList`, `SoftDeleteRetentionPeriodInDays` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` +- New field `IsProtectable` in struct `AzureVMWorkloadSQLInstanceProtectableItem` +- New field `SoftDeleteRetentionPeriodInDays` in struct `BackupResourceVaultConfig` +- New field `AcquireStorageAccountLock`, `ProtectedItemsCount` in struct `BackupStatusResponse` +- New field `SoftDeleteRetentionPeriodInDays` in struct `DPMProtectedItem` +- New field `SourceResourceID` in struct `DistributedNodesInfo` +- New field `SoftDeleteRetentionPeriodInDays` in struct `GenericProtectedItem` +- New field `ProtectableItemCount` in struct `InquiryValidation` +- New field `SoftDeleteRetentionPeriodInDays` in struct `MabFileFolderProtectedItem` +- New field `GroupIDs` in struct `PrivateEndpointConnection` +- New field `ActionsRequired` in struct `PrivateLinkServiceConnectionState` +- New field `SoftDeleteRetentionPeriodInDays` in struct `ProtectedItem` + + ## 2.1.1 (2023-04-14) ### Bug Fixes diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/autorest.md b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/autorest.md index f7132c608d26..502ab34eb58d 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/autorest.md +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/autorest.md @@ -5,8 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 2.1.1 +module-version: 3.0.0 +tag: package-2023-04 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupengines_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupengines_client.go index 82700d627dfa..0c8a1dd9756f 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupengines_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupengines_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -47,24 +46,27 @@ func NewBackupEnginesClient(subscriptionID string, credential azcore.TokenCreden // Get - Returns backup management server registered to Recovery Services Vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - backupEngineName - Name of the backup management server. // - options - BackupEnginesClientGetOptions contains the optional parameters for the BackupEnginesClient.Get method. func (client *BackupEnginesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, backupEngineName string, options *BackupEnginesClientGetOptions) (BackupEnginesClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, backupEngineName, options) if err != nil { return BackupEnginesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BackupEnginesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupEnginesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupEnginesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -91,7 +93,7 @@ func (client *BackupEnginesClient) getCreateRequest(ctx context.Context, vaultNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } @@ -114,7 +116,7 @@ func (client *BackupEnginesClient) getHandleResponse(resp *http.Response) (Backu // NewListPager - Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - options - BackupEnginesClientListOptions contains the optional parameters for the BackupEnginesClient.NewListPager method. @@ -166,7 +168,7 @@ func (client *BackupEnginesClient) listCreateRequest(ctx context.Context, vaultN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupengines_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupengines_client_example_test.go index 5062c08fccd8..028ea7214be5 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupengines_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupengines_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Dpm/BackupEngines_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/Dpm/BackupEngines_List.json func ExampleBackupEnginesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -91,7 +91,7 @@ func ExampleBackupEnginesClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Dpm/BackupEngines_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/Dpm/BackupEngines_Get.json func ExampleBackupEnginesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupjobs_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupjobs_client.go index d5daeda19973..e585f67ab062 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupjobs_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupjobs_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -46,7 +45,7 @@ func NewBackupJobsClient(subscriptionID string, credential azcore.TokenCredentia // NewListPager - Provides a pageable list of jobs. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - options - BackupJobsClientListOptions contains the optional parameters for the BackupJobsClient.NewListPager method. @@ -98,7 +97,7 @@ func (client *BackupJobsClient) listCreateRequest(ctx context.Context, vaultName return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupjobs_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupjobs_client_example_test.go index bb97b426716d..526573d949fc 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupjobs_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupjobs_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/ListJobs.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/Common/ListJobs.json func ExampleBackupJobsClient_NewListPager_listAllJobs() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -81,7 +81,7 @@ func ExampleBackupJobsClient_NewListPager_listAllJobs() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/ListJobsWithAllSupportedFilters.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/Common/ListJobsWithAllSupportedFilters.json func ExampleBackupJobsClient_NewListPager_listJobsWithFilters() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -127,7 +127,7 @@ func ExampleBackupJobsClient_NewListPager_listJobsWithFilters() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/ListJobsWithStartTimeAndEndTimeFilters.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/Common/ListJobsWithStartTimeAndEndTimeFilters.json func ExampleBackupJobsClient_NewListPager_listJobsWithTimeFilter() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupoperationresults_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupoperationresults_client.go index c603e57a6fb5..44dd77b23f1a 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupoperationresults_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupoperationresults_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -50,23 +49,25 @@ func NewBackupOperationResultsClient(subscriptionID string, credential azcore.To // argument. OperationID is part of the Location header of the operation response. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - operationID - OperationID which represents the operation. // - options - BackupOperationResultsClientGetOptions contains the optional parameters for the BackupOperationResultsClient.Get // method. func (client *BackupOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *BackupOperationResultsClientGetOptions) (BackupOperationResultsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, operationID, options) if err != nil { return BackupOperationResultsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BackupOperationResultsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return BackupOperationResultsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return BackupOperationResultsClientGetResponse{}, err } return BackupOperationResultsClientGetResponse{}, nil } @@ -95,7 +96,7 @@ func (client *BackupOperationResultsClient) getCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupoperationresults_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupoperationresults_client_example_test.go index d572f65e34a8..35d9ac5d0cea 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupoperationresults_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupoperationresults_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/ProtectedItem_Delete_OperationResult.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/Common/ProtectedItem_Delete_OperationResult.json func ExampleBackupOperationResultsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupoperationstatuses_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupoperationstatuses_client.go index 6eddd70a1170..d3b80161e0e8 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupoperationstatuses_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupoperationstatuses_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -49,25 +48,28 @@ func NewBackupOperationStatusesClient(subscriptionID string, credential azcore.T // operation. Some operations create jobs. This method returns the list of jobs when the operation is complete. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - operationID - OperationID which represents the operation. // - options - BackupOperationStatusesClientGetOptions contains the optional parameters for the BackupOperationStatusesClient.Get // method. func (client *BackupOperationStatusesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *BackupOperationStatusesClientGetOptions) (BackupOperationStatusesClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, operationID, options) if err != nil { return BackupOperationStatusesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BackupOperationStatusesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupOperationStatusesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupOperationStatusesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -94,7 +96,7 @@ func (client *BackupOperationStatusesClient) getCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupoperationstatuses_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupoperationstatuses_client_example_test.go index 53506ba3381b..d2636b0a2b9d 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupoperationstatuses_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupoperationstatuses_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/ProtectedItem_Delete_OperationStatus.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/Common/ProtectedItem_Delete_OperationStatus.json func ExampleBackupOperationStatusesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backuppolicies_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backuppolicies_client.go index 2f7f9b9de9f2..59c503ebf1a3 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backuppolicies_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backuppolicies_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -47,7 +46,7 @@ func NewBackupPoliciesClient(subscriptionID string, credential azcore.TokenCrede // NewListPager - Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to // fetch scoped results. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - options - BackupPoliciesClientListOptions contains the optional parameters for the BackupPoliciesClient.NewListPager method. @@ -99,7 +98,7 @@ func (client *BackupPoliciesClient) listCreateRequest(ctx context.Context, vault return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backuppolicies_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backuppolicies_client_example_test.go index 08146f71f6c3..4a9feb5c7ebd 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backuppolicies_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backuppolicies_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/BackupPolicies_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/BackupPolicies_List.json func ExampleBackupPoliciesClient_NewListPager_listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVm() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -101,7 +101,7 @@ func ExampleBackupPoliciesClient_NewListPager_listProtectionPoliciesWithBackupMa } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/V2Policy/v2-List-Policies.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/V2Policy/v2-List-Policies.json func ExampleBackupPoliciesClient_NewListPager_listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVmWithBothV1AndV2Policies() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -213,7 +213,7 @@ func ExampleBackupPoliciesClient_NewListPager_listProtectionPoliciesWithBackupMa } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureWorkload/BackupPolicies_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureWorkload/BackupPolicies_List.json func ExampleBackupPoliciesClient_NewListPager_listProtectionPoliciesWithBackupManagementTypeFilterAsAzureWorkload() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotectableitems_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotectableitems_client.go index 9ca5feb286b8..62509d40e59d 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotectableitems_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotectableitems_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -47,7 +46,7 @@ func NewBackupProtectableItemsClient(subscriptionID string, credential azcore.To // NewListPager - Provides a pageable list of protectable objects within your subscription according to the query filter and // the pagination parameters. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - options - BackupProtectableItemsClientListOptions contains the optional parameters for the BackupProtectableItemsClient.NewListPager @@ -100,7 +99,7 @@ func (client *BackupProtectableItemsClient) listCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotectableitems_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotectableitems_client_example_test.go index 84c552ee4a13..2ef8889c1821 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotectableitems_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotectableitems_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/BackupProtectableItems_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/BackupProtectableItems_List.json func ExampleBackupProtectableItemsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotecteditems_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotecteditems_client.go index 1bcbf7abb934..00f266307852 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotecteditems_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotecteditems_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -46,7 +45,7 @@ func NewBackupProtectedItemsClient(subscriptionID string, credential azcore.Toke // NewListPager - Provides a pageable list of all items that are backed up within a vault. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - options - BackupProtectedItemsClientListOptions contains the optional parameters for the BackupProtectedItemsClient.NewListPager @@ -99,7 +98,7 @@ func (client *BackupProtectedItemsClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotecteditems_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotecteditems_client_example_test.go index 7e44268d588d..91a6f2339d24 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotecteditems_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotecteditems_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/BackupProtectedItems_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/BackupProtectedItems_List.json func ExampleBackupProtectedItemsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotectioncontainers_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotectioncontainers_client.go index 9f09975fac93..f61f4c1444a5 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotectioncontainers_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotectioncontainers_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -46,7 +45,7 @@ func NewBackupProtectionContainersClient(subscriptionID string, credential azcor // NewListPager - Lists the containers registered to Recovery Services Vault. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - options - BackupProtectionContainersClientListOptions contains the optional parameters for the BackupProtectionContainersClient.NewListPager @@ -99,7 +98,7 @@ func (client *BackupProtectionContainersClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotectioncontainers_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotectioncontainers_client_example_test.go index 4dc7299abd7d..3a73f541ca14 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotectioncontainers_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotectioncontainers_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureStorage/ProtectionContainers_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureStorage/ProtectionContainers_List.json func ExampleBackupProtectionContainersClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotectionintent_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotectionintent_client.go index bd99d7c82dbb..4391ed383fea 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotectionintent_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotectionintent_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -46,7 +45,7 @@ func NewBackupProtectionIntentClient(subscriptionID string, credential azcore.To // NewListPager - Provides a pageable list of all intents that are present within a vault. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - options - BackupProtectionIntentClientListOptions contains the optional parameters for the BackupProtectionIntentClient.NewListPager @@ -99,7 +98,7 @@ func (client *BackupProtectionIntentClient) listCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotectionintent_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotectionintent_client_example_test.go index f3c4639e3564..09b5ce3594eb 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotectionintent_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupprotectionintent_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureWorkload/BackupProtectionIntent_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureWorkload/BackupProtectionIntent_List.json func ExampleBackupProtectionIntentClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupresourceencryptionconfigs_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupresourceencryptionconfigs_client.go index 35ea4f770bcb..493d2b9e234d 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupresourceencryptionconfigs_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupresourceencryptionconfigs_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -47,24 +46,27 @@ func NewBackupResourceEncryptionConfigsClient(subscriptionID string, credential // Get - Fetches Vault Encryption config. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - options - BackupResourceEncryptionConfigsClientGetOptions contains the optional parameters for the BackupResourceEncryptionConfigsClient.Get // method. func (client *BackupResourceEncryptionConfigsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, options *BackupResourceEncryptionConfigsClientGetOptions) (BackupResourceEncryptionConfigsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, options) if err != nil { return BackupResourceEncryptionConfigsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BackupResourceEncryptionConfigsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupResourceEncryptionConfigsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupResourceEncryptionConfigsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -87,7 +89,7 @@ func (client *BackupResourceEncryptionConfigsClient) getCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -105,23 +107,25 @@ func (client *BackupResourceEncryptionConfigsClient) getHandleResponse(resp *htt // Update - Updates Vault encryption config. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - parameters - Vault encryption input config request // - options - BackupResourceEncryptionConfigsClientUpdateOptions contains the optional parameters for the BackupResourceEncryptionConfigsClient.Update // method. func (client *BackupResourceEncryptionConfigsClient) Update(ctx context.Context, vaultName string, resourceGroupName string, parameters BackupResourceEncryptionConfigResource, options *BackupResourceEncryptionConfigsClientUpdateOptions) (BackupResourceEncryptionConfigsClientUpdateResponse, error) { + var err error req, err := client.updateCreateRequest(ctx, vaultName, resourceGroupName, parameters, options) if err != nil { return BackupResourceEncryptionConfigsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BackupResourceEncryptionConfigsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupResourceEncryptionConfigsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupResourceEncryptionConfigsClientUpdateResponse{}, err } return BackupResourceEncryptionConfigsClientUpdateResponse{}, nil } @@ -146,8 +150,11 @@ func (client *BackupResourceEncryptionConfigsClient) updateCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupresourceencryptionconfigs_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupresourceencryptionconfigs_client_example_test.go index 1512ff07695c..7755edb93d43 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupresourceencryptionconfigs_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupresourceencryptionconfigs_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/BackupResourceEncryptionConfig_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/BackupResourceEncryptionConfig_Get.json func ExampleBackupResourceEncryptionConfigsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -52,7 +52,7 @@ func ExampleBackupResourceEncryptionConfigsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/BackupResourceEncryptionConfig_Put.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/BackupResourceEncryptionConfig_Put.json func ExampleBackupResourceEncryptionConfigsClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupresourcestorageconfigsnoncrr_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupresourcestorageconfigsnoncrr_client.go index 0446ee425bb6..7b9062985982 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupresourcestorageconfigsnoncrr_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupresourcestorageconfigsnoncrr_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -47,24 +46,27 @@ func NewBackupResourceStorageConfigsNonCRRClient(subscriptionID string, credenti // Get - Fetches resource storage config. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - options - BackupResourceStorageConfigsNonCRRClientGetOptions contains the optional parameters for the BackupResourceStorageConfigsNonCRRClient.Get // method. func (client *BackupResourceStorageConfigsNonCRRClient) Get(ctx context.Context, vaultName string, resourceGroupName string, options *BackupResourceStorageConfigsNonCRRClientGetOptions) (BackupResourceStorageConfigsNonCRRClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, options) if err != nil { return BackupResourceStorageConfigsNonCRRClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BackupResourceStorageConfigsNonCRRClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupResourceStorageConfigsNonCRRClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupResourceStorageConfigsNonCRRClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -87,7 +89,7 @@ func (client *BackupResourceStorageConfigsNonCRRClient) getCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -105,23 +107,25 @@ func (client *BackupResourceStorageConfigsNonCRRClient) getHandleResponse(resp * // Patch - Updates vault storage model type. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - parameters - Vault storage config request // - options - BackupResourceStorageConfigsNonCRRClientPatchOptions contains the optional parameters for the BackupResourceStorageConfigsNonCRRClient.Patch // method. func (client *BackupResourceStorageConfigsNonCRRClient) Patch(ctx context.Context, vaultName string, resourceGroupName string, parameters BackupResourceConfigResource, options *BackupResourceStorageConfigsNonCRRClientPatchOptions) (BackupResourceStorageConfigsNonCRRClientPatchResponse, error) { + var err error req, err := client.patchCreateRequest(ctx, vaultName, resourceGroupName, parameters, options) if err != nil { return BackupResourceStorageConfigsNonCRRClientPatchResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BackupResourceStorageConfigsNonCRRClientPatchResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return BackupResourceStorageConfigsNonCRRClientPatchResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return BackupResourceStorageConfigsNonCRRClientPatchResponse{}, err } return BackupResourceStorageConfigsNonCRRClientPatchResponse{}, nil } @@ -146,34 +150,40 @@ func (client *BackupResourceStorageConfigsNonCRRClient) patchCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // Update - Updates vault storage model type. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - parameters - Vault storage config request // - options - BackupResourceStorageConfigsNonCRRClientUpdateOptions contains the optional parameters for the BackupResourceStorageConfigsNonCRRClient.Update // method. func (client *BackupResourceStorageConfigsNonCRRClient) Update(ctx context.Context, vaultName string, resourceGroupName string, parameters BackupResourceConfigResource, options *BackupResourceStorageConfigsNonCRRClientUpdateOptions) (BackupResourceStorageConfigsNonCRRClientUpdateResponse, error) { + var err error req, err := client.updateCreateRequest(ctx, vaultName, resourceGroupName, parameters, options) if err != nil { return BackupResourceStorageConfigsNonCRRClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BackupResourceStorageConfigsNonCRRClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupResourceStorageConfigsNonCRRClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupResourceStorageConfigsNonCRRClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -196,10 +206,13 @@ func (client *BackupResourceStorageConfigsNonCRRClient) updateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupresourcestorageconfigsnoncrr_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupresourcestorageconfigsnoncrr_client_example_test.go index 286c4e86b830..cca1e6633e7c 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupresourcestorageconfigsnoncrr_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupresourcestorageconfigsnoncrr_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/BackupStorageConfig_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/Common/BackupStorageConfig_Get.json func ExampleBackupResourceStorageConfigsNonCRRClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -48,7 +48,7 @@ func ExampleBackupResourceStorageConfigsNonCRRClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/BackupStorageConfig_Put.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/Common/BackupStorageConfig_Put.json func ExampleBackupResourceStorageConfigsNonCRRClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -83,7 +83,7 @@ func ExampleBackupResourceStorageConfigsNonCRRClient_Update() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/BackupStorageConfig_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/Common/BackupStorageConfig_Patch.json func ExampleBackupResourceStorageConfigsNonCRRClient_Patch() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupresourcevaultconfigs_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupresourcevaultconfigs_client.go index 7f3b95249b4e..c87d4401c843 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupresourcevaultconfigs_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupresourcevaultconfigs_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -47,24 +46,27 @@ func NewBackupResourceVaultConfigsClient(subscriptionID string, credential azcor // Get - Fetches resource vault config. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - options - BackupResourceVaultConfigsClientGetOptions contains the optional parameters for the BackupResourceVaultConfigsClient.Get // method. func (client *BackupResourceVaultConfigsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, options *BackupResourceVaultConfigsClientGetOptions) (BackupResourceVaultConfigsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, options) if err != nil { return BackupResourceVaultConfigsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BackupResourceVaultConfigsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupResourceVaultConfigsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupResourceVaultConfigsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -87,7 +89,7 @@ func (client *BackupResourceVaultConfigsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -105,25 +107,28 @@ func (client *BackupResourceVaultConfigsClient) getHandleResponse(resp *http.Res // Put - Updates vault security config. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - parameters - resource config request // - options - BackupResourceVaultConfigsClientPutOptions contains the optional parameters for the BackupResourceVaultConfigsClient.Put // method. func (client *BackupResourceVaultConfigsClient) Put(ctx context.Context, vaultName string, resourceGroupName string, parameters BackupResourceVaultConfigResource, options *BackupResourceVaultConfigsClientPutOptions) (BackupResourceVaultConfigsClientPutResponse, error) { + var err error req, err := client.putCreateRequest(ctx, vaultName, resourceGroupName, parameters, options) if err != nil { return BackupResourceVaultConfigsClientPutResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BackupResourceVaultConfigsClientPutResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupResourceVaultConfigsClientPutResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupResourceVaultConfigsClientPutResponse{}, err } - return client.putHandleResponse(resp) + resp, err := client.putHandleResponse(httpResp) + return resp, err } // putCreateRequest creates the Put request. @@ -146,10 +151,13 @@ func (client *BackupResourceVaultConfigsClient) putCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // putHandleResponse handles the Put response. @@ -164,25 +172,28 @@ func (client *BackupResourceVaultConfigsClient) putHandleResponse(resp *http.Res // Update - Updates vault security config. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - parameters - resource config request // - options - BackupResourceVaultConfigsClientUpdateOptions contains the optional parameters for the BackupResourceVaultConfigsClient.Update // method. func (client *BackupResourceVaultConfigsClient) Update(ctx context.Context, vaultName string, resourceGroupName string, parameters BackupResourceVaultConfigResource, options *BackupResourceVaultConfigsClientUpdateOptions) (BackupResourceVaultConfigsClientUpdateResponse, error) { + var err error req, err := client.updateCreateRequest(ctx, vaultName, resourceGroupName, parameters, options) if err != nil { return BackupResourceVaultConfigsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BackupResourceVaultConfigsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupResourceVaultConfigsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupResourceVaultConfigsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -205,10 +216,13 @@ func (client *BackupResourceVaultConfigsClient) updateCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupresourcevaultconfigs_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupresourcevaultconfigs_client_example_test.go index 0f0f3fe96e69..55be78349012 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupresourcevaultconfigs_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupresourcevaultconfigs_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/BackupResourceVaultConfigs_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/Common/BackupResourceVaultConfigs_Get.json func ExampleBackupResourceVaultConfigsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -46,7 +46,7 @@ func ExampleBackupResourceVaultConfigsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/BackupResourceVaultConfigs_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/Common/BackupResourceVaultConfigs_Patch.json func ExampleBackupResourceVaultConfigsClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -78,7 +78,7 @@ func ExampleBackupResourceVaultConfigsClient_Update() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/BackupResourceVaultConfigs_Put.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/Common/BackupResourceVaultConfigs_Put.json func ExampleBackupResourceVaultConfigsClient_Put() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backups_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backups_client.go index c8076a200476..52023cf3eff1 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backups_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backups_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -48,7 +47,7 @@ func NewBackupsClient(subscriptionID string, credential azcore.TokenCredential, // call GetProtectedItemOperationResult API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - fabricName - Fabric name associated with the backup item. @@ -57,16 +56,18 @@ func NewBackupsClient(subscriptionID string, credential azcore.TokenCredential, // - parameters - resource backup request // - options - BackupsClientTriggerOptions contains the optional parameters for the BackupsClient.Trigger method. func (client *BackupsClient) Trigger(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters BackupRequestResource, options *BackupsClientTriggerOptions) (BackupsClientTriggerResponse, error) { + var err error req, err := client.triggerCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters, options) if err != nil { return BackupsClientTriggerResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BackupsClientTriggerResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return BackupsClientTriggerResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return BackupsClientTriggerResponse{}, err } return BackupsClientTriggerResponse{}, nil } @@ -103,8 +104,11 @@ func (client *BackupsClient) triggerCreateRequest(ctx context.Context, vaultName return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backups_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backups_client_example_test.go index 610ce5e7be92..0fce987b6183 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backups_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backups_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/TriggerBackup_Post.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/Common/TriggerBackup_Post.json func ExampleBackupsClient_Trigger() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupstatus_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupstatus_client.go index 6479546c4f5d..8f4910105c66 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupstatus_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupstatus_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -47,23 +46,26 @@ func NewBackupStatusClient(subscriptionID string, credential azcore.TokenCredent // Get - Get the container backup status // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - azureRegion - Azure region to hit Api // - parameters - Container Backup Status Request // - options - BackupStatusClientGetOptions contains the optional parameters for the BackupStatusClient.Get method. func (client *BackupStatusClient) Get(ctx context.Context, azureRegion string, parameters BackupStatusRequest, options *BackupStatusClientGetOptions) (BackupStatusClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, azureRegion, parameters, options) if err != nil { return BackupStatusClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BackupStatusClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupStatusClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupStatusClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -82,10 +84,13 @@ func (client *BackupStatusClient) getCreateRequest(ctx context.Context, azureReg return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // getHandleResponse handles the Get response. diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupstatus_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupstatus_client_example_test.go index db46285a1e81..1d9848e04189 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupstatus_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupstatus_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/GetBackupStatus.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/GetBackupStatus.json func ExampleBackupStatusClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupusagesummaries_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupusagesummaries_client.go index 401380c3e824..66b19cee9be9 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupusagesummaries_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupusagesummaries_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -46,7 +45,7 @@ func NewBackupUsageSummariesClient(subscriptionID string, credential azcore.Toke // NewListPager - Fetches the backup management usage summaries of the vault. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - options - BackupUsageSummariesClientListOptions contains the optional parameters for the BackupUsageSummariesClient.NewListPager @@ -93,7 +92,7 @@ func (client *BackupUsageSummariesClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupusagesummaries_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupusagesummaries_client_example_test.go index 114615d7ba37..3e3454e90fcd 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupusagesummaries_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupusagesummaries_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/BackupProtectionContainers_UsageSummary_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/Common/BackupProtectionContainers_UsageSummary_Get.json func ExampleBackupUsageSummariesClient_NewListPager_getProtectedContainersUsagesSummary() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -75,7 +75,7 @@ func ExampleBackupUsageSummariesClient_NewListPager_getProtectedContainersUsages } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/BackupProtectedItem_UsageSummary_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/Common/BackupProtectedItem_UsageSummary_Get.json func ExampleBackupUsageSummariesClient_NewListPager_getProtectedItemsUsagesSummary() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupworkloaditems_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupworkloaditems_client.go index 190329494fc9..c1b3e5e231df 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupworkloaditems_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupworkloaditems_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -47,7 +46,7 @@ func NewBackupWorkloadItemsClient(subscriptionID string, credential azcore.Token // NewListPager - Provides a pageable list of workload item of a specific container according to the query filter and the // pagination parameters. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - fabricName - Fabric name associated with the container. @@ -110,7 +109,7 @@ func (client *BackupWorkloadItemsClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupworkloaditems_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupworkloaditems_client_example_test.go index 0823451f0605..97a740ef8359 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupworkloaditems_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupworkloaditems_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureWorkload/BackupWorkloadItems_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureWorkload/BackupWorkloadItems_List.json func ExampleBackupWorkloadItemsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/bmspreparedatamoveoperationresult_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/bmspreparedatamoveoperationresult_client.go index 9bf1eecf41e5..2f77f47a8f82 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/bmspreparedatamoveoperationresult_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/bmspreparedatamoveoperationresult_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -47,24 +46,27 @@ func NewBMSPrepareDataMoveOperationResultClient(subscriptionID string, credentia // Get - Fetches Operation Result for Prepare Data Move // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - options - BMSPrepareDataMoveOperationResultClientGetOptions contains the optional parameters for the BMSPrepareDataMoveOperationResultClient.Get // method. func (client *BMSPrepareDataMoveOperationResultClient) Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *BMSPrepareDataMoveOperationResultClientGetOptions) (BMSPrepareDataMoveOperationResultClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, operationID, options) if err != nil { return BMSPrepareDataMoveOperationResultClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BMSPrepareDataMoveOperationResultClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return BMSPrepareDataMoveOperationResultClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return BMSPrepareDataMoveOperationResultClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -91,7 +93,7 @@ func (client *BMSPrepareDataMoveOperationResultClient) getCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/bmspreparedatamoveoperationresult_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/bmspreparedatamoveoperationresult_client_example_test.go index 76defb7dfd0e..2fc27343c3aa 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/bmspreparedatamoveoperationresult_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/bmspreparedatamoveoperationresult_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/BackupDataMove/PrepareDataMoveOperationResult_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/BackupDataMove/PrepareDataMoveOperationResult_Get.json func ExampleBMSPrepareDataMoveOperationResultClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/client.go index c78d9851fc07..92583911d07d 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -47,7 +46,7 @@ func NewClient(subscriptionID string, credential azcore.TokenCredential, options // BeginBMSPrepareDataMove - Prepares source vault for Data Move operation // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - parameters - Prepare data move request @@ -59,7 +58,8 @@ func (client *Client) BeginBMSPrepareDataMove(ctx context.Context, vaultName str if err != nil { return nil, err } - return runtime.NewPoller[ClientBMSPrepareDataMoveResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[ClientBMSPrepareDataMoveResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[ClientBMSPrepareDataMoveResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -68,20 +68,22 @@ func (client *Client) BeginBMSPrepareDataMove(ctx context.Context, vaultName str // BMSPrepareDataMove - Prepares source vault for Data Move operation // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 func (client *Client) bMSPrepareDataMove(ctx context.Context, vaultName string, resourceGroupName string, parameters PrepareDataMoveRequest, options *ClientBeginBMSPrepareDataMoveOptions) (*http.Response, error) { + var err error req, err := client.bmsPrepareDataMoveCreateRequest(ctx, vaultName, resourceGroupName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // bmsPrepareDataMoveCreateRequest creates the BMSPrepareDataMove request. @@ -104,16 +106,19 @@ func (client *Client) bmsPrepareDataMoveCreateRequest(ctx context.Context, vault return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginBMSTriggerDataMove - Triggers Data Move Operation on target vault // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - parameters - Trigger data move request @@ -125,7 +130,8 @@ func (client *Client) BeginBMSTriggerDataMove(ctx context.Context, vaultName str if err != nil { return nil, err } - return runtime.NewPoller[ClientBMSTriggerDataMoveResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[ClientBMSTriggerDataMoveResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[ClientBMSTriggerDataMoveResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -134,20 +140,22 @@ func (client *Client) BeginBMSTriggerDataMove(ctx context.Context, vaultName str // BMSTriggerDataMove - Triggers Data Move Operation on target vault // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 func (client *Client) bMSTriggerDataMove(ctx context.Context, vaultName string, resourceGroupName string, parameters TriggerDataMoveRequest, options *ClientBeginBMSTriggerDataMoveOptions) (*http.Response, error) { + var err error req, err := client.bmsTriggerDataMoveCreateRequest(ctx, vaultName, resourceGroupName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // bmsTriggerDataMoveCreateRequest creates the BMSTriggerDataMove request. @@ -170,32 +178,38 @@ func (client *Client) bmsTriggerDataMoveCreateRequest(ctx context.Context, vault return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // GetOperationStatus - Fetches operation status for data move operation on vault // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - options - ClientGetOperationStatusOptions contains the optional parameters for the Client.GetOperationStatus method. func (client *Client) GetOperationStatus(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *ClientGetOperationStatusOptions) (ClientGetOperationStatusResponse, error) { + var err error req, err := client.getOperationStatusCreateRequest(ctx, vaultName, resourceGroupName, operationID, options) if err != nil { return ClientGetOperationStatusResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ClientGetOperationStatusResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClientGetOperationStatusResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClientGetOperationStatusResponse{}, err } - return client.getOperationStatusHandleResponse(resp) + resp, err := client.getOperationStatusHandleResponse(httpResp) + return resp, err } // getOperationStatusCreateRequest creates the GetOperationStatus request. @@ -222,7 +236,7 @@ func (client *Client) getOperationStatusCreateRequest(ctx context.Context, vault return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -240,7 +254,7 @@ func (client *Client) getOperationStatusHandleResponse(resp *http.Response) (Cli // BeginMoveRecoveryPoint - Move recovery point from one datastore to another store. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - parameters - Move Resource Across Tiers Request @@ -251,7 +265,8 @@ func (client *Client) BeginMoveRecoveryPoint(ctx context.Context, vaultName stri if err != nil { return nil, err } - return runtime.NewPoller[ClientMoveRecoveryPointResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[ClientMoveRecoveryPointResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[ClientMoveRecoveryPointResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -260,20 +275,22 @@ func (client *Client) BeginMoveRecoveryPoint(ctx context.Context, vaultName stri // MoveRecoveryPoint - Move recovery point from one datastore to another store. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 func (client *Client) moveRecoveryPoint(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters MoveRPAcrossTiersRequest, options *ClientBeginMoveRecoveryPointOptions) (*http.Response, error) { + var err error req, err := client.moveRecoveryPointCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // moveRecoveryPointCreateRequest creates the MoveRecoveryPoint request. @@ -312,8 +329,11 @@ func (client *Client) moveRecoveryPointCreateRequest(ctx context.Context, vaultN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/client_example_test.go index 81c13b2b1543..b6f59d30adc0 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/BackupDataMove/BackupDataMoveOperationStatus_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/BackupDataMove/BackupDataMoveOperationStatus_Get.json func ExampleClient_GetOperationStatus() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -45,7 +45,7 @@ func ExampleClient_GetOperationStatus() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/BackupDataMove/PrepareDataMove_Post.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/BackupDataMove/PrepareDataMove_Post.json func ExampleClient_BeginBMSPrepareDataMove() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -70,7 +70,7 @@ func ExampleClient_BeginBMSPrepareDataMove() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/BackupDataMove/TriggerDataMove_Post.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/BackupDataMove/TriggerDataMove_Post.json func ExampleClient_BeginBMSTriggerDataMove() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -96,7 +96,7 @@ func ExampleClient_BeginBMSTriggerDataMove() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/TriggerRecoveryPointMove_Post.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/TriggerRecoveryPointMove_Post.json func ExampleClient_BeginMoveRecoveryPoint() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/client_factory.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/client_factory.go index 7f0209119b75..b512bb78380b 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/client_factory.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/client_factory.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -38,113 +37,113 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } -func (c *ClientFactory) NewBackupResourceStorageConfigsNonCRRClient() *BackupResourceStorageConfigsNonCRRClient { - subClient, _ := NewBackupResourceStorageConfigsNonCRRClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewBMSPrepareDataMoveOperationResultClient() *BMSPrepareDataMoveOperationResultClient { + subClient, _ := NewBMSPrepareDataMoveOperationResultClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewProtectionIntentClient() *ProtectionIntentClient { - subClient, _ := NewProtectionIntentClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewBackupEnginesClient() *BackupEnginesClient { + subClient, _ := NewBackupEnginesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewBackupStatusClient() *BackupStatusClient { - subClient, _ := NewBackupStatusClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewBackupJobsClient() *BackupJobsClient { + subClient, _ := NewBackupJobsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewFeatureSupportClient() *FeatureSupportClient { - subClient, _ := NewFeatureSupportClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewBackupOperationResultsClient() *BackupOperationResultsClient { + subClient, _ := NewBackupOperationResultsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewBackupProtectionIntentClient() *BackupProtectionIntentClient { - subClient, _ := NewBackupProtectionIntentClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewBackupOperationStatusesClient() *BackupOperationStatusesClient { + subClient, _ := NewBackupOperationStatusesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewBackupUsageSummariesClient() *BackupUsageSummariesClient { - subClient, _ := NewBackupUsageSummariesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewBackupPoliciesClient() *BackupPoliciesClient { + subClient, _ := NewBackupPoliciesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) +func (c *ClientFactory) NewBackupProtectableItemsClient() *BackupProtectableItemsClient { + subClient, _ := NewBackupProtectableItemsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewBackupResourceVaultConfigsClient() *BackupResourceVaultConfigsClient { - subClient, _ := NewBackupResourceVaultConfigsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewBackupProtectedItemsClient() *BackupProtectedItemsClient { + subClient, _ := NewBackupProtectedItemsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewBackupResourceEncryptionConfigsClient() *BackupResourceEncryptionConfigsClient { - subClient, _ := NewBackupResourceEncryptionConfigsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewBackupProtectionContainersClient() *BackupProtectionContainersClient { + subClient, _ := NewBackupProtectionContainersClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewPrivateEndpointConnectionClient() *PrivateEndpointConnectionClient { - subClient, _ := NewPrivateEndpointConnectionClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewBackupProtectionIntentClient() *BackupProtectionIntentClient { + subClient, _ := NewBackupProtectionIntentClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewPrivateEndpointClient() *PrivateEndpointClient { - subClient, _ := NewPrivateEndpointClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewBackupResourceEncryptionConfigsClient() *BackupResourceEncryptionConfigsClient { + subClient, _ := NewBackupResourceEncryptionConfigsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewClient() *Client { - subClient, _ := NewClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewBackupResourceStorageConfigsNonCRRClient() *BackupResourceStorageConfigsNonCRRClient { + subClient, _ := NewBackupResourceStorageConfigsNonCRRClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewBMSPrepareDataMoveOperationResultClient() *BMSPrepareDataMoveOperationResultClient { - subClient, _ := NewBMSPrepareDataMoveOperationResultClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewBackupResourceVaultConfigsClient() *BackupResourceVaultConfigsClient { + subClient, _ := NewBackupResourceVaultConfigsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewProtectedItemsClient() *ProtectedItemsClient { - subClient, _ := NewProtectedItemsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewBackupStatusClient() *BackupStatusClient { + subClient, _ := NewBackupStatusClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewProtectedItemOperationResultsClient() *ProtectedItemOperationResultsClient { - subClient, _ := NewProtectedItemOperationResultsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewBackupUsageSummariesClient() *BackupUsageSummariesClient { + subClient, _ := NewBackupUsageSummariesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewRecoveryPointsClient() *RecoveryPointsClient { - subClient, _ := NewRecoveryPointsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewBackupWorkloadItemsClient() *BackupWorkloadItemsClient { + subClient, _ := NewBackupWorkloadItemsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewRestoresClient() *RestoresClient { - subClient, _ := NewRestoresClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewBackupsClient() *BackupsClient { + subClient, _ := NewBackupsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewBackupPoliciesClient() *BackupPoliciesClient { - subClient, _ := NewBackupPoliciesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewClient() *Client { + subClient, _ := NewClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewProtectionPoliciesClient() *ProtectionPoliciesClient { - subClient, _ := NewProtectionPoliciesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewDeletedProtectionContainersClient() *DeletedProtectionContainersClient { + subClient, _ := NewDeletedProtectionContainersClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewProtectionPolicyOperationResultsClient() *ProtectionPolicyOperationResultsClient { - subClient, _ := NewProtectionPolicyOperationResultsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewExportJobsOperationResultsClient() *ExportJobsOperationResultsClient { + subClient, _ := NewExportJobsOperationResultsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewBackupJobsClient() *BackupJobsClient { - subClient, _ := NewBackupJobsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewFeatureSupportClient() *FeatureSupportClient { + subClient, _ := NewFeatureSupportClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewJobDetailsClient() *JobDetailsClient { - subClient, _ := NewJobDetailsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewItemLevelRecoveryConnectionsClient() *ItemLevelRecoveryConnectionsClient { + subClient, _ := NewItemLevelRecoveryConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -153,13 +152,13 @@ func (c *ClientFactory) NewJobCancellationsClient() *JobCancellationsClient { return subClient } -func (c *ClientFactory) NewJobOperationResultsClient() *JobOperationResultsClient { - subClient, _ := NewJobOperationResultsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewJobDetailsClient() *JobDetailsClient { + subClient, _ := NewJobDetailsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewExportJobsOperationResultsClient() *ExportJobsOperationResultsClient { - subClient, _ := NewExportJobsOperationResultsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewJobOperationResultsClient() *JobOperationResultsClient { + subClient, _ := NewJobOperationResultsClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -168,53 +167,43 @@ func (c *ClientFactory) NewJobsClient() *JobsClient { return subClient } -func (c *ClientFactory) NewBackupProtectedItemsClient() *BackupProtectedItemsClient { - subClient, _ := NewBackupProtectedItemsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - func (c *ClientFactory) NewOperationClient() *OperationClient { subClient, _ := NewOperationClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewValidateOperationClient() *ValidateOperationClient { - subClient, _ := NewValidateOperationClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewValidateOperationResultsClient() *ValidateOperationResultsClient { - subClient, _ := NewValidateOperationResultsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + subClient, _ := NewOperationsClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewValidateOperationStatusesClient() *ValidateOperationStatusesClient { - subClient, _ := NewValidateOperationStatusesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewPrivateEndpointClient() *PrivateEndpointClient { + subClient, _ := NewPrivateEndpointClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewBackupEnginesClient() *BackupEnginesClient { - subClient, _ := NewBackupEnginesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewPrivateEndpointConnectionClient() *PrivateEndpointConnectionClient { + subClient, _ := NewPrivateEndpointConnectionClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewProtectionContainerRefreshOperationResultsClient() *ProtectionContainerRefreshOperationResultsClient { - subClient, _ := NewProtectionContainerRefreshOperationResultsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewProtectableContainersClient() *ProtectableContainersClient { + subClient, _ := NewProtectableContainersClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewProtectableContainersClient() *ProtectableContainersClient { - subClient, _ := NewProtectableContainersClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewProtectedItemOperationResultsClient() *ProtectedItemOperationResultsClient { + subClient, _ := NewProtectedItemOperationResultsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewProtectionContainersClient() *ProtectionContainersClient { - subClient, _ := NewProtectionContainersClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewProtectedItemOperationStatusesClient() *ProtectedItemOperationStatusesClient { + subClient, _ := NewProtectedItemOperationStatusesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewBackupWorkloadItemsClient() *BackupWorkloadItemsClient { - subClient, _ := NewBackupWorkloadItemsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewProtectedItemsClient() *ProtectedItemsClient { + subClient, _ := NewProtectedItemsClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -223,28 +212,28 @@ func (c *ClientFactory) NewProtectionContainerOperationResultsClient() *Protecti return subClient } -func (c *ClientFactory) NewBackupsClient() *BackupsClient { - subClient, _ := NewBackupsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewProtectionContainerRefreshOperationResultsClient() *ProtectionContainerRefreshOperationResultsClient { + subClient, _ := NewProtectionContainerRefreshOperationResultsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewProtectedItemOperationStatusesClient() *ProtectedItemOperationStatusesClient { - subClient, _ := NewProtectedItemOperationStatusesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewProtectionContainersClient() *ProtectionContainersClient { + subClient, _ := NewProtectionContainersClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewItemLevelRecoveryConnectionsClient() *ItemLevelRecoveryConnectionsClient { - subClient, _ := NewItemLevelRecoveryConnectionsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewProtectionIntentClient() *ProtectionIntentClient { + subClient, _ := NewProtectionIntentClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewBackupOperationResultsClient() *BackupOperationResultsClient { - subClient, _ := NewBackupOperationResultsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewProtectionPoliciesClient() *ProtectionPoliciesClient { + subClient, _ := NewProtectionPoliciesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewBackupOperationStatusesClient() *BackupOperationStatusesClient { - subClient, _ := NewBackupOperationStatusesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewProtectionPolicyOperationResultsClient() *ProtectionPolicyOperationResultsClient { + subClient, _ := NewProtectionPolicyOperationResultsClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -253,18 +242,28 @@ func (c *ClientFactory) NewProtectionPolicyOperationStatusesClient() *Protection return subClient } -func (c *ClientFactory) NewBackupProtectableItemsClient() *BackupProtectableItemsClient { - subClient, _ := NewBackupProtectableItemsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewRecoveryPointsClient() *RecoveryPointsClient { + subClient, _ := NewRecoveryPointsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewBackupProtectionContainersClient() *BackupProtectionContainersClient { - subClient, _ := NewBackupProtectionContainersClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewRecoveryPointsRecommendedForMoveClient() *RecoveryPointsRecommendedForMoveClient { + subClient, _ := NewRecoveryPointsRecommendedForMoveClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewDeletedProtectionContainersClient() *DeletedProtectionContainersClient { - subClient, _ := NewDeletedProtectionContainersClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewResourceGuardProxiesClient() *ResourceGuardProxiesClient { + subClient, _ := NewResourceGuardProxiesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewResourceGuardProxyClient() *ResourceGuardProxyClient { + subClient, _ := NewResourceGuardProxyClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewRestoresClient() *RestoresClient { + subClient, _ := NewRestoresClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -273,17 +272,17 @@ func (c *ClientFactory) NewSecurityPINsClient() *SecurityPINsClient { return subClient } -func (c *ClientFactory) NewRecoveryPointsRecommendedForMoveClient() *RecoveryPointsRecommendedForMoveClient { - subClient, _ := NewRecoveryPointsRecommendedForMoveClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewValidateOperationClient() *ValidateOperationClient { + subClient, _ := NewValidateOperationClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewResourceGuardProxiesClient() *ResourceGuardProxiesClient { - subClient, _ := NewResourceGuardProxiesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewValidateOperationResultsClient() *ValidateOperationResultsClient { + subClient, _ := NewValidateOperationResultsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewResourceGuardProxyClient() *ResourceGuardProxyClient { - subClient, _ := NewResourceGuardProxyClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewValidateOperationStatusesClient() *ValidateOperationStatusesClient { + subClient, _ := NewValidateOperationStatusesClient(c.subscriptionID, c.credential, c.options) return subClient } diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/constants.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/constants.go index 5ca554b2517e..80cc6c379a71 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/constants.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/constants.go @@ -3,15 +3,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup const ( moduleName = "armrecoveryservicesbackup" - moduleVersion = "v2.1.1" + moduleVersion = "v3.0.0" ) // AcquireStorageAccountLock - Whether storage account lock is to be acquired for this container or not. @@ -317,25 +316,25 @@ func PossibleDataSourceTypeValues() []DataSourceType { type DayOfWeek string const ( - DayOfWeekSunday DayOfWeek = "Sunday" + DayOfWeekFriday DayOfWeek = "Friday" DayOfWeekMonday DayOfWeek = "Monday" + DayOfWeekSaturday DayOfWeek = "Saturday" + DayOfWeekSunday DayOfWeek = "Sunday" + DayOfWeekThursday DayOfWeek = "Thursday" DayOfWeekTuesday DayOfWeek = "Tuesday" DayOfWeekWednesday DayOfWeek = "Wednesday" - DayOfWeekThursday DayOfWeek = "Thursday" - DayOfWeekFriday DayOfWeek = "Friday" - DayOfWeekSaturday DayOfWeek = "Saturday" ) // PossibleDayOfWeekValues returns the possible values for the DayOfWeek const type. func PossibleDayOfWeekValues() []DayOfWeek { return []DayOfWeek{ - DayOfWeekSunday, + DayOfWeekFriday, DayOfWeekMonday, + DayOfWeekSaturday, + DayOfWeekSunday, + DayOfWeekThursday, DayOfWeekTuesday, DayOfWeekWednesday, - DayOfWeekThursday, - DayOfWeekFriday, - DayOfWeekSaturday, } } @@ -413,105 +412,105 @@ func PossibleFabricNameValues() []FabricName { type HTTPStatusCode string const ( - HTTPStatusCodeContinue HTTPStatusCode = "Continue" - HTTPStatusCodeSwitchingProtocols HTTPStatusCode = "SwitchingProtocols" - HTTPStatusCodeOK HTTPStatusCode = "OK" - HTTPStatusCodeCreated HTTPStatusCode = "Created" HTTPStatusCodeAccepted HTTPStatusCode = "Accepted" - HTTPStatusCodeNonAuthoritativeInformation HTTPStatusCode = "NonAuthoritativeInformation" - HTTPStatusCodeNoContent HTTPStatusCode = "NoContent" - HTTPStatusCodeResetContent HTTPStatusCode = "ResetContent" - HTTPStatusCodePartialContent HTTPStatusCode = "PartialContent" - HTTPStatusCodeMultipleChoices HTTPStatusCode = "MultipleChoices" HTTPStatusCodeAmbiguous HTTPStatusCode = "Ambiguous" - HTTPStatusCodeMovedPermanently HTTPStatusCode = "MovedPermanently" - HTTPStatusCodeMoved HTTPStatusCode = "Moved" - HTTPStatusCodeFound HTTPStatusCode = "Found" - HTTPStatusCodeRedirect HTTPStatusCode = "Redirect" - HTTPStatusCodeSeeOther HTTPStatusCode = "SeeOther" - HTTPStatusCodeRedirectMethod HTTPStatusCode = "RedirectMethod" - HTTPStatusCodeNotModified HTTPStatusCode = "NotModified" - HTTPStatusCodeUseProxy HTTPStatusCode = "UseProxy" - HTTPStatusCodeUnused HTTPStatusCode = "Unused" - HTTPStatusCodeTemporaryRedirect HTTPStatusCode = "TemporaryRedirect" - HTTPStatusCodeRedirectKeepVerb HTTPStatusCode = "RedirectKeepVerb" + HTTPStatusCodeBadGateway HTTPStatusCode = "BadGateway" HTTPStatusCodeBadRequest HTTPStatusCode = "BadRequest" - HTTPStatusCodeUnauthorized HTTPStatusCode = "Unauthorized" - HTTPStatusCodePaymentRequired HTTPStatusCode = "PaymentRequired" - HTTPStatusCodeForbidden HTTPStatusCode = "Forbidden" - HTTPStatusCodeNotFound HTTPStatusCode = "NotFound" - HTTPStatusCodeMethodNotAllowed HTTPStatusCode = "MethodNotAllowed" - HTTPStatusCodeNotAcceptable HTTPStatusCode = "NotAcceptable" - HTTPStatusCodeProxyAuthenticationRequired HTTPStatusCode = "ProxyAuthenticationRequired" - HTTPStatusCodeRequestTimeout HTTPStatusCode = "RequestTimeout" HTTPStatusCodeConflict HTTPStatusCode = "Conflict" + HTTPStatusCodeContinue HTTPStatusCode = "Continue" + HTTPStatusCodeCreated HTTPStatusCode = "Created" + HTTPStatusCodeExpectationFailed HTTPStatusCode = "ExpectationFailed" + HTTPStatusCodeForbidden HTTPStatusCode = "Forbidden" + HTTPStatusCodeFound HTTPStatusCode = "Found" + HTTPStatusCodeGatewayTimeout HTTPStatusCode = "GatewayTimeout" HTTPStatusCodeGone HTTPStatusCode = "Gone" + HTTPStatusCodeHTTPVersionNotSupported HTTPStatusCode = "HttpVersionNotSupported" + HTTPStatusCodeInternalServerError HTTPStatusCode = "InternalServerError" HTTPStatusCodeLengthRequired HTTPStatusCode = "LengthRequired" + HTTPStatusCodeMethodNotAllowed HTTPStatusCode = "MethodNotAllowed" + HTTPStatusCodeMoved HTTPStatusCode = "Moved" + HTTPStatusCodeMovedPermanently HTTPStatusCode = "MovedPermanently" + HTTPStatusCodeMultipleChoices HTTPStatusCode = "MultipleChoices" + HTTPStatusCodeNoContent HTTPStatusCode = "NoContent" + HTTPStatusCodeNonAuthoritativeInformation HTTPStatusCode = "NonAuthoritativeInformation" + HTTPStatusCodeNotAcceptable HTTPStatusCode = "NotAcceptable" + HTTPStatusCodeNotFound HTTPStatusCode = "NotFound" + HTTPStatusCodeNotImplemented HTTPStatusCode = "NotImplemented" + HTTPStatusCodeNotModified HTTPStatusCode = "NotModified" + HTTPStatusCodeOK HTTPStatusCode = "OK" + HTTPStatusCodePartialContent HTTPStatusCode = "PartialContent" + HTTPStatusCodePaymentRequired HTTPStatusCode = "PaymentRequired" HTTPStatusCodePreconditionFailed HTTPStatusCode = "PreconditionFailed" + HTTPStatusCodeProxyAuthenticationRequired HTTPStatusCode = "ProxyAuthenticationRequired" + HTTPStatusCodeRedirect HTTPStatusCode = "Redirect" + HTTPStatusCodeRedirectKeepVerb HTTPStatusCode = "RedirectKeepVerb" + HTTPStatusCodeRedirectMethod HTTPStatusCode = "RedirectMethod" HTTPStatusCodeRequestEntityTooLarge HTTPStatusCode = "RequestEntityTooLarge" + HTTPStatusCodeRequestTimeout HTTPStatusCode = "RequestTimeout" HTTPStatusCodeRequestURITooLong HTTPStatusCode = "RequestUriTooLong" - HTTPStatusCodeUnsupportedMediaType HTTPStatusCode = "UnsupportedMediaType" HTTPStatusCodeRequestedRangeNotSatisfiable HTTPStatusCode = "RequestedRangeNotSatisfiable" - HTTPStatusCodeExpectationFailed HTTPStatusCode = "ExpectationFailed" - HTTPStatusCodeUpgradeRequired HTTPStatusCode = "UpgradeRequired" - HTTPStatusCodeInternalServerError HTTPStatusCode = "InternalServerError" - HTTPStatusCodeNotImplemented HTTPStatusCode = "NotImplemented" - HTTPStatusCodeBadGateway HTTPStatusCode = "BadGateway" + HTTPStatusCodeResetContent HTTPStatusCode = "ResetContent" + HTTPStatusCodeSeeOther HTTPStatusCode = "SeeOther" HTTPStatusCodeServiceUnavailable HTTPStatusCode = "ServiceUnavailable" - HTTPStatusCodeGatewayTimeout HTTPStatusCode = "GatewayTimeout" - HTTPStatusCodeHTTPVersionNotSupported HTTPStatusCode = "HttpVersionNotSupported" + HTTPStatusCodeSwitchingProtocols HTTPStatusCode = "SwitchingProtocols" + HTTPStatusCodeTemporaryRedirect HTTPStatusCode = "TemporaryRedirect" + HTTPStatusCodeUnauthorized HTTPStatusCode = "Unauthorized" + HTTPStatusCodeUnsupportedMediaType HTTPStatusCode = "UnsupportedMediaType" + HTTPStatusCodeUnused HTTPStatusCode = "Unused" + HTTPStatusCodeUpgradeRequired HTTPStatusCode = "UpgradeRequired" + HTTPStatusCodeUseProxy HTTPStatusCode = "UseProxy" ) // PossibleHTTPStatusCodeValues returns the possible values for the HTTPStatusCode const type. func PossibleHTTPStatusCodeValues() []HTTPStatusCode { return []HTTPStatusCode{ - HTTPStatusCodeContinue, - HTTPStatusCodeSwitchingProtocols, - HTTPStatusCodeOK, - HTTPStatusCodeCreated, HTTPStatusCodeAccepted, - HTTPStatusCodeNonAuthoritativeInformation, - HTTPStatusCodeNoContent, - HTTPStatusCodeResetContent, - HTTPStatusCodePartialContent, - HTTPStatusCodeMultipleChoices, HTTPStatusCodeAmbiguous, - HTTPStatusCodeMovedPermanently, - HTTPStatusCodeMoved, - HTTPStatusCodeFound, - HTTPStatusCodeRedirect, - HTTPStatusCodeSeeOther, - HTTPStatusCodeRedirectMethod, - HTTPStatusCodeNotModified, - HTTPStatusCodeUseProxy, - HTTPStatusCodeUnused, - HTTPStatusCodeTemporaryRedirect, - HTTPStatusCodeRedirectKeepVerb, + HTTPStatusCodeBadGateway, HTTPStatusCodeBadRequest, - HTTPStatusCodeUnauthorized, - HTTPStatusCodePaymentRequired, - HTTPStatusCodeForbidden, - HTTPStatusCodeNotFound, - HTTPStatusCodeMethodNotAllowed, - HTTPStatusCodeNotAcceptable, - HTTPStatusCodeProxyAuthenticationRequired, - HTTPStatusCodeRequestTimeout, HTTPStatusCodeConflict, + HTTPStatusCodeContinue, + HTTPStatusCodeCreated, + HTTPStatusCodeExpectationFailed, + HTTPStatusCodeForbidden, + HTTPStatusCodeFound, + HTTPStatusCodeGatewayTimeout, HTTPStatusCodeGone, + HTTPStatusCodeHTTPVersionNotSupported, + HTTPStatusCodeInternalServerError, HTTPStatusCodeLengthRequired, + HTTPStatusCodeMethodNotAllowed, + HTTPStatusCodeMoved, + HTTPStatusCodeMovedPermanently, + HTTPStatusCodeMultipleChoices, + HTTPStatusCodeNoContent, + HTTPStatusCodeNonAuthoritativeInformation, + HTTPStatusCodeNotAcceptable, + HTTPStatusCodeNotFound, + HTTPStatusCodeNotImplemented, + HTTPStatusCodeNotModified, + HTTPStatusCodeOK, + HTTPStatusCodePartialContent, + HTTPStatusCodePaymentRequired, HTTPStatusCodePreconditionFailed, + HTTPStatusCodeProxyAuthenticationRequired, + HTTPStatusCodeRedirect, + HTTPStatusCodeRedirectKeepVerb, + HTTPStatusCodeRedirectMethod, HTTPStatusCodeRequestEntityTooLarge, + HTTPStatusCodeRequestTimeout, HTTPStatusCodeRequestURITooLong, - HTTPStatusCodeUnsupportedMediaType, HTTPStatusCodeRequestedRangeNotSatisfiable, - HTTPStatusCodeExpectationFailed, - HTTPStatusCodeUpgradeRequired, - HTTPStatusCodeInternalServerError, - HTTPStatusCodeNotImplemented, - HTTPStatusCodeBadGateway, + HTTPStatusCodeResetContent, + HTTPStatusCodeSeeOther, HTTPStatusCodeServiceUnavailable, - HTTPStatusCodeGatewayTimeout, - HTTPStatusCodeHTTPVersionNotSupported, + HTTPStatusCodeSwitchingProtocols, + HTTPStatusCodeTemporaryRedirect, + HTTPStatusCodeUnauthorized, + HTTPStatusCodeUnsupportedMediaType, + HTTPStatusCodeUnused, + HTTPStatusCodeUpgradeRequired, + HTTPStatusCodeUseProxy, } } @@ -688,16 +687,16 @@ func PossibleJobStatusValues() []JobStatus { type JobSupportedAction string const ( - JobSupportedActionInvalid JobSupportedAction = "Invalid" JobSupportedActionCancellable JobSupportedAction = "Cancellable" + JobSupportedActionInvalid JobSupportedAction = "Invalid" JobSupportedActionRetriable JobSupportedAction = "Retriable" ) // PossibleJobSupportedActionValues returns the possible values for the JobSupportedAction const type. func PossibleJobSupportedActionValues() []JobSupportedAction { return []JobSupportedAction{ - JobSupportedActionInvalid, JobSupportedActionCancellable, + JobSupportedActionInvalid, JobSupportedActionRetriable, } } @@ -794,37 +793,37 @@ func PossibleMabServerTypeValues() []MabServerType { type MonthOfYear string const ( + MonthOfYearApril MonthOfYear = "April" + MonthOfYearAugust MonthOfYear = "August" + MonthOfYearDecember MonthOfYear = "December" + MonthOfYearFebruary MonthOfYear = "February" MonthOfYearInvalid MonthOfYear = "Invalid" MonthOfYearJanuary MonthOfYear = "January" - MonthOfYearFebruary MonthOfYear = "February" + MonthOfYearJuly MonthOfYear = "July" + MonthOfYearJune MonthOfYear = "June" MonthOfYearMarch MonthOfYear = "March" - MonthOfYearApril MonthOfYear = "April" MonthOfYearMay MonthOfYear = "May" - MonthOfYearJune MonthOfYear = "June" - MonthOfYearJuly MonthOfYear = "July" - MonthOfYearAugust MonthOfYear = "August" - MonthOfYearSeptember MonthOfYear = "September" - MonthOfYearOctober MonthOfYear = "October" MonthOfYearNovember MonthOfYear = "November" - MonthOfYearDecember MonthOfYear = "December" + MonthOfYearOctober MonthOfYear = "October" + MonthOfYearSeptember MonthOfYear = "September" ) // PossibleMonthOfYearValues returns the possible values for the MonthOfYear const type. func PossibleMonthOfYearValues() []MonthOfYear { return []MonthOfYear{ + MonthOfYearApril, + MonthOfYearAugust, + MonthOfYearDecember, + MonthOfYearFebruary, MonthOfYearInvalid, MonthOfYearJanuary, - MonthOfYearFebruary, + MonthOfYearJuly, + MonthOfYearJune, MonthOfYearMarch, - MonthOfYearApril, MonthOfYearMay, - MonthOfYearJune, - MonthOfYearJuly, - MonthOfYearAugust, - MonthOfYearSeptember, - MonthOfYearOctober, MonthOfYearNovember, - MonthOfYearDecember, + MonthOfYearOctober, + MonthOfYearSeptember, } } @@ -940,47 +939,47 @@ func PossiblePrivateEndpointConnectionStatusValues() []PrivateEndpointConnection type ProtectableContainerType string const ( - ProtectableContainerTypeInvalid ProtectableContainerType = "Invalid" - ProtectableContainerTypeUnknown ProtectableContainerType = "Unknown" - ProtectableContainerTypeIaasVMContainer ProtectableContainerType = "IaasVMContainer" - ProtectableContainerTypeIaasVMServiceContainer ProtectableContainerType = "IaasVMServiceContainer" - ProtectableContainerTypeDPMContainer ProtectableContainerType = "DPMContainer" ProtectableContainerTypeAzureBackupServerContainer ProtectableContainerType = "AzureBackupServerContainer" - ProtectableContainerTypeMABContainer ProtectableContainerType = "MABContainer" - ProtectableContainerTypeCluster ProtectableContainerType = "Cluster" ProtectableContainerTypeAzureSQLContainer ProtectableContainerType = "AzureSqlContainer" - ProtectableContainerTypeWindows ProtectableContainerType = "Windows" - ProtectableContainerTypeVCenter ProtectableContainerType = "VCenter" - ProtectableContainerTypeVMAppContainer ProtectableContainerType = "VMAppContainer" - ProtectableContainerTypeSQLAGWorkLoadContainer ProtectableContainerType = "SQLAGWorkLoadContainer" - ProtectableContainerTypeStorageContainer ProtectableContainerType = "StorageContainer" + ProtectableContainerTypeAzureWorkloadContainer ProtectableContainerType = "AzureWorkloadContainer" + ProtectableContainerTypeCluster ProtectableContainerType = "Cluster" + ProtectableContainerTypeDPMContainer ProtectableContainerType = "DPMContainer" ProtectableContainerTypeGenericContainer ProtectableContainerType = "GenericContainer" + ProtectableContainerTypeIaasVMContainer ProtectableContainerType = "IaasVMContainer" + ProtectableContainerTypeIaasVMServiceContainer ProtectableContainerType = "IaasVMServiceContainer" + ProtectableContainerTypeInvalid ProtectableContainerType = "Invalid" + ProtectableContainerTypeMABContainer ProtectableContainerType = "MABContainer" ProtectableContainerTypeMicrosoftClassicComputeVirtualMachines ProtectableContainerType = "Microsoft.ClassicCompute/virtualMachines" ProtectableContainerTypeMicrosoftComputeVirtualMachines ProtectableContainerType = "Microsoft.Compute/virtualMachines" - ProtectableContainerTypeAzureWorkloadContainer ProtectableContainerType = "AzureWorkloadContainer" + ProtectableContainerTypeSQLAGWorkLoadContainer ProtectableContainerType = "SQLAGWorkLoadContainer" + ProtectableContainerTypeStorageContainer ProtectableContainerType = "StorageContainer" + ProtectableContainerTypeUnknown ProtectableContainerType = "Unknown" + ProtectableContainerTypeVCenter ProtectableContainerType = "VCenter" + ProtectableContainerTypeVMAppContainer ProtectableContainerType = "VMAppContainer" + ProtectableContainerTypeWindows ProtectableContainerType = "Windows" ) // PossibleProtectableContainerTypeValues returns the possible values for the ProtectableContainerType const type. func PossibleProtectableContainerTypeValues() []ProtectableContainerType { return []ProtectableContainerType{ - ProtectableContainerTypeInvalid, - ProtectableContainerTypeUnknown, - ProtectableContainerTypeIaasVMContainer, - ProtectableContainerTypeIaasVMServiceContainer, - ProtectableContainerTypeDPMContainer, ProtectableContainerTypeAzureBackupServerContainer, - ProtectableContainerTypeMABContainer, - ProtectableContainerTypeCluster, ProtectableContainerTypeAzureSQLContainer, - ProtectableContainerTypeWindows, - ProtectableContainerTypeVCenter, - ProtectableContainerTypeVMAppContainer, - ProtectableContainerTypeSQLAGWorkLoadContainer, - ProtectableContainerTypeStorageContainer, + ProtectableContainerTypeAzureWorkloadContainer, + ProtectableContainerTypeCluster, + ProtectableContainerTypeDPMContainer, ProtectableContainerTypeGenericContainer, + ProtectableContainerTypeIaasVMContainer, + ProtectableContainerTypeIaasVMServiceContainer, + ProtectableContainerTypeInvalid, + ProtectableContainerTypeMABContainer, ProtectableContainerTypeMicrosoftClassicComputeVirtualMachines, ProtectableContainerTypeMicrosoftComputeVirtualMachines, - ProtectableContainerTypeAzureWorkloadContainer, + ProtectableContainerTypeSQLAGWorkLoadContainer, + ProtectableContainerTypeStorageContainer, + ProtectableContainerTypeUnknown, + ProtectableContainerTypeVCenter, + ProtectableContainerTypeVMAppContainer, + ProtectableContainerTypeWindows, } } @@ -1146,21 +1145,21 @@ func PossibleRecoveryModeValues() []RecoveryMode { type RecoveryPointTierStatus string const ( - RecoveryPointTierStatusInvalid RecoveryPointTierStatus = "Invalid" - RecoveryPointTierStatusValid RecoveryPointTierStatus = "Valid" - RecoveryPointTierStatusDisabled RecoveryPointTierStatus = "Disabled" RecoveryPointTierStatusDeleted RecoveryPointTierStatus = "Deleted" + RecoveryPointTierStatusDisabled RecoveryPointTierStatus = "Disabled" + RecoveryPointTierStatusInvalid RecoveryPointTierStatus = "Invalid" RecoveryPointTierStatusRehydrated RecoveryPointTierStatus = "Rehydrated" + RecoveryPointTierStatusValid RecoveryPointTierStatus = "Valid" ) // PossibleRecoveryPointTierStatusValues returns the possible values for the RecoveryPointTierStatus const type. func PossibleRecoveryPointTierStatusValues() []RecoveryPointTierStatus { return []RecoveryPointTierStatus{ - RecoveryPointTierStatusInvalid, - RecoveryPointTierStatusValid, - RecoveryPointTierStatusDisabled, RecoveryPointTierStatusDeleted, + RecoveryPointTierStatusDisabled, + RecoveryPointTierStatusInvalid, RecoveryPointTierStatusRehydrated, + RecoveryPointTierStatusValid, } } @@ -1168,19 +1167,19 @@ func PossibleRecoveryPointTierStatusValues() []RecoveryPointTierStatus { type RecoveryPointTierType string const ( - RecoveryPointTierTypeInvalid RecoveryPointTierType = "Invalid" - RecoveryPointTierTypeInstantRP RecoveryPointTierType = "InstantRP" - RecoveryPointTierTypeHardenedRP RecoveryPointTierType = "HardenedRP" RecoveryPointTierTypeArchivedRP RecoveryPointTierType = "ArchivedRP" + RecoveryPointTierTypeHardenedRP RecoveryPointTierType = "HardenedRP" + RecoveryPointTierTypeInstantRP RecoveryPointTierType = "InstantRP" + RecoveryPointTierTypeInvalid RecoveryPointTierType = "Invalid" ) // PossibleRecoveryPointTierTypeValues returns the possible values for the RecoveryPointTierType const type. func PossibleRecoveryPointTierTypeValues() []RecoveryPointTierType { return []RecoveryPointTierType{ - RecoveryPointTierTypeInvalid, - RecoveryPointTierTypeInstantRP, - RecoveryPointTierTypeHardenedRP, RecoveryPointTierTypeArchivedRP, + RecoveryPointTierTypeHardenedRP, + RecoveryPointTierTypeInstantRP, + RecoveryPointTierTypeInvalid, } } @@ -1402,6 +1401,7 @@ func PossibleScheduleRunTypeValues() []ScheduleRunType { type SoftDeleteFeatureState string const ( + SoftDeleteFeatureStateAlwaysON SoftDeleteFeatureState = "AlwaysON" SoftDeleteFeatureStateDisabled SoftDeleteFeatureState = "Disabled" SoftDeleteFeatureStateEnabled SoftDeleteFeatureState = "Enabled" SoftDeleteFeatureStateInvalid SoftDeleteFeatureState = "Invalid" @@ -1410,6 +1410,7 @@ const ( // PossibleSoftDeleteFeatureStateValues returns the possible values for the SoftDeleteFeatureState const type. func PossibleSoftDeleteFeatureStateValues() []SoftDeleteFeatureState { return []SoftDeleteFeatureState{ + SoftDeleteFeatureStateAlwaysON, SoftDeleteFeatureStateDisabled, SoftDeleteFeatureStateEnabled, SoftDeleteFeatureStateInvalid, @@ -1483,17 +1484,17 @@ func PossibleSupportStatusValues() []SupportStatus { type TargetDiskNetworkAccessOption string const ( - TargetDiskNetworkAccessOptionSameAsOnSourceDisks TargetDiskNetworkAccessOption = "SameAsOnSourceDisks" TargetDiskNetworkAccessOptionEnablePrivateAccessForAllDisks TargetDiskNetworkAccessOption = "EnablePrivateAccessForAllDisks" TargetDiskNetworkAccessOptionEnablePublicAccessForAllDisks TargetDiskNetworkAccessOption = "EnablePublicAccessForAllDisks" + TargetDiskNetworkAccessOptionSameAsOnSourceDisks TargetDiskNetworkAccessOption = "SameAsOnSourceDisks" ) // PossibleTargetDiskNetworkAccessOptionValues returns the possible values for the TargetDiskNetworkAccessOption const type. func PossibleTargetDiskNetworkAccessOptionValues() []TargetDiskNetworkAccessOption { return []TargetDiskNetworkAccessOption{ - TargetDiskNetworkAccessOptionSameAsOnSourceDisks, TargetDiskNetworkAccessOptionEnablePrivateAccessForAllDisks, TargetDiskNetworkAccessOptionEnablePublicAccessForAllDisks, + TargetDiskNetworkAccessOptionSameAsOnSourceDisks, } } @@ -1580,26 +1581,44 @@ func PossibleValidationStatusValues() []ValidationStatus { } } +// VaultSubResourceType - GroupId for the PrivateEndpointConnection - AzureBackup, AzureBackup_secondary or AzureSiteRecovery +type VaultSubResourceType string + +const ( + VaultSubResourceTypeAzureBackup VaultSubResourceType = "AzureBackup" + VaultSubResourceTypeAzureBackupSecondary VaultSubResourceType = "AzureBackup_secondary" + VaultSubResourceTypeAzureSiteRecovery VaultSubResourceType = "AzureSiteRecovery" +) + +// PossibleVaultSubResourceTypeValues returns the possible values for the VaultSubResourceType const type. +func PossibleVaultSubResourceTypeValues() []VaultSubResourceType { + return []VaultSubResourceType{ + VaultSubResourceTypeAzureBackup, + VaultSubResourceTypeAzureBackupSecondary, + VaultSubResourceTypeAzureSiteRecovery, + } +} + type WeekOfMonth string const ( WeekOfMonthFirst WeekOfMonth = "First" - WeekOfMonthSecond WeekOfMonth = "Second" - WeekOfMonthThird WeekOfMonth = "Third" WeekOfMonthFourth WeekOfMonth = "Fourth" - WeekOfMonthLast WeekOfMonth = "Last" WeekOfMonthInvalid WeekOfMonth = "Invalid" + WeekOfMonthLast WeekOfMonth = "Last" + WeekOfMonthSecond WeekOfMonth = "Second" + WeekOfMonthThird WeekOfMonth = "Third" ) // PossibleWeekOfMonthValues returns the possible values for the WeekOfMonth const type. func PossibleWeekOfMonthValues() []WeekOfMonth { return []WeekOfMonth{ WeekOfMonthFirst, - WeekOfMonthSecond, - WeekOfMonthThird, WeekOfMonthFourth, - WeekOfMonthLast, WeekOfMonthInvalid, + WeekOfMonthLast, + WeekOfMonthSecond, + WeekOfMonthThird, } } diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/deletedprotectioncontainers_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/deletedprotectioncontainers_client.go index 1944c73f7db4..1768242b4293 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/deletedprotectioncontainers_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/deletedprotectioncontainers_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -46,7 +45,7 @@ func NewDeletedProtectionContainersClient(subscriptionID string, credential azco // NewListPager - Lists the soft deleted containers registered to Recovery Services Vault. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - vaultName - The name of the recovery services vault. // - options - DeletedProtectionContainersClientListOptions contains the optional parameters for the DeletedProtectionContainersClient.NewListPager @@ -99,7 +98,7 @@ func (client *DeletedProtectionContainersClient) listCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/deletedprotectioncontainers_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/deletedprotectioncontainers_client_example_test.go index eb42d462eae0..391fc6200dbe 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/deletedprotectioncontainers_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/deletedprotectioncontainers_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureStorage/SoftDeletedContainers_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureStorage/SoftDeletedContainers_List.json func ExampleDeletedProtectionContainersClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/exportjobsoperationresults_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/exportjobsoperationresults_client.go index 26b3be45f613..7d3753e3ce3a 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/exportjobsoperationresults_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/exportjobsoperationresults_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -49,25 +48,28 @@ func NewExportJobsOperationResultsClient(subscriptionID string, credential azcor // jobs in JSON serialized format. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - operationID - OperationID which represents the export job. // - options - ExportJobsOperationResultsClientGetOptions contains the optional parameters for the ExportJobsOperationResultsClient.Get // method. func (client *ExportJobsOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *ExportJobsOperationResultsClientGetOptions) (ExportJobsOperationResultsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, operationID, options) if err != nil { return ExportJobsOperationResultsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ExportJobsOperationResultsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return ExportJobsOperationResultsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return ExportJobsOperationResultsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -94,7 +96,7 @@ func (client *ExportJobsOperationResultsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/exportjobsoperationresults_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/exportjobsoperationresults_client_example_test.go index dbacbd7378f4..1ca871815869 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/exportjobsoperationresults_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/exportjobsoperationresults_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/ExportJobsOperationResult.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/Common/ExportJobsOperationResult.json func ExampleExportJobsOperationResultsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/featuresupport_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/featuresupport_client.go index cf099d1c2974..ab83543301e5 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/featuresupport_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/featuresupport_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -47,23 +46,26 @@ func NewFeatureSupportClient(subscriptionID string, credential azcore.TokenCrede // Validate - It will validate if given feature with resource properties is supported in service // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - azureRegion - Azure region to hit Api // - parameters - Feature support request object // - options - FeatureSupportClientValidateOptions contains the optional parameters for the FeatureSupportClient.Validate method. func (client *FeatureSupportClient) Validate(ctx context.Context, azureRegion string, parameters FeatureSupportRequestClassification, options *FeatureSupportClientValidateOptions) (FeatureSupportClientValidateResponse, error) { + var err error req, err := client.validateCreateRequest(ctx, azureRegion, parameters, options) if err != nil { return FeatureSupportClientValidateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return FeatureSupportClientValidateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FeatureSupportClientValidateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FeatureSupportClientValidateResponse{}, err } - return client.validateHandleResponse(resp) + resp, err := client.validateHandleResponse(httpResp) + return resp, err } // validateCreateRequest creates the Validate request. @@ -82,10 +84,13 @@ func (client *FeatureSupportClient) validateCreateRequest(ctx context.Context, a return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // validateHandleResponse handles the Validate response. diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/featuresupport_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/featuresupport_client_example_test.go index 894b7b210d6c..0a458925c83d 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/featuresupport_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/featuresupport_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/BackupFeature_Validate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/BackupFeature_Validate.json func ExampleFeatureSupportClient_Validate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/go.mod b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/go.mod index c93c6af3d12f..ce6bc93ad8be 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/go.mod +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/go.mod @@ -1,21 +1,21 @@ -module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2 +module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3 go 1.18 require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1 + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1 ) require ( - github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 // indirect - github.com/golang-jwt/jwt/v4 v4.5.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 // indirect + github.com/golang-jwt/jwt/v5 v5.0.0 // indirect github.com/google/uuid v1.3.0 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect - golang.org/x/crypto v0.6.0 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + golang.org/x/crypto v0.12.0 // indirect + golang.org/x/net v0.14.0 // indirect + golang.org/x/sys v0.11.0 // indirect + golang.org/x/text v0.12.0 // indirect ) diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/go.sum b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/go.sum index 8ba445a8c4da..545850a5189d 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/go.sum +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/go.sum @@ -1,15 +1,15 @@ -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 h1:rTnT/Jrcm+figWlYz4Ixzt0SJVR2cMC8lvZcimipiEY= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0/go.mod h1:ON4tFdPTwRcgWEaVDrN3584Ef+b7GgSJaXxe5fW9t4M= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 h1:uqM+VoHjVH6zdlkLF2b6O0ZANcHoj3rO0PoQ3jglUJA= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2/go.mod h1:twTKAa1E6hLmSDjLhaCkbTMQKc7p/rNLU40rLxGEOCI= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 h1:leh5DwKv6Ihwi+h60uHtn6UWAxBbZ0q8DwQVMzf61zw= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= -github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 h1:UE9n9rkJF62ArLb1F3DEjRt8O3jLwMWdSoypKV4f3MU= -github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1 h1:/iHxaJhsFr0+xVFfbMr5vxz848jyiWuIEDhYq3y5odY= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1 h1:LNHhpdK7hzUcx/k1LIcuh5k7k1LGIWLQfCjaneSj7Fc= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1/go.mod h1:uE9zaUfEQT/nbQjVi2IblCG9iaLtZsuYZ8ne+PuQ02M= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= +github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 h1:WpB/QDNLpMw72xHJc34BNNykqSOeEJDAWkhf0u12/Jk= +github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= -github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= -github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= +github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE= +github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= @@ -18,14 +18,14 @@ github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9 github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/interfaces.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/interfaces.go new file mode 100644 index 000000000000..a0dedeff9aa7 --- /dev/null +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/interfaces.go @@ -0,0 +1,417 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +// AzureIaaSVMProtectedItemClassification provides polymorphic access to related types. +// Call the interface's GetAzureIaaSVMProtectedItem() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureIaaSClassicComputeVMProtectedItem, *AzureIaaSComputeVMProtectedItem, *AzureIaaSVMProtectedItem +type AzureIaaSVMProtectedItemClassification interface { + ProtectedItemClassification + // GetAzureIaaSVMProtectedItem returns the AzureIaaSVMProtectedItem content of the underlying type. + GetAzureIaaSVMProtectedItem() *AzureIaaSVMProtectedItem +} + +// AzureRecoveryServiceVaultProtectionIntentClassification provides polymorphic access to related types. +// Call the interface's GetAzureRecoveryServiceVaultProtectionIntent() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureRecoveryServiceVaultProtectionIntent, *AzureWorkloadAutoProtectionIntent, *AzureWorkloadSQLAutoProtectionIntent +type AzureRecoveryServiceVaultProtectionIntentClassification interface { + ProtectionIntentClassification + // GetAzureRecoveryServiceVaultProtectionIntent returns the AzureRecoveryServiceVaultProtectionIntent content of the underlying type. + GetAzureRecoveryServiceVaultProtectionIntent() *AzureRecoveryServiceVaultProtectionIntent +} + +// AzureVMWorkloadItemClassification provides polymorphic access to related types. +// Call the interface's GetAzureVMWorkloadItem() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureVMWorkloadItem, *AzureVMWorkloadSAPAseDatabaseWorkloadItem, *AzureVMWorkloadSAPAseSystemWorkloadItem, *AzureVMWorkloadSAPHanaDatabaseWorkloadItem, +// - *AzureVMWorkloadSAPHanaSystemWorkloadItem, *AzureVMWorkloadSQLDatabaseWorkloadItem, *AzureVMWorkloadSQLInstanceWorkloadItem +type AzureVMWorkloadItemClassification interface { + WorkloadItemClassification + // GetAzureVMWorkloadItem returns the AzureVMWorkloadItem content of the underlying type. + GetAzureVMWorkloadItem() *AzureVMWorkloadItem +} + +// AzureVMWorkloadProtectableItemClassification provides polymorphic access to related types. +// Call the interface's GetAzureVMWorkloadProtectableItem() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureVMWorkloadProtectableItem, *AzureVMWorkloadSAPAseSystemProtectableItem, *AzureVMWorkloadSAPHanaDBInstance, *AzureVMWorkloadSAPHanaDatabaseProtectableItem, +// - *AzureVMWorkloadSAPHanaHSRProtectableItem, *AzureVMWorkloadSAPHanaSystemProtectableItem, *AzureVMWorkloadSQLAvailabilityGroupProtectableItem, +// - *AzureVMWorkloadSQLDatabaseProtectableItem, *AzureVMWorkloadSQLInstanceProtectableItem +type AzureVMWorkloadProtectableItemClassification interface { + WorkloadProtectableItemClassification + // GetAzureVMWorkloadProtectableItem returns the AzureVMWorkloadProtectableItem content of the underlying type. + GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem +} + +// AzureVMWorkloadProtectedItemClassification provides polymorphic access to related types. +// Call the interface's GetAzureVMWorkloadProtectedItem() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureVMWorkloadProtectedItem, *AzureVMWorkloadSAPAseDatabaseProtectedItem, *AzureVMWorkloadSAPHanaDBInstanceProtectedItem, +// - *AzureVMWorkloadSAPHanaDatabaseProtectedItem, *AzureVMWorkloadSQLDatabaseProtectedItem +type AzureVMWorkloadProtectedItemClassification interface { + ProtectedItemClassification + // GetAzureVMWorkloadProtectedItem returns the AzureVMWorkloadProtectedItem content of the underlying type. + GetAzureVMWorkloadProtectedItem() *AzureVMWorkloadProtectedItem +} + +// AzureWorkloadAutoProtectionIntentClassification provides polymorphic access to related types. +// Call the interface's GetAzureWorkloadAutoProtectionIntent() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureWorkloadAutoProtectionIntent, *AzureWorkloadSQLAutoProtectionIntent +type AzureWorkloadAutoProtectionIntentClassification interface { + AzureRecoveryServiceVaultProtectionIntentClassification + // GetAzureWorkloadAutoProtectionIntent returns the AzureWorkloadAutoProtectionIntent content of the underlying type. + GetAzureWorkloadAutoProtectionIntent() *AzureWorkloadAutoProtectionIntent +} + +// AzureWorkloadContainerClassification provides polymorphic access to related types. +// Call the interface's GetAzureWorkloadContainer() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureSQLAGWorkloadContainerProtectionContainer, *AzureVMAppContainerProtectionContainer, *AzureWorkloadContainer +type AzureWorkloadContainerClassification interface { + ProtectionContainerClassification + // GetAzureWorkloadContainer returns the AzureWorkloadContainer content of the underlying type. + GetAzureWorkloadContainer() *AzureWorkloadContainer +} + +// AzureWorkloadPointInTimeRecoveryPointClassification provides polymorphic access to related types. +// Call the interface's GetAzureWorkloadPointInTimeRecoveryPoint() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureWorkloadPointInTimeRecoveryPoint, *AzureWorkloadSAPHanaPointInTimeRecoveryPoint +type AzureWorkloadPointInTimeRecoveryPointClassification interface { + AzureWorkloadRecoveryPointClassification + // GetAzureWorkloadPointInTimeRecoveryPoint returns the AzureWorkloadPointInTimeRecoveryPoint content of the underlying type. + GetAzureWorkloadPointInTimeRecoveryPoint() *AzureWorkloadPointInTimeRecoveryPoint +} + +// AzureWorkloadRecoveryPointClassification provides polymorphic access to related types. +// Call the interface's GetAzureWorkloadRecoveryPoint() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureWorkloadPointInTimeRecoveryPoint, *AzureWorkloadRecoveryPoint, *AzureWorkloadSAPHanaPointInTimeRecoveryPoint, *AzureWorkloadSAPHanaRecoveryPoint, +// - *AzureWorkloadSQLPointInTimeRecoveryPoint, *AzureWorkloadSQLRecoveryPoint +type AzureWorkloadRecoveryPointClassification interface { + RecoveryPointClassification + // GetAzureWorkloadRecoveryPoint returns the AzureWorkloadRecoveryPoint content of the underlying type. + GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint +} + +// AzureWorkloadRestoreRequestClassification provides polymorphic access to related types. +// Call the interface's GetAzureWorkloadRestoreRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureWorkloadPointInTimeRestoreRequest, *AzureWorkloadRestoreRequest, *AzureWorkloadSAPHanaPointInTimeRestoreRequest, +// - *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, *AzureWorkloadSAPHanaRestoreRequest, *AzureWorkloadSAPHanaRestoreWithRehydrateRequest, +// - *AzureWorkloadSQLPointInTimeRestoreRequest, *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, *AzureWorkloadSQLRestoreRequest, +// - *AzureWorkloadSQLRestoreWithRehydrateRequest +type AzureWorkloadRestoreRequestClassification interface { + RestoreRequestClassification + // GetAzureWorkloadRestoreRequest returns the AzureWorkloadRestoreRequest content of the underlying type. + GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest +} + +// AzureWorkloadSAPHanaPointInTimeRestoreRequestClassification provides polymorphic access to related types. +// Call the interface's GetAzureWorkloadSAPHanaPointInTimeRestoreRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureWorkloadSAPHanaPointInTimeRestoreRequest, *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest +type AzureWorkloadSAPHanaPointInTimeRestoreRequestClassification interface { + AzureWorkloadSAPHanaRestoreRequestClassification + // GetAzureWorkloadSAPHanaPointInTimeRestoreRequest returns the AzureWorkloadSAPHanaPointInTimeRestoreRequest content of the underlying type. + GetAzureWorkloadSAPHanaPointInTimeRestoreRequest() *AzureWorkloadSAPHanaPointInTimeRestoreRequest +} + +// AzureWorkloadSAPHanaRestoreRequestClassification provides polymorphic access to related types. +// Call the interface's GetAzureWorkloadSAPHanaRestoreRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureWorkloadSAPHanaPointInTimeRestoreRequest, *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, *AzureWorkloadSAPHanaRestoreRequest, +// - *AzureWorkloadSAPHanaRestoreWithRehydrateRequest +type AzureWorkloadSAPHanaRestoreRequestClassification interface { + AzureWorkloadRestoreRequestClassification + // GetAzureWorkloadSAPHanaRestoreRequest returns the AzureWorkloadSAPHanaRestoreRequest content of the underlying type. + GetAzureWorkloadSAPHanaRestoreRequest() *AzureWorkloadSAPHanaRestoreRequest +} + +// AzureWorkloadSQLPointInTimeRestoreRequestClassification provides polymorphic access to related types. +// Call the interface's GetAzureWorkloadSQLPointInTimeRestoreRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureWorkloadSQLPointInTimeRestoreRequest, *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest +type AzureWorkloadSQLPointInTimeRestoreRequestClassification interface { + AzureWorkloadSQLRestoreRequestClassification + // GetAzureWorkloadSQLPointInTimeRestoreRequest returns the AzureWorkloadSQLPointInTimeRestoreRequest content of the underlying type. + GetAzureWorkloadSQLPointInTimeRestoreRequest() *AzureWorkloadSQLPointInTimeRestoreRequest +} + +// AzureWorkloadSQLRecoveryPointClassification provides polymorphic access to related types. +// Call the interface's GetAzureWorkloadSQLRecoveryPoint() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureWorkloadSQLPointInTimeRecoveryPoint, *AzureWorkloadSQLRecoveryPoint +type AzureWorkloadSQLRecoveryPointClassification interface { + AzureWorkloadRecoveryPointClassification + // GetAzureWorkloadSQLRecoveryPoint returns the AzureWorkloadSQLRecoveryPoint content of the underlying type. + GetAzureWorkloadSQLRecoveryPoint() *AzureWorkloadSQLRecoveryPoint +} + +// AzureWorkloadSQLRestoreRequestClassification provides polymorphic access to related types. +// Call the interface's GetAzureWorkloadSQLRestoreRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureWorkloadSQLPointInTimeRestoreRequest, *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, *AzureWorkloadSQLRestoreRequest, +// - *AzureWorkloadSQLRestoreWithRehydrateRequest +type AzureWorkloadSQLRestoreRequestClassification interface { + AzureWorkloadRestoreRequestClassification + // GetAzureWorkloadSQLRestoreRequest returns the AzureWorkloadSQLRestoreRequest content of the underlying type. + GetAzureWorkloadSQLRestoreRequest() *AzureWorkloadSQLRestoreRequest +} + +// BackupEngineBaseClassification provides polymorphic access to related types. +// Call the interface's GetBackupEngineBase() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureBackupServerEngine, *BackupEngineBase, *DpmBackupEngine +type BackupEngineBaseClassification interface { + // GetBackupEngineBase returns the BackupEngineBase content of the underlying type. + GetBackupEngineBase() *BackupEngineBase +} + +// BackupRequestClassification provides polymorphic access to related types. +// Call the interface's GetBackupRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureFileShareBackupRequest, *AzureWorkloadBackupRequest, *BackupRequest, *IaasVMBackupRequest +type BackupRequestClassification interface { + // GetBackupRequest returns the BackupRequest content of the underlying type. + GetBackupRequest() *BackupRequest +} + +// DpmContainerClassification provides polymorphic access to related types. +// Call the interface's GetDpmContainer() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureBackupServerContainer, *DpmContainer +type DpmContainerClassification interface { + ProtectionContainerClassification + // GetDpmContainer returns the DpmContainer content of the underlying type. + GetDpmContainer() *DpmContainer +} + +// FeatureSupportRequestClassification provides polymorphic access to related types. +// Call the interface's GetFeatureSupportRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureBackupGoalFeatureSupportRequest, *AzureVMResourceFeatureSupportRequest, *FeatureSupportRequest +type FeatureSupportRequestClassification interface { + // GetFeatureSupportRequest returns the FeatureSupportRequest content of the underlying type. + GetFeatureSupportRequest() *FeatureSupportRequest +} + +// ILRRequestClassification provides polymorphic access to related types. +// Call the interface's GetILRRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureFileShareProvisionILRRequest, *ILRRequest, *IaasVMILRRegistrationRequest +type ILRRequestClassification interface { + // GetILRRequest returns the ILRRequest content of the underlying type. + GetILRRequest() *ILRRequest +} + +// IaaSVMContainerClassification provides polymorphic access to related types. +// Call the interface's GetIaaSVMContainer() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureIaaSClassicComputeVMContainer, *AzureIaaSComputeVMContainer, *IaaSVMContainer +type IaaSVMContainerClassification interface { + ProtectionContainerClassification + // GetIaaSVMContainer returns the IaaSVMContainer content of the underlying type. + GetIaaSVMContainer() *IaaSVMContainer +} + +// IaaSVMProtectableItemClassification provides polymorphic access to related types. +// Call the interface's GetIaaSVMProtectableItem() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureIaaSClassicComputeVMProtectableItem, *AzureIaaSComputeVMProtectableItem, *IaaSVMProtectableItem +type IaaSVMProtectableItemClassification interface { + WorkloadProtectableItemClassification + // GetIaaSVMProtectableItem returns the IaaSVMProtectableItem content of the underlying type. + GetIaaSVMProtectableItem() *IaaSVMProtectableItem +} + +// IaasVMRestoreRequestClassification provides polymorphic access to related types. +// Call the interface's GetIaasVMRestoreRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *IaasVMRestoreRequest, *IaasVMRestoreWithRehydrationRequest +type IaasVMRestoreRequestClassification interface { + RestoreRequestClassification + // GetIaasVMRestoreRequest returns the IaasVMRestoreRequest content of the underlying type. + GetIaasVMRestoreRequest() *IaasVMRestoreRequest +} + +// JobClassification provides polymorphic access to related types. +// Call the interface's GetJob() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureIaaSVMJob, *AzureIaaSVMJobV2, *AzureStorageJob, *AzureWorkloadJob, *DpmJob, *Job, *MabJob, *VaultJob +type JobClassification interface { + // GetJob returns the Job content of the underlying type. + GetJob() *Job +} + +// OperationResultInfoBaseClassification provides polymorphic access to related types. +// Call the interface's GetOperationResultInfoBase() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ExportJobsOperationResultInfo, *OperationResultInfo, *OperationResultInfoBase +type OperationResultInfoBaseClassification interface { + // GetOperationResultInfoBase returns the OperationResultInfoBase content of the underlying type. + GetOperationResultInfoBase() *OperationResultInfoBase +} + +// OperationStatusExtendedInfoClassification provides polymorphic access to related types. +// Call the interface's GetOperationStatusExtendedInfo() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *OperationStatusExtendedInfo, *OperationStatusJobExtendedInfo, *OperationStatusJobsExtendedInfo, *OperationStatusProvisionILRExtendedInfo, +// - *OperationStatusValidateOperationExtendedInfo +type OperationStatusExtendedInfoClassification interface { + // GetOperationStatusExtendedInfo returns the OperationStatusExtendedInfo content of the underlying type. + GetOperationStatusExtendedInfo() *OperationStatusExtendedInfo +} + +// ProtectableContainerClassification provides polymorphic access to related types. +// Call the interface's GetProtectableContainer() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureStorageProtectableContainer, *AzureVMAppContainerProtectableContainer, *ProtectableContainer +type ProtectableContainerClassification interface { + // GetProtectableContainer returns the ProtectableContainer content of the underlying type. + GetProtectableContainer() *ProtectableContainer +} + +// ProtectedItemClassification provides polymorphic access to related types. +// Call the interface's GetProtectedItem() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureFileshareProtectedItem, *AzureIaaSClassicComputeVMProtectedItem, *AzureIaaSComputeVMProtectedItem, *AzureIaaSVMProtectedItem, +// - *AzureSQLProtectedItem, *AzureVMWorkloadProtectedItem, *AzureVMWorkloadSAPAseDatabaseProtectedItem, *AzureVMWorkloadSAPHanaDBInstanceProtectedItem, +// - *AzureVMWorkloadSAPHanaDatabaseProtectedItem, *AzureVMWorkloadSQLDatabaseProtectedItem, *DPMProtectedItem, *GenericProtectedItem, +// - *MabFileFolderProtectedItem, *ProtectedItem +type ProtectedItemClassification interface { + // GetProtectedItem returns the ProtectedItem content of the underlying type. + GetProtectedItem() *ProtectedItem +} + +// ProtectionContainerClassification provides polymorphic access to related types. +// Call the interface's GetProtectionContainer() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureBackupServerContainer, *AzureIaaSClassicComputeVMContainer, *AzureIaaSComputeVMContainer, *AzureSQLAGWorkloadContainerProtectionContainer, +// - *AzureSQLContainer, *AzureStorageContainer, *AzureVMAppContainerProtectionContainer, *AzureWorkloadContainer, *DpmContainer, +// - *GenericContainer, *IaaSVMContainer, *MabContainer, *ProtectionContainer +type ProtectionContainerClassification interface { + // GetProtectionContainer returns the ProtectionContainer content of the underlying type. + GetProtectionContainer() *ProtectionContainer +} + +// ProtectionIntentClassification provides polymorphic access to related types. +// Call the interface's GetProtectionIntent() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureRecoveryServiceVaultProtectionIntent, *AzureResourceProtectionIntent, *AzureWorkloadAutoProtectionIntent, *AzureWorkloadContainerAutoProtectionIntent, +// - *AzureWorkloadSQLAutoProtectionIntent, *ProtectionIntent +type ProtectionIntentClassification interface { + // GetProtectionIntent returns the ProtectionIntent content of the underlying type. + GetProtectionIntent() *ProtectionIntent +} + +// ProtectionPolicyClassification provides polymorphic access to related types. +// Call the interface's GetProtectionPolicy() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureFileShareProtectionPolicy, *AzureIaaSVMProtectionPolicy, *AzureSQLProtectionPolicy, *AzureVMWorkloadProtectionPolicy, +// - *GenericProtectionPolicy, *MabProtectionPolicy, *ProtectionPolicy +type ProtectionPolicyClassification interface { + // GetProtectionPolicy returns the ProtectionPolicy content of the underlying type. + GetProtectionPolicy() *ProtectionPolicy +} + +// RecoveryPointClassification provides polymorphic access to related types. +// Call the interface's GetRecoveryPoint() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureFileShareRecoveryPoint, *AzureWorkloadPointInTimeRecoveryPoint, *AzureWorkloadRecoveryPoint, *AzureWorkloadSAPHanaPointInTimeRecoveryPoint, +// - *AzureWorkloadSAPHanaRecoveryPoint, *AzureWorkloadSQLPointInTimeRecoveryPoint, *AzureWorkloadSQLRecoveryPoint, *GenericRecoveryPoint, +// - *IaasVMRecoveryPoint, *RecoveryPoint +type RecoveryPointClassification interface { + // GetRecoveryPoint returns the RecoveryPoint content of the underlying type. + GetRecoveryPoint() *RecoveryPoint +} + +// RestoreRequestClassification provides polymorphic access to related types. +// Call the interface's GetRestoreRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureFileShareRestoreRequest, *AzureWorkloadPointInTimeRestoreRequest, *AzureWorkloadRestoreRequest, *AzureWorkloadSAPHanaPointInTimeRestoreRequest, +// - *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, *AzureWorkloadSAPHanaRestoreRequest, *AzureWorkloadSAPHanaRestoreWithRehydrateRequest, +// - *AzureWorkloadSQLPointInTimeRestoreRequest, *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, *AzureWorkloadSQLRestoreRequest, +// - *AzureWorkloadSQLRestoreWithRehydrateRequest, *IaasVMRestoreRequest, *IaasVMRestoreWithRehydrationRequest, *RestoreRequest +type RestoreRequestClassification interface { + // GetRestoreRequest returns the RestoreRequest content of the underlying type. + GetRestoreRequest() *RestoreRequest +} + +// RetentionPolicyClassification provides polymorphic access to related types. +// Call the interface's GetRetentionPolicy() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *LongTermRetentionPolicy, *RetentionPolicy, *SimpleRetentionPolicy +type RetentionPolicyClassification interface { + // GetRetentionPolicy returns the RetentionPolicy content of the underlying type. + GetRetentionPolicy() *RetentionPolicy +} + +// SchedulePolicyClassification provides polymorphic access to related types. +// Call the interface's GetSchedulePolicy() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *LogSchedulePolicy, *LongTermSchedulePolicy, *SchedulePolicy, *SimpleSchedulePolicy, *SimpleSchedulePolicyV2 +type SchedulePolicyClassification interface { + // GetSchedulePolicy returns the SchedulePolicy content of the underlying type. + GetSchedulePolicy() *SchedulePolicy +} + +// ValidateOperationRequestClassification provides polymorphic access to related types. +// Call the interface's GetValidateOperationRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ValidateIaasVMRestoreOperationRequest, *ValidateOperationRequest, *ValidateRestoreOperationRequest +type ValidateOperationRequestClassification interface { + // GetValidateOperationRequest returns the ValidateOperationRequest content of the underlying type. + GetValidateOperationRequest() *ValidateOperationRequest +} + +// ValidateRestoreOperationRequestClassification provides polymorphic access to related types. +// Call the interface's GetValidateRestoreOperationRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ValidateIaasVMRestoreOperationRequest, *ValidateRestoreOperationRequest +type ValidateRestoreOperationRequestClassification interface { + ValidateOperationRequestClassification + // GetValidateRestoreOperationRequest returns the ValidateRestoreOperationRequest content of the underlying type. + GetValidateRestoreOperationRequest() *ValidateRestoreOperationRequest +} + +// VaultStorageConfigOperationResultResponseClassification provides polymorphic access to related types. +// Call the interface's GetVaultStorageConfigOperationResultResponse() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *PrepareDataMoveResponse, *VaultStorageConfigOperationResultResponse +type VaultStorageConfigOperationResultResponseClassification interface { + // GetVaultStorageConfigOperationResultResponse returns the VaultStorageConfigOperationResultResponse content of the underlying type. + GetVaultStorageConfigOperationResultResponse() *VaultStorageConfigOperationResultResponse +} + +// WorkloadItemClassification provides polymorphic access to related types. +// Call the interface's GetWorkloadItem() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureVMWorkloadItem, *AzureVMWorkloadSAPAseDatabaseWorkloadItem, *AzureVMWorkloadSAPAseSystemWorkloadItem, *AzureVMWorkloadSAPHanaDatabaseWorkloadItem, +// - *AzureVMWorkloadSAPHanaSystemWorkloadItem, *AzureVMWorkloadSQLDatabaseWorkloadItem, *AzureVMWorkloadSQLInstanceWorkloadItem, +// - *WorkloadItem +type WorkloadItemClassification interface { + // GetWorkloadItem returns the WorkloadItem content of the underlying type. + GetWorkloadItem() *WorkloadItem +} + +// WorkloadProtectableItemClassification provides polymorphic access to related types. +// Call the interface's GetWorkloadProtectableItem() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureFileShareProtectableItem, *AzureIaaSClassicComputeVMProtectableItem, *AzureIaaSComputeVMProtectableItem, *AzureVMWorkloadProtectableItem, +// - *AzureVMWorkloadSAPAseSystemProtectableItem, *AzureVMWorkloadSAPHanaDBInstance, *AzureVMWorkloadSAPHanaDatabaseProtectableItem, +// - *AzureVMWorkloadSAPHanaHSRProtectableItem, *AzureVMWorkloadSAPHanaSystemProtectableItem, *AzureVMWorkloadSQLAvailabilityGroupProtectableItem, +// - *AzureVMWorkloadSQLDatabaseProtectableItem, *AzureVMWorkloadSQLInstanceProtectableItem, *IaaSVMProtectableItem, *WorkloadProtectableItem +type WorkloadProtectableItemClassification interface { + // GetWorkloadProtectableItem returns the WorkloadProtectableItem content of the underlying type. + GetWorkloadProtectableItem() *WorkloadProtectableItem +} diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/itemlevelrecoveryconnections_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/itemlevelrecoveryconnections_client.go index 26aa8dafa3d7..25c75e9c485f 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/itemlevelrecoveryconnections_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/itemlevelrecoveryconnections_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -49,7 +48,7 @@ func NewItemLevelRecoveryConnectionsClient(subscriptionID string, credential azc // operation. To know the status of provisioning, call GetProtectedItemOperationResult API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - fabricName - Fabric name associated with the backed up items. @@ -61,16 +60,18 @@ func NewItemLevelRecoveryConnectionsClient(subscriptionID string, credential azc // - options - ItemLevelRecoveryConnectionsClientProvisionOptions contains the optional parameters for the ItemLevelRecoveryConnectionsClient.Provision // method. func (client *ItemLevelRecoveryConnectionsClient) Provision(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters ILRRequestResource, options *ItemLevelRecoveryConnectionsClientProvisionOptions) (ItemLevelRecoveryConnectionsClientProvisionResponse, error) { + var err error req, err := client.provisionCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID, parameters, options) if err != nil { return ItemLevelRecoveryConnectionsClientProvisionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ItemLevelRecoveryConnectionsClientProvisionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return ItemLevelRecoveryConnectionsClientProvisionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return ItemLevelRecoveryConnectionsClientProvisionResponse{}, err } return ItemLevelRecoveryConnectionsClientProvisionResponse{}, nil } @@ -111,17 +112,20 @@ func (client *ItemLevelRecoveryConnectionsClient) provisionCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // Revoke - Revokes an iSCSI connection which can be used to download a script. Executing this script opens a file explorer // displaying all recoverable files and folders. This is an asynchronous operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - fabricName - Fabric name associated with the backed up items. @@ -132,16 +136,18 @@ func (client *ItemLevelRecoveryConnectionsClient) provisionCreateRequest(ctx con // - options - ItemLevelRecoveryConnectionsClientRevokeOptions contains the optional parameters for the ItemLevelRecoveryConnectionsClient.Revoke // method. func (client *ItemLevelRecoveryConnectionsClient) Revoke(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, options *ItemLevelRecoveryConnectionsClientRevokeOptions) (ItemLevelRecoveryConnectionsClientRevokeResponse, error) { + var err error req, err := client.revokeCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID, options) if err != nil { return ItemLevelRecoveryConnectionsClientRevokeResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ItemLevelRecoveryConnectionsClientRevokeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return ItemLevelRecoveryConnectionsClientRevokeResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return ItemLevelRecoveryConnectionsClientRevokeResponse{}, err } return ItemLevelRecoveryConnectionsClientRevokeResponse{}, nil } @@ -182,7 +188,7 @@ func (client *ItemLevelRecoveryConnectionsClient) revokeCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/itemlevelrecoveryconnections_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/itemlevelrecoveryconnections_client_example_test.go index 52ffd7d31b36..0f9205dc689d 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/itemlevelrecoveryconnections_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/itemlevelrecoveryconnections_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/Provision_Ilr.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/Provision_Ilr.json func ExampleItemLevelRecoveryConnectionsClient_Provision() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -43,7 +43,7 @@ func ExampleItemLevelRecoveryConnectionsClient_Provision() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/Revoke_Ilr.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/Revoke_Ilr.json func ExampleItemLevelRecoveryConnectionsClient_Revoke() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/jobcancellations_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/jobcancellations_client.go index a9878bcab821..6fa19d33d1bf 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/jobcancellations_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/jobcancellations_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -48,23 +47,25 @@ func NewJobCancellationsClient(subscriptionID string, credential azcore.TokenCre // API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - jobName - Name of the job to cancel. // - options - JobCancellationsClientTriggerOptions contains the optional parameters for the JobCancellationsClient.Trigger // method. func (client *JobCancellationsClient) Trigger(ctx context.Context, vaultName string, resourceGroupName string, jobName string, options *JobCancellationsClientTriggerOptions) (JobCancellationsClientTriggerResponse, error) { + var err error req, err := client.triggerCreateRequest(ctx, vaultName, resourceGroupName, jobName, options) if err != nil { return JobCancellationsClientTriggerResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobCancellationsClientTriggerResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return JobCancellationsClientTriggerResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return JobCancellationsClientTriggerResponse{}, err } return JobCancellationsClientTriggerResponse{}, nil } @@ -93,7 +94,7 @@ func (client *JobCancellationsClient) triggerCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/jobcancellations_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/jobcancellations_client_example_test.go index b48bd9724a43..95c1d7f0d080 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/jobcancellations_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/jobcancellations_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/TriggerCancelJob.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/Common/TriggerCancelJob.json func ExampleJobCancellationsClient_Trigger() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/jobdetails_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/jobdetails_client.go index dd514ae1f6ee..a52e2a6f7a81 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/jobdetails_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/jobdetails_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -47,24 +46,27 @@ func NewJobDetailsClient(subscriptionID string, credential azcore.TokenCredentia // Get - Gets extended information associated with the job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - jobName - Name of the job whose details are to be fetched. // - options - JobDetailsClientGetOptions contains the optional parameters for the JobDetailsClient.Get method. func (client *JobDetailsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, jobName string, options *JobDetailsClientGetOptions) (JobDetailsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, jobName, options) if err != nil { return JobDetailsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobDetailsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobDetailsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobDetailsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -91,7 +93,7 @@ func (client *JobDetailsClient) getCreateRequest(ctx context.Context, vaultName return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/jobdetails_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/jobdetails_client_example_test.go index bd22d3c7065c..e235c8be2450 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/jobdetails_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/jobdetails_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/GetJobDetails.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/Common/GetJobDetails.json func ExampleJobDetailsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/joboperationresults_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/joboperationresults_client.go index 3ce7f2fe201a..71e6711fbc73 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/joboperationresults_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/joboperationresults_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -47,23 +46,25 @@ func NewJobOperationResultsClient(subscriptionID string, credential azcore.Token // Get - Fetches the result of any operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - jobName - Job name whose operation result has to be fetched. // - operationID - OperationID which represents the operation whose result has to be fetched. // - options - JobOperationResultsClientGetOptions contains the optional parameters for the JobOperationResultsClient.Get method. func (client *JobOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, jobName string, operationID string, options *JobOperationResultsClientGetOptions) (JobOperationResultsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, jobName, operationID, options) if err != nil { return JobOperationResultsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobOperationResultsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return JobOperationResultsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return JobOperationResultsClientGetResponse{}, err } return JobOperationResultsClientGetResponse{}, nil } @@ -96,7 +97,7 @@ func (client *JobOperationResultsClient) getCreateRequest(ctx context.Context, v return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/joboperationresults_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/joboperationresults_client_example_test.go index 2143f7fb3307..6b3b7774f300 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/joboperationresults_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/joboperationresults_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/CancelJobOperationResult.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/Common/CancelJobOperationResult.json func ExampleJobOperationResultsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/jobs_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/jobs_client.go index 7e22ef78b46a..53421ff834af 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/jobs_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/jobs_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -47,21 +46,23 @@ func NewJobsClient(subscriptionID string, credential azcore.TokenCredential, opt // Export - Triggers export of jobs specified by filters and returns an OperationID to track. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - options - JobsClientExportOptions contains the optional parameters for the JobsClient.Export method. func (client *JobsClient) Export(ctx context.Context, vaultName string, resourceGroupName string, options *JobsClientExportOptions) (JobsClientExportResponse, error) { + var err error req, err := client.exportCreateRequest(ctx, vaultName, resourceGroupName, options) if err != nil { return JobsClientExportResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobsClientExportResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return JobsClientExportResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return JobsClientExportResponse{}, err } return JobsClientExportResponse{}, nil } @@ -86,7 +87,7 @@ func (client *JobsClient) exportCreateRequest(ctx context.Context, vaultName str return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/jobs_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/jobs_client_example_test.go index 52e31ed35ad5..787a2924024c 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/jobs_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/jobs_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/TriggerExportJobs.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/Common/TriggerExportJobs.json func ExampleJobsClient_Export() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/models.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/models.go index f3506f2675fe..c7d68479d5a2 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/models.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/models.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -75,32 +74,32 @@ type AzureBackupServerContainer struct { // GetDpmContainer implements the DpmContainerClassification interface for type AzureBackupServerContainer. func (a *AzureBackupServerContainer) GetDpmContainer() *DpmContainer { return &DpmContainer{ + BackupManagementType: a.BackupManagementType, CanReRegister: a.CanReRegister, ContainerID: a.ContainerID, - ProtectedItemCount: a.ProtectedItemCount, + ContainerType: a.ContainerType, DpmAgentVersion: a.DpmAgentVersion, DpmServers: a.DpmServers, - UpgradeAvailable: a.UpgradeAvailable, - ProtectionStatus: a.ProtectionStatus, ExtendedInfo: a.ExtendedInfo, FriendlyName: a.FriendlyName, - BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, HealthStatus: a.HealthStatus, - ContainerType: a.ContainerType, ProtectableObjectType: a.ProtectableObjectType, + ProtectedItemCount: a.ProtectedItemCount, + ProtectionStatus: a.ProtectionStatus, + RegistrationStatus: a.RegistrationStatus, + UpgradeAvailable: a.UpgradeAvailable, } } // GetProtectionContainer implements the ProtectionContainerClassification interface for type AzureBackupServerContainer. func (a *AzureBackupServerContainer) GetProtectionContainer() *ProtectionContainer { return &ProtectionContainer{ - FriendlyName: a.FriendlyName, BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, - HealthStatus: a.HealthStatus, ContainerType: a.ContainerType, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, ProtectableObjectType: a.ProtectableObjectType, + RegistrationStatus: a.RegistrationStatus, } } @@ -149,19 +148,19 @@ type AzureBackupServerEngine struct { // GetBackupEngineBase implements the BackupEngineBaseClassification interface for type AzureBackupServerEngine. func (a *AzureBackupServerEngine) GetBackupEngineBase() *BackupEngineBase { return &BackupEngineBase{ - FriendlyName: a.FriendlyName, - BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, + AzureBackupAgentVersion: a.AzureBackupAgentVersion, + BackupEngineID: a.BackupEngineID, BackupEngineState: a.BackupEngineState, - HealthStatus: a.HealthStatus, BackupEngineType: a.BackupEngineType, + BackupManagementType: a.BackupManagementType, CanReRegister: a.CanReRegister, - BackupEngineID: a.BackupEngineID, DpmVersion: a.DpmVersion, - AzureBackupAgentVersion: a.AzureBackupAgentVersion, + ExtendedInfo: a.ExtendedInfo, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, IsAzureBackupAgentUpgradeAvailable: a.IsAzureBackupAgentUpgradeAvailable, IsDpmUpgradeAvailable: a.IsDpmUpgradeAvailable, - ExtendedInfo: a.ExtendedInfo, + RegistrationStatus: a.RegistrationStatus, } } @@ -212,10 +211,10 @@ type AzureFileShareProtectableItem struct { func (a *AzureFileShareProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { return &WorkloadProtectableItem{ BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, } } @@ -246,8 +245,8 @@ type AzureFileShareProtectionPolicy struct { // GetProtectionPolicy implements the ProtectionPolicyClassification interface for type AzureFileShareProtectionPolicy. func (a *AzureFileShareProtectionPolicy) GetProtectionPolicy() *ProtectionPolicy { return &ProtectionPolicy{ - ProtectedItemsCount: a.ProtectedItemsCount, BackupManagementType: a.BackupManagementType, + ProtectedItemsCount: a.ProtectedItemsCount, ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, } } @@ -396,7 +395,7 @@ type AzureFileshareProtectedItem struct { ResourceGuardOperationRequests []*string // Soft delete retention period in days - SoftDeleteRetentionPeriod *int32 + SoftDeleteRetentionPeriodInDays *int32 // ARM ID of the resource to be backed up. SourceResourceID *string @@ -411,24 +410,24 @@ type AzureFileshareProtectedItem struct { // GetProtectedItem implements the ProtectedItemClassification interface for type AzureFileshareProtectedItem. func (a *AzureFileshareProtectedItem) GetProtectedItem() *ProtectedItem { return &ProtectedItem{ - ProtectedItemType: a.ProtectedItemType, BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, CreateMode: a.CreateMode, DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + IsArchiveEnabled: a.IsArchiveEnabled, IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + LastRecoveryPoint: a.LastRecoveryPoint, + PolicyID: a.PolicyID, PolicyName: a.PolicyName, - SoftDeleteRetentionPeriod: a.SoftDeleteRetentionPeriod, + ProtectedItemType: a.ProtectedItemType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + WorkloadType: a.WorkloadType, } } @@ -487,27 +486,27 @@ type AzureIaaSClassicComputeVMContainer struct { // GetIaaSVMContainer implements the IaaSVMContainerClassification interface for type AzureIaaSClassicComputeVMContainer. func (a *AzureIaaSClassicComputeVMContainer) GetIaaSVMContainer() *IaaSVMContainer { return &IaaSVMContainer{ - VirtualMachineID: a.VirtualMachineID, - VirtualMachineVersion: a.VirtualMachineVersion, - ResourceGroup: a.ResourceGroup, - FriendlyName: a.FriendlyName, BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, - HealthStatus: a.HealthStatus, ContainerType: a.ContainerType, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, ProtectableObjectType: a.ProtectableObjectType, + RegistrationStatus: a.RegistrationStatus, + ResourceGroup: a.ResourceGroup, + VirtualMachineID: a.VirtualMachineID, + VirtualMachineVersion: a.VirtualMachineVersion, } } // GetProtectionContainer implements the ProtectionContainerClassification interface for type AzureIaaSClassicComputeVMContainer. func (a *AzureIaaSClassicComputeVMContainer) GetProtectionContainer() *ProtectionContainer { return &ProtectionContainer{ - FriendlyName: a.FriendlyName, BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, - HealthStatus: a.HealthStatus, ContainerType: a.ContainerType, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, ProtectableObjectType: a.ProtectableObjectType, + RegistrationStatus: a.RegistrationStatus, } } @@ -541,14 +540,14 @@ type AzureIaaSClassicComputeVMProtectableItem struct { // GetIaaSVMProtectableItem implements the IaaSVMProtectableItemClassification interface for type AzureIaaSClassicComputeVMProtectableItem. func (a *AzureIaaSClassicComputeVMProtectableItem) GetIaaSVMProtectableItem() *IaaSVMProtectableItem { return &IaaSVMProtectableItem{ - VirtualMachineID: a.VirtualMachineID, - VirtualMachineVersion: a.VirtualMachineVersion, - ResourceGroup: a.ResourceGroup, BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, ProtectionState: a.ProtectionState, + ResourceGroup: a.ResourceGroup, + VirtualMachineID: a.VirtualMachineID, + VirtualMachineVersion: a.VirtualMachineVersion, + WorkloadType: a.WorkloadType, } } @@ -556,10 +555,10 @@ func (a *AzureIaaSClassicComputeVMProtectableItem) GetIaaSVMProtectableItem() *I func (a *AzureIaaSClassicComputeVMProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { return &WorkloadProtectableItem{ BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, } } @@ -629,7 +628,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { ResourceGuardOperationRequests []*string // Soft delete retention period in days - SoftDeleteRetentionPeriod *int32 + SoftDeleteRetentionPeriodInDays *int32 // ARM ID of the resource to be backed up. SourceResourceID *string @@ -659,60 +658,60 @@ type AzureIaaSClassicComputeVMProtectedItem struct { // GetAzureIaaSVMProtectedItem implements the AzureIaaSVMProtectedItemClassification interface for type AzureIaaSClassicComputeVMProtectedItem. func (a *AzureIaaSClassicComputeVMProtectedItem) GetAzureIaaSVMProtectedItem() *AzureIaaSVMProtectedItem { return &AzureIaaSVMProtectedItem{ - FriendlyName: a.FriendlyName, - VirtualMachineID: a.VirtualMachineID, - ProtectionStatus: a.ProtectionStatus, - ProtectionState: a.ProtectionState, - HealthStatus: a.HealthStatus, - HealthDetails: a.HealthDetails, - KpisHealths: a.KpisHealths, - LastBackupStatus: a.LastBackupStatus, - LastBackupTime: a.LastBackupTime, - ProtectedItemDataID: a.ProtectedItemDataID, - ExtendedInfo: a.ExtendedInfo, - ExtendedProperties: a.ExtendedProperties, - ProtectedItemType: a.ProtectedItemType, BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, CreateMode: a.CreateMode, DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + ExtendedInfo: a.ExtendedInfo, + ExtendedProperties: a.ExtendedProperties, + FriendlyName: a.FriendlyName, + HealthDetails: a.HealthDetails, + HealthStatus: a.HealthStatus, + IsArchiveEnabled: a.IsArchiveEnabled, IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + KpisHealths: a.KpisHealths, + LastBackupStatus: a.LastBackupStatus, + LastBackupTime: a.LastBackupTime, + LastRecoveryPoint: a.LastRecoveryPoint, + PolicyID: a.PolicyID, PolicyName: a.PolicyName, - SoftDeleteRetentionPeriod: a.SoftDeleteRetentionPeriod, + ProtectedItemDataID: a.ProtectedItemDataID, + ProtectedItemType: a.ProtectedItemType, + ProtectionState: a.ProtectionState, + ProtectionStatus: a.ProtectionStatus, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + VirtualMachineID: a.VirtualMachineID, + WorkloadType: a.WorkloadType, } } // GetProtectedItem implements the ProtectedItemClassification interface for type AzureIaaSClassicComputeVMProtectedItem. func (a *AzureIaaSClassicComputeVMProtectedItem) GetProtectedItem() *ProtectedItem { return &ProtectedItem{ - ProtectedItemType: a.ProtectedItemType, BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, CreateMode: a.CreateMode, DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + IsArchiveEnabled: a.IsArchiveEnabled, IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + LastRecoveryPoint: a.LastRecoveryPoint, + PolicyID: a.PolicyID, PolicyName: a.PolicyName, - SoftDeleteRetentionPeriod: a.SoftDeleteRetentionPeriod, + ProtectedItemType: a.ProtectedItemType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + WorkloadType: a.WorkloadType, } } @@ -752,27 +751,27 @@ type AzureIaaSComputeVMContainer struct { // GetIaaSVMContainer implements the IaaSVMContainerClassification interface for type AzureIaaSComputeVMContainer. func (a *AzureIaaSComputeVMContainer) GetIaaSVMContainer() *IaaSVMContainer { return &IaaSVMContainer{ - VirtualMachineID: a.VirtualMachineID, - VirtualMachineVersion: a.VirtualMachineVersion, - ResourceGroup: a.ResourceGroup, - FriendlyName: a.FriendlyName, BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, - HealthStatus: a.HealthStatus, ContainerType: a.ContainerType, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, ProtectableObjectType: a.ProtectableObjectType, + RegistrationStatus: a.RegistrationStatus, + ResourceGroup: a.ResourceGroup, + VirtualMachineID: a.VirtualMachineID, + VirtualMachineVersion: a.VirtualMachineVersion, } } // GetProtectionContainer implements the ProtectionContainerClassification interface for type AzureIaaSComputeVMContainer. func (a *AzureIaaSComputeVMContainer) GetProtectionContainer() *ProtectionContainer { return &ProtectionContainer{ - FriendlyName: a.FriendlyName, BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, - HealthStatus: a.HealthStatus, ContainerType: a.ContainerType, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, ProtectableObjectType: a.ProtectableObjectType, + RegistrationStatus: a.RegistrationStatus, } } @@ -806,14 +805,14 @@ type AzureIaaSComputeVMProtectableItem struct { // GetIaaSVMProtectableItem implements the IaaSVMProtectableItemClassification interface for type AzureIaaSComputeVMProtectableItem. func (a *AzureIaaSComputeVMProtectableItem) GetIaaSVMProtectableItem() *IaaSVMProtectableItem { return &IaaSVMProtectableItem{ - VirtualMachineID: a.VirtualMachineID, - VirtualMachineVersion: a.VirtualMachineVersion, - ResourceGroup: a.ResourceGroup, BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, ProtectionState: a.ProtectionState, + ResourceGroup: a.ResourceGroup, + VirtualMachineID: a.VirtualMachineID, + VirtualMachineVersion: a.VirtualMachineVersion, + WorkloadType: a.WorkloadType, } } @@ -821,10 +820,10 @@ func (a *AzureIaaSComputeVMProtectableItem) GetIaaSVMProtectableItem() *IaaSVMPr func (a *AzureIaaSComputeVMProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { return &WorkloadProtectableItem{ BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, } } @@ -894,7 +893,7 @@ type AzureIaaSComputeVMProtectedItem struct { ResourceGuardOperationRequests []*string // Soft delete retention period in days - SoftDeleteRetentionPeriod *int32 + SoftDeleteRetentionPeriodInDays *int32 // ARM ID of the resource to be backed up. SourceResourceID *string @@ -924,60 +923,60 @@ type AzureIaaSComputeVMProtectedItem struct { // GetAzureIaaSVMProtectedItem implements the AzureIaaSVMProtectedItemClassification interface for type AzureIaaSComputeVMProtectedItem. func (a *AzureIaaSComputeVMProtectedItem) GetAzureIaaSVMProtectedItem() *AzureIaaSVMProtectedItem { return &AzureIaaSVMProtectedItem{ - FriendlyName: a.FriendlyName, - VirtualMachineID: a.VirtualMachineID, - ProtectionStatus: a.ProtectionStatus, - ProtectionState: a.ProtectionState, - HealthStatus: a.HealthStatus, - HealthDetails: a.HealthDetails, - KpisHealths: a.KpisHealths, - LastBackupStatus: a.LastBackupStatus, - LastBackupTime: a.LastBackupTime, - ProtectedItemDataID: a.ProtectedItemDataID, - ExtendedInfo: a.ExtendedInfo, - ExtendedProperties: a.ExtendedProperties, - ProtectedItemType: a.ProtectedItemType, BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, CreateMode: a.CreateMode, DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + ExtendedInfo: a.ExtendedInfo, + ExtendedProperties: a.ExtendedProperties, + FriendlyName: a.FriendlyName, + HealthDetails: a.HealthDetails, + HealthStatus: a.HealthStatus, + IsArchiveEnabled: a.IsArchiveEnabled, IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + KpisHealths: a.KpisHealths, + LastBackupStatus: a.LastBackupStatus, + LastBackupTime: a.LastBackupTime, + LastRecoveryPoint: a.LastRecoveryPoint, + PolicyID: a.PolicyID, PolicyName: a.PolicyName, - SoftDeleteRetentionPeriod: a.SoftDeleteRetentionPeriod, + ProtectedItemDataID: a.ProtectedItemDataID, + ProtectedItemType: a.ProtectedItemType, + ProtectionState: a.ProtectionState, + ProtectionStatus: a.ProtectionStatus, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + VirtualMachineID: a.VirtualMachineID, + WorkloadType: a.WorkloadType, } } // GetProtectedItem implements the ProtectedItemClassification interface for type AzureIaaSComputeVMProtectedItem. func (a *AzureIaaSComputeVMProtectedItem) GetProtectedItem() *ProtectedItem { return &ProtectedItem{ - ProtectedItemType: a.ProtectedItemType, BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, CreateMode: a.CreateMode, DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + IsArchiveEnabled: a.IsArchiveEnabled, IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + LastRecoveryPoint: a.LastRecoveryPoint, + PolicyID: a.PolicyID, PolicyName: a.PolicyName, - SoftDeleteRetentionPeriod: a.SoftDeleteRetentionPeriod, + ProtectedItemType: a.ProtectedItemType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + WorkloadType: a.WorkloadType, } } @@ -1062,14 +1061,14 @@ type AzureIaaSVMJob struct { // GetJob implements the JobClassification interface for type AzureIaaSVMJob. func (a *AzureIaaSVMJob) GetJob() *Job { return &Job{ - EntityFriendlyName: a.EntityFriendlyName, + ActivityID: a.ActivityID, BackupManagementType: a.BackupManagementType, - Operation: a.Operation, - Status: a.Status, - StartTime: a.StartTime, EndTime: a.EndTime, - ActivityID: a.ActivityID, + EntityFriendlyName: a.EntityFriendlyName, JobType: a.JobType, + Operation: a.Operation, + StartTime: a.StartTime, + Status: a.Status, } } @@ -1169,27 +1168,17 @@ type AzureIaaSVMJobV2 struct { // GetJob implements the JobClassification interface for type AzureIaaSVMJobV2. func (a *AzureIaaSVMJobV2) GetJob() *Job { return &Job{ - EntityFriendlyName: a.EntityFriendlyName, + ActivityID: a.ActivityID, BackupManagementType: a.BackupManagementType, + EndTime: a.EndTime, + EntityFriendlyName: a.EntityFriendlyName, + JobType: a.JobType, Operation: a.Operation, - Status: a.Status, StartTime: a.StartTime, - EndTime: a.EndTime, - ActivityID: a.ActivityID, - JobType: a.JobType, + Status: a.Status, } } -// AzureIaaSVMProtectedItemClassification provides polymorphic access to related types. -// Call the interface's GetAzureIaaSVMProtectedItem() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureIaaSClassicComputeVMProtectedItem, *AzureIaaSComputeVMProtectedItem, *AzureIaaSVMProtectedItem -type AzureIaaSVMProtectedItemClassification interface { - ProtectedItemClassification - // GetAzureIaaSVMProtectedItem returns the AzureIaaSVMProtectedItem content of the underlying type. - GetAzureIaaSVMProtectedItem() *AzureIaaSVMProtectedItem -} - // AzureIaaSVMProtectedItem - IaaS VM workload-specific backup item. type AzureIaaSVMProtectedItem struct { // REQUIRED; backup item type. @@ -1256,7 +1245,7 @@ type AzureIaaSVMProtectedItem struct { ResourceGuardOperationRequests []*string // Soft delete retention period in days - SoftDeleteRetentionPeriod *int32 + SoftDeleteRetentionPeriodInDays *int32 // ARM ID of the resource to be backed up. SourceResourceID *string @@ -1289,24 +1278,24 @@ func (a *AzureIaaSVMProtectedItem) GetAzureIaaSVMProtectedItem() *AzureIaaSVMPro // GetProtectedItem implements the ProtectedItemClassification interface for type AzureIaaSVMProtectedItem. func (a *AzureIaaSVMProtectedItem) GetProtectedItem() *ProtectedItem { return &ProtectedItem{ - ProtectedItemType: a.ProtectedItemType, BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, CreateMode: a.CreateMode, DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + IsArchiveEnabled: a.IsArchiveEnabled, IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + LastRecoveryPoint: a.LastRecoveryPoint, + PolicyID: a.PolicyID, PolicyName: a.PolicyName, - SoftDeleteRetentionPeriod: a.SoftDeleteRetentionPeriod, + ProtectedItemType: a.ProtectedItemType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + WorkloadType: a.WorkloadType, } } @@ -1364,22 +1353,12 @@ type AzureIaaSVMProtectionPolicy struct { // GetProtectionPolicy implements the ProtectionPolicyClassification interface for type AzureIaaSVMProtectionPolicy. func (a *AzureIaaSVMProtectionPolicy) GetProtectionPolicy() *ProtectionPolicy { return &ProtectionPolicy{ - ProtectedItemsCount: a.ProtectedItemsCount, BackupManagementType: a.BackupManagementType, + ProtectedItemsCount: a.ProtectedItemsCount, ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, } } -// AzureRecoveryServiceVaultProtectionIntentClassification provides polymorphic access to related types. -// Call the interface's GetAzureRecoveryServiceVaultProtectionIntent() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureRecoveryServiceVaultProtectionIntent, *AzureWorkloadAutoProtectionIntent, *AzureWorkloadSQLAutoProtectionIntent -type AzureRecoveryServiceVaultProtectionIntentClassification interface { - ProtectionIntentClassification - // GetAzureRecoveryServiceVaultProtectionIntent returns the AzureRecoveryServiceVaultProtectionIntent content of the underlying type. - GetAzureRecoveryServiceVaultProtectionIntent() *AzureRecoveryServiceVaultProtectionIntent -} - // AzureRecoveryServiceVaultProtectionIntent - Azure Recovery Services Vault specific protection intent item. type AzureRecoveryServiceVaultProtectionIntent struct { // REQUIRED; backup protectionIntent type. @@ -1410,12 +1389,12 @@ func (a *AzureRecoveryServiceVaultProtectionIntent) GetAzureRecoveryServiceVault // GetProtectionIntent implements the ProtectionIntentClassification interface for type AzureRecoveryServiceVaultProtectionIntent. func (a *AzureRecoveryServiceVaultProtectionIntent) GetProtectionIntent() *ProtectionIntent { return &ProtectionIntent{ - ProtectionIntentItemType: a.ProtectionIntentItemType, BackupManagementType: a.BackupManagementType, - SourceResourceID: a.SourceResourceID, ItemID: a.ItemID, PolicyID: a.PolicyID, + ProtectionIntentItemType: a.ProtectionIntentItemType, ProtectionState: a.ProtectionState, + SourceResourceID: a.SourceResourceID, } } @@ -1446,12 +1425,12 @@ type AzureResourceProtectionIntent struct { // GetProtectionIntent implements the ProtectionIntentClassification interface for type AzureResourceProtectionIntent. func (a *AzureResourceProtectionIntent) GetProtectionIntent() *ProtectionIntent { return &ProtectionIntent{ - ProtectionIntentItemType: a.ProtectionIntentItemType, BackupManagementType: a.BackupManagementType, - SourceResourceID: a.SourceResourceID, ItemID: a.ItemID, PolicyID: a.PolicyID, + ProtectionIntentItemType: a.ProtectionIntentItemType, ProtectionState: a.ProtectionState, + SourceResourceID: a.SourceResourceID, } } @@ -1497,29 +1476,29 @@ type AzureSQLAGWorkloadContainerProtectionContainer struct { // GetAzureWorkloadContainer implements the AzureWorkloadContainerClassification interface for type AzureSQLAGWorkloadContainerProtectionContainer. func (a *AzureSQLAGWorkloadContainerProtectionContainer) GetAzureWorkloadContainer() *AzureWorkloadContainer { return &AzureWorkloadContainer{ - SourceResourceID: a.SourceResourceID, - LastUpdatedTime: a.LastUpdatedTime, + BackupManagementType: a.BackupManagementType, + ContainerType: a.ContainerType, ExtendedInfo: a.ExtendedInfo, - WorkloadType: a.WorkloadType, - OperationType: a.OperationType, FriendlyName: a.FriendlyName, - BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, HealthStatus: a.HealthStatus, - ContainerType: a.ContainerType, + LastUpdatedTime: a.LastUpdatedTime, + OperationType: a.OperationType, ProtectableObjectType: a.ProtectableObjectType, + RegistrationStatus: a.RegistrationStatus, + SourceResourceID: a.SourceResourceID, + WorkloadType: a.WorkloadType, } } // GetProtectionContainer implements the ProtectionContainerClassification interface for type AzureSQLAGWorkloadContainerProtectionContainer. func (a *AzureSQLAGWorkloadContainerProtectionContainer) GetProtectionContainer() *ProtectionContainer { return &ProtectionContainer{ - FriendlyName: a.FriendlyName, BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, - HealthStatus: a.HealthStatus, ContainerType: a.ContainerType, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, ProtectableObjectType: a.ProtectableObjectType, + RegistrationStatus: a.RegistrationStatus, } } @@ -1550,12 +1529,12 @@ type AzureSQLContainer struct { // GetProtectionContainer implements the ProtectionContainerClassification interface for type AzureSQLContainer. func (a *AzureSQLContainer) GetProtectionContainer() *ProtectionContainer { return &ProtectionContainer{ - FriendlyName: a.FriendlyName, BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, - HealthStatus: a.HealthStatus, ContainerType: a.ContainerType, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, ProtectableObjectType: a.ProtectableObjectType, + RegistrationStatus: a.RegistrationStatus, } } @@ -1613,7 +1592,7 @@ type AzureSQLProtectedItem struct { ResourceGuardOperationRequests []*string // Soft delete retention period in days - SoftDeleteRetentionPeriod *int32 + SoftDeleteRetentionPeriodInDays *int32 // ARM ID of the resource to be backed up. SourceResourceID *string @@ -1628,24 +1607,24 @@ type AzureSQLProtectedItem struct { // GetProtectedItem implements the ProtectedItemClassification interface for type AzureSQLProtectedItem. func (a *AzureSQLProtectedItem) GetProtectedItem() *ProtectedItem { return &ProtectedItem{ - ProtectedItemType: a.ProtectedItemType, BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, CreateMode: a.CreateMode, DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + IsArchiveEnabled: a.IsArchiveEnabled, IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + LastRecoveryPoint: a.LastRecoveryPoint, + PolicyID: a.PolicyID, PolicyName: a.PolicyName, - SoftDeleteRetentionPeriod: a.SoftDeleteRetentionPeriod, + ProtectedItemType: a.ProtectedItemType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + WorkloadType: a.WorkloadType, } } @@ -1679,8 +1658,8 @@ type AzureSQLProtectionPolicy struct { // GetProtectionPolicy implements the ProtectionPolicyClassification interface for type AzureSQLProtectionPolicy. func (a *AzureSQLProtectionPolicy) GetProtectionPolicy() *ProtectionPolicy { return &ProtectionPolicy{ - ProtectedItemsCount: a.ProtectedItemsCount, BackupManagementType: a.BackupManagementType, + ProtectedItemsCount: a.ProtectedItemsCount, ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, } } @@ -1727,12 +1706,12 @@ type AzureStorageContainer struct { // GetProtectionContainer implements the ProtectionContainerClassification interface for type AzureStorageContainer. func (a *AzureStorageContainer) GetProtectionContainer() *ProtectionContainer { return &ProtectionContainer{ - FriendlyName: a.FriendlyName, BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, - HealthStatus: a.HealthStatus, ContainerType: a.ContainerType, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, ProtectableObjectType: a.ProtectableObjectType, + RegistrationStatus: a.RegistrationStatus, } } @@ -1799,14 +1778,14 @@ type AzureStorageJob struct { // GetJob implements the JobClassification interface for type AzureStorageJob. func (a *AzureStorageJob) GetJob() *Job { return &Job{ - EntityFriendlyName: a.EntityFriendlyName, + ActivityID: a.ActivityID, BackupManagementType: a.BackupManagementType, - Operation: a.Operation, - Status: a.Status, - StartTime: a.StartTime, EndTime: a.EndTime, - ActivityID: a.ActivityID, + EntityFriendlyName: a.EntityFriendlyName, JobType: a.JobType, + Operation: a.Operation, + StartTime: a.StartTime, + Status: a.Status, } } @@ -1854,11 +1833,11 @@ type AzureStorageProtectableContainer struct { // GetProtectableContainer implements the ProtectableContainerClassification interface for type AzureStorageProtectableContainer. func (a *AzureStorageProtectableContainer) GetProtectableContainer() *ProtectableContainer { return &ProtectableContainer{ - FriendlyName: a.FriendlyName, BackupManagementType: a.BackupManagementType, - ProtectableContainerType: a.ProtectableContainerType, - HealthStatus: a.HealthStatus, ContainerID: a.ContainerID, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, + ProtectableContainerType: a.ProtectableContainerType, } } @@ -1885,11 +1864,11 @@ type AzureVMAppContainerProtectableContainer struct { // GetProtectableContainer implements the ProtectableContainerClassification interface for type AzureVMAppContainerProtectableContainer. func (a *AzureVMAppContainerProtectableContainer) GetProtectableContainer() *ProtectableContainer { return &ProtectableContainer{ - FriendlyName: a.FriendlyName, BackupManagementType: a.BackupManagementType, - ProtectableContainerType: a.ProtectableContainerType, - HealthStatus: a.HealthStatus, ContainerID: a.ContainerID, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, + ProtectableContainerType: a.ProtectableContainerType, } } @@ -1935,29 +1914,29 @@ type AzureVMAppContainerProtectionContainer struct { // GetAzureWorkloadContainer implements the AzureWorkloadContainerClassification interface for type AzureVMAppContainerProtectionContainer. func (a *AzureVMAppContainerProtectionContainer) GetAzureWorkloadContainer() *AzureWorkloadContainer { return &AzureWorkloadContainer{ - SourceResourceID: a.SourceResourceID, - LastUpdatedTime: a.LastUpdatedTime, + BackupManagementType: a.BackupManagementType, + ContainerType: a.ContainerType, ExtendedInfo: a.ExtendedInfo, - WorkloadType: a.WorkloadType, - OperationType: a.OperationType, FriendlyName: a.FriendlyName, - BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, HealthStatus: a.HealthStatus, - ContainerType: a.ContainerType, + LastUpdatedTime: a.LastUpdatedTime, + OperationType: a.OperationType, ProtectableObjectType: a.ProtectableObjectType, + RegistrationStatus: a.RegistrationStatus, + SourceResourceID: a.SourceResourceID, + WorkloadType: a.WorkloadType, } } // GetProtectionContainer implements the ProtectionContainerClassification interface for type AzureVMAppContainerProtectionContainer. func (a *AzureVMAppContainerProtectionContainer) GetProtectionContainer() *ProtectionContainer { return &ProtectionContainer{ - FriendlyName: a.FriendlyName, BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, - HealthStatus: a.HealthStatus, ContainerType: a.ContainerType, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, ProtectableObjectType: a.ProtectableObjectType, + RegistrationStatus: a.RegistrationStatus, } } @@ -1986,17 +1965,6 @@ type AzureVMResourceFeatureSupportResponse struct { SupportStatus *SupportStatus } -// AzureVMWorkloadItemClassification provides polymorphic access to related types. -// Call the interface's GetAzureVMWorkloadItem() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureVMWorkloadItem, *AzureVMWorkloadSAPAseDatabaseWorkloadItem, *AzureVMWorkloadSAPAseSystemWorkloadItem, *AzureVMWorkloadSAPHanaDatabaseWorkloadItem, -// - *AzureVMWorkloadSAPHanaSystemWorkloadItem, *AzureVMWorkloadSQLDatabaseWorkloadItem, *AzureVMWorkloadSQLInstanceWorkloadItem -type AzureVMWorkloadItemClassification interface { - WorkloadItemClassification - // GetAzureVMWorkloadItem returns the AzureVMWorkloadItem content of the underlying type. - GetAzureVMWorkloadItem() *AzureVMWorkloadItem -} - // AzureVMWorkloadItem - Azure VM workload-specific workload item. type AzureVMWorkloadItem struct { // REQUIRED; Type of the backup item. @@ -2037,25 +2005,13 @@ func (a *AzureVMWorkloadItem) GetAzureVMWorkloadItem() *AzureVMWorkloadItem { re func (a *AzureVMWorkloadItem) GetWorkloadItem() *WorkloadItem { return &WorkloadItem{ BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - WorkloadItemType: a.WorkloadItemType, FriendlyName: a.FriendlyName, ProtectionState: a.ProtectionState, + WorkloadItemType: a.WorkloadItemType, + WorkloadType: a.WorkloadType, } } -// AzureVMWorkloadProtectableItemClassification provides polymorphic access to related types. -// Call the interface's GetAzureVMWorkloadProtectableItem() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureVMWorkloadProtectableItem, *AzureVMWorkloadSAPAseSystemProtectableItem, *AzureVMWorkloadSAPHanaDBInstance, *AzureVMWorkloadSAPHanaDatabaseProtectableItem, -// - *AzureVMWorkloadSAPHanaHSR, *AzureVMWorkloadSAPHanaSystemProtectableItem, *AzureVMWorkloadSQLAvailabilityGroupProtectableItem, -// - *AzureVMWorkloadSQLDatabaseProtectableItem, *AzureVMWorkloadSQLInstanceProtectableItem -type AzureVMWorkloadProtectableItemClassification interface { - WorkloadProtectableItemClassification - // GetAzureVMWorkloadProtectableItem returns the AzureVMWorkloadProtectableItem content of the underlying type. - GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem -} - // AzureVMWorkloadProtectableItem - Azure VM workload-specific protectable item. type AzureVMWorkloadProtectableItem struct { // REQUIRED; Type of the backup item. @@ -2073,6 +2029,9 @@ type AzureVMWorkloadProtectableItem struct { // Indicates if protectable item is auto-protected IsAutoProtected *bool + // Indicates if item is protectable + IsProtectable *bool + // Name for instance or AG ParentName *string @@ -2108,24 +2067,13 @@ func (a *AzureVMWorkloadProtectableItem) GetAzureVMWorkloadProtectableItem() *Az func (a *AzureVMWorkloadProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { return &WorkloadProtectableItem{ BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, } } -// AzureVMWorkloadProtectedItemClassification provides polymorphic access to related types. -// Call the interface's GetAzureVMWorkloadProtectedItem() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureVMWorkloadProtectedItem, *AzureVMWorkloadSAPAseDatabaseProtectedItem, *AzureVMWorkloadSAPHanaDBInstanceProtectedItem, -// - *AzureVMWorkloadSAPHanaDatabaseProtectedItem, *AzureVMWorkloadSQLDatabaseProtectedItem -type AzureVMWorkloadProtectedItemClassification interface { - ProtectedItemClassification - // GetAzureVMWorkloadProtectedItem returns the AzureVMWorkloadProtectedItem content of the underlying type. - GetAzureVMWorkloadProtectedItem() *AzureVMWorkloadProtectedItem -} - // AzureVMWorkloadProtectedItem - Azure VM workload-specific protected item. type AzureVMWorkloadProtectedItem struct { // REQUIRED; backup item type. @@ -2176,6 +2124,9 @@ type AzureVMWorkloadProtectedItem struct { // Timestamp when the last (latest) backup copy was created for this backup item. LastRecoveryPoint *time.Time + // List of the nodes in case of distributed container. + NodesList []*DistributedNodesInfo + // Parent name of the DB such as Instance or Availability Group. ParentName *string @@ -2204,7 +2155,7 @@ type AzureVMWorkloadProtectedItem struct { ServerName *string // Soft delete retention period in days - SoftDeleteRetentionPeriod *int32 + SoftDeleteRetentionPeriodInDays *int32 // ARM ID of the resource to be backed up. SourceResourceID *string @@ -2230,24 +2181,24 @@ func (a *AzureVMWorkloadProtectedItem) GetAzureVMWorkloadProtectedItem() *AzureV // GetProtectedItem implements the ProtectedItemClassification interface for type AzureVMWorkloadProtectedItem. func (a *AzureVMWorkloadProtectedItem) GetProtectedItem() *ProtectedItem { return &ProtectedItem{ - ProtectedItemType: a.ProtectedItemType, BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, CreateMode: a.CreateMode, DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + IsArchiveEnabled: a.IsArchiveEnabled, IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + LastRecoveryPoint: a.LastRecoveryPoint, + PolicyID: a.PolicyID, PolicyName: a.PolicyName, - SoftDeleteRetentionPeriod: a.SoftDeleteRetentionPeriod, + ProtectedItemType: a.ProtectedItemType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + WorkloadType: a.WorkloadType, } } @@ -2302,8 +2253,8 @@ type AzureVMWorkloadProtectionPolicy struct { // GetProtectionPolicy implements the ProtectionPolicyClassification interface for type AzureVMWorkloadProtectionPolicy. func (a *AzureVMWorkloadProtectionPolicy) GetProtectionPolicy() *ProtectionPolicy { return &ProtectionPolicy{ - ProtectedItemsCount: a.ProtectedItemsCount, BackupManagementType: a.BackupManagementType, + ProtectedItemsCount: a.ProtectedItemsCount, ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, } } @@ -2358,6 +2309,9 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { // Timestamp when the last (latest) backup copy was created for this backup item. LastRecoveryPoint *time.Time + // List of the nodes in case of distributed container. + NodesList []*DistributedNodesInfo + // Parent name of the DB such as Instance or Availability Group. ParentName *string @@ -2386,7 +2340,7 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { ServerName *string // Soft delete retention period in days - SoftDeleteRetentionPeriod *int32 + SoftDeleteRetentionPeriodInDays *int32 // ARM ID of the resource to be backed up. SourceResourceID *string @@ -2407,61 +2361,62 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { // GetAzureVMWorkloadProtectedItem implements the AzureVMWorkloadProtectedItemClassification interface for type AzureVMWorkloadSAPAseDatabaseProtectedItem. func (a *AzureVMWorkloadSAPAseDatabaseProtectedItem) GetAzureVMWorkloadProtectedItem() *AzureVMWorkloadProtectedItem { return &AzureVMWorkloadProtectedItem{ - FriendlyName: a.FriendlyName, - ServerName: a.ServerName, - ParentName: a.ParentName, - ParentType: a.ParentType, - ProtectionStatus: a.ProtectionStatus, - ProtectionState: a.ProtectionState, - LastBackupStatus: a.LastBackupStatus, - LastBackupTime: a.LastBackupTime, - LastBackupErrorDetail: a.LastBackupErrorDetail, - ProtectedItemDataSourceID: a.ProtectedItemDataSourceID, - ProtectedItemHealthStatus: a.ProtectedItemHealthStatus, - ExtendedInfo: a.ExtendedInfo, - KpisHealths: a.KpisHealths, - ProtectedItemType: a.ProtectedItemType, BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, CreateMode: a.CreateMode, DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + ExtendedInfo: a.ExtendedInfo, + FriendlyName: a.FriendlyName, + IsArchiveEnabled: a.IsArchiveEnabled, IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + KpisHealths: a.KpisHealths, + LastBackupErrorDetail: a.LastBackupErrorDetail, + LastBackupStatus: a.LastBackupStatus, + LastBackupTime: a.LastBackupTime, + LastRecoveryPoint: a.LastRecoveryPoint, + NodesList: a.NodesList, + ParentName: a.ParentName, + ParentType: a.ParentType, + PolicyID: a.PolicyID, PolicyName: a.PolicyName, - SoftDeleteRetentionPeriod: a.SoftDeleteRetentionPeriod, + ProtectedItemDataSourceID: a.ProtectedItemDataSourceID, + ProtectedItemHealthStatus: a.ProtectedItemHealthStatus, + ProtectedItemType: a.ProtectedItemType, + ProtectionState: a.ProtectionState, + ProtectionStatus: a.ProtectionStatus, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + ServerName: a.ServerName, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + WorkloadType: a.WorkloadType, } } // GetProtectedItem implements the ProtectedItemClassification interface for type AzureVMWorkloadSAPAseDatabaseProtectedItem. func (a *AzureVMWorkloadSAPAseDatabaseProtectedItem) GetProtectedItem() *ProtectedItem { return &ProtectedItem{ - ProtectedItemType: a.ProtectedItemType, BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, CreateMode: a.CreateMode, DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + IsArchiveEnabled: a.IsArchiveEnabled, IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + LastRecoveryPoint: a.LastRecoveryPoint, + PolicyID: a.PolicyID, PolicyName: a.PolicyName, - SoftDeleteRetentionPeriod: a.SoftDeleteRetentionPeriod, + ProtectedItemType: a.ProtectedItemType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + WorkloadType: a.WorkloadType, } } @@ -2501,16 +2456,16 @@ type AzureVMWorkloadSAPAseDatabaseWorkloadItem struct { // GetAzureVMWorkloadItem implements the AzureVMWorkloadItemClassification interface for type AzureVMWorkloadSAPAseDatabaseWorkloadItem. func (a *AzureVMWorkloadSAPAseDatabaseWorkloadItem) GetAzureVMWorkloadItem() *AzureVMWorkloadItem { return &AzureVMWorkloadItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, ParentName: a.ParentName, + ProtectionState: a.ProtectionState, ServerName: a.ServerName, - IsAutoProtectable: a.IsAutoProtectable, - Subinquireditemcount: a.Subinquireditemcount, SubWorkloadItemCount: a.SubWorkloadItemCount, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, + Subinquireditemcount: a.Subinquireditemcount, WorkloadItemType: a.WorkloadItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, } } @@ -2518,10 +2473,10 @@ func (a *AzureVMWorkloadSAPAseDatabaseWorkloadItem) GetAzureVMWorkloadItem() *Az func (a *AzureVMWorkloadSAPAseDatabaseWorkloadItem) GetWorkloadItem() *WorkloadItem { return &WorkloadItem{ BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - WorkloadItemType: a.WorkloadItemType, FriendlyName: a.FriendlyName, ProtectionState: a.ProtectionState, + WorkloadItemType: a.WorkloadItemType, + WorkloadType: a.WorkloadType, } } @@ -2542,6 +2497,9 @@ type AzureVMWorkloadSAPAseSystemProtectableItem struct { // Indicates if protectable item is auto-protected IsAutoProtected *bool + // Indicates if item is protectable + IsProtectable *bool + // Name for instance or AG ParentName *string @@ -2571,19 +2529,20 @@ type AzureVMWorkloadSAPAseSystemProtectableItem struct { // GetAzureVMWorkloadProtectableItem implements the AzureVMWorkloadProtectableItemClassification interface for type AzureVMWorkloadSAPAseSystemProtectableItem. func (a *AzureVMWorkloadSAPAseSystemProtectableItem) GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem { return &AzureVMWorkloadProtectableItem{ - ParentName: a.ParentName, - ParentUniqueName: a.ParentUniqueName, - ServerName: a.ServerName, + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, IsAutoProtectable: a.IsAutoProtectable, IsAutoProtected: a.IsAutoProtected, - Subinquireditemcount: a.Subinquireditemcount, - Subprotectableitemcount: a.Subprotectableitemcount, + IsProtectable: a.IsProtectable, + ParentName: a.ParentName, + ParentUniqueName: a.ParentUniqueName, Prebackupvalidation: a.Prebackupvalidation, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, ProtectableItemType: a.ProtectableItemType, - FriendlyName: a.FriendlyName, ProtectionState: a.ProtectionState, + ServerName: a.ServerName, + Subinquireditemcount: a.Subinquireditemcount, + Subprotectableitemcount: a.Subprotectableitemcount, + WorkloadType: a.WorkloadType, } } @@ -2591,10 +2550,10 @@ func (a *AzureVMWorkloadSAPAseSystemProtectableItem) GetAzureVMWorkloadProtectab func (a *AzureVMWorkloadSAPAseSystemProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { return &WorkloadProtectableItem{ BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, } } @@ -2634,16 +2593,16 @@ type AzureVMWorkloadSAPAseSystemWorkloadItem struct { // GetAzureVMWorkloadItem implements the AzureVMWorkloadItemClassification interface for type AzureVMWorkloadSAPAseSystemWorkloadItem. func (a *AzureVMWorkloadSAPAseSystemWorkloadItem) GetAzureVMWorkloadItem() *AzureVMWorkloadItem { return &AzureVMWorkloadItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, ParentName: a.ParentName, + ProtectionState: a.ProtectionState, ServerName: a.ServerName, - IsAutoProtectable: a.IsAutoProtectable, - Subinquireditemcount: a.Subinquireditemcount, SubWorkloadItemCount: a.SubWorkloadItemCount, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, + Subinquireditemcount: a.Subinquireditemcount, WorkloadItemType: a.WorkloadItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, } } @@ -2651,10 +2610,10 @@ func (a *AzureVMWorkloadSAPAseSystemWorkloadItem) GetAzureVMWorkloadItem() *Azur func (a *AzureVMWorkloadSAPAseSystemWorkloadItem) GetWorkloadItem() *WorkloadItem { return &WorkloadItem{ BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - WorkloadItemType: a.WorkloadItemType, FriendlyName: a.FriendlyName, ProtectionState: a.ProtectionState, + WorkloadItemType: a.WorkloadItemType, + WorkloadType: a.WorkloadType, } } @@ -2675,6 +2634,9 @@ type AzureVMWorkloadSAPHanaDBInstance struct { // Indicates if protectable item is auto-protected IsAutoProtected *bool + // Indicates if item is protectable + IsProtectable *bool + // Name for instance or AG ParentName *string @@ -2704,19 +2666,20 @@ type AzureVMWorkloadSAPHanaDBInstance struct { // GetAzureVMWorkloadProtectableItem implements the AzureVMWorkloadProtectableItemClassification interface for type AzureVMWorkloadSAPHanaDBInstance. func (a *AzureVMWorkloadSAPHanaDBInstance) GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem { return &AzureVMWorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, + IsAutoProtected: a.IsAutoProtected, + IsProtectable: a.IsProtectable, ParentName: a.ParentName, ParentUniqueName: a.ParentUniqueName, + Prebackupvalidation: a.Prebackupvalidation, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, ServerName: a.ServerName, - IsAutoProtectable: a.IsAutoProtectable, - IsAutoProtected: a.IsAutoProtected, Subinquireditemcount: a.Subinquireditemcount, Subprotectableitemcount: a.Subprotectableitemcount, - Prebackupvalidation: a.Prebackupvalidation, - BackupManagementType: a.BackupManagementType, WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, } } @@ -2724,10 +2687,10 @@ func (a *AzureVMWorkloadSAPHanaDBInstance) GetAzureVMWorkloadProtectableItem() * func (a *AzureVMWorkloadSAPHanaDBInstance) GetWorkloadProtectableItem() *WorkloadProtectableItem { return &WorkloadProtectableItem{ BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, } } @@ -2781,6 +2744,9 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { // Timestamp when the last (latest) backup copy was created for this backup item. LastRecoveryPoint *time.Time + // List of the nodes in case of distributed container. + NodesList []*DistributedNodesInfo + // Parent name of the DB such as Instance or Availability Group. ParentName *string @@ -2809,7 +2775,7 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { ServerName *string // Soft delete retention period in days - SoftDeleteRetentionPeriod *int32 + SoftDeleteRetentionPeriodInDays *int32 // ARM ID of the resource to be backed up. SourceResourceID *string @@ -2830,61 +2796,62 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { // GetAzureVMWorkloadProtectedItem implements the AzureVMWorkloadProtectedItemClassification interface for type AzureVMWorkloadSAPHanaDBInstanceProtectedItem. func (a *AzureVMWorkloadSAPHanaDBInstanceProtectedItem) GetAzureVMWorkloadProtectedItem() *AzureVMWorkloadProtectedItem { return &AzureVMWorkloadProtectedItem{ - FriendlyName: a.FriendlyName, - ServerName: a.ServerName, - ParentName: a.ParentName, - ParentType: a.ParentType, - ProtectionStatus: a.ProtectionStatus, - ProtectionState: a.ProtectionState, - LastBackupStatus: a.LastBackupStatus, - LastBackupTime: a.LastBackupTime, - LastBackupErrorDetail: a.LastBackupErrorDetail, - ProtectedItemDataSourceID: a.ProtectedItemDataSourceID, - ProtectedItemHealthStatus: a.ProtectedItemHealthStatus, - ExtendedInfo: a.ExtendedInfo, - KpisHealths: a.KpisHealths, - ProtectedItemType: a.ProtectedItemType, BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, CreateMode: a.CreateMode, DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + ExtendedInfo: a.ExtendedInfo, + FriendlyName: a.FriendlyName, + IsArchiveEnabled: a.IsArchiveEnabled, IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + KpisHealths: a.KpisHealths, + LastBackupErrorDetail: a.LastBackupErrorDetail, + LastBackupStatus: a.LastBackupStatus, + LastBackupTime: a.LastBackupTime, + LastRecoveryPoint: a.LastRecoveryPoint, + NodesList: a.NodesList, + ParentName: a.ParentName, + ParentType: a.ParentType, + PolicyID: a.PolicyID, PolicyName: a.PolicyName, - SoftDeleteRetentionPeriod: a.SoftDeleteRetentionPeriod, + ProtectedItemDataSourceID: a.ProtectedItemDataSourceID, + ProtectedItemHealthStatus: a.ProtectedItemHealthStatus, + ProtectedItemType: a.ProtectedItemType, + ProtectionState: a.ProtectionState, + ProtectionStatus: a.ProtectionStatus, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + ServerName: a.ServerName, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + WorkloadType: a.WorkloadType, } } // GetProtectedItem implements the ProtectedItemClassification interface for type AzureVMWorkloadSAPHanaDBInstanceProtectedItem. func (a *AzureVMWorkloadSAPHanaDBInstanceProtectedItem) GetProtectedItem() *ProtectedItem { return &ProtectedItem{ - ProtectedItemType: a.ProtectedItemType, BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, CreateMode: a.CreateMode, DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + IsArchiveEnabled: a.IsArchiveEnabled, IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + LastRecoveryPoint: a.LastRecoveryPoint, + PolicyID: a.PolicyID, PolicyName: a.PolicyName, - SoftDeleteRetentionPeriod: a.SoftDeleteRetentionPeriod, + ProtectedItemType: a.ProtectedItemType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + WorkloadType: a.WorkloadType, } } @@ -2905,6 +2872,9 @@ type AzureVMWorkloadSAPHanaDatabaseProtectableItem struct { // Indicates if protectable item is auto-protected IsAutoProtected *bool + // Indicates if item is protectable + IsProtectable *bool + // Name for instance or AG ParentName *string @@ -2934,19 +2904,20 @@ type AzureVMWorkloadSAPHanaDatabaseProtectableItem struct { // GetAzureVMWorkloadProtectableItem implements the AzureVMWorkloadProtectableItemClassification interface for type AzureVMWorkloadSAPHanaDatabaseProtectableItem. func (a *AzureVMWorkloadSAPHanaDatabaseProtectableItem) GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem { return &AzureVMWorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, + IsAutoProtected: a.IsAutoProtected, + IsProtectable: a.IsProtectable, ParentName: a.ParentName, ParentUniqueName: a.ParentUniqueName, + Prebackupvalidation: a.Prebackupvalidation, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, ServerName: a.ServerName, - IsAutoProtectable: a.IsAutoProtectable, - IsAutoProtected: a.IsAutoProtected, Subinquireditemcount: a.Subinquireditemcount, Subprotectableitemcount: a.Subprotectableitemcount, - Prebackupvalidation: a.Prebackupvalidation, - BackupManagementType: a.BackupManagementType, WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, } } @@ -2954,10 +2925,10 @@ func (a *AzureVMWorkloadSAPHanaDatabaseProtectableItem) GetAzureVMWorkloadProtec func (a *AzureVMWorkloadSAPHanaDatabaseProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { return &WorkloadProtectableItem{ BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, } } @@ -3011,6 +2982,9 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { // Timestamp when the last (latest) backup copy was created for this backup item. LastRecoveryPoint *time.Time + // List of the nodes in case of distributed container. + NodesList []*DistributedNodesInfo + // Parent name of the DB such as Instance or Availability Group. ParentName *string @@ -3039,7 +3013,7 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { ServerName *string // Soft delete retention period in days - SoftDeleteRetentionPeriod *int32 + SoftDeleteRetentionPeriodInDays *int32 // ARM ID of the resource to be backed up. SourceResourceID *string @@ -3060,61 +3034,62 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { // GetAzureVMWorkloadProtectedItem implements the AzureVMWorkloadProtectedItemClassification interface for type AzureVMWorkloadSAPHanaDatabaseProtectedItem. func (a *AzureVMWorkloadSAPHanaDatabaseProtectedItem) GetAzureVMWorkloadProtectedItem() *AzureVMWorkloadProtectedItem { return &AzureVMWorkloadProtectedItem{ - FriendlyName: a.FriendlyName, - ServerName: a.ServerName, - ParentName: a.ParentName, - ParentType: a.ParentType, - ProtectionStatus: a.ProtectionStatus, - ProtectionState: a.ProtectionState, - LastBackupStatus: a.LastBackupStatus, - LastBackupTime: a.LastBackupTime, - LastBackupErrorDetail: a.LastBackupErrorDetail, - ProtectedItemDataSourceID: a.ProtectedItemDataSourceID, - ProtectedItemHealthStatus: a.ProtectedItemHealthStatus, - ExtendedInfo: a.ExtendedInfo, - KpisHealths: a.KpisHealths, - ProtectedItemType: a.ProtectedItemType, BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, CreateMode: a.CreateMode, DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + ExtendedInfo: a.ExtendedInfo, + FriendlyName: a.FriendlyName, + IsArchiveEnabled: a.IsArchiveEnabled, IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + KpisHealths: a.KpisHealths, + LastBackupErrorDetail: a.LastBackupErrorDetail, + LastBackupStatus: a.LastBackupStatus, + LastBackupTime: a.LastBackupTime, + LastRecoveryPoint: a.LastRecoveryPoint, + NodesList: a.NodesList, + ParentName: a.ParentName, + ParentType: a.ParentType, + PolicyID: a.PolicyID, PolicyName: a.PolicyName, - SoftDeleteRetentionPeriod: a.SoftDeleteRetentionPeriod, + ProtectedItemDataSourceID: a.ProtectedItemDataSourceID, + ProtectedItemHealthStatus: a.ProtectedItemHealthStatus, + ProtectedItemType: a.ProtectedItemType, + ProtectionState: a.ProtectionState, + ProtectionStatus: a.ProtectionStatus, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + ServerName: a.ServerName, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + WorkloadType: a.WorkloadType, } } // GetProtectedItem implements the ProtectedItemClassification interface for type AzureVMWorkloadSAPHanaDatabaseProtectedItem. func (a *AzureVMWorkloadSAPHanaDatabaseProtectedItem) GetProtectedItem() *ProtectedItem { return &ProtectedItem{ - ProtectedItemType: a.ProtectedItemType, BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, CreateMode: a.CreateMode, DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + IsArchiveEnabled: a.IsArchiveEnabled, IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + LastRecoveryPoint: a.LastRecoveryPoint, + PolicyID: a.PolicyID, PolicyName: a.PolicyName, - SoftDeleteRetentionPeriod: a.SoftDeleteRetentionPeriod, + ProtectedItemType: a.ProtectedItemType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + WorkloadType: a.WorkloadType, } } @@ -3154,16 +3129,16 @@ type AzureVMWorkloadSAPHanaDatabaseWorkloadItem struct { // GetAzureVMWorkloadItem implements the AzureVMWorkloadItemClassification interface for type AzureVMWorkloadSAPHanaDatabaseWorkloadItem. func (a *AzureVMWorkloadSAPHanaDatabaseWorkloadItem) GetAzureVMWorkloadItem() *AzureVMWorkloadItem { return &AzureVMWorkloadItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, ParentName: a.ParentName, + ProtectionState: a.ProtectionState, ServerName: a.ServerName, - IsAutoProtectable: a.IsAutoProtectable, - Subinquireditemcount: a.Subinquireditemcount, SubWorkloadItemCount: a.SubWorkloadItemCount, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, + Subinquireditemcount: a.Subinquireditemcount, WorkloadItemType: a.WorkloadItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, } } @@ -3171,15 +3146,15 @@ func (a *AzureVMWorkloadSAPHanaDatabaseWorkloadItem) GetAzureVMWorkloadItem() *A func (a *AzureVMWorkloadSAPHanaDatabaseWorkloadItem) GetWorkloadItem() *WorkloadItem { return &WorkloadItem{ BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - WorkloadItemType: a.WorkloadItemType, FriendlyName: a.FriendlyName, ProtectionState: a.ProtectionState, + WorkloadItemType: a.WorkloadItemType, + WorkloadType: a.WorkloadType, } } -// AzureVMWorkloadSAPHanaHSR - Azure VM workload-specific protectable item representing SAP HANA Dbinstance. -type AzureVMWorkloadSAPHanaHSR struct { +// AzureVMWorkloadSAPHanaHSRProtectableItem - Azure VM workload-specific protectable item representing HANA HSR. +type AzureVMWorkloadSAPHanaHSRProtectableItem struct { // REQUIRED; Type of the backup item. ProtectableItemType *string @@ -3195,6 +3170,9 @@ type AzureVMWorkloadSAPHanaHSR struct { // Indicates if protectable item is auto-protected IsAutoProtected *bool + // Indicates if item is protectable + IsProtectable *bool + // Name for instance or AG ParentName *string @@ -3221,33 +3199,34 @@ type AzureVMWorkloadSAPHanaHSR struct { WorkloadType *string } -// GetAzureVMWorkloadProtectableItem implements the AzureVMWorkloadProtectableItemClassification interface for type AzureVMWorkloadSAPHanaHSR. -func (a *AzureVMWorkloadSAPHanaHSR) GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem { +// GetAzureVMWorkloadProtectableItem implements the AzureVMWorkloadProtectableItemClassification interface for type AzureVMWorkloadSAPHanaHSRProtectableItem. +func (a *AzureVMWorkloadSAPHanaHSRProtectableItem) GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem { return &AzureVMWorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, + IsAutoProtected: a.IsAutoProtected, + IsProtectable: a.IsProtectable, ParentName: a.ParentName, ParentUniqueName: a.ParentUniqueName, + Prebackupvalidation: a.Prebackupvalidation, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, ServerName: a.ServerName, - IsAutoProtectable: a.IsAutoProtectable, - IsAutoProtected: a.IsAutoProtected, Subinquireditemcount: a.Subinquireditemcount, Subprotectableitemcount: a.Subprotectableitemcount, - Prebackupvalidation: a.Prebackupvalidation, - BackupManagementType: a.BackupManagementType, WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, } } -// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type AzureVMWorkloadSAPHanaHSR. -func (a *AzureVMWorkloadSAPHanaHSR) GetWorkloadProtectableItem() *WorkloadProtectableItem { +// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type AzureVMWorkloadSAPHanaHSRProtectableItem. +func (a *AzureVMWorkloadSAPHanaHSRProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { return &WorkloadProtectableItem{ BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, } } @@ -3268,6 +3247,9 @@ type AzureVMWorkloadSAPHanaSystemProtectableItem struct { // Indicates if protectable item is auto-protected IsAutoProtected *bool + // Indicates if item is protectable + IsProtectable *bool + // Name for instance or AG ParentName *string @@ -3297,19 +3279,20 @@ type AzureVMWorkloadSAPHanaSystemProtectableItem struct { // GetAzureVMWorkloadProtectableItem implements the AzureVMWorkloadProtectableItemClassification interface for type AzureVMWorkloadSAPHanaSystemProtectableItem. func (a *AzureVMWorkloadSAPHanaSystemProtectableItem) GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem { return &AzureVMWorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, + IsAutoProtected: a.IsAutoProtected, + IsProtectable: a.IsProtectable, ParentName: a.ParentName, ParentUniqueName: a.ParentUniqueName, + Prebackupvalidation: a.Prebackupvalidation, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, ServerName: a.ServerName, - IsAutoProtectable: a.IsAutoProtectable, - IsAutoProtected: a.IsAutoProtected, Subinquireditemcount: a.Subinquireditemcount, Subprotectableitemcount: a.Subprotectableitemcount, - Prebackupvalidation: a.Prebackupvalidation, - BackupManagementType: a.BackupManagementType, WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, } } @@ -3317,10 +3300,10 @@ func (a *AzureVMWorkloadSAPHanaSystemProtectableItem) GetAzureVMWorkloadProtecta func (a *AzureVMWorkloadSAPHanaSystemProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { return &WorkloadProtectableItem{ BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, } } @@ -3360,16 +3343,16 @@ type AzureVMWorkloadSAPHanaSystemWorkloadItem struct { // GetAzureVMWorkloadItem implements the AzureVMWorkloadItemClassification interface for type AzureVMWorkloadSAPHanaSystemWorkloadItem. func (a *AzureVMWorkloadSAPHanaSystemWorkloadItem) GetAzureVMWorkloadItem() *AzureVMWorkloadItem { return &AzureVMWorkloadItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, ParentName: a.ParentName, + ProtectionState: a.ProtectionState, ServerName: a.ServerName, - IsAutoProtectable: a.IsAutoProtectable, - Subinquireditemcount: a.Subinquireditemcount, SubWorkloadItemCount: a.SubWorkloadItemCount, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, + Subinquireditemcount: a.Subinquireditemcount, WorkloadItemType: a.WorkloadItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, } } @@ -3377,10 +3360,10 @@ func (a *AzureVMWorkloadSAPHanaSystemWorkloadItem) GetAzureVMWorkloadItem() *Azu func (a *AzureVMWorkloadSAPHanaSystemWorkloadItem) GetWorkloadItem() *WorkloadItem { return &WorkloadItem{ BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - WorkloadItemType: a.WorkloadItemType, FriendlyName: a.FriendlyName, ProtectionState: a.ProtectionState, + WorkloadItemType: a.WorkloadItemType, + WorkloadType: a.WorkloadType, } } @@ -3402,6 +3385,12 @@ type AzureVMWorkloadSQLAvailabilityGroupProtectableItem struct { // Indicates if protectable item is auto-protected IsAutoProtected *bool + // Indicates if item is protectable + IsProtectable *bool + + // List of the nodes in case of distributed container. + NodesList []*DistributedNodesInfo + // Name for instance or AG ParentName *string @@ -3431,19 +3420,20 @@ type AzureVMWorkloadSQLAvailabilityGroupProtectableItem struct { // GetAzureVMWorkloadProtectableItem implements the AzureVMWorkloadProtectableItemClassification interface for type AzureVMWorkloadSQLAvailabilityGroupProtectableItem. func (a *AzureVMWorkloadSQLAvailabilityGroupProtectableItem) GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem { return &AzureVMWorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, + IsAutoProtected: a.IsAutoProtected, + IsProtectable: a.IsProtectable, ParentName: a.ParentName, ParentUniqueName: a.ParentUniqueName, + Prebackupvalidation: a.Prebackupvalidation, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, ServerName: a.ServerName, - IsAutoProtectable: a.IsAutoProtectable, - IsAutoProtected: a.IsAutoProtected, Subinquireditemcount: a.Subinquireditemcount, Subprotectableitemcount: a.Subprotectableitemcount, - Prebackupvalidation: a.Prebackupvalidation, - BackupManagementType: a.BackupManagementType, WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, } } @@ -3451,10 +3441,10 @@ func (a *AzureVMWorkloadSQLAvailabilityGroupProtectableItem) GetAzureVMWorkloadP func (a *AzureVMWorkloadSQLAvailabilityGroupProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { return &WorkloadProtectableItem{ BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, } } @@ -3475,6 +3465,9 @@ type AzureVMWorkloadSQLDatabaseProtectableItem struct { // Indicates if protectable item is auto-protected IsAutoProtected *bool + // Indicates if item is protectable + IsProtectable *bool + // Name for instance or AG ParentName *string @@ -3504,19 +3497,20 @@ type AzureVMWorkloadSQLDatabaseProtectableItem struct { // GetAzureVMWorkloadProtectableItem implements the AzureVMWorkloadProtectableItemClassification interface for type AzureVMWorkloadSQLDatabaseProtectableItem. func (a *AzureVMWorkloadSQLDatabaseProtectableItem) GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem { return &AzureVMWorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, + IsAutoProtected: a.IsAutoProtected, + IsProtectable: a.IsProtectable, ParentName: a.ParentName, ParentUniqueName: a.ParentUniqueName, + Prebackupvalidation: a.Prebackupvalidation, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, ServerName: a.ServerName, - IsAutoProtectable: a.IsAutoProtectable, - IsAutoProtected: a.IsAutoProtected, Subinquireditemcount: a.Subinquireditemcount, Subprotectableitemcount: a.Subprotectableitemcount, - Prebackupvalidation: a.Prebackupvalidation, - BackupManagementType: a.BackupManagementType, WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, } } @@ -3524,10 +3518,10 @@ func (a *AzureVMWorkloadSQLDatabaseProtectableItem) GetAzureVMWorkloadProtectabl func (a *AzureVMWorkloadSQLDatabaseProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { return &WorkloadProtectableItem{ BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, } } @@ -3581,6 +3575,9 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { // Timestamp when the last (latest) backup copy was created for this backup item. LastRecoveryPoint *time.Time + // List of the nodes in case of distributed container. + NodesList []*DistributedNodesInfo + // Parent name of the DB such as Instance or Availability Group. ParentName *string @@ -3609,7 +3606,7 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { ServerName *string // Soft delete retention period in days - SoftDeleteRetentionPeriod *int32 + SoftDeleteRetentionPeriodInDays *int32 // ARM ID of the resource to be backed up. SourceResourceID *string @@ -3630,61 +3627,62 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { // GetAzureVMWorkloadProtectedItem implements the AzureVMWorkloadProtectedItemClassification interface for type AzureVMWorkloadSQLDatabaseProtectedItem. func (a *AzureVMWorkloadSQLDatabaseProtectedItem) GetAzureVMWorkloadProtectedItem() *AzureVMWorkloadProtectedItem { return &AzureVMWorkloadProtectedItem{ - FriendlyName: a.FriendlyName, - ServerName: a.ServerName, - ParentName: a.ParentName, - ParentType: a.ParentType, - ProtectionStatus: a.ProtectionStatus, - ProtectionState: a.ProtectionState, - LastBackupStatus: a.LastBackupStatus, - LastBackupTime: a.LastBackupTime, - LastBackupErrorDetail: a.LastBackupErrorDetail, - ProtectedItemDataSourceID: a.ProtectedItemDataSourceID, - ProtectedItemHealthStatus: a.ProtectedItemHealthStatus, - ExtendedInfo: a.ExtendedInfo, - KpisHealths: a.KpisHealths, - ProtectedItemType: a.ProtectedItemType, BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, CreateMode: a.CreateMode, DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + ExtendedInfo: a.ExtendedInfo, + FriendlyName: a.FriendlyName, + IsArchiveEnabled: a.IsArchiveEnabled, IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + KpisHealths: a.KpisHealths, + LastBackupErrorDetail: a.LastBackupErrorDetail, + LastBackupStatus: a.LastBackupStatus, + LastBackupTime: a.LastBackupTime, + LastRecoveryPoint: a.LastRecoveryPoint, + NodesList: a.NodesList, + ParentName: a.ParentName, + ParentType: a.ParentType, + PolicyID: a.PolicyID, PolicyName: a.PolicyName, - SoftDeleteRetentionPeriod: a.SoftDeleteRetentionPeriod, + ProtectedItemDataSourceID: a.ProtectedItemDataSourceID, + ProtectedItemHealthStatus: a.ProtectedItemHealthStatus, + ProtectedItemType: a.ProtectedItemType, + ProtectionState: a.ProtectionState, + ProtectionStatus: a.ProtectionStatus, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + ServerName: a.ServerName, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + WorkloadType: a.WorkloadType, } } // GetProtectedItem implements the ProtectedItemClassification interface for type AzureVMWorkloadSQLDatabaseProtectedItem. func (a *AzureVMWorkloadSQLDatabaseProtectedItem) GetProtectedItem() *ProtectedItem { return &ProtectedItem{ - ProtectedItemType: a.ProtectedItemType, BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, CreateMode: a.CreateMode, DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + IsArchiveEnabled: a.IsArchiveEnabled, IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + LastRecoveryPoint: a.LastRecoveryPoint, + PolicyID: a.PolicyID, PolicyName: a.PolicyName, - SoftDeleteRetentionPeriod: a.SoftDeleteRetentionPeriod, + ProtectedItemType: a.ProtectedItemType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + WorkloadType: a.WorkloadType, } } @@ -3724,16 +3722,16 @@ type AzureVMWorkloadSQLDatabaseWorkloadItem struct { // GetAzureVMWorkloadItem implements the AzureVMWorkloadItemClassification interface for type AzureVMWorkloadSQLDatabaseWorkloadItem. func (a *AzureVMWorkloadSQLDatabaseWorkloadItem) GetAzureVMWorkloadItem() *AzureVMWorkloadItem { return &AzureVMWorkloadItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, ParentName: a.ParentName, + ProtectionState: a.ProtectionState, ServerName: a.ServerName, - IsAutoProtectable: a.IsAutoProtectable, - Subinquireditemcount: a.Subinquireditemcount, SubWorkloadItemCount: a.SubWorkloadItemCount, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, + Subinquireditemcount: a.Subinquireditemcount, WorkloadItemType: a.WorkloadItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, } } @@ -3741,10 +3739,10 @@ func (a *AzureVMWorkloadSQLDatabaseWorkloadItem) GetAzureVMWorkloadItem() *Azure func (a *AzureVMWorkloadSQLDatabaseWorkloadItem) GetWorkloadItem() *WorkloadItem { return &WorkloadItem{ BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - WorkloadItemType: a.WorkloadItemType, FriendlyName: a.FriendlyName, ProtectionState: a.ProtectionState, + WorkloadItemType: a.WorkloadItemType, + WorkloadType: a.WorkloadType, } } @@ -3765,6 +3763,9 @@ type AzureVMWorkloadSQLInstanceProtectableItem struct { // Indicates if protectable item is auto-protected IsAutoProtected *bool + // Indicates if item is protectable + IsProtectable *bool + // Name for instance or AG ParentName *string @@ -3794,19 +3795,20 @@ type AzureVMWorkloadSQLInstanceProtectableItem struct { // GetAzureVMWorkloadProtectableItem implements the AzureVMWorkloadProtectableItemClassification interface for type AzureVMWorkloadSQLInstanceProtectableItem. func (a *AzureVMWorkloadSQLInstanceProtectableItem) GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem { return &AzureVMWorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, + IsAutoProtected: a.IsAutoProtected, + IsProtectable: a.IsProtectable, ParentName: a.ParentName, ParentUniqueName: a.ParentUniqueName, + Prebackupvalidation: a.Prebackupvalidation, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, ServerName: a.ServerName, - IsAutoProtectable: a.IsAutoProtectable, - IsAutoProtected: a.IsAutoProtected, Subinquireditemcount: a.Subinquireditemcount, Subprotectableitemcount: a.Subprotectableitemcount, - Prebackupvalidation: a.Prebackupvalidation, - BackupManagementType: a.BackupManagementType, WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, } } @@ -3814,10 +3816,10 @@ func (a *AzureVMWorkloadSQLInstanceProtectableItem) GetAzureVMWorkloadProtectabl func (a *AzureVMWorkloadSQLInstanceProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { return &WorkloadProtectableItem{ BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, } } @@ -3860,16 +3862,16 @@ type AzureVMWorkloadSQLInstanceWorkloadItem struct { // GetAzureVMWorkloadItem implements the AzureVMWorkloadItemClassification interface for type AzureVMWorkloadSQLInstanceWorkloadItem. func (a *AzureVMWorkloadSQLInstanceWorkloadItem) GetAzureVMWorkloadItem() *AzureVMWorkloadItem { return &AzureVMWorkloadItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, ParentName: a.ParentName, + ProtectionState: a.ProtectionState, ServerName: a.ServerName, - IsAutoProtectable: a.IsAutoProtectable, - Subinquireditemcount: a.Subinquireditemcount, SubWorkloadItemCount: a.SubWorkloadItemCount, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, + Subinquireditemcount: a.Subinquireditemcount, WorkloadItemType: a.WorkloadItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, } } @@ -3877,23 +3879,13 @@ func (a *AzureVMWorkloadSQLInstanceWorkloadItem) GetAzureVMWorkloadItem() *Azure func (a *AzureVMWorkloadSQLInstanceWorkloadItem) GetWorkloadItem() *WorkloadItem { return &WorkloadItem{ BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - WorkloadItemType: a.WorkloadItemType, FriendlyName: a.FriendlyName, ProtectionState: a.ProtectionState, + WorkloadItemType: a.WorkloadItemType, + WorkloadType: a.WorkloadType, } } -// AzureWorkloadAutoProtectionIntentClassification provides polymorphic access to related types. -// Call the interface's GetAzureWorkloadAutoProtectionIntent() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureWorkloadAutoProtectionIntent, *AzureWorkloadSQLAutoProtectionIntent -type AzureWorkloadAutoProtectionIntentClassification interface { - AzureRecoveryServiceVaultProtectionIntentClassification - // GetAzureWorkloadAutoProtectionIntent returns the AzureWorkloadAutoProtectionIntent content of the underlying type. - GetAzureWorkloadAutoProtectionIntent() *AzureWorkloadAutoProtectionIntent -} - // AzureWorkloadAutoProtectionIntent - Azure Recovery Services Vault specific protection intent item. type AzureWorkloadAutoProtectionIntent struct { // REQUIRED; backup protectionIntent type. @@ -3919,12 +3911,12 @@ type AzureWorkloadAutoProtectionIntent struct { // for type AzureWorkloadAutoProtectionIntent. func (a *AzureWorkloadAutoProtectionIntent) GetAzureRecoveryServiceVaultProtectionIntent() *AzureRecoveryServiceVaultProtectionIntent { return &AzureRecoveryServiceVaultProtectionIntent{ - ProtectionIntentItemType: a.ProtectionIntentItemType, BackupManagementType: a.BackupManagementType, - SourceResourceID: a.SourceResourceID, ItemID: a.ItemID, PolicyID: a.PolicyID, + ProtectionIntentItemType: a.ProtectionIntentItemType, ProtectionState: a.ProtectionState, + SourceResourceID: a.SourceResourceID, } } @@ -3937,12 +3929,12 @@ func (a *AzureWorkloadAutoProtectionIntent) GetAzureWorkloadAutoProtectionIntent // GetProtectionIntent implements the ProtectionIntentClassification interface for type AzureWorkloadAutoProtectionIntent. func (a *AzureWorkloadAutoProtectionIntent) GetProtectionIntent() *ProtectionIntent { return &ProtectionIntent{ - ProtectionIntentItemType: a.ProtectionIntentItemType, BackupManagementType: a.BackupManagementType, - SourceResourceID: a.SourceResourceID, ItemID: a.ItemID, PolicyID: a.PolicyID, + ProtectionIntentItemType: a.ProtectionIntentItemType, ProtectionState: a.ProtectionState, + SourceResourceID: a.SourceResourceID, } } @@ -3968,16 +3960,6 @@ func (a *AzureWorkloadBackupRequest) GetBackupRequest() *BackupRequest { } } -// AzureWorkloadContainerClassification provides polymorphic access to related types. -// Call the interface's GetAzureWorkloadContainer() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureSQLAGWorkloadContainerProtectionContainer, *AzureVMAppContainerProtectionContainer, *AzureWorkloadContainer -type AzureWorkloadContainerClassification interface { - ProtectionContainerClassification - // GetAzureWorkloadContainer returns the AzureWorkloadContainer content of the underlying type. - GetAzureWorkloadContainer() *AzureWorkloadContainer -} - // AzureWorkloadContainer - Container for the workloads running inside Azure Compute or Classic Compute. type AzureWorkloadContainer struct { // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines @@ -4023,12 +4005,12 @@ func (a *AzureWorkloadContainer) GetAzureWorkloadContainer() *AzureWorkloadConta // GetProtectionContainer implements the ProtectionContainerClassification interface for type AzureWorkloadContainer. func (a *AzureWorkloadContainer) GetProtectionContainer() *ProtectionContainer { return &ProtectionContainer{ - FriendlyName: a.FriendlyName, BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, - HealthStatus: a.HealthStatus, ContainerType: a.ContainerType, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, ProtectableObjectType: a.ProtectableObjectType, + RegistrationStatus: a.RegistrationStatus, } } @@ -4056,12 +4038,12 @@ type AzureWorkloadContainerAutoProtectionIntent struct { // GetProtectionIntent implements the ProtectionIntentClassification interface for type AzureWorkloadContainerAutoProtectionIntent. func (a *AzureWorkloadContainerAutoProtectionIntent) GetProtectionIntent() *ProtectionIntent { return &ProtectionIntent{ - ProtectionIntentItemType: a.ProtectionIntentItemType, BackupManagementType: a.BackupManagementType, - SourceResourceID: a.SourceResourceID, ItemID: a.ItemID, PolicyID: a.PolicyID, + ProtectionIntentItemType: a.ProtectionIntentItemType, ProtectionState: a.ProtectionState, + SourceResourceID: a.SourceResourceID, } } @@ -4140,14 +4122,14 @@ type AzureWorkloadJob struct { // GetJob implements the JobClassification interface for type AzureWorkloadJob. func (a *AzureWorkloadJob) GetJob() *Job { return &Job{ - EntityFriendlyName: a.EntityFriendlyName, + ActivityID: a.ActivityID, BackupManagementType: a.BackupManagementType, - Operation: a.Operation, - Status: a.Status, - StartTime: a.StartTime, EndTime: a.EndTime, - ActivityID: a.ActivityID, + EntityFriendlyName: a.EntityFriendlyName, JobType: a.JobType, + Operation: a.Operation, + StartTime: a.StartTime, + Status: a.Status, } } @@ -4172,16 +4154,6 @@ type AzureWorkloadJobTaskDetails struct { TaskID *string } -// AzureWorkloadPointInTimeRecoveryPointClassification provides polymorphic access to related types. -// Call the interface's GetAzureWorkloadPointInTimeRecoveryPoint() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureWorkloadPointInTimeRecoveryPoint, *AzureWorkloadSAPHanaPointInTimeRecoveryPoint -type AzureWorkloadPointInTimeRecoveryPointClassification interface { - AzureWorkloadRecoveryPointClassification - // GetAzureWorkloadPointInTimeRecoveryPoint returns the AzureWorkloadPointInTimeRecoveryPoint content of the underlying type. - GetAzureWorkloadPointInTimeRecoveryPoint() *AzureWorkloadPointInTimeRecoveryPoint -} - // AzureWorkloadPointInTimeRecoveryPoint - Recovery point specific to PointInTime type AzureWorkloadPointInTimeRecoveryPoint struct { // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. @@ -4215,12 +4187,12 @@ func (a *AzureWorkloadPointInTimeRecoveryPoint) GetAzureWorkloadPointInTimeRecov // GetAzureWorkloadRecoveryPoint implements the AzureWorkloadRecoveryPointClassification interface for type AzureWorkloadPointInTimeRecoveryPoint. func (a *AzureWorkloadPointInTimeRecoveryPoint) GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint { return &AzureWorkloadRecoveryPoint{ - RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, - Type: a.Type, - RecoveryPointTierDetails: a.RecoveryPointTierDetails, + ObjectType: a.ObjectType, RecoveryPointMoveReadinessInfo: a.RecoveryPointMoveReadinessInfo, RecoveryPointProperties: a.RecoveryPointProperties, - ObjectType: a.ObjectType, + RecoveryPointTierDetails: a.RecoveryPointTierDetails, + RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, + Type: a.Type, } } @@ -4261,13 +4233,13 @@ type AzureWorkloadPointInTimeRestoreRequest struct { // GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadPointInTimeRestoreRequest. func (a *AzureWorkloadPointInTimeRestoreRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { return &AzureWorkloadRestoreRequest{ + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, RecoveryType: a.RecoveryType, SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, } } @@ -4278,17 +4250,6 @@ func (a *AzureWorkloadPointInTimeRestoreRequest) GetRestoreRequest() *RestoreReq } } -// AzureWorkloadRecoveryPointClassification provides polymorphic access to related types. -// Call the interface's GetAzureWorkloadRecoveryPoint() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureWorkloadPointInTimeRecoveryPoint, *AzureWorkloadRecoveryPoint, *AzureWorkloadSAPHanaPointInTimeRecoveryPoint, *AzureWorkloadSAPHanaRecoveryPoint, -// - *AzureWorkloadSQLPointInTimeRecoveryPoint, *AzureWorkloadSQLRecoveryPoint -type AzureWorkloadRecoveryPointClassification interface { - RecoveryPointClassification - // GetAzureWorkloadRecoveryPoint returns the AzureWorkloadRecoveryPoint content of the underlying type. - GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint -} - // AzureWorkloadRecoveryPoint - Workload specific recovery point, specifically encapsulates full/diff recovery point type AzureWorkloadRecoveryPoint struct { // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. @@ -4322,19 +4283,6 @@ func (a *AzureWorkloadRecoveryPoint) GetRecoveryPoint() *RecoveryPoint { } } -// AzureWorkloadRestoreRequestClassification provides polymorphic access to related types. -// Call the interface's GetAzureWorkloadRestoreRequest() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureWorkloadPointInTimeRestoreRequest, *AzureWorkloadRestoreRequest, *AzureWorkloadSAPHanaPointInTimeRestoreRequest, -// - *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, *AzureWorkloadSAPHanaRestoreRequest, *AzureWorkloadSAPHanaRestoreWithRehydrateRequest, -// - *AzureWorkloadSQLPointInTimeRestoreRequest, *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, *AzureWorkloadSQLRestoreRequest, -// - *AzureWorkloadSQLRestoreWithRehydrateRequest -type AzureWorkloadRestoreRequestClassification interface { - RestoreRequestClassification - // GetAzureWorkloadRestoreRequest returns the AzureWorkloadRestoreRequest content of the underlying type. - GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest -} - // AzureWorkloadRestoreRequest - AzureWorkload-specific restore. type AzureWorkloadRestoreRequest struct { // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. @@ -4399,25 +4347,25 @@ type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct { // type AzureWorkloadSAPHanaPointInTimeRecoveryPoint. func (a *AzureWorkloadSAPHanaPointInTimeRecoveryPoint) GetAzureWorkloadPointInTimeRecoveryPoint() *AzureWorkloadPointInTimeRecoveryPoint { return &AzureWorkloadPointInTimeRecoveryPoint{ - TimeRanges: a.TimeRanges, - RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, - Type: a.Type, - RecoveryPointTierDetails: a.RecoveryPointTierDetails, + ObjectType: a.ObjectType, RecoveryPointMoveReadinessInfo: a.RecoveryPointMoveReadinessInfo, RecoveryPointProperties: a.RecoveryPointProperties, - ObjectType: a.ObjectType, + RecoveryPointTierDetails: a.RecoveryPointTierDetails, + RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, + TimeRanges: a.TimeRanges, + Type: a.Type, } } // GetAzureWorkloadRecoveryPoint implements the AzureWorkloadRecoveryPointClassification interface for type AzureWorkloadSAPHanaPointInTimeRecoveryPoint. func (a *AzureWorkloadSAPHanaPointInTimeRecoveryPoint) GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint { return &AzureWorkloadRecoveryPoint{ - RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, - Type: a.Type, - RecoveryPointTierDetails: a.RecoveryPointTierDetails, + ObjectType: a.ObjectType, RecoveryPointMoveReadinessInfo: a.RecoveryPointMoveReadinessInfo, RecoveryPointProperties: a.RecoveryPointProperties, - ObjectType: a.ObjectType, + RecoveryPointTierDetails: a.RecoveryPointTierDetails, + RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, + Type: a.Type, } } @@ -4428,16 +4376,6 @@ func (a *AzureWorkloadSAPHanaPointInTimeRecoveryPoint) GetRecoveryPoint() *Recov } } -// AzureWorkloadSAPHanaPointInTimeRestoreRequestClassification provides polymorphic access to related types. -// Call the interface's GetAzureWorkloadSAPHanaPointInTimeRestoreRequest() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureWorkloadSAPHanaPointInTimeRestoreRequest, *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest -type AzureWorkloadSAPHanaPointInTimeRestoreRequestClassification interface { - AzureWorkloadSAPHanaRestoreRequestClassification - // GetAzureWorkloadSAPHanaPointInTimeRestoreRequest returns the AzureWorkloadSAPHanaPointInTimeRestoreRequest content of the underlying type. - GetAzureWorkloadSAPHanaPointInTimeRestoreRequest() *AzureWorkloadSAPHanaPointInTimeRestoreRequest -} - // AzureWorkloadSAPHanaPointInTimeRestoreRequest - AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log // restore type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { @@ -4469,13 +4407,13 @@ type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { // GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadSAPHanaPointInTimeRestoreRequest. func (a *AzureWorkloadSAPHanaPointInTimeRestoreRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { return &AzureWorkloadRestoreRequest{ + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, RecoveryType: a.RecoveryType, SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, } } @@ -4489,13 +4427,13 @@ func (a *AzureWorkloadSAPHanaPointInTimeRestoreRequest) GetAzureWorkloadSAPHanaP // AzureWorkloadSAPHanaPointInTimeRestoreRequest. func (a *AzureWorkloadSAPHanaPointInTimeRestoreRequest) GetAzureWorkloadSAPHanaRestoreRequest() *AzureWorkloadSAPHanaRestoreRequest { return &AzureWorkloadSAPHanaRestoreRequest{ + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, RecoveryType: a.RecoveryType, SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, } } @@ -4540,13 +4478,13 @@ type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct { // GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest. func (a *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { return &AzureWorkloadRestoreRequest{ + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, RecoveryType: a.RecoveryType, SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, } } @@ -4554,14 +4492,14 @@ func (a *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) GetAzureWor // interface for type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest. func (a *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) GetAzureWorkloadSAPHanaPointInTimeRestoreRequest() *AzureWorkloadSAPHanaPointInTimeRestoreRequest { return &AzureWorkloadSAPHanaPointInTimeRestoreRequest{ + ObjectType: a.ObjectType, PointInTime: a.PointInTime, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, RecoveryType: a.RecoveryType, SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, } } @@ -4569,13 +4507,13 @@ func (a *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) GetAzureWor // AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest. func (a *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) GetAzureWorkloadSAPHanaRestoreRequest() *AzureWorkloadSAPHanaRestoreRequest { return &AzureWorkloadSAPHanaRestoreRequest{ + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, RecoveryType: a.RecoveryType, SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, } } @@ -4610,12 +4548,12 @@ type AzureWorkloadSAPHanaRecoveryPoint struct { // GetAzureWorkloadRecoveryPoint implements the AzureWorkloadRecoveryPointClassification interface for type AzureWorkloadSAPHanaRecoveryPoint. func (a *AzureWorkloadSAPHanaRecoveryPoint) GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint { return &AzureWorkloadRecoveryPoint{ - RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, - Type: a.Type, - RecoveryPointTierDetails: a.RecoveryPointTierDetails, + ObjectType: a.ObjectType, RecoveryPointMoveReadinessInfo: a.RecoveryPointMoveReadinessInfo, RecoveryPointProperties: a.RecoveryPointProperties, - ObjectType: a.ObjectType, + RecoveryPointTierDetails: a.RecoveryPointTierDetails, + RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, + Type: a.Type, } } @@ -4626,17 +4564,6 @@ func (a *AzureWorkloadSAPHanaRecoveryPoint) GetRecoveryPoint() *RecoveryPoint { } } -// AzureWorkloadSAPHanaRestoreRequestClassification provides polymorphic access to related types. -// Call the interface's GetAzureWorkloadSAPHanaRestoreRequest() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureWorkloadSAPHanaPointInTimeRestoreRequest, *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, *AzureWorkloadSAPHanaRestoreRequest, -// - *AzureWorkloadSAPHanaRestoreWithRehydrateRequest -type AzureWorkloadSAPHanaRestoreRequestClassification interface { - AzureWorkloadRestoreRequestClassification - // GetAzureWorkloadSAPHanaRestoreRequest returns the AzureWorkloadSAPHanaRestoreRequest content of the underlying type. - GetAzureWorkloadSAPHanaRestoreRequest() *AzureWorkloadSAPHanaRestoreRequest -} - // AzureWorkloadSAPHanaRestoreRequest - AzureWorkload SAP Hana-specific restore. type AzureWorkloadSAPHanaRestoreRequest struct { // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. @@ -4664,13 +4591,13 @@ type AzureWorkloadSAPHanaRestoreRequest struct { // GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadSAPHanaRestoreRequest. func (a *AzureWorkloadSAPHanaRestoreRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { return &AzureWorkloadRestoreRequest{ + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, RecoveryType: a.RecoveryType, SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, } } @@ -4718,13 +4645,13 @@ type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct { // GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadSAPHanaRestoreWithRehydrateRequest. func (a *AzureWorkloadSAPHanaRestoreWithRehydrateRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { return &AzureWorkloadRestoreRequest{ + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, RecoveryType: a.RecoveryType, SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, } } @@ -4732,13 +4659,13 @@ func (a *AzureWorkloadSAPHanaRestoreWithRehydrateRequest) GetAzureWorkloadRestor // AzureWorkloadSAPHanaRestoreWithRehydrateRequest. func (a *AzureWorkloadSAPHanaRestoreWithRehydrateRequest) GetAzureWorkloadSAPHanaRestoreRequest() *AzureWorkloadSAPHanaRestoreRequest { return &AzureWorkloadSAPHanaRestoreRequest{ + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, RecoveryType: a.RecoveryType, SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, } } @@ -4777,12 +4704,12 @@ type AzureWorkloadSQLAutoProtectionIntent struct { // for type AzureWorkloadSQLAutoProtectionIntent. func (a *AzureWorkloadSQLAutoProtectionIntent) GetAzureRecoveryServiceVaultProtectionIntent() *AzureRecoveryServiceVaultProtectionIntent { return &AzureRecoveryServiceVaultProtectionIntent{ - ProtectionIntentItemType: a.ProtectionIntentItemType, BackupManagementType: a.BackupManagementType, - SourceResourceID: a.SourceResourceID, ItemID: a.ItemID, PolicyID: a.PolicyID, + ProtectionIntentItemType: a.ProtectionIntentItemType, ProtectionState: a.ProtectionState, + SourceResourceID: a.SourceResourceID, } } @@ -4790,24 +4717,24 @@ func (a *AzureWorkloadSQLAutoProtectionIntent) GetAzureRecoveryServiceVaultProte // AzureWorkloadSQLAutoProtectionIntent. func (a *AzureWorkloadSQLAutoProtectionIntent) GetAzureWorkloadAutoProtectionIntent() *AzureWorkloadAutoProtectionIntent { return &AzureWorkloadAutoProtectionIntent{ - ProtectionIntentItemType: a.ProtectionIntentItemType, BackupManagementType: a.BackupManagementType, - SourceResourceID: a.SourceResourceID, ItemID: a.ItemID, PolicyID: a.PolicyID, + ProtectionIntentItemType: a.ProtectionIntentItemType, ProtectionState: a.ProtectionState, + SourceResourceID: a.SourceResourceID, } } // GetProtectionIntent implements the ProtectionIntentClassification interface for type AzureWorkloadSQLAutoProtectionIntent. func (a *AzureWorkloadSQLAutoProtectionIntent) GetProtectionIntent() *ProtectionIntent { return &ProtectionIntent{ - ProtectionIntentItemType: a.ProtectionIntentItemType, BackupManagementType: a.BackupManagementType, - SourceResourceID: a.SourceResourceID, ItemID: a.ItemID, PolicyID: a.PolicyID, + ProtectionIntentItemType: a.ProtectionIntentItemType, ProtectionState: a.ProtectionState, + SourceResourceID: a.SourceResourceID, } } @@ -4843,12 +4770,12 @@ type AzureWorkloadSQLPointInTimeRecoveryPoint struct { // GetAzureWorkloadRecoveryPoint implements the AzureWorkloadRecoveryPointClassification interface for type AzureWorkloadSQLPointInTimeRecoveryPoint. func (a *AzureWorkloadSQLPointInTimeRecoveryPoint) GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint { return &AzureWorkloadRecoveryPoint{ - RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, - Type: a.Type, - RecoveryPointTierDetails: a.RecoveryPointTierDetails, + ObjectType: a.ObjectType, RecoveryPointMoveReadinessInfo: a.RecoveryPointMoveReadinessInfo, RecoveryPointProperties: a.RecoveryPointProperties, - ObjectType: a.ObjectType, + RecoveryPointTierDetails: a.RecoveryPointTierDetails, + RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, + Type: a.Type, } } @@ -4856,12 +4783,12 @@ func (a *AzureWorkloadSQLPointInTimeRecoveryPoint) GetAzureWorkloadRecoveryPoint func (a *AzureWorkloadSQLPointInTimeRecoveryPoint) GetAzureWorkloadSQLRecoveryPoint() *AzureWorkloadSQLRecoveryPoint { return &AzureWorkloadSQLRecoveryPoint{ ExtendedInfo: a.ExtendedInfo, - RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, - Type: a.Type, - RecoveryPointTierDetails: a.RecoveryPointTierDetails, + ObjectType: a.ObjectType, RecoveryPointMoveReadinessInfo: a.RecoveryPointMoveReadinessInfo, RecoveryPointProperties: a.RecoveryPointProperties, - ObjectType: a.ObjectType, + RecoveryPointTierDetails: a.RecoveryPointTierDetails, + RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, + Type: a.Type, } } @@ -4872,16 +4799,6 @@ func (a *AzureWorkloadSQLPointInTimeRecoveryPoint) GetRecoveryPoint() *RecoveryP } } -// AzureWorkloadSQLPointInTimeRestoreRequestClassification provides polymorphic access to related types. -// Call the interface's GetAzureWorkloadSQLPointInTimeRestoreRequest() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureWorkloadSQLPointInTimeRestoreRequest, *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest -type AzureWorkloadSQLPointInTimeRestoreRequestClassification interface { - AzureWorkloadSQLRestoreRequestClassification - // GetAzureWorkloadSQLPointInTimeRestoreRequest returns the AzureWorkloadSQLPointInTimeRestoreRequest content of the underlying type. - GetAzureWorkloadSQLPointInTimeRestoreRequest() *AzureWorkloadSQLPointInTimeRestoreRequest -} - // AzureWorkloadSQLPointInTimeRestoreRequest - AzureWorkload SQL -specific restore. Specifically for PointInTime/Log restore type AzureWorkloadSQLPointInTimeRestoreRequest struct { // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. @@ -4921,13 +4838,13 @@ type AzureWorkloadSQLPointInTimeRestoreRequest struct { // GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadSQLPointInTimeRestoreRequest. func (a *AzureWorkloadSQLPointInTimeRestoreRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { return &AzureWorkloadRestoreRequest{ + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, RecoveryType: a.RecoveryType, SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, } } @@ -4940,16 +4857,16 @@ func (a *AzureWorkloadSQLPointInTimeRestoreRequest) GetAzureWorkloadSQLPointInTi // GetAzureWorkloadSQLRestoreRequest implements the AzureWorkloadSQLRestoreRequestClassification interface for type AzureWorkloadSQLPointInTimeRestoreRequest. func (a *AzureWorkloadSQLPointInTimeRestoreRequest) GetAzureWorkloadSQLRestoreRequest() *AzureWorkloadSQLRestoreRequest { return &AzureWorkloadSQLRestoreRequest{ - ShouldUseAlternateTargetLocation: a.ShouldUseAlternateTargetLocation, - IsNonRecoverable: a.IsNonRecoverable, AlternateDirectoryPaths: a.AlternateDirectoryPaths, + IsNonRecoverable: a.IsNonRecoverable, + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, RecoveryType: a.RecoveryType, + ShouldUseAlternateTargetLocation: a.ShouldUseAlternateTargetLocation, SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, } } @@ -5003,13 +4920,13 @@ type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct { // GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest. func (a *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { return &AzureWorkloadRestoreRequest{ + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, RecoveryType: a.RecoveryType, SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, } } @@ -5017,33 +4934,33 @@ func (a *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) GetAzureWorkloa // for type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest. func (a *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) GetAzureWorkloadSQLPointInTimeRestoreRequest() *AzureWorkloadSQLPointInTimeRestoreRequest { return &AzureWorkloadSQLPointInTimeRestoreRequest{ - PointInTime: a.PointInTime, - ShouldUseAlternateTargetLocation: a.ShouldUseAlternateTargetLocation, - IsNonRecoverable: a.IsNonRecoverable, AlternateDirectoryPaths: a.AlternateDirectoryPaths, + IsNonRecoverable: a.IsNonRecoverable, + ObjectType: a.ObjectType, + PointInTime: a.PointInTime, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, RecoveryType: a.RecoveryType, + ShouldUseAlternateTargetLocation: a.ShouldUseAlternateTargetLocation, SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, } } // GetAzureWorkloadSQLRestoreRequest implements the AzureWorkloadSQLRestoreRequestClassification interface for type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest. func (a *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) GetAzureWorkloadSQLRestoreRequest() *AzureWorkloadSQLRestoreRequest { return &AzureWorkloadSQLRestoreRequest{ - ShouldUseAlternateTargetLocation: a.ShouldUseAlternateTargetLocation, - IsNonRecoverable: a.IsNonRecoverable, AlternateDirectoryPaths: a.AlternateDirectoryPaths, + IsNonRecoverable: a.IsNonRecoverable, + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, RecoveryType: a.RecoveryType, + ShouldUseAlternateTargetLocation: a.ShouldUseAlternateTargetLocation, SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, } } @@ -5054,16 +4971,6 @@ func (a *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) GetRestoreReque } } -// AzureWorkloadSQLRecoveryPointClassification provides polymorphic access to related types. -// Call the interface's GetAzureWorkloadSQLRecoveryPoint() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureWorkloadSQLPointInTimeRecoveryPoint, *AzureWorkloadSQLRecoveryPoint -type AzureWorkloadSQLRecoveryPointClassification interface { - AzureWorkloadRecoveryPointClassification - // GetAzureWorkloadSQLRecoveryPoint returns the AzureWorkloadSQLRecoveryPoint content of the underlying type. - GetAzureWorkloadSQLRecoveryPoint() *AzureWorkloadSQLRecoveryPoint -} - // AzureWorkloadSQLRecoveryPoint - SQL specific recoverypoint, specifically encapsulates full/diff recoverypoint along with // extended info type AzureWorkloadSQLRecoveryPoint struct { @@ -5094,12 +5001,12 @@ type AzureWorkloadSQLRecoveryPoint struct { // GetAzureWorkloadRecoveryPoint implements the AzureWorkloadRecoveryPointClassification interface for type AzureWorkloadSQLRecoveryPoint. func (a *AzureWorkloadSQLRecoveryPoint) GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint { return &AzureWorkloadRecoveryPoint{ - RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, - Type: a.Type, - RecoveryPointTierDetails: a.RecoveryPointTierDetails, + ObjectType: a.ObjectType, RecoveryPointMoveReadinessInfo: a.RecoveryPointMoveReadinessInfo, RecoveryPointProperties: a.RecoveryPointProperties, - ObjectType: a.ObjectType, + RecoveryPointTierDetails: a.RecoveryPointTierDetails, + RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, + Type: a.Type, } } @@ -5124,17 +5031,6 @@ type AzureWorkloadSQLRecoveryPointExtendedInfo struct { DataDirectoryTimeInUTC *time.Time } -// AzureWorkloadSQLRestoreRequestClassification provides polymorphic access to related types. -// Call the interface's GetAzureWorkloadSQLRestoreRequest() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureWorkloadSQLPointInTimeRestoreRequest, *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, *AzureWorkloadSQLRestoreRequest, -// - *AzureWorkloadSQLRestoreWithRehydrateRequest -type AzureWorkloadSQLRestoreRequestClassification interface { - AzureWorkloadRestoreRequestClassification - // GetAzureWorkloadSQLRestoreRequest returns the AzureWorkloadSQLRestoreRequest content of the underlying type. - GetAzureWorkloadSQLRestoreRequest() *AzureWorkloadSQLRestoreRequest -} - // AzureWorkloadSQLRestoreRequest - AzureWorkload SQL -specific restore. Specifically for full/diff restore type AzureWorkloadSQLRestoreRequest struct { // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. @@ -5171,13 +5067,13 @@ type AzureWorkloadSQLRestoreRequest struct { // GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadSQLRestoreRequest. func (a *AzureWorkloadSQLRestoreRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { return &AzureWorkloadRestoreRequest{ + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, RecoveryType: a.RecoveryType, SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, } } @@ -5233,29 +5129,29 @@ type AzureWorkloadSQLRestoreWithRehydrateRequest struct { // GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadSQLRestoreWithRehydrateRequest. func (a *AzureWorkloadSQLRestoreWithRehydrateRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { return &AzureWorkloadRestoreRequest{ + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, RecoveryType: a.RecoveryType, SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, } } // GetAzureWorkloadSQLRestoreRequest implements the AzureWorkloadSQLRestoreRequestClassification interface for type AzureWorkloadSQLRestoreWithRehydrateRequest. func (a *AzureWorkloadSQLRestoreWithRehydrateRequest) GetAzureWorkloadSQLRestoreRequest() *AzureWorkloadSQLRestoreRequest { return &AzureWorkloadSQLRestoreRequest{ - ShouldUseAlternateTargetLocation: a.ShouldUseAlternateTargetLocation, - IsNonRecoverable: a.IsNonRecoverable, AlternateDirectoryPaths: a.AlternateDirectoryPaths, + IsNonRecoverable: a.IsNonRecoverable, + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, RecoveryType: a.RecoveryType, + ShouldUseAlternateTargetLocation: a.ShouldUseAlternateTargetLocation, SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, } } @@ -5350,12 +5246,6 @@ type BMSPOQueryObject struct { WorkloadType *WorkloadType } -// BMSPrepareDataMoveOperationResultClientGetOptions contains the optional parameters for the BMSPrepareDataMoveOperationResultClient.Get -// method. -type BMSPrepareDataMoveOperationResultClientGetOptions struct { - // placeholder for future optional parameters -} - // BMSRPQueryObject - Filters to list backup copies. type BMSRPQueryObject struct { // Backup copies created before this time. @@ -5398,15 +5288,6 @@ type BMSWorkloadItemQueryObject struct { WorkloadType *WorkloadType } -// BackupEngineBaseClassification provides polymorphic access to related types. -// Call the interface's GetBackupEngineBase() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureBackupServerEngine, *BackupEngineBase, *DpmBackupEngine -type BackupEngineBaseClassification interface { - // GetBackupEngineBase returns the BackupEngineBase content of the underlying type. - GetBackupEngineBase() *BackupEngineBase -} - // BackupEngineBase - The base backup engine class. All workload specific backup engines derive from this class. type BackupEngineBase struct { // REQUIRED; Type of the backup engine. @@ -5512,30 +5393,6 @@ type BackupEngineExtendedInfo struct { UsedDiskSpace *float64 } -// BackupEnginesClientGetOptions contains the optional parameters for the BackupEnginesClient.Get method. -type BackupEnginesClientGetOptions struct { - // OData filter options. - Filter *string - // skipToken Filter. - SkipToken *string -} - -// BackupEnginesClientListOptions contains the optional parameters for the BackupEnginesClient.NewListPager method. -type BackupEnginesClientListOptions struct { - // OData filter options. - Filter *string - // skipToken Filter. - SkipToken *string -} - -// BackupJobsClientListOptions contains the optional parameters for the BackupJobsClient.NewListPager method. -type BackupJobsClientListOptions struct { - // OData filter options. - Filter *string - // skipToken Filter. - SkipToken *string -} - // BackupManagementUsage - Backup management usages of a vault. type BackupManagementUsage struct { // Current value of usage. @@ -5563,65 +5420,6 @@ type BackupManagementUsageList struct { Value []*BackupManagementUsage } -// BackupOperationResultsClientGetOptions contains the optional parameters for the BackupOperationResultsClient.Get method. -type BackupOperationResultsClientGetOptions struct { - // placeholder for future optional parameters -} - -// BackupOperationStatusesClientGetOptions contains the optional parameters for the BackupOperationStatusesClient.Get method. -type BackupOperationStatusesClientGetOptions struct { - // placeholder for future optional parameters -} - -// BackupPoliciesClientListOptions contains the optional parameters for the BackupPoliciesClient.NewListPager method. -type BackupPoliciesClientListOptions struct { - // OData filter options. - Filter *string -} - -// BackupProtectableItemsClientListOptions contains the optional parameters for the BackupProtectableItemsClient.NewListPager -// method. -type BackupProtectableItemsClientListOptions struct { - // OData filter options. - Filter *string - // skipToken Filter. - SkipToken *string -} - -// BackupProtectedItemsClientListOptions contains the optional parameters for the BackupProtectedItemsClient.NewListPager -// method. -type BackupProtectedItemsClientListOptions struct { - // OData filter options. - Filter *string - // skipToken Filter. - SkipToken *string -} - -// BackupProtectionContainersClientListOptions contains the optional parameters for the BackupProtectionContainersClient.NewListPager -// method. -type BackupProtectionContainersClientListOptions struct { - // OData filter options. - Filter *string -} - -// BackupProtectionIntentClientListOptions contains the optional parameters for the BackupProtectionIntentClient.NewListPager -// method. -type BackupProtectionIntentClientListOptions struct { - // OData filter options. - Filter *string - // skipToken Filter. - SkipToken *string -} - -// BackupRequestClassification provides polymorphic access to related types. -// Call the interface's GetBackupRequest() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureFileShareBackupRequest, *AzureWorkloadBackupRequest, *BackupRequest, *IaasVMBackupRequest -type BackupRequestClassification interface { - // GetBackupRequest returns the BackupRequest content of the underlying type. - GetBackupRequest() *BackupRequest -} - // BackupRequest - Base class for backup request. Workload-specific backup requests are derived from this class. type BackupRequest struct { // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. @@ -5778,42 +5576,12 @@ type BackupResourceEncryptionConfigResource struct { Type *string } -// BackupResourceEncryptionConfigsClientGetOptions contains the optional parameters for the BackupResourceEncryptionConfigsClient.Get -// method. -type BackupResourceEncryptionConfigsClientGetOptions struct { - // placeholder for future optional parameters -} - -// BackupResourceEncryptionConfigsClientUpdateOptions contains the optional parameters for the BackupResourceEncryptionConfigsClient.Update -// method. -type BackupResourceEncryptionConfigsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// BackupResourceStorageConfigsNonCRRClientGetOptions contains the optional parameters for the BackupResourceStorageConfigsNonCRRClient.Get -// method. -type BackupResourceStorageConfigsNonCRRClientGetOptions struct { - // placeholder for future optional parameters -} - -// BackupResourceStorageConfigsNonCRRClientPatchOptions contains the optional parameters for the BackupResourceStorageConfigsNonCRRClient.Patch -// method. -type BackupResourceStorageConfigsNonCRRClientPatchOptions struct { - // placeholder for future optional parameters -} - -// BackupResourceStorageConfigsNonCRRClientUpdateOptions contains the optional parameters for the BackupResourceStorageConfigsNonCRRClient.Update -// method. -type BackupResourceStorageConfigsNonCRRClientUpdateOptions struct { - // placeholder for future optional parameters -} - // BackupResourceVaultConfig - Backup resource vault config details. type BackupResourceVaultConfig struct { // Enabled or Disabled. EnhancedSecurityState *EnhancedSecurityState - // Is soft delete feature state editable + // This flag is no longer in use. Please use 'softDeleteFeatureState' to set the soft delete state for the vault IsSoftDeleteFeatureStateEditable *bool // ResourceGuard Operation Requests @@ -5822,6 +5590,9 @@ type BackupResourceVaultConfig struct { // Soft Delete feature state SoftDeleteFeatureState *SoftDeleteFeatureState + // Soft delete retention period in days + SoftDeleteRetentionPeriodInDays *int32 + // Storage type. StorageModelType *StorageType @@ -5856,29 +5627,6 @@ type BackupResourceVaultConfigResource struct { Type *string } -// BackupResourceVaultConfigsClientGetOptions contains the optional parameters for the BackupResourceVaultConfigsClient.Get -// method. -type BackupResourceVaultConfigsClientGetOptions struct { - // placeholder for future optional parameters -} - -// BackupResourceVaultConfigsClientPutOptions contains the optional parameters for the BackupResourceVaultConfigsClient.Put -// method. -type BackupResourceVaultConfigsClientPutOptions struct { - // placeholder for future optional parameters -} - -// BackupResourceVaultConfigsClientUpdateOptions contains the optional parameters for the BackupResourceVaultConfigsClient.Update -// method. -type BackupResourceVaultConfigsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// BackupStatusClientGetOptions contains the optional parameters for the BackupStatusClient.Get method. -type BackupStatusClientGetOptions struct { - // placeholder for future optional parameters -} - // BackupStatusRequest - BackupStatus request. type BackupStatusRequest struct { // Protectable Item Logical Name @@ -5893,6 +5641,9 @@ type BackupStatusRequest struct { // BackupStatusResponse - BackupStatus response. type BackupStatusResponse struct { + // Specifies whether the storage account lock has been acquired or not + AcquireStorageAccountLock *AcquireStorageAccountLock + // Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;csname;vmname. ContainerName *string @@ -5911,6 +5662,9 @@ type BackupStatusResponse struct { // Specifies the product specific ds name. E.g. vm;iaasvmcontainer;csname;vmname. ProtectedItemName *string + // Number of protected items + ProtectedItemsCount *int32 + // Specifies whether the container is registered or not ProtectionStatus *ProtectionStatus @@ -5921,46 +5675,6 @@ type BackupStatusResponse struct { VaultID *string } -// BackupUsageSummariesClientListOptions contains the optional parameters for the BackupUsageSummariesClient.NewListPager -// method. -type BackupUsageSummariesClientListOptions struct { - // OData filter options. - Filter *string - // skipToken Filter. - SkipToken *string -} - -// BackupWorkloadItemsClientListOptions contains the optional parameters for the BackupWorkloadItemsClient.NewListPager method. -type BackupWorkloadItemsClientListOptions struct { - // OData filter options. - Filter *string - // skipToken Filter. - SkipToken *string -} - -// BackupsClientTriggerOptions contains the optional parameters for the BackupsClient.Trigger method. -type BackupsClientTriggerOptions struct { - // placeholder for future optional parameters -} - -// ClientBeginBMSPrepareDataMoveOptions contains the optional parameters for the Client.BeginBMSPrepareDataMove method. -type ClientBeginBMSPrepareDataMoveOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientBeginBMSTriggerDataMoveOptions contains the optional parameters for the Client.BeginBMSTriggerDataMove method. -type ClientBeginBMSTriggerDataMoveOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientBeginMoveRecoveryPointOptions contains the optional parameters for the Client.BeginMoveRecoveryPoint method. -type ClientBeginMoveRecoveryPointOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - // ClientDiscoveryDisplay - Localized display information of an operation. type ClientDiscoveryDisplay struct { // Description of the operation having details of what operation is about. @@ -6024,11 +5738,6 @@ type ClientDiscoveryValueForSingleAPI struct { Properties *ClientDiscoveryForProperties } -// ClientGetOperationStatusOptions contains the optional parameters for the Client.GetOperationStatus method. -type ClientGetOperationStatusOptions struct { - // placeholder for future optional parameters -} - // ClientScriptForConnect - Client script details for file / folder restore. type ClientScriptForConnect struct { // OS type - Windows, Linux etc. for which this file / folder restore client script works. @@ -6126,7 +5835,7 @@ type DPMProtectedItem struct { ResourceGuardOperationRequests []*string // Soft delete retention period in days - SoftDeleteRetentionPeriod *int32 + SoftDeleteRetentionPeriodInDays *int32 // ARM ID of the resource to be backed up. SourceResourceID *string @@ -6141,24 +5850,24 @@ type DPMProtectedItem struct { // GetProtectedItem implements the ProtectedItemClassification interface for type DPMProtectedItem. func (d *DPMProtectedItem) GetProtectedItem() *ProtectedItem { return &ProtectedItem{ - ProtectedItemType: d.ProtectedItemType, BackupManagementType: d.BackupManagementType, - WorkloadType: d.WorkloadType, - ContainerName: d.ContainerName, - SourceResourceID: d.SourceResourceID, - PolicyID: d.PolicyID, - LastRecoveryPoint: d.LastRecoveryPoint, BackupSetName: d.BackupSetName, + ContainerName: d.ContainerName, CreateMode: d.CreateMode, DeferredDeleteTimeInUTC: d.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: d.IsScheduledForDeferredDelete, DeferredDeleteTimeRemaining: d.DeferredDeleteTimeRemaining, + IsArchiveEnabled: d.IsArchiveEnabled, IsDeferredDeleteScheduleUpcoming: d.IsDeferredDeleteScheduleUpcoming, IsRehydrate: d.IsRehydrate, - ResourceGuardOperationRequests: d.ResourceGuardOperationRequests, - IsArchiveEnabled: d.IsArchiveEnabled, + IsScheduledForDeferredDelete: d.IsScheduledForDeferredDelete, + LastRecoveryPoint: d.LastRecoveryPoint, + PolicyID: d.PolicyID, PolicyName: d.PolicyName, - SoftDeleteRetentionPeriod: d.SoftDeleteRetentionPeriod, + ProtectedItemType: d.ProtectedItemType, + ResourceGuardOperationRequests: d.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: d.SoftDeleteRetentionPeriodInDays, + SourceResourceID: d.SourceResourceID, + WorkloadType: d.WorkloadType, } } @@ -6236,13 +5945,6 @@ type Day struct { IsLast *bool } -// DeletedProtectionContainersClientListOptions contains the optional parameters for the DeletedProtectionContainersClient.NewListPager -// method. -type DeletedProtectionContainersClientListOptions struct { - // OData filter options. - Filter *string -} - type DiskExclusionProperties struct { // List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. DiskLunList []*int32 @@ -6265,6 +5967,9 @@ type DistributedNodesInfo struct { // Name of the node under a distributed container. NodeName *string + // ARM resource id of the node + SourceResourceID *string + // Status of this Node. Failed | Succeeded Status *string } @@ -6314,32 +6019,22 @@ type DpmBackupEngine struct { // GetBackupEngineBase implements the BackupEngineBaseClassification interface for type DpmBackupEngine. func (d *DpmBackupEngine) GetBackupEngineBase() *BackupEngineBase { return &BackupEngineBase{ - FriendlyName: d.FriendlyName, - BackupManagementType: d.BackupManagementType, - RegistrationStatus: d.RegistrationStatus, + AzureBackupAgentVersion: d.AzureBackupAgentVersion, + BackupEngineID: d.BackupEngineID, BackupEngineState: d.BackupEngineState, - HealthStatus: d.HealthStatus, BackupEngineType: d.BackupEngineType, + BackupManagementType: d.BackupManagementType, CanReRegister: d.CanReRegister, - BackupEngineID: d.BackupEngineID, DpmVersion: d.DpmVersion, - AzureBackupAgentVersion: d.AzureBackupAgentVersion, + ExtendedInfo: d.ExtendedInfo, + FriendlyName: d.FriendlyName, + HealthStatus: d.HealthStatus, IsAzureBackupAgentUpgradeAvailable: d.IsAzureBackupAgentUpgradeAvailable, IsDpmUpgradeAvailable: d.IsDpmUpgradeAvailable, - ExtendedInfo: d.ExtendedInfo, + RegistrationStatus: d.RegistrationStatus, } } -// DpmContainerClassification provides polymorphic access to related types. -// Call the interface's GetDpmContainer() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureBackupServerContainer, *DpmContainer -type DpmContainerClassification interface { - ProtectionContainerClassification - // GetDpmContainer returns the DpmContainer content of the underlying type. - GetDpmContainer() *DpmContainer -} - // DpmContainer - DPM workload-specific protection container. type DpmContainer struct { // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines @@ -6394,12 +6089,12 @@ func (d *DpmContainer) GetDpmContainer() *DpmContainer { return d } // GetProtectionContainer implements the ProtectionContainerClassification interface for type DpmContainer. func (d *DpmContainer) GetProtectionContainer() *ProtectionContainer { return &ProtectionContainer{ - FriendlyName: d.FriendlyName, BackupManagementType: d.BackupManagementType, - RegistrationStatus: d.RegistrationStatus, - HealthStatus: d.HealthStatus, ContainerType: d.ContainerType, + FriendlyName: d.FriendlyName, + HealthStatus: d.HealthStatus, ProtectableObjectType: d.ProtectableObjectType, + RegistrationStatus: d.RegistrationStatus, } } @@ -6466,14 +6161,14 @@ type DpmJob struct { // GetJob implements the JobClassification interface for type DpmJob. func (d *DpmJob) GetJob() *Job { return &Job{ - EntityFriendlyName: d.EntityFriendlyName, + ActivityID: d.ActivityID, BackupManagementType: d.BackupManagementType, - Operation: d.Operation, - Status: d.Status, - StartTime: d.StartTime, EndTime: d.EndTime, - ActivityID: d.ActivityID, + EntityFriendlyName: d.EntityFriendlyName, JobType: d.JobType, + Operation: d.Operation, + StartTime: d.StartTime, + Status: d.Status, } } @@ -6571,12 +6266,6 @@ func (e *ExportJobsOperationResultInfo) GetOperationResultInfoBase() *OperationR } } -// ExportJobsOperationResultsClientGetOptions contains the optional parameters for the ExportJobsOperationResultsClient.Get -// method. -type ExportJobsOperationResultsClientGetOptions struct { - // placeholder for future optional parameters -} - // ExtendedLocation - The extended location of Recovery point where VM was present. type ExtendedLocation struct { // Name of the extended location. @@ -6595,20 +6284,6 @@ type ExtendedProperties struct { LinuxVMApplicationName *string } -// FeatureSupportClientValidateOptions contains the optional parameters for the FeatureSupportClient.Validate method. -type FeatureSupportClientValidateOptions struct { - // placeholder for future optional parameters -} - -// FeatureSupportRequestClassification provides polymorphic access to related types. -// Call the interface's GetFeatureSupportRequest() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureBackupGoalFeatureSupportRequest, *AzureVMResourceFeatureSupportRequest, *FeatureSupportRequest -type FeatureSupportRequestClassification interface { - // GetFeatureSupportRequest returns the FeatureSupportRequest content of the underlying type. - GetFeatureSupportRequest() *FeatureSupportRequest -} - // FeatureSupportRequest - Base class for feature request type FeatureSupportRequest struct { // REQUIRED; backup support feature type. @@ -6651,12 +6326,12 @@ type GenericContainer struct { // GetProtectionContainer implements the ProtectionContainerClassification interface for type GenericContainer. func (g *GenericContainer) GetProtectionContainer() *ProtectionContainer { return &ProtectionContainer{ - FriendlyName: g.FriendlyName, BackupManagementType: g.BackupManagementType, - RegistrationStatus: g.RegistrationStatus, - HealthStatus: g.HealthStatus, ContainerType: g.ContainerType, + FriendlyName: g.FriendlyName, + HealthStatus: g.HealthStatus, ProtectableObjectType: g.ProtectableObjectType, + RegistrationStatus: g.RegistrationStatus, } } @@ -6732,7 +6407,7 @@ type GenericProtectedItem struct { ResourceGuardOperationRequests []*string // Soft delete retention period in days - SoftDeleteRetentionPeriod *int32 + SoftDeleteRetentionPeriodInDays *int32 // Loosely coupled (type, value) associations (example - parent of a protected item) SourceAssociations map[string]*string @@ -6750,24 +6425,24 @@ type GenericProtectedItem struct { // GetProtectedItem implements the ProtectedItemClassification interface for type GenericProtectedItem. func (g *GenericProtectedItem) GetProtectedItem() *ProtectedItem { return &ProtectedItem{ - ProtectedItemType: g.ProtectedItemType, BackupManagementType: g.BackupManagementType, - WorkloadType: g.WorkloadType, - ContainerName: g.ContainerName, - SourceResourceID: g.SourceResourceID, - PolicyID: g.PolicyID, - LastRecoveryPoint: g.LastRecoveryPoint, BackupSetName: g.BackupSetName, + ContainerName: g.ContainerName, CreateMode: g.CreateMode, DeferredDeleteTimeInUTC: g.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: g.IsScheduledForDeferredDelete, DeferredDeleteTimeRemaining: g.DeferredDeleteTimeRemaining, + IsArchiveEnabled: g.IsArchiveEnabled, IsDeferredDeleteScheduleUpcoming: g.IsDeferredDeleteScheduleUpcoming, IsRehydrate: g.IsRehydrate, - ResourceGuardOperationRequests: g.ResourceGuardOperationRequests, - IsArchiveEnabled: g.IsArchiveEnabled, + IsScheduledForDeferredDelete: g.IsScheduledForDeferredDelete, + LastRecoveryPoint: g.LastRecoveryPoint, + PolicyID: g.PolicyID, PolicyName: g.PolicyName, - SoftDeleteRetentionPeriod: g.SoftDeleteRetentionPeriod, + ProtectedItemType: g.ProtectedItemType, + ResourceGuardOperationRequests: g.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: g.SoftDeleteRetentionPeriodInDays, + SourceResourceID: g.SourceResourceID, + WorkloadType: g.WorkloadType, } } @@ -6795,8 +6470,8 @@ type GenericProtectionPolicy struct { // GetProtectionPolicy implements the ProtectionPolicyClassification interface for type GenericProtectionPolicy. func (g *GenericProtectionPolicy) GetProtectionPolicy() *ProtectionPolicy { return &ProtectionPolicy{ - ProtectedItemsCount: g.ProtectedItemsCount, BackupManagementType: g.BackupManagementType, + ProtectedItemsCount: g.ProtectedItemsCount, ResourceGuardOperationRequests: g.ResourceGuardOperationRequests, } } @@ -6846,15 +6521,6 @@ type HourlySchedule struct { ScheduleWindowStartTime *time.Time } -// ILRRequestClassification provides polymorphic access to related types. -// Call the interface's GetILRRequest() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureFileShareProvisionILRRequest, *ILRRequest, *IaasVMILRRegistrationRequest -type ILRRequestClassification interface { - // GetILRRequest returns the ILRRequest content of the underlying type. - GetILRRequest() *ILRRequest -} - // ILRRequest - Parameters to Provision ILR API. type ILRRequest struct { // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. @@ -6888,16 +6554,6 @@ type ILRRequestResource struct { Type *string } -// IaaSVMContainerClassification provides polymorphic access to related types. -// Call the interface's GetIaaSVMContainer() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureIaaSClassicComputeVMContainer, *AzureIaaSComputeVMContainer, *IaaSVMContainer -type IaaSVMContainerClassification interface { - ProtectionContainerClassification - // GetIaaSVMContainer returns the IaaSVMContainer content of the underlying type. - GetIaaSVMContainer() *IaaSVMContainer -} - // IaaSVMContainer - IaaS VM workload-specific container. type IaaSVMContainer struct { // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines @@ -6937,25 +6593,15 @@ func (i *IaaSVMContainer) GetIaaSVMContainer() *IaaSVMContainer { return i } // GetProtectionContainer implements the ProtectionContainerClassification interface for type IaaSVMContainer. func (i *IaaSVMContainer) GetProtectionContainer() *ProtectionContainer { return &ProtectionContainer{ - FriendlyName: i.FriendlyName, BackupManagementType: i.BackupManagementType, - RegistrationStatus: i.RegistrationStatus, - HealthStatus: i.HealthStatus, ContainerType: i.ContainerType, + FriendlyName: i.FriendlyName, + HealthStatus: i.HealthStatus, ProtectableObjectType: i.ProtectableObjectType, + RegistrationStatus: i.RegistrationStatus, } } -// IaaSVMProtectableItemClassification provides polymorphic access to related types. -// Call the interface's GetIaaSVMProtectableItem() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureIaaSClassicComputeVMProtectableItem, *AzureIaaSComputeVMProtectableItem, *IaaSVMProtectableItem -type IaaSVMProtectableItemClassification interface { - WorkloadProtectableItemClassification - // GetIaaSVMProtectableItem returns the IaaSVMProtectableItem content of the underlying type. - GetIaaSVMProtectableItem() *IaaSVMProtectableItem -} - // IaaSVMProtectableItem - IaaS VM workload-specific backup item. type IaaSVMProtectableItem struct { // REQUIRED; Type of the backup item. @@ -6990,10 +6636,10 @@ func (i *IaaSVMProtectableItem) GetIaaSVMProtectableItem() *IaaSVMProtectableIte func (i *IaaSVMProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { return &WorkloadProtectableItem{ BackupManagementType: i.BackupManagementType, - WorkloadType: i.WorkloadType, - ProtectableItemType: i.ProtectableItemType, FriendlyName: i.FriendlyName, + ProtectableItemType: i.ProtectableItemType, ProtectionState: i.ProtectionState, + WorkloadType: i.WorkloadType, } } @@ -7105,16 +6751,6 @@ func (i *IaasVMRecoveryPoint) GetRecoveryPoint() *RecoveryPoint { } } -// IaasVMRestoreRequestClassification provides polymorphic access to related types. -// Call the interface's GetIaasVMRestoreRequest() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *IaasVMRestoreRequest, *IaasVMRestoreWithRehydrationRequest -type IaasVMRestoreRequestClassification interface { - RestoreRequestClassification - // GetIaasVMRestoreRequest returns the IaasVMRestoreRequest content of the underlying type. - GetIaasVMRestoreRequest() *IaasVMRestoreRequest -} - // IaasVMRestoreRequest - IaaS VM workload-specific restore. type IaasVMRestoreRequest struct { // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. @@ -7293,30 +6929,30 @@ type IaasVMRestoreWithRehydrationRequest struct { // GetIaasVMRestoreRequest implements the IaasVMRestoreRequestClassification interface for type IaasVMRestoreWithRehydrationRequest. func (i *IaasVMRestoreWithRehydrationRequest) GetIaasVMRestoreRequest() *IaasVMRestoreRequest { return &IaasVMRestoreRequest{ - RecoveryPointID: i.RecoveryPointID, - RecoveryType: i.RecoveryType, - SourceResourceID: i.SourceResourceID, - TargetVirtualMachineID: i.TargetVirtualMachineID, - TargetResourceGroupID: i.TargetResourceGroupID, - StorageAccountID: i.StorageAccountID, - VirtualNetworkID: i.VirtualNetworkID, - SubnetID: i.SubnetID, - TargetDomainNameID: i.TargetDomainNameID, - Region: i.Region, AffinityGroup: i.AffinityGroup, CreateNewCloudService: i.CreateNewCloudService, - OriginalStorageAccountOption: i.OriginalStorageAccountOption, + DiskEncryptionSetID: i.DiskEncryptionSetID, EncryptionDetails: i.EncryptionDetails, + ExtendedLocation: i.ExtendedLocation, + IdentityBasedRestoreDetails: i.IdentityBasedRestoreDetails, + IdentityInfo: i.IdentityInfo, + ObjectType: i.ObjectType, + OriginalStorageAccountOption: i.OriginalStorageAccountOption, + RecoveryPointID: i.RecoveryPointID, + RecoveryType: i.RecoveryType, + Region: i.Region, RestoreDiskLunList: i.RestoreDiskLunList, RestoreWithManagedDisks: i.RestoreWithManagedDisks, - DiskEncryptionSetID: i.DiskEncryptionSetID, - Zones: i.Zones, - IdentityInfo: i.IdentityInfo, - IdentityBasedRestoreDetails: i.IdentityBasedRestoreDetails, - ExtendedLocation: i.ExtendedLocation, SecuredVMDetails: i.SecuredVMDetails, + SourceResourceID: i.SourceResourceID, + StorageAccountID: i.StorageAccountID, + SubnetID: i.SubnetID, TargetDiskNetworkAccessSettings: i.TargetDiskNetworkAccessSettings, - ObjectType: i.ObjectType, + TargetDomainNameID: i.TargetDomainNameID, + TargetResourceGroupID: i.TargetResourceGroupID, + TargetVirtualMachineID: i.TargetVirtualMachineID, + VirtualNetworkID: i.VirtualNetworkID, + Zones: i.Zones, } } @@ -7367,6 +7003,9 @@ type InquiryValidation struct { // READ-ONLY; Error Additional Detail in case the status is non-success. AdditionalDetail *string + + // READ-ONLY; Dictionary to store the count of ProtectableItems with key POType. + ProtectableItemCount any } // InstantItemRecoveryTarget - Target details for file / folder restore. @@ -7380,27 +7019,6 @@ type InstantRPAdditionalDetails struct { AzureBackupRGNameSuffix *string } -// ItemLevelRecoveryConnectionsClientProvisionOptions contains the optional parameters for the ItemLevelRecoveryConnectionsClient.Provision -// method. -type ItemLevelRecoveryConnectionsClientProvisionOptions struct { - // placeholder for future optional parameters -} - -// ItemLevelRecoveryConnectionsClientRevokeOptions contains the optional parameters for the ItemLevelRecoveryConnectionsClient.Revoke -// method. -type ItemLevelRecoveryConnectionsClientRevokeOptions struct { - // placeholder for future optional parameters -} - -// JobClassification provides polymorphic access to related types. -// Call the interface's GetJob() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureIaaSVMJob, *AzureIaaSVMJobV2, *AzureStorageJob, *AzureWorkloadJob, *DpmJob, *Job, *MabJob, *VaultJob -type JobClassification interface { - // GetJob returns the Job content of the underlying type. - GetJob() *Job -} - // Job - Defines workload agnostic properties for a job. type Job struct { // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. @@ -7431,21 +7049,6 @@ type Job struct { // GetJob implements the JobClassification interface for type Job. func (j *Job) GetJob() *Job { return j } -// JobCancellationsClientTriggerOptions contains the optional parameters for the JobCancellationsClient.Trigger method. -type JobCancellationsClientTriggerOptions struct { - // placeholder for future optional parameters -} - -// JobDetailsClientGetOptions contains the optional parameters for the JobDetailsClient.Get method. -type JobDetailsClientGetOptions struct { - // placeholder for future optional parameters -} - -// JobOperationResultsClientGetOptions contains the optional parameters for the JobOperationResultsClient.Get method. -type JobOperationResultsClientGetOptions struct { - // placeholder for future optional parameters -} - // JobQueryObject - Filters to list the jobs. type JobQueryObject struct { // Type of backup management for the job. @@ -7500,12 +7103,6 @@ type JobResourceList struct { Value []*JobResource } -// JobsClientExportOptions contains the optional parameters for the JobsClient.Export method. -type JobsClientExportOptions struct { - // OData filter options. - Filter *string -} - // KEKDetails - KEK is encryption key for BEK. type KEKDetails struct { // KEK data. @@ -7669,12 +7266,12 @@ type MabContainer struct { // GetProtectionContainer implements the ProtectionContainerClassification interface for type MabContainer. func (m *MabContainer) GetProtectionContainer() *ProtectionContainer { return &ProtectionContainer{ - FriendlyName: m.FriendlyName, BackupManagementType: m.BackupManagementType, - RegistrationStatus: m.RegistrationStatus, - HealthStatus: m.HealthStatus, ContainerType: m.ContainerType, + FriendlyName: m.FriendlyName, + HealthStatus: m.HealthStatus, ProtectableObjectType: m.ProtectableObjectType, + RegistrationStatus: m.RegistrationStatus, } } @@ -7771,7 +7368,7 @@ type MabFileFolderProtectedItem struct { ResourceGuardOperationRequests []*string // Soft delete retention period in days - SoftDeleteRetentionPeriod *int32 + SoftDeleteRetentionPeriodInDays *int32 // ARM ID of the resource to be backed up. SourceResourceID *string @@ -7786,24 +7383,24 @@ type MabFileFolderProtectedItem struct { // GetProtectedItem implements the ProtectedItemClassification interface for type MabFileFolderProtectedItem. func (m *MabFileFolderProtectedItem) GetProtectedItem() *ProtectedItem { return &ProtectedItem{ - ProtectedItemType: m.ProtectedItemType, BackupManagementType: m.BackupManagementType, - WorkloadType: m.WorkloadType, - ContainerName: m.ContainerName, - SourceResourceID: m.SourceResourceID, - PolicyID: m.PolicyID, - LastRecoveryPoint: m.LastRecoveryPoint, BackupSetName: m.BackupSetName, + ContainerName: m.ContainerName, CreateMode: m.CreateMode, DeferredDeleteTimeInUTC: m.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: m.IsScheduledForDeferredDelete, DeferredDeleteTimeRemaining: m.DeferredDeleteTimeRemaining, + IsArchiveEnabled: m.IsArchiveEnabled, IsDeferredDeleteScheduleUpcoming: m.IsDeferredDeleteScheduleUpcoming, IsRehydrate: m.IsRehydrate, - ResourceGuardOperationRequests: m.ResourceGuardOperationRequests, - IsArchiveEnabled: m.IsArchiveEnabled, + IsScheduledForDeferredDelete: m.IsScheduledForDeferredDelete, + LastRecoveryPoint: m.LastRecoveryPoint, + PolicyID: m.PolicyID, PolicyName: m.PolicyName, - SoftDeleteRetentionPeriod: m.SoftDeleteRetentionPeriod, + ProtectedItemType: m.ProtectedItemType, + ResourceGuardOperationRequests: m.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: m.SoftDeleteRetentionPeriodInDays, + SourceResourceID: m.SourceResourceID, + WorkloadType: m.WorkloadType, } } @@ -7870,14 +7467,14 @@ type MabJob struct { // GetJob implements the JobClassification interface for type MabJob. func (m *MabJob) GetJob() *Job { return &Job{ - EntityFriendlyName: m.EntityFriendlyName, + ActivityID: m.ActivityID, BackupManagementType: m.BackupManagementType, - Operation: m.Operation, - Status: m.Status, - StartTime: m.StartTime, EndTime: m.EndTime, - ActivityID: m.ActivityID, + EntityFriendlyName: m.EntityFriendlyName, JobType: m.JobType, + Operation: m.Operation, + StartTime: m.StartTime, + Status: m.Status, } } @@ -7932,8 +7529,8 @@ type MabProtectionPolicy struct { // GetProtectionPolicy implements the ProtectionPolicyClassification interface for type MabProtectionPolicy. func (m *MabProtectionPolicy) GetProtectionPolicy() *ProtectionPolicy { return &ProtectionPolicy{ - ProtectedItemsCount: m.ProtectedItemsCount, BackupManagementType: m.BackupManagementType, + ProtectedItemsCount: m.ProtectedItemsCount, ResourceGuardOperationRequests: m.ResourceGuardOperationRequests, } } @@ -8000,11 +7597,6 @@ type NewErrorResponseError struct { Target *string } -// OperationClientValidateOptions contains the optional parameters for the OperationClient.Validate method. -type OperationClientValidateOptions struct { - // placeholder for future optional parameters -} - // OperationResultInfo - Operation result info. type OperationResultInfo struct { // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. @@ -8021,15 +7613,6 @@ func (o *OperationResultInfo) GetOperationResultInfoBase() *OperationResultInfoB } } -// OperationResultInfoBaseClassification provides polymorphic access to related types. -// Call the interface's GetOperationResultInfoBase() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ExportJobsOperationResultInfo, *OperationResultInfo, *OperationResultInfoBase -type OperationResultInfoBaseClassification interface { - // GetOperationResultInfoBase returns the OperationResultInfoBase content of the underlying type. - GetOperationResultInfoBase() *OperationResultInfoBase -} - // OperationResultInfoBase - Base class for operation result info. type OperationResultInfoBase struct { // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. @@ -8084,16 +7667,6 @@ type OperationStatusError struct { Message *string } -// OperationStatusExtendedInfoClassification provides polymorphic access to related types. -// Call the interface's GetOperationStatusExtendedInfo() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *OperationStatusExtendedInfo, *OperationStatusJobExtendedInfo, *OperationStatusJobsExtendedInfo, *OperationStatusProvisionILRExtendedInfo, -// - *OperationStatusValidateOperationExtendedInfo -type OperationStatusExtendedInfoClassification interface { - // GetOperationStatusExtendedInfo returns the OperationStatusExtendedInfo content of the underlying type. - GetOperationStatusExtendedInfo() *OperationStatusExtendedInfo -} - // OperationStatusExtendedInfo - Base class for additional information of operation status. type OperationStatusExtendedInfo struct { // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. @@ -8181,11 +7754,6 @@ type OperationWorkerResponse struct { StatusCode *HTTPStatusCode } -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - // PointInTimeRange - Provides details for log ranges type PointInTimeRange struct { // End time of the time range for log recovery. @@ -8292,14 +7860,11 @@ type PrivateEndpoint struct { ID *string } -// PrivateEndpointClientGetOperationStatusOptions contains the optional parameters for the PrivateEndpointClient.GetOperationStatus -// method. -type PrivateEndpointClientGetOperationStatusOptions struct { - // placeholder for future optional parameters -} - // PrivateEndpointConnection - Private Endpoint Connection Response Properties type PrivateEndpointConnection struct { + // Group Ids for the Private Endpoint + GroupIDs []*VaultSubResourceType + // Gets or sets private endpoint associated with the private endpoint connection PrivateEndpoint *PrivateEndpoint @@ -8310,26 +7875,6 @@ type PrivateEndpointConnection struct { ProvisioningState *ProvisioningState } -// PrivateEndpointConnectionClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginDelete -// method. -type PrivateEndpointConnectionClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateEndpointConnectionClientBeginPutOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginPut -// method. -type PrivateEndpointConnectionClientBeginPutOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateEndpointConnectionClientGetOptions contains the optional parameters for the PrivateEndpointConnectionClient.Get -// method. -type PrivateEndpointConnectionClientGetOptions struct { - // placeholder for future optional parameters -} - // PrivateEndpointConnectionResource - Private Endpoint Connection Response Properties type PrivateEndpointConnectionResource struct { // Optional ETag. @@ -8357,7 +7902,7 @@ type PrivateEndpointConnectionResource struct { // PrivateLinkServiceConnectionState - Private Link Service Connection State type PrivateLinkServiceConnectionState struct { // Gets or sets actions required - ActionRequired *string + ActionsRequired *string // Gets or sets description Description *string @@ -8366,15 +7911,6 @@ type PrivateLinkServiceConnectionState struct { Status *PrivateEndpointConnectionStatus } -// ProtectableContainerClassification provides polymorphic access to related types. -// Call the interface's GetProtectableContainer() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureStorageProtectableContainer, *AzureVMAppContainerProtectableContainer, *ProtectableContainer -type ProtectableContainerClassification interface { - // GetProtectableContainer returns the ProtectableContainer content of the underlying type. - GetProtectableContainer() *ProtectableContainer -} - // ProtectableContainer - Protectable Container Class. type ProtectableContainer struct { // REQUIRED; Type of the container. The value of this property for @@ -8431,25 +7967,6 @@ type ProtectableContainerResourceList struct { Value []*ProtectableContainerResource } -// ProtectableContainersClientListOptions contains the optional parameters for the ProtectableContainersClient.NewListPager -// method. -type ProtectableContainersClientListOptions struct { - // OData filter options. - Filter *string -} - -// ProtectedItemClassification provides polymorphic access to related types. -// Call the interface's GetProtectedItem() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureFileshareProtectedItem, *AzureIaaSClassicComputeVMProtectedItem, *AzureIaaSComputeVMProtectedItem, *AzureIaaSVMProtectedItem, -// - *AzureSQLProtectedItem, *AzureVMWorkloadProtectedItem, *AzureVMWorkloadSAPAseDatabaseProtectedItem, *AzureVMWorkloadSAPHanaDBInstanceProtectedItem, -// - *AzureVMWorkloadSAPHanaDatabaseProtectedItem, *AzureVMWorkloadSQLDatabaseProtectedItem, *DPMProtectedItem, *GenericProtectedItem, -// - *MabFileFolderProtectedItem, *ProtectedItem -type ProtectedItemClassification interface { - // GetProtectedItem returns the ProtectedItem content of the underlying type. - GetProtectedItem() *ProtectedItem -} - // ProtectedItem - Base class for backup items. type ProtectedItem struct { // REQUIRED; backup item type. @@ -8495,7 +8012,7 @@ type ProtectedItem struct { ResourceGuardOperationRequests []*string // Soft delete retention period in days - SoftDeleteRetentionPeriod *int32 + SoftDeleteRetentionPeriodInDays *int32 // ARM ID of the resource to be backed up. SourceResourceID *string @@ -8510,18 +8027,6 @@ type ProtectedItem struct { // GetProtectedItem implements the ProtectedItemClassification interface for type ProtectedItem. func (p *ProtectedItem) GetProtectedItem() *ProtectedItem { return p } -// ProtectedItemOperationResultsClientGetOptions contains the optional parameters for the ProtectedItemOperationResultsClient.Get -// method. -type ProtectedItemOperationResultsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ProtectedItemOperationStatusesClientGetOptions contains the optional parameters for the ProtectedItemOperationStatusesClient.Get -// method. -type ProtectedItemOperationStatusesClientGetOptions struct { - // placeholder for future optional parameters -} - // ProtectedItemQueryObject - Filters to list backup items. type ProtectedItemQueryObject struct { // Backup Engine name @@ -8585,34 +8090,6 @@ type ProtectedItemResourceList struct { Value []*ProtectedItemResource } -// ProtectedItemsClientCreateOrUpdateOptions contains the optional parameters for the ProtectedItemsClient.CreateOrUpdate -// method. -type ProtectedItemsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ProtectedItemsClientDeleteOptions contains the optional parameters for the ProtectedItemsClient.Delete method. -type ProtectedItemsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ProtectedItemsClientGetOptions contains the optional parameters for the ProtectedItemsClient.Get method. -type ProtectedItemsClientGetOptions struct { - // OData filter options. - Filter *string -} - -// ProtectionContainerClassification provides polymorphic access to related types. -// Call the interface's GetProtectionContainer() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureBackupServerContainer, *AzureIaaSClassicComputeVMContainer, *AzureIaaSComputeVMContainer, *AzureSQLAGWorkloadContainerProtectionContainer, -// - *AzureSQLContainer, *AzureStorageContainer, *AzureVMAppContainerProtectionContainer, *AzureWorkloadContainer, *DpmContainer, -// - *GenericContainer, *IaaSVMContainer, *MabContainer, *ProtectionContainer -type ProtectionContainerClassification interface { - // GetProtectionContainer returns the ProtectionContainer content of the underlying type. - GetProtectionContainer() *ProtectionContainer -} - // ProtectionContainer - Base class for container with backup items. Containers with specific workloads are derived from this // class. type ProtectionContainer struct { @@ -8641,18 +8118,6 @@ type ProtectionContainer struct { // GetProtectionContainer implements the ProtectionContainerClassification interface for type ProtectionContainer. func (p *ProtectionContainer) GetProtectionContainer() *ProtectionContainer { return p } -// ProtectionContainerOperationResultsClientGetOptions contains the optional parameters for the ProtectionContainerOperationResultsClient.Get -// method. -type ProtectionContainerOperationResultsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ProtectionContainerRefreshOperationResultsClientGetOptions contains the optional parameters for the ProtectionContainerRefreshOperationResultsClient.Get -// method. -type ProtectionContainerRefreshOperationResultsClientGetOptions struct { - // placeholder for future optional parameters -} - // ProtectionContainerResource - Base class for container with backup items. Containers with specific workloads are derived // from this class. type ProtectionContainerResource struct { @@ -8687,45 +8152,6 @@ type ProtectionContainerResourceList struct { Value []*ProtectionContainerResource } -// ProtectionContainersClientGetOptions contains the optional parameters for the ProtectionContainersClient.Get method. -type ProtectionContainersClientGetOptions struct { - // placeholder for future optional parameters -} - -// ProtectionContainersClientInquireOptions contains the optional parameters for the ProtectionContainersClient.Inquire method. -type ProtectionContainersClientInquireOptions struct { - // OData filter options. - Filter *string -} - -// ProtectionContainersClientRefreshOptions contains the optional parameters for the ProtectionContainersClient.Refresh method. -type ProtectionContainersClientRefreshOptions struct { - // OData filter options. - Filter *string -} - -// ProtectionContainersClientRegisterOptions contains the optional parameters for the ProtectionContainersClient.Register -// method. -type ProtectionContainersClientRegisterOptions struct { - // placeholder for future optional parameters -} - -// ProtectionContainersClientUnregisterOptions contains the optional parameters for the ProtectionContainersClient.Unregister -// method. -type ProtectionContainersClientUnregisterOptions struct { - // placeholder for future optional parameters -} - -// ProtectionIntentClassification provides polymorphic access to related types. -// Call the interface's GetProtectionIntent() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureRecoveryServiceVaultProtectionIntent, *AzureResourceProtectionIntent, *AzureWorkloadAutoProtectionIntent, *AzureWorkloadContainerAutoProtectionIntent, -// - *AzureWorkloadSQLAutoProtectionIntent, *ProtectionIntent -type ProtectionIntentClassification interface { - // GetProtectionIntent returns the ProtectionIntent content of the underlying type. - GetProtectionIntent() *ProtectionIntent -} - // ProtectionIntent - Base class for backup ProtectionIntent. type ProtectionIntent struct { // REQUIRED; backup protectionIntent type. @@ -8750,27 +8176,6 @@ type ProtectionIntent struct { // GetProtectionIntent implements the ProtectionIntentClassification interface for type ProtectionIntent. func (p *ProtectionIntent) GetProtectionIntent() *ProtectionIntent { return p } -// ProtectionIntentClientCreateOrUpdateOptions contains the optional parameters for the ProtectionIntentClient.CreateOrUpdate -// method. -type ProtectionIntentClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ProtectionIntentClientDeleteOptions contains the optional parameters for the ProtectionIntentClient.Delete method. -type ProtectionIntentClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ProtectionIntentClientGetOptions contains the optional parameters for the ProtectionIntentClient.Get method. -type ProtectionIntentClientGetOptions struct { - // placeholder for future optional parameters -} - -// ProtectionIntentClientValidateOptions contains the optional parameters for the ProtectionIntentClient.Validate method. -type ProtectionIntentClientValidateOptions struct { - // placeholder for future optional parameters -} - // ProtectionIntentQueryObject - Filters to list protection intent. type ProtectionIntentQueryObject struct { // Backup management type for the backed up item @@ -8819,34 +8224,6 @@ type ProtectionIntentResourceList struct { Value []*ProtectionIntentResource } -// ProtectionPoliciesClientBeginDeleteOptions contains the optional parameters for the ProtectionPoliciesClient.BeginDelete -// method. -type ProtectionPoliciesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ProtectionPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ProtectionPoliciesClient.CreateOrUpdate -// method. -type ProtectionPoliciesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ProtectionPoliciesClientGetOptions contains the optional parameters for the ProtectionPoliciesClient.Get method. -type ProtectionPoliciesClientGetOptions struct { - // placeholder for future optional parameters -} - -// ProtectionPolicyClassification provides polymorphic access to related types. -// Call the interface's GetProtectionPolicy() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureFileShareProtectionPolicy, *AzureIaaSVMProtectionPolicy, *AzureSQLProtectionPolicy, *AzureVMWorkloadProtectionPolicy, -// - *GenericProtectionPolicy, *MabProtectionPolicy, *ProtectionPolicy -type ProtectionPolicyClassification interface { - // GetProtectionPolicy returns the ProtectionPolicy content of the underlying type. - GetProtectionPolicy() *ProtectionPolicy -} - // ProtectionPolicy - Base class for backup policy. Workload-specific backup policies are derived from this class. type ProtectionPolicy struct { // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. @@ -8862,18 +8239,6 @@ type ProtectionPolicy struct { // GetProtectionPolicy implements the ProtectionPolicyClassification interface for type ProtectionPolicy. func (p *ProtectionPolicy) GetProtectionPolicy() *ProtectionPolicy { return p } -// ProtectionPolicyOperationResultsClientGetOptions contains the optional parameters for the ProtectionPolicyOperationResultsClient.Get -// method. -type ProtectionPolicyOperationResultsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ProtectionPolicyOperationStatusesClientGetOptions contains the optional parameters for the ProtectionPolicyOperationStatusesClient.Get -// method. -type ProtectionPolicyOperationStatusesClientGetOptions struct { - // placeholder for future optional parameters -} - // ProtectionPolicyQueryObject - Filters the list backup policies API. type ProtectionPolicyQueryObject struct { // Backup management type for the backup policy. @@ -8919,17 +8284,6 @@ type ProtectionPolicyResourceList struct { Value []*ProtectionPolicyResource } -// RecoveryPointClassification provides polymorphic access to related types. -// Call the interface's GetRecoveryPoint() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureFileShareRecoveryPoint, *AzureWorkloadPointInTimeRecoveryPoint, *AzureWorkloadRecoveryPoint, *AzureWorkloadSAPHanaPointInTimeRecoveryPoint, -// - *AzureWorkloadSAPHanaRecoveryPoint, *AzureWorkloadSQLPointInTimeRecoveryPoint, *AzureWorkloadSQLRecoveryPoint, *GenericRecoveryPoint, -// - *IaasVMRecoveryPoint, *RecoveryPoint -type RecoveryPointClassification interface { - // GetRecoveryPoint returns the RecoveryPoint content of the underlying type. - GetRecoveryPoint() *RecoveryPoint -} - // RecoveryPoint - Base class for backup copies. Workload-specific backup copies are derived from this class. type RecoveryPoint struct { // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. @@ -9037,23 +8391,6 @@ type RecoveryPointTierInformationV2 struct { Type *RecoveryPointTierType } -// RecoveryPointsClientGetOptions contains the optional parameters for the RecoveryPointsClient.Get method. -type RecoveryPointsClientGetOptions struct { - // placeholder for future optional parameters -} - -// RecoveryPointsClientListOptions contains the optional parameters for the RecoveryPointsClient.NewListPager method. -type RecoveryPointsClientListOptions struct { - // OData filter options. - Filter *string -} - -// RecoveryPointsRecommendedForMoveClientListOptions contains the optional parameters for the RecoveryPointsRecommendedForMoveClient.NewListPager -// method. -type RecoveryPointsRecommendedForMoveClientListOptions struct { - // placeholder for future optional parameters -} - // Resource - ARM Resource. type Resource struct { // Optional ETag. @@ -9080,11 +8417,6 @@ type ResourceGuardOperationDetail struct { VaultCriticalOperation *string } -// ResourceGuardProxiesClientGetOptions contains the optional parameters for the ResourceGuardProxiesClient.NewGetPager method. -type ResourceGuardProxiesClientGetOptions struct { - // placeholder for future optional parameters -} - type ResourceGuardProxyBase struct { Description *string LastUpdatedTime *string @@ -9124,27 +8456,6 @@ type ResourceGuardProxyBaseResourceList struct { Value []*ResourceGuardProxyBaseResource } -// ResourceGuardProxyClientDeleteOptions contains the optional parameters for the ResourceGuardProxyClient.Delete method. -type ResourceGuardProxyClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ResourceGuardProxyClientGetOptions contains the optional parameters for the ResourceGuardProxyClient.Get method. -type ResourceGuardProxyClientGetOptions struct { - // placeholder for future optional parameters -} - -// ResourceGuardProxyClientPutOptions contains the optional parameters for the ResourceGuardProxyClient.Put method. -type ResourceGuardProxyClientPutOptions struct { - // placeholder for future optional parameters -} - -// ResourceGuardProxyClientUnlockDeleteOptions contains the optional parameters for the ResourceGuardProxyClient.UnlockDelete -// method. -type ResourceGuardProxyClientUnlockDeleteOptions struct { - // placeholder for future optional parameters -} - // ResourceHealthDetails - Health Details for backup items. type ResourceHealthDetails struct { // READ-ONLY; Health Code @@ -9178,18 +8489,6 @@ type RestoreFileSpecs struct { TargetFolderPath *string } -// RestoreRequestClassification provides polymorphic access to related types. -// Call the interface's GetRestoreRequest() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureFileShareRestoreRequest, *AzureWorkloadPointInTimeRestoreRequest, *AzureWorkloadRestoreRequest, *AzureWorkloadSAPHanaPointInTimeRestoreRequest, -// - *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, *AzureWorkloadSAPHanaRestoreRequest, *AzureWorkloadSAPHanaRestoreWithRehydrateRequest, -// - *AzureWorkloadSQLPointInTimeRestoreRequest, *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, *AzureWorkloadSQLRestoreRequest, -// - *AzureWorkloadSQLRestoreWithRehydrateRequest, *IaasVMRestoreRequest, *IaasVMRestoreWithRehydrationRequest, *RestoreRequest -type RestoreRequestClassification interface { - // GetRestoreRequest returns the RestoreRequest content of the underlying type. - GetRestoreRequest() *RestoreRequest -} - // RestoreRequest - Base class for restore request. Workload-specific restore requests are derived from this class. type RestoreRequest struct { // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. @@ -9223,12 +8522,6 @@ type RestoreRequestResource struct { Type *string } -// RestoresClientBeginTriggerOptions contains the optional parameters for the RestoresClient.BeginTrigger method. -type RestoresClientBeginTriggerOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - // RetentionDuration - Retention duration. type RetentionDuration struct { // Count of duration types. Retention duration is obtained by the counting the duration type Count times. For example, when @@ -9239,15 +8532,6 @@ type RetentionDuration struct { DurationType *RetentionDurationType } -// RetentionPolicyClassification provides polymorphic access to related types. -// Call the interface's GetRetentionPolicy() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *LongTermRetentionPolicy, *RetentionPolicy, *SimpleRetentionPolicy -type RetentionPolicyClassification interface { - // GetRetentionPolicy returns the RetentionPolicy content of the underlying type. - GetRetentionPolicy() *RetentionPolicy -} - // RetentionPolicy - Base class for retention policy. type RetentionPolicy struct { // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. @@ -9284,15 +8568,6 @@ type SQLDataDirectoryMapping struct { TargetPath *string } -// SchedulePolicyClassification provides polymorphic access to related types. -// Call the interface's GetSchedulePolicy() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *LogSchedulePolicy, *LongTermSchedulePolicy, *SchedulePolicy, *SimpleSchedulePolicy, *SimpleSchedulePolicyV2 -type SchedulePolicyClassification interface { - // GetSchedulePolicy returns the SchedulePolicy content of the underlying type. - GetSchedulePolicy() *SchedulePolicy -} - // SchedulePolicy - Base class for backup schedule. type SchedulePolicy struct { // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. @@ -9308,12 +8583,6 @@ type SecuredVMDetails struct { SecuredVMOsDiskEncryptionSetID *string } -// SecurityPINsClientGetOptions contains the optional parameters for the SecurityPINsClient.Get method. -type SecurityPINsClientGetOptions struct { - // security pin request - Parameters *SecurityPinBase -} - // SecurityPinBase - Base class for get security pin request body type SecurityPinBase struct { // ResourceGuard Operation Requests @@ -9532,27 +8801,11 @@ func (v *ValidateIaasVMRestoreOperationRequest) GetValidateOperationRequest() *V // GetValidateRestoreOperationRequest implements the ValidateRestoreOperationRequestClassification interface for type ValidateIaasVMRestoreOperationRequest. func (v *ValidateIaasVMRestoreOperationRequest) GetValidateRestoreOperationRequest() *ValidateRestoreOperationRequest { return &ValidateRestoreOperationRequest{ - RestoreRequest: v.RestoreRequest, ObjectType: v.ObjectType, + RestoreRequest: v.RestoreRequest, } } -// ValidateOperationClientBeginTriggerOptions contains the optional parameters for the ValidateOperationClient.BeginTrigger -// method. -type ValidateOperationClientBeginTriggerOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ValidateOperationRequestClassification provides polymorphic access to related types. -// Call the interface's GetValidateOperationRequest() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ValidateIaasVMRestoreOperationRequest, *ValidateOperationRequest, *ValidateRestoreOperationRequest -type ValidateOperationRequestClassification interface { - // GetValidateOperationRequest returns the ValidateOperationRequest content of the underlying type. - GetValidateOperationRequest() *ValidateOperationRequest -} - // ValidateOperationRequest - Base class for validate operation request. type ValidateOperationRequest struct { // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. @@ -9568,32 +8821,11 @@ type ValidateOperationResponse struct { ValidationResults []*ErrorDetail } -// ValidateOperationResultsClientGetOptions contains the optional parameters for the ValidateOperationResultsClient.Get method. -type ValidateOperationResultsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ValidateOperationStatusesClientGetOptions contains the optional parameters for the ValidateOperationStatusesClient.Get -// method. -type ValidateOperationStatusesClientGetOptions struct { - // placeholder for future optional parameters -} - type ValidateOperationsResponse struct { // Base class for validate operation response. ValidateOperationResponse *ValidateOperationResponse } -// ValidateRestoreOperationRequestClassification provides polymorphic access to related types. -// Call the interface's GetValidateRestoreOperationRequest() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ValidateIaasVMRestoreOperationRequest, *ValidateRestoreOperationRequest -type ValidateRestoreOperationRequestClassification interface { - ValidateOperationRequestClassification - // GetValidateRestoreOperationRequest returns the ValidateRestoreOperationRequest content of the underlying type. - GetValidateRestoreOperationRequest() *ValidateRestoreOperationRequest -} - // ValidateRestoreOperationRequest - AzureRestoreValidation request. type ValidateRestoreOperationRequest struct { // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. @@ -9657,14 +8889,14 @@ type VaultJob struct { // GetJob implements the JobClassification interface for type VaultJob. func (v *VaultJob) GetJob() *Job { return &Job{ - EntityFriendlyName: v.EntityFriendlyName, + ActivityID: v.ActivityID, BackupManagementType: v.BackupManagementType, - Operation: v.Operation, - Status: v.Status, - StartTime: v.StartTime, EndTime: v.EndTime, - ActivityID: v.ActivityID, + EntityFriendlyName: v.EntityFriendlyName, JobType: v.JobType, + Operation: v.Operation, + StartTime: v.StartTime, + Status: v.Status, } } @@ -9686,15 +8918,6 @@ type VaultJobExtendedInfo struct { PropertyBag map[string]*string } -// VaultStorageConfigOperationResultResponseClassification provides polymorphic access to related types. -// Call the interface's GetVaultStorageConfigOperationResultResponse() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *PrepareDataMoveResponse, *VaultStorageConfigOperationResultResponse -type VaultStorageConfigOperationResultResponseClassification interface { - // GetVaultStorageConfigOperationResultResponse returns the VaultStorageConfigOperationResultResponse content of the underlying type. - GetVaultStorageConfigOperationResultResponse() *VaultStorageConfigOperationResultResponse -} - // VaultStorageConfigOperationResultResponse - Operation result response for Vault Storage Config type VaultStorageConfigOperationResultResponse struct { // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. @@ -9747,17 +8970,6 @@ type WorkloadInquiryDetails struct { Type *string } -// WorkloadItemClassification provides polymorphic access to related types. -// Call the interface's GetWorkloadItem() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureVMWorkloadItem, *AzureVMWorkloadSAPAseDatabaseWorkloadItem, *AzureVMWorkloadSAPAseSystemWorkloadItem, *AzureVMWorkloadSAPHanaDatabaseWorkloadItem, -// - *AzureVMWorkloadSAPHanaSystemWorkloadItem, *AzureVMWorkloadSQLDatabaseWorkloadItem, *AzureVMWorkloadSQLInstanceWorkloadItem, -// - *WorkloadItem -type WorkloadItemClassification interface { - // GetWorkloadItem returns the WorkloadItem content of the underlying type. - GetWorkloadItem() *WorkloadItem -} - // WorkloadItem - Base class for backup item. Workload-specific backup items are derived from this class. type WorkloadItem struct { // REQUIRED; Type of the backup item. @@ -9812,18 +9024,6 @@ type WorkloadItemResourceList struct { Value []*WorkloadItemResource } -// WorkloadProtectableItemClassification provides polymorphic access to related types. -// Call the interface's GetWorkloadProtectableItem() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureFileShareProtectableItem, *AzureIaaSClassicComputeVMProtectableItem, *AzureIaaSComputeVMProtectableItem, *AzureVMWorkloadProtectableItem, -// - *AzureVMWorkloadSAPAseSystemProtectableItem, *AzureVMWorkloadSAPHanaDBInstance, *AzureVMWorkloadSAPHanaDatabaseProtectableItem, -// - *AzureVMWorkloadSAPHanaHSR, *AzureVMWorkloadSAPHanaSystemProtectableItem, *AzureVMWorkloadSQLAvailabilityGroupProtectableItem, -// - *AzureVMWorkloadSQLDatabaseProtectableItem, *AzureVMWorkloadSQLInstanceProtectableItem, *IaaSVMProtectableItem, *WorkloadProtectableItem -type WorkloadProtectableItemClassification interface { - // GetWorkloadProtectableItem returns the WorkloadProtectableItem content of the underlying type. - GetWorkloadProtectableItem() *WorkloadProtectableItem -} - // WorkloadProtectableItem - Base class for backup item. Workload-specific backup items are derived from this class. type WorkloadProtectableItem struct { // REQUIRED; Type of the backup item. diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/models_serde.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/models_serde.go index 69f0018d4087..09bfbbe111ad 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/models_serde.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/models_serde.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -493,7 +492,7 @@ func (a AzureFileshareProtectedItem) MarshalJSON() ([]byte, error) { populate(objectMap, "protectionState", a.ProtectionState) populate(objectMap, "protectionStatus", a.ProtectionStatus) populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) - populate(objectMap, "softDeleteRetentionPeriod", a.SoftDeleteRetentionPeriod) + populate(objectMap, "softDeleteRetentionPeriodInDays", a.SoftDeleteRetentionPeriodInDays) populate(objectMap, "sourceResourceId", a.SourceResourceID) populate(objectMap, "workloadType", a.WorkloadType) return json.Marshal(objectMap) @@ -574,8 +573,8 @@ func (a *AzureFileshareProtectedItem) UnmarshalJSON(data []byte) error { case "resourceGuardOperationRequests": err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) delete(rawMsg, key) - case "softDeleteRetentionPeriod": - err = unpopulate(val, "SoftDeleteRetentionPeriod", &a.SoftDeleteRetentionPeriod) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &a.SoftDeleteRetentionPeriodInDays) delete(rawMsg, key) case "sourceResourceId": err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) @@ -777,7 +776,7 @@ func (a AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) { populate(objectMap, "protectionState", a.ProtectionState) populate(objectMap, "protectionStatus", a.ProtectionStatus) populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) - populate(objectMap, "softDeleteRetentionPeriod", a.SoftDeleteRetentionPeriod) + populate(objectMap, "softDeleteRetentionPeriodInDays", a.SoftDeleteRetentionPeriodInDays) populate(objectMap, "sourceResourceId", a.SourceResourceID) populate(objectMap, "virtualMachineId", a.VirtualMachineID) populate(objectMap, "workloadType", a.WorkloadType) @@ -871,8 +870,8 @@ func (a *AzureIaaSClassicComputeVMProtectedItem) UnmarshalJSON(data []byte) erro case "resourceGuardOperationRequests": err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) delete(rawMsg, key) - case "softDeleteRetentionPeriod": - err = unpopulate(val, "SoftDeleteRetentionPeriod", &a.SoftDeleteRetentionPeriod) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &a.SoftDeleteRetentionPeriodInDays) delete(rawMsg, key) case "sourceResourceId": err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) @@ -1034,7 +1033,7 @@ func (a AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) { populate(objectMap, "protectionState", a.ProtectionState) populate(objectMap, "protectionStatus", a.ProtectionStatus) populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) - populate(objectMap, "softDeleteRetentionPeriod", a.SoftDeleteRetentionPeriod) + populate(objectMap, "softDeleteRetentionPeriodInDays", a.SoftDeleteRetentionPeriodInDays) populate(objectMap, "sourceResourceId", a.SourceResourceID) populate(objectMap, "virtualMachineId", a.VirtualMachineID) populate(objectMap, "workloadType", a.WorkloadType) @@ -1128,8 +1127,8 @@ func (a *AzureIaaSComputeVMProtectedItem) UnmarshalJSON(data []byte) error { case "resourceGuardOperationRequests": err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) delete(rawMsg, key) - case "softDeleteRetentionPeriod": - err = unpopulate(val, "SoftDeleteRetentionPeriod", &a.SoftDeleteRetentionPeriod) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &a.SoftDeleteRetentionPeriodInDays) delete(rawMsg, key) case "sourceResourceId": err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) @@ -1519,7 +1518,7 @@ func (a AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) { populate(objectMap, "protectionState", a.ProtectionState) populate(objectMap, "protectionStatus", a.ProtectionStatus) populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) - populate(objectMap, "softDeleteRetentionPeriod", a.SoftDeleteRetentionPeriod) + populate(objectMap, "softDeleteRetentionPeriodInDays", a.SoftDeleteRetentionPeriodInDays) populate(objectMap, "sourceResourceId", a.SourceResourceID) populate(objectMap, "virtualMachineId", a.VirtualMachineID) populate(objectMap, "workloadType", a.WorkloadType) @@ -1613,8 +1612,8 @@ func (a *AzureIaaSVMProtectedItem) UnmarshalJSON(data []byte) error { case "resourceGuardOperationRequests": err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) delete(rawMsg, key) - case "softDeleteRetentionPeriod": - err = unpopulate(val, "SoftDeleteRetentionPeriod", &a.SoftDeleteRetentionPeriod) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &a.SoftDeleteRetentionPeriodInDays) delete(rawMsg, key) case "sourceResourceId": err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) @@ -1976,7 +1975,7 @@ func (a AzureSQLProtectedItem) MarshalJSON() ([]byte, error) { objectMap["protectedItemType"] = "Microsoft.Sql/servers/databases" populate(objectMap, "protectionState", a.ProtectionState) populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) - populate(objectMap, "softDeleteRetentionPeriod", a.SoftDeleteRetentionPeriod) + populate(objectMap, "softDeleteRetentionPeriodInDays", a.SoftDeleteRetentionPeriodInDays) populate(objectMap, "sourceResourceId", a.SourceResourceID) populate(objectMap, "workloadType", a.WorkloadType) return json.Marshal(objectMap) @@ -2045,8 +2044,8 @@ func (a *AzureSQLProtectedItem) UnmarshalJSON(data []byte) error { case "resourceGuardOperationRequests": err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) delete(rawMsg, key) - case "softDeleteRetentionPeriod": - err = unpopulate(val, "SoftDeleteRetentionPeriod", &a.SoftDeleteRetentionPeriod) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &a.SoftDeleteRetentionPeriodInDays) delete(rawMsg, key) case "sourceResourceId": err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) @@ -2672,6 +2671,7 @@ func (a AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) { populate(objectMap, "friendlyName", a.FriendlyName) populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) populate(objectMap, "isAutoProtected", a.IsAutoProtected) + populate(objectMap, "isProtectable", a.IsProtectable) populate(objectMap, "parentName", a.ParentName) populate(objectMap, "parentUniqueName", a.ParentUniqueName) populate(objectMap, "prebackupvalidation", a.Prebackupvalidation) @@ -2705,6 +2705,9 @@ func (a *AzureVMWorkloadProtectableItem) UnmarshalJSON(data []byte) error { case "isAutoProtected": err = unpopulate(val, "IsAutoProtected", &a.IsAutoProtected) delete(rawMsg, key) + case "isProtectable": + err = unpopulate(val, "IsProtectable", &a.IsProtectable) + delete(rawMsg, key) case "parentName": err = unpopulate(val, "ParentName", &a.ParentName) delete(rawMsg, key) @@ -2760,6 +2763,7 @@ func (a AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) { populate(objectMap, "lastBackupStatus", a.LastBackupStatus) populateTimeRFC3339(objectMap, "lastBackupTime", a.LastBackupTime) populateTimeRFC3339(objectMap, "lastRecoveryPoint", a.LastRecoveryPoint) + populate(objectMap, "nodesList", a.NodesList) populate(objectMap, "parentName", a.ParentName) populate(objectMap, "parentType", a.ParentType) populate(objectMap, "policyId", a.PolicyID) @@ -2771,7 +2775,7 @@ func (a AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) { populate(objectMap, "protectionStatus", a.ProtectionStatus) populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) populate(objectMap, "serverName", a.ServerName) - populate(objectMap, "softDeleteRetentionPeriod", a.SoftDeleteRetentionPeriod) + populate(objectMap, "softDeleteRetentionPeriodInDays", a.SoftDeleteRetentionPeriodInDays) populate(objectMap, "sourceResourceId", a.SourceResourceID) populate(objectMap, "workloadType", a.WorkloadType) return json.Marshal(objectMap) @@ -2837,6 +2841,9 @@ func (a *AzureVMWorkloadProtectedItem) UnmarshalJSON(data []byte) error { case "lastRecoveryPoint": err = unpopulateTimeRFC3339(val, "LastRecoveryPoint", &a.LastRecoveryPoint) delete(rawMsg, key) + case "nodesList": + err = unpopulate(val, "NodesList", &a.NodesList) + delete(rawMsg, key) case "parentName": err = unpopulate(val, "ParentName", &a.ParentName) delete(rawMsg, key) @@ -2870,8 +2877,8 @@ func (a *AzureVMWorkloadProtectedItem) UnmarshalJSON(data []byte) error { case "serverName": err = unpopulate(val, "ServerName", &a.ServerName) delete(rawMsg, key) - case "softDeleteRetentionPeriod": - err = unpopulate(val, "SoftDeleteRetentionPeriod", &a.SoftDeleteRetentionPeriod) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &a.SoftDeleteRetentionPeriodInDays) delete(rawMsg, key) case "sourceResourceId": err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) @@ -3009,6 +3016,7 @@ func (a AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error populate(objectMap, "lastBackupStatus", a.LastBackupStatus) populateTimeRFC3339(objectMap, "lastBackupTime", a.LastBackupTime) populateTimeRFC3339(objectMap, "lastRecoveryPoint", a.LastRecoveryPoint) + populate(objectMap, "nodesList", a.NodesList) populate(objectMap, "parentName", a.ParentName) populate(objectMap, "parentType", a.ParentType) populate(objectMap, "policyId", a.PolicyID) @@ -3020,7 +3028,7 @@ func (a AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error populate(objectMap, "protectionStatus", a.ProtectionStatus) populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) populate(objectMap, "serverName", a.ServerName) - populate(objectMap, "softDeleteRetentionPeriod", a.SoftDeleteRetentionPeriod) + populate(objectMap, "softDeleteRetentionPeriodInDays", a.SoftDeleteRetentionPeriodInDays) populate(objectMap, "sourceResourceId", a.SourceResourceID) populate(objectMap, "workloadType", a.WorkloadType) return json.Marshal(objectMap) @@ -3086,6 +3094,9 @@ func (a *AzureVMWorkloadSAPAseDatabaseProtectedItem) UnmarshalJSON(data []byte) case "lastRecoveryPoint": err = unpopulateTimeRFC3339(val, "LastRecoveryPoint", &a.LastRecoveryPoint) delete(rawMsg, key) + case "nodesList": + err = unpopulate(val, "NodesList", &a.NodesList) + delete(rawMsg, key) case "parentName": err = unpopulate(val, "ParentName", &a.ParentName) delete(rawMsg, key) @@ -3119,8 +3130,8 @@ func (a *AzureVMWorkloadSAPAseDatabaseProtectedItem) UnmarshalJSON(data []byte) case "serverName": err = unpopulate(val, "ServerName", &a.ServerName) delete(rawMsg, key) - case "softDeleteRetentionPeriod": - err = unpopulate(val, "SoftDeleteRetentionPeriod", &a.SoftDeleteRetentionPeriod) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &a.SoftDeleteRetentionPeriodInDays) delete(rawMsg, key) case "sourceResourceId": err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) @@ -3206,6 +3217,7 @@ func (a AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error populate(objectMap, "friendlyName", a.FriendlyName) populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) populate(objectMap, "isAutoProtected", a.IsAutoProtected) + populate(objectMap, "isProtectable", a.IsProtectable) populate(objectMap, "parentName", a.ParentName) populate(objectMap, "parentUniqueName", a.ParentUniqueName) populate(objectMap, "prebackupvalidation", a.Prebackupvalidation) @@ -3239,6 +3251,9 @@ func (a *AzureVMWorkloadSAPAseSystemProtectableItem) UnmarshalJSON(data []byte) case "isAutoProtected": err = unpopulate(val, "IsAutoProtected", &a.IsAutoProtected) delete(rawMsg, key) + case "isProtectable": + err = unpopulate(val, "IsProtectable", &a.IsProtectable) + delete(rawMsg, key) case "parentName": err = unpopulate(val, "ParentName", &a.ParentName) delete(rawMsg, key) @@ -3344,6 +3359,7 @@ func (a AzureVMWorkloadSAPHanaDBInstance) MarshalJSON() ([]byte, error) { populate(objectMap, "friendlyName", a.FriendlyName) populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) populate(objectMap, "isAutoProtected", a.IsAutoProtected) + populate(objectMap, "isProtectable", a.IsProtectable) populate(objectMap, "parentName", a.ParentName) populate(objectMap, "parentUniqueName", a.ParentUniqueName) populate(objectMap, "prebackupvalidation", a.Prebackupvalidation) @@ -3377,6 +3393,9 @@ func (a *AzureVMWorkloadSAPHanaDBInstance) UnmarshalJSON(data []byte) error { case "isAutoProtected": err = unpopulate(val, "IsAutoProtected", &a.IsAutoProtected) delete(rawMsg, key) + case "isProtectable": + err = unpopulate(val, "IsProtectable", &a.IsProtectable) + delete(rawMsg, key) case "parentName": err = unpopulate(val, "ParentName", &a.ParentName) delete(rawMsg, key) @@ -3432,6 +3451,7 @@ func (a AzureVMWorkloadSAPHanaDBInstanceProtectedItem) MarshalJSON() ([]byte, er populate(objectMap, "lastBackupStatus", a.LastBackupStatus) populateTimeRFC3339(objectMap, "lastBackupTime", a.LastBackupTime) populateTimeRFC3339(objectMap, "lastRecoveryPoint", a.LastRecoveryPoint) + populate(objectMap, "nodesList", a.NodesList) populate(objectMap, "parentName", a.ParentName) populate(objectMap, "parentType", a.ParentType) populate(objectMap, "policyId", a.PolicyID) @@ -3443,7 +3463,7 @@ func (a AzureVMWorkloadSAPHanaDBInstanceProtectedItem) MarshalJSON() ([]byte, er populate(objectMap, "protectionStatus", a.ProtectionStatus) populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) populate(objectMap, "serverName", a.ServerName) - populate(objectMap, "softDeleteRetentionPeriod", a.SoftDeleteRetentionPeriod) + populate(objectMap, "softDeleteRetentionPeriodInDays", a.SoftDeleteRetentionPeriodInDays) populate(objectMap, "sourceResourceId", a.SourceResourceID) populate(objectMap, "workloadType", a.WorkloadType) return json.Marshal(objectMap) @@ -3509,6 +3529,9 @@ func (a *AzureVMWorkloadSAPHanaDBInstanceProtectedItem) UnmarshalJSON(data []byt case "lastRecoveryPoint": err = unpopulateTimeRFC3339(val, "LastRecoveryPoint", &a.LastRecoveryPoint) delete(rawMsg, key) + case "nodesList": + err = unpopulate(val, "NodesList", &a.NodesList) + delete(rawMsg, key) case "parentName": err = unpopulate(val, "ParentName", &a.ParentName) delete(rawMsg, key) @@ -3542,8 +3565,8 @@ func (a *AzureVMWorkloadSAPHanaDBInstanceProtectedItem) UnmarshalJSON(data []byt case "serverName": err = unpopulate(val, "ServerName", &a.ServerName) delete(rawMsg, key) - case "softDeleteRetentionPeriod": - err = unpopulate(val, "SoftDeleteRetentionPeriod", &a.SoftDeleteRetentionPeriod) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &a.SoftDeleteRetentionPeriodInDays) delete(rawMsg, key) case "sourceResourceId": err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) @@ -3566,6 +3589,7 @@ func (a AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, er populate(objectMap, "friendlyName", a.FriendlyName) populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) populate(objectMap, "isAutoProtected", a.IsAutoProtected) + populate(objectMap, "isProtectable", a.IsProtectable) populate(objectMap, "parentName", a.ParentName) populate(objectMap, "parentUniqueName", a.ParentUniqueName) populate(objectMap, "prebackupvalidation", a.Prebackupvalidation) @@ -3599,6 +3623,9 @@ func (a *AzureVMWorkloadSAPHanaDatabaseProtectableItem) UnmarshalJSON(data []byt case "isAutoProtected": err = unpopulate(val, "IsAutoProtected", &a.IsAutoProtected) delete(rawMsg, key) + case "isProtectable": + err = unpopulate(val, "IsProtectable", &a.IsProtectable) + delete(rawMsg, key) case "parentName": err = unpopulate(val, "ParentName", &a.ParentName) delete(rawMsg, key) @@ -3654,6 +3681,7 @@ func (a AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, erro populate(objectMap, "lastBackupStatus", a.LastBackupStatus) populateTimeRFC3339(objectMap, "lastBackupTime", a.LastBackupTime) populateTimeRFC3339(objectMap, "lastRecoveryPoint", a.LastRecoveryPoint) + populate(objectMap, "nodesList", a.NodesList) populate(objectMap, "parentName", a.ParentName) populate(objectMap, "parentType", a.ParentType) populate(objectMap, "policyId", a.PolicyID) @@ -3665,7 +3693,7 @@ func (a AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, erro populate(objectMap, "protectionStatus", a.ProtectionStatus) populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) populate(objectMap, "serverName", a.ServerName) - populate(objectMap, "softDeleteRetentionPeriod", a.SoftDeleteRetentionPeriod) + populate(objectMap, "softDeleteRetentionPeriodInDays", a.SoftDeleteRetentionPeriodInDays) populate(objectMap, "sourceResourceId", a.SourceResourceID) populate(objectMap, "workloadType", a.WorkloadType) return json.Marshal(objectMap) @@ -3731,6 +3759,9 @@ func (a *AzureVMWorkloadSAPHanaDatabaseProtectedItem) UnmarshalJSON(data []byte) case "lastRecoveryPoint": err = unpopulateTimeRFC3339(val, "LastRecoveryPoint", &a.LastRecoveryPoint) delete(rawMsg, key) + case "nodesList": + err = unpopulate(val, "NodesList", &a.NodesList) + delete(rawMsg, key) case "parentName": err = unpopulate(val, "ParentName", &a.ParentName) delete(rawMsg, key) @@ -3764,8 +3795,8 @@ func (a *AzureVMWorkloadSAPHanaDatabaseProtectedItem) UnmarshalJSON(data []byte) case "serverName": err = unpopulate(val, "ServerName", &a.ServerName) delete(rawMsg, key) - case "softDeleteRetentionPeriod": - err = unpopulate(val, "SoftDeleteRetentionPeriod", &a.SoftDeleteRetentionPeriod) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &a.SoftDeleteRetentionPeriodInDays) delete(rawMsg, key) case "sourceResourceId": err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) @@ -3844,17 +3875,18 @@ func (a *AzureVMWorkloadSAPHanaDatabaseWorkloadItem) UnmarshalJSON(data []byte) return nil } -// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSAPHanaHSR. -func (a AzureVMWorkloadSAPHanaHSR) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSAPHanaHSRProtectableItem. +func (a AzureVMWorkloadSAPHanaHSRProtectableItem) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "backupManagementType", a.BackupManagementType) populate(objectMap, "friendlyName", a.FriendlyName) populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) populate(objectMap, "isAutoProtected", a.IsAutoProtected) + populate(objectMap, "isProtectable", a.IsProtectable) populate(objectMap, "parentName", a.ParentName) populate(objectMap, "parentUniqueName", a.ParentUniqueName) populate(objectMap, "prebackupvalidation", a.Prebackupvalidation) - objectMap["protectableItemType"] = "SAPHanaHSR" + objectMap["protectableItemType"] = "HanaHSRContainer" populate(objectMap, "protectionState", a.ProtectionState) populate(objectMap, "serverName", a.ServerName) populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) @@ -3863,8 +3895,8 @@ func (a AzureVMWorkloadSAPHanaHSR) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSAPHanaHSR. -func (a *AzureVMWorkloadSAPHanaHSR) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSAPHanaHSRProtectableItem. +func (a *AzureVMWorkloadSAPHanaHSRProtectableItem) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", a, err) @@ -3884,6 +3916,9 @@ func (a *AzureVMWorkloadSAPHanaHSR) UnmarshalJSON(data []byte) error { case "isAutoProtected": err = unpopulate(val, "IsAutoProtected", &a.IsAutoProtected) delete(rawMsg, key) + case "isProtectable": + err = unpopulate(val, "IsProtectable", &a.IsProtectable) + delete(rawMsg, key) case "parentName": err = unpopulate(val, "ParentName", &a.ParentName) delete(rawMsg, key) @@ -3926,6 +3961,7 @@ func (a AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, erro populate(objectMap, "friendlyName", a.FriendlyName) populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) populate(objectMap, "isAutoProtected", a.IsAutoProtected) + populate(objectMap, "isProtectable", a.IsProtectable) populate(objectMap, "parentName", a.ParentName) populate(objectMap, "parentUniqueName", a.ParentUniqueName) populate(objectMap, "prebackupvalidation", a.Prebackupvalidation) @@ -3959,6 +3995,9 @@ func (a *AzureVMWorkloadSAPHanaSystemProtectableItem) UnmarshalJSON(data []byte) case "isAutoProtected": err = unpopulate(val, "IsAutoProtected", &a.IsAutoProtected) delete(rawMsg, key) + case "isProtectable": + err = unpopulate(val, "IsProtectable", &a.IsProtectable) + delete(rawMsg, key) case "parentName": err = unpopulate(val, "ParentName", &a.ParentName) delete(rawMsg, key) @@ -4064,6 +4103,8 @@ func (a AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byt populate(objectMap, "friendlyName", a.FriendlyName) populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) populate(objectMap, "isAutoProtected", a.IsAutoProtected) + populate(objectMap, "isProtectable", a.IsProtectable) + populate(objectMap, "nodesList", a.NodesList) populate(objectMap, "parentName", a.ParentName) populate(objectMap, "parentUniqueName", a.ParentUniqueName) populate(objectMap, "prebackupvalidation", a.Prebackupvalidation) @@ -4097,6 +4138,12 @@ func (a *AzureVMWorkloadSQLAvailabilityGroupProtectableItem) UnmarshalJSON(data case "isAutoProtected": err = unpopulate(val, "IsAutoProtected", &a.IsAutoProtected) delete(rawMsg, key) + case "isProtectable": + err = unpopulate(val, "IsProtectable", &a.IsProtectable) + delete(rawMsg, key) + case "nodesList": + err = unpopulate(val, "NodesList", &a.NodesList) + delete(rawMsg, key) case "parentName": err = unpopulate(val, "ParentName", &a.ParentName) delete(rawMsg, key) @@ -4139,6 +4186,7 @@ func (a AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) populate(objectMap, "friendlyName", a.FriendlyName) populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) populate(objectMap, "isAutoProtected", a.IsAutoProtected) + populate(objectMap, "isProtectable", a.IsProtectable) populate(objectMap, "parentName", a.ParentName) populate(objectMap, "parentUniqueName", a.ParentUniqueName) populate(objectMap, "prebackupvalidation", a.Prebackupvalidation) @@ -4172,6 +4220,9 @@ func (a *AzureVMWorkloadSQLDatabaseProtectableItem) UnmarshalJSON(data []byte) e case "isAutoProtected": err = unpopulate(val, "IsAutoProtected", &a.IsAutoProtected) delete(rawMsg, key) + case "isProtectable": + err = unpopulate(val, "IsProtectable", &a.IsProtectable) + delete(rawMsg, key) case "parentName": err = unpopulate(val, "ParentName", &a.ParentName) delete(rawMsg, key) @@ -4227,6 +4278,7 @@ func (a AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) { populate(objectMap, "lastBackupStatus", a.LastBackupStatus) populateTimeRFC3339(objectMap, "lastBackupTime", a.LastBackupTime) populateTimeRFC3339(objectMap, "lastRecoveryPoint", a.LastRecoveryPoint) + populate(objectMap, "nodesList", a.NodesList) populate(objectMap, "parentName", a.ParentName) populate(objectMap, "parentType", a.ParentType) populate(objectMap, "policyId", a.PolicyID) @@ -4238,7 +4290,7 @@ func (a AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) { populate(objectMap, "protectionStatus", a.ProtectionStatus) populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) populate(objectMap, "serverName", a.ServerName) - populate(objectMap, "softDeleteRetentionPeriod", a.SoftDeleteRetentionPeriod) + populate(objectMap, "softDeleteRetentionPeriodInDays", a.SoftDeleteRetentionPeriodInDays) populate(objectMap, "sourceResourceId", a.SourceResourceID) populate(objectMap, "workloadType", a.WorkloadType) return json.Marshal(objectMap) @@ -4304,6 +4356,9 @@ func (a *AzureVMWorkloadSQLDatabaseProtectedItem) UnmarshalJSON(data []byte) err case "lastRecoveryPoint": err = unpopulateTimeRFC3339(val, "LastRecoveryPoint", &a.LastRecoveryPoint) delete(rawMsg, key) + case "nodesList": + err = unpopulate(val, "NodesList", &a.NodesList) + delete(rawMsg, key) case "parentName": err = unpopulate(val, "ParentName", &a.ParentName) delete(rawMsg, key) @@ -4337,8 +4392,8 @@ func (a *AzureVMWorkloadSQLDatabaseProtectedItem) UnmarshalJSON(data []byte) err case "serverName": err = unpopulate(val, "ServerName", &a.ServerName) delete(rawMsg, key) - case "softDeleteRetentionPeriod": - err = unpopulate(val, "SoftDeleteRetentionPeriod", &a.SoftDeleteRetentionPeriod) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &a.SoftDeleteRetentionPeriodInDays) delete(rawMsg, key) case "sourceResourceId": err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) @@ -4424,6 +4479,7 @@ func (a AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) populate(objectMap, "friendlyName", a.FriendlyName) populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) populate(objectMap, "isAutoProtected", a.IsAutoProtected) + populate(objectMap, "isProtectable", a.IsProtectable) populate(objectMap, "parentName", a.ParentName) populate(objectMap, "parentUniqueName", a.ParentUniqueName) populate(objectMap, "prebackupvalidation", a.Prebackupvalidation) @@ -4457,6 +4513,9 @@ func (a *AzureVMWorkloadSQLInstanceProtectableItem) UnmarshalJSON(data []byte) e case "isAutoProtected": err = unpopulate(val, "IsAutoProtected", &a.IsAutoProtected) delete(rawMsg, key) + case "isProtectable": + err = unpopulate(val, "IsProtectable", &a.IsProtectable) + delete(rawMsg, key) case "parentName": err = unpopulate(val, "ParentName", &a.ParentName) delete(rawMsg, key) @@ -6979,6 +7038,7 @@ func (b BackupResourceVaultConfig) MarshalJSON() ([]byte, error) { populate(objectMap, "isSoftDeleteFeatureStateEditable", b.IsSoftDeleteFeatureStateEditable) populate(objectMap, "resourceGuardOperationRequests", b.ResourceGuardOperationRequests) populate(objectMap, "softDeleteFeatureState", b.SoftDeleteFeatureState) + populate(objectMap, "softDeleteRetentionPeriodInDays", b.SoftDeleteRetentionPeriodInDays) populate(objectMap, "storageModelType", b.StorageModelType) populate(objectMap, "storageType", b.StorageType) populate(objectMap, "storageTypeState", b.StorageTypeState) @@ -7006,6 +7066,9 @@ func (b *BackupResourceVaultConfig) UnmarshalJSON(data []byte) error { case "softDeleteFeatureState": err = unpopulate(val, "SoftDeleteFeatureState", &b.SoftDeleteFeatureState) delete(rawMsg, key) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &b.SoftDeleteRetentionPeriodInDays) + delete(rawMsg, key) case "storageModelType": err = unpopulate(val, "StorageModelType", &b.StorageModelType) delete(rawMsg, key) @@ -7112,12 +7175,14 @@ func (b *BackupStatusRequest) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BackupStatusResponse. func (b BackupStatusResponse) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "acquireStorageAccountLock", b.AcquireStorageAccountLock) populate(objectMap, "containerName", b.ContainerName) populate(objectMap, "errorCode", b.ErrorCode) populate(objectMap, "errorMessage", b.ErrorMessage) populate(objectMap, "fabricName", b.FabricName) populate(objectMap, "policyName", b.PolicyName) populate(objectMap, "protectedItemName", b.ProtectedItemName) + populate(objectMap, "protectedItemsCount", b.ProtectedItemsCount) populate(objectMap, "protectionStatus", b.ProtectionStatus) populate(objectMap, "registrationStatus", b.RegistrationStatus) populate(objectMap, "vaultId", b.VaultID) @@ -7133,6 +7198,9 @@ func (b *BackupStatusResponse) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "acquireStorageAccountLock": + err = unpopulate(val, "AcquireStorageAccountLock", &b.AcquireStorageAccountLock) + delete(rawMsg, key) case "containerName": err = unpopulate(val, "ContainerName", &b.ContainerName) delete(rawMsg, key) @@ -7151,6 +7219,9 @@ func (b *BackupStatusResponse) UnmarshalJSON(data []byte) error { case "protectedItemName": err = unpopulate(val, "ProtectedItemName", &b.ProtectedItemName) delete(rawMsg, key) + case "protectedItemsCount": + err = unpopulate(val, "ProtectedItemsCount", &b.ProtectedItemsCount) + delete(rawMsg, key) case "protectionStatus": err = unpopulate(val, "ProtectionStatus", &b.ProtectionStatus) delete(rawMsg, key) @@ -7497,7 +7568,7 @@ func (d DPMProtectedItem) MarshalJSON() ([]byte, error) { objectMap["protectedItemType"] = "DPMProtectedItem" populate(objectMap, "protectionState", d.ProtectionState) populate(objectMap, "resourceGuardOperationRequests", d.ResourceGuardOperationRequests) - populate(objectMap, "softDeleteRetentionPeriod", d.SoftDeleteRetentionPeriod) + populate(objectMap, "softDeleteRetentionPeriodInDays", d.SoftDeleteRetentionPeriodInDays) populate(objectMap, "sourceResourceId", d.SourceResourceID) populate(objectMap, "workloadType", d.WorkloadType) return json.Marshal(objectMap) @@ -7569,8 +7640,8 @@ func (d *DPMProtectedItem) UnmarshalJSON(data []byte) error { case "resourceGuardOperationRequests": err = unpopulate(val, "ResourceGuardOperationRequests", &d.ResourceGuardOperationRequests) delete(rawMsg, key) - case "softDeleteRetentionPeriod": - err = unpopulate(val, "SoftDeleteRetentionPeriod", &d.SoftDeleteRetentionPeriod) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &d.SoftDeleteRetentionPeriodInDays) delete(rawMsg, key) case "sourceResourceId": err = unpopulate(val, "SourceResourceID", &d.SourceResourceID) @@ -7864,6 +7935,7 @@ func (d DistributedNodesInfo) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "errorDetail", d.ErrorDetail) populate(objectMap, "nodeName", d.NodeName) + populate(objectMap, "sourceResourceId", d.SourceResourceID) populate(objectMap, "status", d.Status) return json.Marshal(objectMap) } @@ -7883,6 +7955,9 @@ func (d *DistributedNodesInfo) UnmarshalJSON(data []byte) error { case "nodeName": err = unpopulate(val, "NodeName", &d.NodeName) delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &d.SourceResourceID) + delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &d.Status) delete(rawMsg, key) @@ -8598,7 +8673,7 @@ func (g GenericProtectedItem) MarshalJSON() ([]byte, error) { objectMap["protectedItemType"] = "GenericProtectedItem" populate(objectMap, "protectionState", g.ProtectionState) populate(objectMap, "resourceGuardOperationRequests", g.ResourceGuardOperationRequests) - populate(objectMap, "softDeleteRetentionPeriod", g.SoftDeleteRetentionPeriod) + populate(objectMap, "softDeleteRetentionPeriodInDays", g.SoftDeleteRetentionPeriodInDays) populate(objectMap, "sourceAssociations", g.SourceAssociations) populate(objectMap, "sourceResourceId", g.SourceResourceID) populate(objectMap, "workloadType", g.WorkloadType) @@ -8674,8 +8749,8 @@ func (g *GenericProtectedItem) UnmarshalJSON(data []byte) error { case "resourceGuardOperationRequests": err = unpopulate(val, "ResourceGuardOperationRequests", &g.ResourceGuardOperationRequests) delete(rawMsg, key) - case "softDeleteRetentionPeriod": - err = unpopulate(val, "SoftDeleteRetentionPeriod", &g.SoftDeleteRetentionPeriod) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &g.SoftDeleteRetentionPeriodInDays) delete(rawMsg, key) case "sourceAssociations": err = unpopulate(val, "SourceAssociations", &g.SourceAssociations) @@ -9559,6 +9634,7 @@ func (i InquiryValidation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "additionalDetail", i.AdditionalDetail) populate(objectMap, "errorDetail", i.ErrorDetail) + populateAny(objectMap, "protectableItemCount", i.ProtectableItemCount) populate(objectMap, "status", i.Status) return json.Marshal(objectMap) } @@ -9578,6 +9654,9 @@ func (i *InquiryValidation) UnmarshalJSON(data []byte) error { case "errorDetail": err = unpopulate(val, "ErrorDetail", &i.ErrorDetail) delete(rawMsg, key) + case "protectableItemCount": + err = unpopulate(val, "ProtectableItemCount", &i.ProtectableItemCount) + delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &i.Status) delete(rawMsg, key) @@ -10277,7 +10356,7 @@ func (m MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) { objectMap["protectedItemType"] = "MabFileFolderProtectedItem" populate(objectMap, "protectionState", m.ProtectionState) populate(objectMap, "resourceGuardOperationRequests", m.ResourceGuardOperationRequests) - populate(objectMap, "softDeleteRetentionPeriod", m.SoftDeleteRetentionPeriod) + populate(objectMap, "softDeleteRetentionPeriodInDays", m.SoftDeleteRetentionPeriodInDays) populate(objectMap, "sourceResourceId", m.SourceResourceID) populate(objectMap, "workloadType", m.WorkloadType) return json.Marshal(objectMap) @@ -10358,8 +10437,8 @@ func (m *MabFileFolderProtectedItem) UnmarshalJSON(data []byte) error { case "resourceGuardOperationRequests": err = unpopulate(val, "ResourceGuardOperationRequests", &m.ResourceGuardOperationRequests) delete(rawMsg, key) - case "softDeleteRetentionPeriod": - err = unpopulate(val, "SoftDeleteRetentionPeriod", &m.SoftDeleteRetentionPeriod) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &m.SoftDeleteRetentionPeriodInDays) delete(rawMsg, key) case "sourceResourceId": err = unpopulate(val, "SourceResourceID", &m.SourceResourceID) @@ -11422,6 +11501,7 @@ func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection. func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "groupIds", p.GroupIDs) populate(objectMap, "privateEndpoint", p.PrivateEndpoint) populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) populate(objectMap, "provisioningState", p.ProvisioningState) @@ -11437,6 +11517,9 @@ func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "groupIds": + err = unpopulate(val, "GroupIDs", &p.GroupIDs) + delete(rawMsg, key) case "privateEndpoint": err = unpopulate(val, "PrivateEndpoint", &p.PrivateEndpoint) delete(rawMsg, key) @@ -11508,7 +11591,7 @@ func (p *PrivateEndpointConnectionResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState. func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "actionRequired", p.ActionRequired) + populate(objectMap, "actionsRequired", p.ActionsRequired) populate(objectMap, "description", p.Description) populate(objectMap, "status", p.Status) return json.Marshal(objectMap) @@ -11523,8 +11606,8 @@ func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "actionRequired": - err = unpopulate(val, "ActionRequired", &p.ActionRequired) + case "actionsRequired": + err = unpopulate(val, "ActionsRequired", &p.ActionsRequired) delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &p.Description) @@ -11683,7 +11766,7 @@ func (p ProtectedItem) MarshalJSON() ([]byte, error) { populate(objectMap, "policyName", p.PolicyName) objectMap["protectedItemType"] = p.ProtectedItemType populate(objectMap, "resourceGuardOperationRequests", p.ResourceGuardOperationRequests) - populate(objectMap, "softDeleteRetentionPeriod", p.SoftDeleteRetentionPeriod) + populate(objectMap, "softDeleteRetentionPeriodInDays", p.SoftDeleteRetentionPeriodInDays) populate(objectMap, "sourceResourceId", p.SourceResourceID) populate(objectMap, "workloadType", p.WorkloadType) return json.Marshal(objectMap) @@ -11743,8 +11826,8 @@ func (p *ProtectedItem) UnmarshalJSON(data []byte) error { case "resourceGuardOperationRequests": err = unpopulate(val, "ResourceGuardOperationRequests", &p.ResourceGuardOperationRequests) delete(rawMsg, key) - case "softDeleteRetentionPeriod": - err = unpopulate(val, "SoftDeleteRetentionPeriod", &p.SoftDeleteRetentionPeriod) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &p.SoftDeleteRetentionPeriodInDays) delete(rawMsg, key) case "sourceResourceId": err = unpopulate(val, "SourceResourceID", &p.SourceResourceID) diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/operation_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/operation_client.go index a0204f1235c7..0d982517d9a7 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/operation_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/operation_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -47,24 +46,27 @@ func NewOperationClient(subscriptionID string, credential azcore.TokenCredential // Validate - Validate operation for specified backed up item. This is a synchronous operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - parameters - resource validate operation request // - options - OperationClientValidateOptions contains the optional parameters for the OperationClient.Validate method. func (client *OperationClient) Validate(ctx context.Context, vaultName string, resourceGroupName string, parameters ValidateOperationRequestClassification, options *OperationClientValidateOptions) (OperationClientValidateResponse, error) { + var err error req, err := client.validateCreateRequest(ctx, vaultName, resourceGroupName, parameters, options) if err != nil { return OperationClientValidateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return OperationClientValidateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationClientValidateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return OperationClientValidateResponse{}, err } - return client.validateHandleResponse(resp) + resp, err := client.validateHandleResponse(httpResp) + return resp, err } // validateCreateRequest creates the Validate request. @@ -87,10 +89,13 @@ func (client *OperationClient) validateCreateRequest(ctx context.Context, vaultN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // validateHandleResponse handles the Validate response. diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/operation_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/operation_client_example_test.go index 8e14f551d7b8..4d6503ec172a 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/operation_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/operation_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/ValidateOperation_RestoreDisk.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/ValidateOperation_RestoreDisk.json func ExampleOperationClient_Validate_validateOperation() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -68,7 +68,7 @@ func ExampleOperationClient_Validate_validateOperation() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/ValidateOperation_RestoreDisk_IdentityBasedRestoreDetails.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/ValidateOperation_RestoreDisk_IdentityBasedRestoreDetails.json func ExampleOperationClient_Validate_validateOperationWithIdentityBasedRestoreDetails() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/operations_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/operations_client.go index 84219ccec87b..90b7b2be9a64 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/operations_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/operations_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -40,7 +39,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Returns the list of available operations. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -78,7 +77,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/operations_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/operations_client_example_test.go index 2735196e3d8f..600b85deb355 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/operations_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/operations_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/ListOperations.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ListOperations.json func ExampleOperationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/options.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/options.go new file mode 100644 index 000000000000..8e0585c5bfcc --- /dev/null +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/options.go @@ -0,0 +1,483 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +// BMSPrepareDataMoveOperationResultClientGetOptions contains the optional parameters for the BMSPrepareDataMoveOperationResultClient.Get +// method. +type BMSPrepareDataMoveOperationResultClientGetOptions struct { + // placeholder for future optional parameters +} + +// BackupEnginesClientGetOptions contains the optional parameters for the BackupEnginesClient.Get method. +type BackupEnginesClientGetOptions struct { + // OData filter options. + Filter *string + + // skipToken Filter. + SkipToken *string +} + +// BackupEnginesClientListOptions contains the optional parameters for the BackupEnginesClient.NewListPager method. +type BackupEnginesClientListOptions struct { + // OData filter options. + Filter *string + + // skipToken Filter. + SkipToken *string +} + +// BackupJobsClientListOptions contains the optional parameters for the BackupJobsClient.NewListPager method. +type BackupJobsClientListOptions struct { + // OData filter options. + Filter *string + + // skipToken Filter. + SkipToken *string +} + +// BackupOperationResultsClientGetOptions contains the optional parameters for the BackupOperationResultsClient.Get method. +type BackupOperationResultsClientGetOptions struct { + // placeholder for future optional parameters +} + +// BackupOperationStatusesClientGetOptions contains the optional parameters for the BackupOperationStatusesClient.Get method. +type BackupOperationStatusesClientGetOptions struct { + // placeholder for future optional parameters +} + +// BackupPoliciesClientListOptions contains the optional parameters for the BackupPoliciesClient.NewListPager method. +type BackupPoliciesClientListOptions struct { + // OData filter options. + Filter *string +} + +// BackupProtectableItemsClientListOptions contains the optional parameters for the BackupProtectableItemsClient.NewListPager +// method. +type BackupProtectableItemsClientListOptions struct { + // OData filter options. + Filter *string + + // skipToken Filter. + SkipToken *string +} + +// BackupProtectedItemsClientListOptions contains the optional parameters for the BackupProtectedItemsClient.NewListPager +// method. +type BackupProtectedItemsClientListOptions struct { + // OData filter options. + Filter *string + + // skipToken Filter. + SkipToken *string +} + +// BackupProtectionContainersClientListOptions contains the optional parameters for the BackupProtectionContainersClient.NewListPager +// method. +type BackupProtectionContainersClientListOptions struct { + // OData filter options. + Filter *string +} + +// BackupProtectionIntentClientListOptions contains the optional parameters for the BackupProtectionIntentClient.NewListPager +// method. +type BackupProtectionIntentClientListOptions struct { + // OData filter options. + Filter *string + + // skipToken Filter. + SkipToken *string +} + +// BackupResourceEncryptionConfigsClientGetOptions contains the optional parameters for the BackupResourceEncryptionConfigsClient.Get +// method. +type BackupResourceEncryptionConfigsClientGetOptions struct { + // placeholder for future optional parameters +} + +// BackupResourceEncryptionConfigsClientUpdateOptions contains the optional parameters for the BackupResourceEncryptionConfigsClient.Update +// method. +type BackupResourceEncryptionConfigsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// BackupResourceStorageConfigsNonCRRClientGetOptions contains the optional parameters for the BackupResourceStorageConfigsNonCRRClient.Get +// method. +type BackupResourceStorageConfigsNonCRRClientGetOptions struct { + // placeholder for future optional parameters +} + +// BackupResourceStorageConfigsNonCRRClientPatchOptions contains the optional parameters for the BackupResourceStorageConfigsNonCRRClient.Patch +// method. +type BackupResourceStorageConfigsNonCRRClientPatchOptions struct { + // placeholder for future optional parameters +} + +// BackupResourceStorageConfigsNonCRRClientUpdateOptions contains the optional parameters for the BackupResourceStorageConfigsNonCRRClient.Update +// method. +type BackupResourceStorageConfigsNonCRRClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// BackupResourceVaultConfigsClientGetOptions contains the optional parameters for the BackupResourceVaultConfigsClient.Get +// method. +type BackupResourceVaultConfigsClientGetOptions struct { + // placeholder for future optional parameters +} + +// BackupResourceVaultConfigsClientPutOptions contains the optional parameters for the BackupResourceVaultConfigsClient.Put +// method. +type BackupResourceVaultConfigsClientPutOptions struct { + // placeholder for future optional parameters +} + +// BackupResourceVaultConfigsClientUpdateOptions contains the optional parameters for the BackupResourceVaultConfigsClient.Update +// method. +type BackupResourceVaultConfigsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// BackupStatusClientGetOptions contains the optional parameters for the BackupStatusClient.Get method. +type BackupStatusClientGetOptions struct { + // placeholder for future optional parameters +} + +// BackupUsageSummariesClientListOptions contains the optional parameters for the BackupUsageSummariesClient.NewListPager +// method. +type BackupUsageSummariesClientListOptions struct { + // OData filter options. + Filter *string + + // skipToken Filter. + SkipToken *string +} + +// BackupWorkloadItemsClientListOptions contains the optional parameters for the BackupWorkloadItemsClient.NewListPager method. +type BackupWorkloadItemsClientListOptions struct { + // OData filter options. + Filter *string + + // skipToken Filter. + SkipToken *string +} + +// BackupsClientTriggerOptions contains the optional parameters for the BackupsClient.Trigger method. +type BackupsClientTriggerOptions struct { + // placeholder for future optional parameters +} + +// ClientBeginBMSPrepareDataMoveOptions contains the optional parameters for the Client.BeginBMSPrepareDataMove method. +type ClientBeginBMSPrepareDataMoveOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientBeginBMSTriggerDataMoveOptions contains the optional parameters for the Client.BeginBMSTriggerDataMove method. +type ClientBeginBMSTriggerDataMoveOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientBeginMoveRecoveryPointOptions contains the optional parameters for the Client.BeginMoveRecoveryPoint method. +type ClientBeginMoveRecoveryPointOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientGetOperationStatusOptions contains the optional parameters for the Client.GetOperationStatus method. +type ClientGetOperationStatusOptions struct { + // placeholder for future optional parameters +} + +// DeletedProtectionContainersClientListOptions contains the optional parameters for the DeletedProtectionContainersClient.NewListPager +// method. +type DeletedProtectionContainersClientListOptions struct { + // OData filter options. + Filter *string +} + +// ExportJobsOperationResultsClientGetOptions contains the optional parameters for the ExportJobsOperationResultsClient.Get +// method. +type ExportJobsOperationResultsClientGetOptions struct { + // placeholder for future optional parameters +} + +// FeatureSupportClientValidateOptions contains the optional parameters for the FeatureSupportClient.Validate method. +type FeatureSupportClientValidateOptions struct { + // placeholder for future optional parameters +} + +// ItemLevelRecoveryConnectionsClientProvisionOptions contains the optional parameters for the ItemLevelRecoveryConnectionsClient.Provision +// method. +type ItemLevelRecoveryConnectionsClientProvisionOptions struct { + // placeholder for future optional parameters +} + +// ItemLevelRecoveryConnectionsClientRevokeOptions contains the optional parameters for the ItemLevelRecoveryConnectionsClient.Revoke +// method. +type ItemLevelRecoveryConnectionsClientRevokeOptions struct { + // placeholder for future optional parameters +} + +// JobCancellationsClientTriggerOptions contains the optional parameters for the JobCancellationsClient.Trigger method. +type JobCancellationsClientTriggerOptions struct { + // placeholder for future optional parameters +} + +// JobDetailsClientGetOptions contains the optional parameters for the JobDetailsClient.Get method. +type JobDetailsClientGetOptions struct { + // placeholder for future optional parameters +} + +// JobOperationResultsClientGetOptions contains the optional parameters for the JobOperationResultsClient.Get method. +type JobOperationResultsClientGetOptions struct { + // placeholder for future optional parameters +} + +// JobsClientExportOptions contains the optional parameters for the JobsClient.Export method. +type JobsClientExportOptions struct { + // OData filter options. + Filter *string +} + +// OperationClientValidateOptions contains the optional parameters for the OperationClient.Validate method. +type OperationClientValidateOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointClientGetOperationStatusOptions contains the optional parameters for the PrivateEndpointClient.GetOperationStatus +// method. +type PrivateEndpointClientGetOperationStatusOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginDelete +// method. +type PrivateEndpointConnectionClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateEndpointConnectionClientBeginPutOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginPut +// method. +type PrivateEndpointConnectionClientBeginPutOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateEndpointConnectionClientGetOptions contains the optional parameters for the PrivateEndpointConnectionClient.Get +// method. +type PrivateEndpointConnectionClientGetOptions struct { + // placeholder for future optional parameters +} + +// ProtectableContainersClientListOptions contains the optional parameters for the ProtectableContainersClient.NewListPager +// method. +type ProtectableContainersClientListOptions struct { + // OData filter options. + Filter *string +} + +// ProtectedItemOperationResultsClientGetOptions contains the optional parameters for the ProtectedItemOperationResultsClient.Get +// method. +type ProtectedItemOperationResultsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ProtectedItemOperationStatusesClientGetOptions contains the optional parameters for the ProtectedItemOperationStatusesClient.Get +// method. +type ProtectedItemOperationStatusesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ProtectedItemsClientCreateOrUpdateOptions contains the optional parameters for the ProtectedItemsClient.CreateOrUpdate +// method. +type ProtectedItemsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ProtectedItemsClientDeleteOptions contains the optional parameters for the ProtectedItemsClient.Delete method. +type ProtectedItemsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ProtectedItemsClientGetOptions contains the optional parameters for the ProtectedItemsClient.Get method. +type ProtectedItemsClientGetOptions struct { + // OData filter options. + Filter *string +} + +// ProtectionContainerOperationResultsClientGetOptions contains the optional parameters for the ProtectionContainerOperationResultsClient.Get +// method. +type ProtectionContainerOperationResultsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ProtectionContainerRefreshOperationResultsClientGetOptions contains the optional parameters for the ProtectionContainerRefreshOperationResultsClient.Get +// method. +type ProtectionContainerRefreshOperationResultsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ProtectionContainersClientGetOptions contains the optional parameters for the ProtectionContainersClient.Get method. +type ProtectionContainersClientGetOptions struct { + // placeholder for future optional parameters +} + +// ProtectionContainersClientInquireOptions contains the optional parameters for the ProtectionContainersClient.Inquire method. +type ProtectionContainersClientInquireOptions struct { + // OData filter options. + Filter *string +} + +// ProtectionContainersClientRefreshOptions contains the optional parameters for the ProtectionContainersClient.Refresh method. +type ProtectionContainersClientRefreshOptions struct { + // OData filter options. + Filter *string +} + +// ProtectionContainersClientRegisterOptions contains the optional parameters for the ProtectionContainersClient.Register +// method. +type ProtectionContainersClientRegisterOptions struct { + // placeholder for future optional parameters +} + +// ProtectionContainersClientUnregisterOptions contains the optional parameters for the ProtectionContainersClient.Unregister +// method. +type ProtectionContainersClientUnregisterOptions struct { + // placeholder for future optional parameters +} + +// ProtectionIntentClientCreateOrUpdateOptions contains the optional parameters for the ProtectionIntentClient.CreateOrUpdate +// method. +type ProtectionIntentClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ProtectionIntentClientDeleteOptions contains the optional parameters for the ProtectionIntentClient.Delete method. +type ProtectionIntentClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ProtectionIntentClientGetOptions contains the optional parameters for the ProtectionIntentClient.Get method. +type ProtectionIntentClientGetOptions struct { + // placeholder for future optional parameters +} + +// ProtectionIntentClientValidateOptions contains the optional parameters for the ProtectionIntentClient.Validate method. +type ProtectionIntentClientValidateOptions struct { + // placeholder for future optional parameters +} + +// ProtectionPoliciesClientBeginDeleteOptions contains the optional parameters for the ProtectionPoliciesClient.BeginDelete +// method. +type ProtectionPoliciesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ProtectionPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ProtectionPoliciesClient.CreateOrUpdate +// method. +type ProtectionPoliciesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ProtectionPoliciesClientGetOptions contains the optional parameters for the ProtectionPoliciesClient.Get method. +type ProtectionPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ProtectionPolicyOperationResultsClientGetOptions contains the optional parameters for the ProtectionPolicyOperationResultsClient.Get +// method. +type ProtectionPolicyOperationResultsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ProtectionPolicyOperationStatusesClientGetOptions contains the optional parameters for the ProtectionPolicyOperationStatusesClient.Get +// method. +type ProtectionPolicyOperationStatusesClientGetOptions struct { + // placeholder for future optional parameters +} + +// RecoveryPointsClientGetOptions contains the optional parameters for the RecoveryPointsClient.Get method. +type RecoveryPointsClientGetOptions struct { + // placeholder for future optional parameters +} + +// RecoveryPointsClientListOptions contains the optional parameters for the RecoveryPointsClient.NewListPager method. +type RecoveryPointsClientListOptions struct { + // OData filter options. + Filter *string +} + +// RecoveryPointsRecommendedForMoveClientListOptions contains the optional parameters for the RecoveryPointsRecommendedForMoveClient.NewListPager +// method. +type RecoveryPointsRecommendedForMoveClientListOptions struct { + // placeholder for future optional parameters +} + +// ResourceGuardProxiesClientGetOptions contains the optional parameters for the ResourceGuardProxiesClient.NewGetPager method. +type ResourceGuardProxiesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ResourceGuardProxyClientDeleteOptions contains the optional parameters for the ResourceGuardProxyClient.Delete method. +type ResourceGuardProxyClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ResourceGuardProxyClientGetOptions contains the optional parameters for the ResourceGuardProxyClient.Get method. +type ResourceGuardProxyClientGetOptions struct { + // placeholder for future optional parameters +} + +// ResourceGuardProxyClientPutOptions contains the optional parameters for the ResourceGuardProxyClient.Put method. +type ResourceGuardProxyClientPutOptions struct { + // placeholder for future optional parameters +} + +// ResourceGuardProxyClientUnlockDeleteOptions contains the optional parameters for the ResourceGuardProxyClient.UnlockDelete +// method. +type ResourceGuardProxyClientUnlockDeleteOptions struct { + // placeholder for future optional parameters +} + +// RestoresClientBeginTriggerOptions contains the optional parameters for the RestoresClient.BeginTrigger method. +type RestoresClientBeginTriggerOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SecurityPINsClientGetOptions contains the optional parameters for the SecurityPINsClient.Get method. +type SecurityPINsClientGetOptions struct { + // security pin request + Parameters *SecurityPinBase +} + +// ValidateOperationClientBeginTriggerOptions contains the optional parameters for the ValidateOperationClient.BeginTrigger +// method. +type ValidateOperationClientBeginTriggerOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ValidateOperationResultsClientGetOptions contains the optional parameters for the ValidateOperationResultsClient.Get method. +type ValidateOperationResultsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ValidateOperationStatusesClientGetOptions contains the optional parameters for the ValidateOperationStatusesClient.Get +// method. +type ValidateOperationStatusesClientGetOptions struct { + // placeholder for future optional parameters +} diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/polymorphic_helpers.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/polymorphic_helpers.go index 871bf5e7506f..ae110a3dbf57 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/polymorphic_helpers.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/polymorphic_helpers.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -28,7 +27,10 @@ func unmarshalBackupEngineBaseClassification(rawMsg json.RawMessage) (BackupEngi default: b = &BackupEngineBase{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalBackupRequestClassification(rawMsg json.RawMessage) (BackupRequestClassification, error) { @@ -50,7 +52,10 @@ func unmarshalBackupRequestClassification(rawMsg json.RawMessage) (BackupRequest default: b = &BackupRequest{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalILRRequestClassification(rawMsg json.RawMessage) (ILRRequestClassification, error) { @@ -70,7 +75,10 @@ func unmarshalILRRequestClassification(rawMsg json.RawMessage) (ILRRequestClassi default: b = &ILRRequest{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalJobClassification(rawMsg json.RawMessage) (JobClassification, error) { @@ -100,7 +108,10 @@ func unmarshalJobClassification(rawMsg json.RawMessage) (JobClassification, erro default: b = &Job{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalOperationResultInfoBaseClassification(rawMsg json.RawMessage) (OperationResultInfoBaseClassification, error) { @@ -120,7 +131,10 @@ func unmarshalOperationResultInfoBaseClassification(rawMsg json.RawMessage) (Ope default: b = &OperationResultInfoBase{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalOperationStatusExtendedInfoClassification(rawMsg json.RawMessage) (OperationStatusExtendedInfoClassification, error) { @@ -144,7 +158,10 @@ func unmarshalOperationStatusExtendedInfoClassification(rawMsg json.RawMessage) default: b = &OperationStatusExtendedInfo{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalProtectableContainerClassification(rawMsg json.RawMessage) (ProtectableContainerClassification, error) { @@ -164,7 +181,10 @@ func unmarshalProtectableContainerClassification(rawMsg json.RawMessage) (Protec default: b = &ProtectableContainer{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalProtectedItemClassification(rawMsg json.RawMessage) (ProtectedItemClassification, error) { @@ -206,7 +226,10 @@ func unmarshalProtectedItemClassification(rawMsg json.RawMessage) (ProtectedItem default: b = &ProtectedItem{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalProtectionContainerClassification(rawMsg json.RawMessage) (ProtectionContainerClassification, error) { @@ -246,7 +269,10 @@ func unmarshalProtectionContainerClassification(rawMsg json.RawMessage) (Protect default: b = &ProtectionContainer{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalProtectionIntentClassification(rawMsg json.RawMessage) (ProtectionIntentClassification, error) { @@ -272,7 +298,10 @@ func unmarshalProtectionIntentClassification(rawMsg json.RawMessage) (Protection default: b = &ProtectionIntent{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalProtectionPolicyClassification(rawMsg json.RawMessage) (ProtectionPolicyClassification, error) { @@ -300,7 +329,10 @@ func unmarshalProtectionPolicyClassification(rawMsg json.RawMessage) (Protection default: b = &ProtectionPolicy{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalRecoveryPointClassification(rawMsg json.RawMessage) (RecoveryPointClassification, error) { @@ -334,7 +366,10 @@ func unmarshalRecoveryPointClassification(rawMsg json.RawMessage) (RecoveryPoint default: b = &RecoveryPoint{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalRestoreRequestClassification(rawMsg json.RawMessage) (RestoreRequestClassification, error) { @@ -376,7 +411,10 @@ func unmarshalRestoreRequestClassification(rawMsg json.RawMessage) (RestoreReque default: b = &RestoreRequest{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalRetentionPolicyClassification(rawMsg json.RawMessage) (RetentionPolicyClassification, error) { @@ -396,7 +434,10 @@ func unmarshalRetentionPolicyClassification(rawMsg json.RawMessage) (RetentionPo default: b = &RetentionPolicy{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalSchedulePolicyClassification(rawMsg json.RawMessage) (SchedulePolicyClassification, error) { @@ -420,7 +461,10 @@ func unmarshalSchedulePolicyClassification(rawMsg json.RawMessage) (SchedulePoli default: b = &SchedulePolicy{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalVaultStorageConfigOperationResultResponseClassification(rawMsg json.RawMessage) (VaultStorageConfigOperationResultResponseClassification, error) { @@ -438,7 +482,10 @@ func unmarshalVaultStorageConfigOperationResultResponseClassification(rawMsg jso default: b = &VaultStorageConfigOperationResultResponse{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalWorkloadItemClassification(rawMsg json.RawMessage) (WorkloadItemClassification, error) { @@ -468,7 +515,10 @@ func unmarshalWorkloadItemClassification(rawMsg json.RawMessage) (WorkloadItemCl default: b = &WorkloadItem{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } func unmarshalWorkloadProtectableItemClassification(rawMsg json.RawMessage) (WorkloadProtectableItemClassification, error) { @@ -485,6 +535,8 @@ func unmarshalWorkloadProtectableItemClassification(rawMsg json.RawMessage) (Wor b = &AzureFileShareProtectableItem{} case "AzureVmWorkloadProtectableItem": b = &AzureVMWorkloadProtectableItem{} + case "HanaHSRContainer": + b = &AzureVMWorkloadSAPHanaHSRProtectableItem{} case "IaaSVMProtectableItem": b = &IaaSVMProtectableItem{} case "Microsoft.ClassicCompute/virtualMachines": @@ -497,8 +549,6 @@ func unmarshalWorkloadProtectableItemClassification(rawMsg json.RawMessage) (Wor b = &AzureVMWorkloadSAPHanaDBInstance{} case "SAPHanaDatabase": b = &AzureVMWorkloadSAPHanaDatabaseProtectableItem{} - case "SAPHanaHSR": - b = &AzureVMWorkloadSAPHanaHSR{} case "SAPHanaSystem": b = &AzureVMWorkloadSAPHanaSystemProtectableItem{} case "SQLAvailabilityGroupContainer": @@ -510,5 +560,8 @@ func unmarshalWorkloadProtectableItemClassification(rawMsg json.RawMessage) (Wor default: b = &WorkloadProtectableItem{} } - return b, json.Unmarshal(rawMsg, b) + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil } diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/privateendpoint_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/privateendpoint_client.go index 3f978d1300a6..3b2b2a9cd4ae 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/privateendpoint_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/privateendpoint_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -47,7 +46,7 @@ func NewPrivateEndpointClient(subscriptionID string, credential azcore.TokenCred // GetOperationStatus - Gets the operation status for a private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - privateEndpointConnectionName - The name of the private endpoint connection. @@ -55,18 +54,21 @@ func NewPrivateEndpointClient(subscriptionID string, credential azcore.TokenCred // - options - PrivateEndpointClientGetOperationStatusOptions contains the optional parameters for the PrivateEndpointClient.GetOperationStatus // method. func (client *PrivateEndpointClient) GetOperationStatus(ctx context.Context, vaultName string, resourceGroupName string, privateEndpointConnectionName string, operationID string, options *PrivateEndpointClientGetOperationStatusOptions) (PrivateEndpointClientGetOperationStatusResponse, error) { + var err error req, err := client.getOperationStatusCreateRequest(ctx, vaultName, resourceGroupName, privateEndpointConnectionName, operationID, options) if err != nil { return PrivateEndpointClientGetOperationStatusResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointClientGetOperationStatusResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointClientGetOperationStatusResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointClientGetOperationStatusResponse{}, err } - return client.getOperationStatusHandleResponse(resp) + resp, err := client.getOperationStatusHandleResponse(httpResp) + return resp, err } // getOperationStatusCreateRequest creates the GetOperationStatus request. @@ -97,7 +99,7 @@ func (client *PrivateEndpointClient) getOperationStatusCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/privateendpoint_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/privateendpoint_client_example_test.go index 61d832b9a3cc..01d54b2bca33 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/privateendpoint_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/privateendpoint_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/PrivateEndpointConnection/GetPrivateEndpointConnectionOperationStatus.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/PrivateEndpointConnection/GetPrivateEndpointConnectionOperationStatus.json func ExamplePrivateEndpointClient_GetOperationStatus() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/privateendpointconnection_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/privateendpointconnection_client.go index 79c32de95dec..ef41631846bc 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/privateendpointconnection_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/privateendpointconnection_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -47,7 +46,7 @@ func NewPrivateEndpointConnectionClient(subscriptionID string, credential azcore // BeginDelete - Delete Private Endpoint requests. This call is made by Backup Admin. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - privateEndpointConnectionName - The name of the private endpoint connection. @@ -59,7 +58,8 @@ func (client *PrivateEndpointConnectionClient) BeginDelete(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller[PrivateEndpointConnectionClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[PrivateEndpointConnectionClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -68,20 +68,22 @@ func (client *PrivateEndpointConnectionClient) BeginDelete(ctx context.Context, // Delete - Delete Private Endpoint requests. This call is made by Backup Admin. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 func (client *PrivateEndpointConnectionClient) deleteOperation(ctx context.Context, vaultName string, resourceGroupName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientBeginDeleteOptions) (*http.Response, error) { + var err error req, err := client.deleteCreateRequest(ctx, vaultName, resourceGroupName, privateEndpointConnectionName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -108,7 +110,7 @@ func (client *PrivateEndpointConnectionClient) deleteCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -117,25 +119,28 @@ func (client *PrivateEndpointConnectionClient) deleteCreateRequest(ctx context.C // Get - Get Private Endpoint Connection. This call is made by Backup Admin. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - privateEndpointConnectionName - The name of the private endpoint connection. // - options - PrivateEndpointConnectionClientGetOptions contains the optional parameters for the PrivateEndpointConnectionClient.Get // method. func (client *PrivateEndpointConnectionClient) Get(ctx context.Context, vaultName string, resourceGroupName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientGetOptions) (PrivateEndpointConnectionClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, privateEndpointConnectionName, options) if err != nil { return PrivateEndpointConnectionClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -162,7 +167,7 @@ func (client *PrivateEndpointConnectionClient) getCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +185,7 @@ func (client *PrivateEndpointConnectionClient) getHandleResponse(resp *http.Resp // BeginPut - Approve or Reject Private Endpoint requests. This call is made by Backup Admin. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - privateEndpointConnectionName - The name of the private endpoint connection. @@ -193,7 +198,8 @@ func (client *PrivateEndpointConnectionClient) BeginPut(ctx context.Context, vau if err != nil { return nil, err } - return runtime.NewPoller[PrivateEndpointConnectionClientPutResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[PrivateEndpointConnectionClientPutResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionClientPutResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -202,20 +208,22 @@ func (client *PrivateEndpointConnectionClient) BeginPut(ctx context.Context, vau // Put - Approve or Reject Private Endpoint requests. This call is made by Backup Admin. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 func (client *PrivateEndpointConnectionClient) put(ctx context.Context, vaultName string, resourceGroupName string, privateEndpointConnectionName string, parameters PrivateEndpointConnectionResource, options *PrivateEndpointConnectionClientBeginPutOptions) (*http.Response, error) { + var err error req, err := client.putCreateRequest(ctx, vaultName, resourceGroupName, privateEndpointConnectionName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // putCreateRequest creates the Put request. @@ -242,8 +250,11 @@ func (client *PrivateEndpointConnectionClient) putCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/privateendpointconnection_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/privateendpointconnection_client_example_test.go index d6cae15bdad5..899a6c0c48ee 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/privateendpointconnection_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/privateendpointconnection_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/PrivateEndpointConnection/GetPrivateEndpointConnection.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/PrivateEndpointConnection/GetPrivateEndpointConnection.json func ExamplePrivateEndpointConnectionClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -41,19 +41,21 @@ func ExamplePrivateEndpointConnectionClient_Get() { // Type: to.Ptr("Microsoft.RecoveryServices/vaults/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/gaallaRG/providers/Microsoft.RecoveryServicesBVTD2/vaults/gaallavaultbvtd2msi/privateEndpointConnections/gaallatestpe3.3592346090307038890.backup.5704c932-249a-490b-a142-1396838cd3b"), // Properties: &armrecoveryservicesbackup.PrivateEndpointConnection{ - // PrivateEndpoint: &armrecoveryservicesbackup.PrivateEndpoint{ - // ID: to.Ptr("/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/gaallaRG/providers/Microsoft.Network/privateEndpoints/gaallatestpe3"), + // GroupIDs: []*armrecoveryservicesbackup.VaultSubResourceType{ + // to.Ptr(armrecoveryservicesbackup.VaultSubResourceTypeAzureBackupSecondary)}, + // PrivateEndpoint: &armrecoveryservicesbackup.PrivateEndpoint{ + // ID: to.Ptr("/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/gaallaRG/providers/Microsoft.Network/privateEndpoints/gaallatestpe3"), + // }, + // PrivateLinkServiceConnectionState: &armrecoveryservicesbackup.PrivateLinkServiceConnectionState{ + // Description: to.Ptr("Approved by johndoe@company.com"), + // Status: to.Ptr(armrecoveryservicesbackup.PrivateEndpointConnectionStatusApproved), + // }, + // ProvisioningState: to.Ptr(armrecoveryservicesbackup.ProvisioningStateSucceeded), // }, - // PrivateLinkServiceConnectionState: &armrecoveryservicesbackup.PrivateLinkServiceConnectionState{ - // Description: to.Ptr("Approved by johndoe@company.com"), - // Status: to.Ptr(armrecoveryservicesbackup.PrivateEndpointConnectionStatusApproved), - // }, - // ProvisioningState: to.Ptr(armrecoveryservicesbackup.ProvisioningStateSucceeded), - // }, - // } + // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/PrivateEndpointConnection/PutPrivateEndpointConnection.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/PrivateEndpointConnection/PutPrivateEndpointConnection.json func ExamplePrivateEndpointConnectionClient_BeginPut() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -66,6 +68,8 @@ func ExamplePrivateEndpointConnectionClient_BeginPut() { } poller, err := clientFactory.NewPrivateEndpointConnectionClient().BeginPut(ctx, "gaallavaultbvtd2msi", "gaallaRG", "gaallatestpe2.5704c932-249a-490b-a142-1396838cd3b", armrecoveryservicesbackup.PrivateEndpointConnectionResource{ Properties: &armrecoveryservicesbackup.PrivateEndpointConnection{ + GroupIDs: []*armrecoveryservicesbackup.VaultSubResourceType{ + to.Ptr(armrecoveryservicesbackup.VaultSubResourceTypeAzureBackupSecondary)}, PrivateEndpoint: &armrecoveryservicesbackup.PrivateEndpoint{ ID: to.Ptr("/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/gaallaRG/providers/Microsoft.Network/privateEndpoints/gaallatestpe3"), }, @@ -91,19 +95,21 @@ func ExamplePrivateEndpointConnectionClient_BeginPut() { // Type: to.Ptr("Microsoft.RecoveryServices/vaults/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/gaallaRG/providers/Microsoft.RecoveryServicesBVTD2/vaults/gaallavaultbvtd2msi/privateEndpointConnections/gaallatestpe3.3592346090307038890.backup.5704c932-249a-490b-a142-1396838cd3b"), // Properties: &armrecoveryservicesbackup.PrivateEndpointConnection{ - // PrivateEndpoint: &armrecoveryservicesbackup.PrivateEndpoint{ - // ID: to.Ptr("/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/gaallaRG/providers/Microsoft.Network/privateEndpoints/gaallatestpe3"), - // }, - // PrivateLinkServiceConnectionState: &armrecoveryservicesbackup.PrivateLinkServiceConnectionState{ - // Description: to.Ptr("Approved by johndoe@company.com"), - // Status: to.Ptr(armrecoveryservicesbackup.PrivateEndpointConnectionStatusApproved), + // GroupIDs: []*armrecoveryservicesbackup.VaultSubResourceType{ + // to.Ptr(armrecoveryservicesbackup.VaultSubResourceTypeAzureBackupSecondary)}, + // PrivateEndpoint: &armrecoveryservicesbackup.PrivateEndpoint{ + // ID: to.Ptr("/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/gaallaRG/providers/Microsoft.Network/privateEndpoints/gaallatestpe3"), + // }, + // PrivateLinkServiceConnectionState: &armrecoveryservicesbackup.PrivateLinkServiceConnectionState{ + // Description: to.Ptr("Approved by johndoe@company.com"), + // Status: to.Ptr(armrecoveryservicesbackup.PrivateEndpointConnectionStatusApproved), + // }, + // ProvisioningState: to.Ptr(armrecoveryservicesbackup.ProvisioningStateSucceeded), // }, - // ProvisioningState: to.Ptr(armrecoveryservicesbackup.ProvisioningStateSucceeded), - // }, - // } + // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/PrivateEndpointConnection/DeletePrivateEndpointConnection.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/PrivateEndpointConnection/DeletePrivateEndpointConnection.json func ExamplePrivateEndpointConnectionClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectablecontainers_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectablecontainers_client.go index 91d09e5cbad2..037b451bd676 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectablecontainers_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectablecontainers_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -46,7 +45,7 @@ func NewProtectableContainersClient(subscriptionID string, credential azcore.Tok // NewListPager - Lists the containers that can be registered to Recovery Services Vault. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - options - ProtectableContainersClientListOptions contains the optional parameters for the ProtectableContainersClient.NewListPager @@ -103,7 +102,7 @@ func (client *ProtectableContainersClient) listCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectablecontainers_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectablecontainers_client_example_test.go index 9e466b8207d1..585dd3558721 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectablecontainers_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectablecontainers_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureStorage/ProtectableContainers_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureStorage/ProtectableContainers_List.json func ExampleProtectableContainersClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protecteditemoperationresults_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protecteditemoperationresults_client.go index 93c1d23d36d2..870a77adcd48 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protecteditemoperationresults_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protecteditemoperationresults_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -47,7 +46,7 @@ func NewProtectedItemOperationResultsClient(subscriptionID string, credential az // Get - Fetches the result of any operation on the backup item. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - fabricName - Fabric name associated with the backup item. @@ -57,18 +56,21 @@ func NewProtectedItemOperationResultsClient(subscriptionID string, credential az // - options - ProtectedItemOperationResultsClientGetOptions contains the optional parameters for the ProtectedItemOperationResultsClient.Get // method. func (client *ProtectedItemOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, operationID string, options *ProtectedItemOperationResultsClientGetOptions) (ProtectedItemOperationResultsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, operationID, options) if err != nil { return ProtectedItemOperationResultsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProtectedItemOperationResultsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return ProtectedItemOperationResultsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ProtectedItemOperationResultsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -107,7 +109,7 @@ func (client *ProtectedItemOperationResultsClient) getCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protecteditemoperationresults_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protecteditemoperationresults_client_example_test.go index ef29ad698687..73d863d8fb02 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protecteditemoperationresults_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protecteditemoperationresults_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/ProtectedItemOperationResults.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/ProtectedItemOperationResults.json func ExampleProtectedItemOperationResultsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protecteditemoperationstatuses_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protecteditemoperationstatuses_client.go index 07a9da04d79d..9c98800dfcfb 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protecteditemoperationstatuses_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protecteditemoperationstatuses_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -49,7 +48,7 @@ func NewProtectedItemOperationStatusesClient(subscriptionID string, credential a // the operation. Some operations create jobs. This method returns the list of jobs associated with the operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - fabricName - Fabric name associated with the backup item. @@ -59,18 +58,21 @@ func NewProtectedItemOperationStatusesClient(subscriptionID string, credential a // - options - ProtectedItemOperationStatusesClientGetOptions contains the optional parameters for the ProtectedItemOperationStatusesClient.Get // method. func (client *ProtectedItemOperationStatusesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, operationID string, options *ProtectedItemOperationStatusesClientGetOptions) (ProtectedItemOperationStatusesClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, operationID, options) if err != nil { return ProtectedItemOperationStatusesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProtectedItemOperationStatusesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProtectedItemOperationStatusesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProtectedItemOperationStatusesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -109,7 +111,7 @@ func (client *ProtectedItemOperationStatusesClient) getCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protecteditemoperationstatuses_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protecteditemoperationstatuses_client_example_test.go index 90de73a5acb7..d1cd741f43c9 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protecteditemoperationstatuses_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protecteditemoperationstatuses_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/ProtectedItemOperationStatus.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/ProtectedItemOperationStatus.json func ExampleProtectedItemOperationStatusesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protecteditems_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protecteditems_client.go index 158bbdbc5a30..636989bfadaf 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protecteditems_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protecteditems_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -49,7 +48,7 @@ func NewProtectedItemsClient(subscriptionID string, credential azcore.TokenCrede // GetItemOperationResult API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - fabricName - Fabric name associated with the backup item. @@ -59,18 +58,21 @@ func NewProtectedItemsClient(subscriptionID string, credential azcore.TokenCrede // - options - ProtectedItemsClientCreateOrUpdateOptions contains the optional parameters for the ProtectedItemsClient.CreateOrUpdate // method. func (client *ProtectedItemsClient) CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters ProtectedItemResource, options *ProtectedItemsClientCreateOrUpdateOptions) (ProtectedItemsClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters, options) if err != nil { return ProtectedItemsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProtectedItemsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return ProtectedItemsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return ProtectedItemsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -105,10 +107,13 @@ func (client *ProtectedItemsClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -124,7 +129,7 @@ func (client *ProtectedItemsClient) createOrUpdateHandleResponse(resp *http.Resp // the request, call the GetItemOperationResult API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - fabricName - Fabric name associated with the backed up item. @@ -132,16 +137,18 @@ func (client *ProtectedItemsClient) createOrUpdateHandleResponse(resp *http.Resp // - protectedItemName - Backed up item to be deleted. // - options - ProtectedItemsClientDeleteOptions contains the optional parameters for the ProtectedItemsClient.Delete method. func (client *ProtectedItemsClient) Delete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, options *ProtectedItemsClientDeleteOptions) (ProtectedItemsClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, options) if err != nil { return ProtectedItemsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProtectedItemsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return ProtectedItemsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ProtectedItemsClientDeleteResponse{}, err } return ProtectedItemsClientDeleteResponse{}, nil } @@ -178,7 +185,7 @@ func (client *ProtectedItemsClient) deleteCreateRequest(ctx context.Context, vau return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +195,7 @@ func (client *ProtectedItemsClient) deleteCreateRequest(ctx context.Context, vau // call the GetItemOperationResult API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - fabricName - Fabric name associated with the backed up item. @@ -196,18 +203,21 @@ func (client *ProtectedItemsClient) deleteCreateRequest(ctx context.Context, vau // - protectedItemName - Backed up item name whose details are to be fetched. // - options - ProtectedItemsClientGetOptions contains the optional parameters for the ProtectedItemsClient.Get method. func (client *ProtectedItemsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, options *ProtectedItemsClientGetOptions) (ProtectedItemsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, options) if err != nil { return ProtectedItemsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProtectedItemsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProtectedItemsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProtectedItemsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -242,7 +252,7 @@ func (client *ProtectedItemsClient) getCreateRequest(ctx context.Context, vaultN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protecteditems_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protecteditems_client_example_test.go index e7e24a1c6e31..c1a163b79f7d 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protecteditems_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protecteditems_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/ClassicCompute_ProtectedItem_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/ClassicCompute_ProtectedItem_Get.json func ExampleProtectedItemsClient_Get_getProtectedClassicVirtualMachineDetails() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -60,7 +60,7 @@ func ExampleProtectedItemsClient_Get_getProtectedClassicVirtualMachineDetails() // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/Compute_ProtectedItem_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/Compute_ProtectedItem_Get.json func ExampleProtectedItemsClient_Get_getProtectedVirtualMachineDetails() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -102,7 +102,7 @@ func ExampleProtectedItemsClient_Get_getProtectedVirtualMachineDetails() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/ConfigureProtection.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/ConfigureProtection.json func ExampleProtectedItemsClient_CreateOrUpdate_enableProtectionOnAzureIaasVm() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -149,7 +149,7 @@ func ExampleProtectedItemsClient_CreateOrUpdate_enableProtectionOnAzureIaasVm() // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/StopProtection.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/StopProtection.json func ExampleProtectedItemsClient_CreateOrUpdate_stopProtectionWithRetainDataOnAzureIaasVm() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -196,7 +196,7 @@ func ExampleProtectedItemsClient_CreateOrUpdate_stopProtectionWithRetainDataOnAz // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/ProtectedItem_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/Common/ProtectedItem_Delete.json func ExampleProtectedItemsClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectioncontaineroperationresults_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectioncontaineroperationresults_client.go index 9d15a17c4b76..efcf25c1b1ea 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectioncontaineroperationresults_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectioncontaineroperationresults_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -47,7 +46,7 @@ func NewProtectionContainerOperationResultsClient(subscriptionID string, credent // Get - Fetches the result of any operation on the container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - fabricName - Fabric name associated with the container. @@ -56,18 +55,21 @@ func NewProtectionContainerOperationResultsClient(subscriptionID string, credent // - options - ProtectionContainerOperationResultsClientGetOptions contains the optional parameters for the ProtectionContainerOperationResultsClient.Get // method. func (client *ProtectionContainerOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, operationID string, options *ProtectionContainerOperationResultsClientGetOptions) (ProtectionContainerOperationResultsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, operationID, options) if err != nil { return ProtectionContainerOperationResultsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProtectionContainerOperationResultsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return ProtectionContainerOperationResultsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ProtectionContainerOperationResultsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -102,7 +104,7 @@ func (client *ProtectionContainerOperationResultsClient) getCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectioncontaineroperationresults_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectioncontaineroperationresults_client_example_test.go index d18910119166..f4d2068dedb3 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectioncontaineroperationresults_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectioncontaineroperationresults_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureStorage/ProtectionContainers_Inquire_Result.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureStorage/ProtectionContainers_Inquire_Result.json func ExampleProtectionContainerOperationResultsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectioncontainerrefreshoperationresults_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectioncontainerrefreshoperationresults_client.go index a1163f4e94d9..3e3264ce9a25 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectioncontainerrefreshoperationresults_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectioncontainerrefreshoperationresults_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -47,7 +46,7 @@ func NewProtectionContainerRefreshOperationResultsClient(subscriptionID string, // Get - Provides the result of the refresh operation triggered by the BeginRefresh operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - fabricName - Fabric name associated with the container. @@ -55,16 +54,18 @@ func NewProtectionContainerRefreshOperationResultsClient(subscriptionID string, // - options - ProtectionContainerRefreshOperationResultsClientGetOptions contains the optional parameters for the ProtectionContainerRefreshOperationResultsClient.Get // method. func (client *ProtectionContainerRefreshOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, operationID string, options *ProtectionContainerRefreshOperationResultsClientGetOptions) (ProtectionContainerRefreshOperationResultsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, fabricName, operationID, options) if err != nil { return ProtectionContainerRefreshOperationResultsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProtectionContainerRefreshOperationResultsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return ProtectionContainerRefreshOperationResultsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ProtectionContainerRefreshOperationResultsClientGetResponse{}, err } return ProtectionContainerRefreshOperationResultsClientGetResponse{}, nil } @@ -97,7 +98,7 @@ func (client *ProtectionContainerRefreshOperationResultsClient) getCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectioncontainerrefreshoperationresults_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectioncontainerrefreshoperationresults_client_example_test.go index 541d76e56340..0dde2bfd313c 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectioncontainerrefreshoperationresults_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectioncontainerrefreshoperationresults_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/RefreshContainers_OperationResults.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/Common/RefreshContainers_OperationResults.json func ExampleProtectionContainerRefreshOperationResultsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectioncontainers_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectioncontainers_client.go index 794b3343e6b4..53bd2fff362a 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectioncontainers_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectioncontainers_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -47,7 +46,7 @@ func NewProtectionContainersClient(subscriptionID string, credential azcore.Toke // Get - Gets details of the specific container registered to your Recovery Services Vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - fabricName - Name of the fabric where the container belongs. @@ -55,18 +54,21 @@ func NewProtectionContainersClient(subscriptionID string, credential azcore.Toke // - options - ProtectionContainersClientGetOptions contains the optional parameters for the ProtectionContainersClient.Get // method. func (client *ProtectionContainersClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, options *ProtectionContainersClientGetOptions) (ProtectionContainersClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, options) if err != nil { return ProtectionContainersClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProtectionContainersClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProtectionContainersClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProtectionContainersClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -97,7 +99,7 @@ func (client *ProtectionContainersClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -115,7 +117,7 @@ func (client *ProtectionContainersClient) getHandleResponse(resp *http.Response) // Inquire - This is an async operation and the results should be tracked using location header or Azure-async-url. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - fabricName - Fabric Name associated with the container. @@ -123,16 +125,18 @@ func (client *ProtectionContainersClient) getHandleResponse(resp *http.Response) // - options - ProtectionContainersClientInquireOptions contains the optional parameters for the ProtectionContainersClient.Inquire // method. func (client *ProtectionContainersClient) Inquire(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, options *ProtectionContainersClientInquireOptions) (ProtectionContainersClientInquireResponse, error) { + var err error req, err := client.inquireCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, options) if err != nil { return ProtectionContainersClientInquireResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProtectionContainersClientInquireResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return ProtectionContainersClientInquireResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return ProtectionContainersClientInquireResponse{}, err } return ProtectionContainersClientInquireResponse{}, nil } @@ -165,7 +169,7 @@ func (client *ProtectionContainersClient) inquireCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } @@ -179,23 +183,25 @@ func (client *ProtectionContainersClient) inquireCreateRequest(ctx context.Conte // GetRefreshOperationResult API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - fabricName - Fabric name associated the container. // - options - ProtectionContainersClientRefreshOptions contains the optional parameters for the ProtectionContainersClient.Refresh // method. func (client *ProtectionContainersClient) Refresh(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, options *ProtectionContainersClientRefreshOptions) (ProtectionContainersClientRefreshResponse, error) { + var err error req, err := client.refreshCreateRequest(ctx, vaultName, resourceGroupName, fabricName, options) if err != nil { return ProtectionContainersClientRefreshResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProtectionContainersClientRefreshResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return ProtectionContainersClientRefreshResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return ProtectionContainersClientRefreshResponse{}, err } return ProtectionContainersClientRefreshResponse{}, nil } @@ -224,7 +230,7 @@ func (client *ProtectionContainersClient) refreshCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } @@ -237,7 +243,7 @@ func (client *ProtectionContainersClient) refreshCreateRequest(ctx context.Conte // status, use location header to call get latest status of the operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - fabricName - Fabric name associated with the container. @@ -246,18 +252,21 @@ func (client *ProtectionContainersClient) refreshCreateRequest(ctx context.Conte // - options - ProtectionContainersClientRegisterOptions contains the optional parameters for the ProtectionContainersClient.Register // method. func (client *ProtectionContainersClient) Register(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, parameters ProtectionContainerResource, options *ProtectionContainersClientRegisterOptions) (ProtectionContainersClientRegisterResponse, error) { + var err error req, err := client.registerCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, parameters, options) if err != nil { return ProtectionContainersClientRegisterResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProtectionContainersClientRegisterResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return ProtectionContainersClientRegisterResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return ProtectionContainersClientRegisterResponse{}, err } - return client.registerHandleResponse(resp) + resp, err := client.registerHandleResponse(httpResp) + return resp, err } // registerCreateRequest creates the Register request. @@ -288,10 +297,13 @@ func (client *ProtectionContainersClient) registerCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // registerHandleResponse handles the Register response. @@ -308,7 +320,7 @@ func (client *ProtectionContainersClient) registerHandleResponse(resp *http.Resp // Operation Result API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - fabricName - Name of the fabric where the container belongs. @@ -316,16 +328,18 @@ func (client *ProtectionContainersClient) registerHandleResponse(resp *http.Resp // - options - ProtectionContainersClientUnregisterOptions contains the optional parameters for the ProtectionContainersClient.Unregister // method. func (client *ProtectionContainersClient) Unregister(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, options *ProtectionContainersClientUnregisterOptions) (ProtectionContainersClientUnregisterResponse, error) { + var err error req, err := client.unregisterCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, options) if err != nil { return ProtectionContainersClientUnregisterResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProtectionContainersClientUnregisterResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return ProtectionContainersClientUnregisterResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ProtectionContainersClientUnregisterResponse{}, err } return ProtectionContainersClientUnregisterResponse{}, nil } @@ -358,7 +372,7 @@ func (client *ProtectionContainersClient) unregisterCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectioncontainers_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectioncontainers_client_example_test.go index 308680126a15..f7f863be0b44 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectioncontainers_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectioncontainers_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureWorkload/ProtectionContainers_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureWorkload/ProtectionContainers_Get.json func ExampleProtectionContainersClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -77,7 +77,7 @@ func ExampleProtectionContainersClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureStorage/ProtectionContainers_Register.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureStorage/ProtectionContainers_Register.json func ExampleProtectionContainersClient_Register() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -119,7 +119,7 @@ func ExampleProtectionContainersClient_Register() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureWorkload/ProtectionContainers_Unregister.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureWorkload/ProtectionContainers_Unregister.json func ExampleProtectionContainersClient_Unregister() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -136,7 +136,7 @@ func ExampleProtectionContainersClient_Unregister() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureStorage/ProtectionContainers_Inquire.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureStorage/ProtectionContainers_Inquire.json func ExampleProtectionContainersClient_Inquire() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -153,7 +153,7 @@ func ExampleProtectionContainersClient_Inquire() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/RefreshContainers.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/Common/RefreshContainers.json func ExampleProtectionContainersClient_Refresh() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionintent_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionintent_client.go index d2cb16ebede4..7ea79a696a81 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionintent_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionintent_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -47,7 +46,7 @@ func NewProtectionIntentClient(subscriptionID string, credential azcore.TokenCre // CreateOrUpdate - Create Intent for Enabling backup of an item. This is a synchronous operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - fabricName - Fabric name associated with the backup item. @@ -56,18 +55,21 @@ func NewProtectionIntentClient(subscriptionID string, credential azcore.TokenCre // - options - ProtectionIntentClientCreateOrUpdateOptions contains the optional parameters for the ProtectionIntentClient.CreateOrUpdate // method. func (client *ProtectionIntentClient) CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string, parameters ProtectionIntentResource, options *ProtectionIntentClientCreateOrUpdateOptions) (ProtectionIntentClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, vaultName, resourceGroupName, fabricName, intentObjectName, parameters, options) if err != nil { return ProtectionIntentClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProtectionIntentClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProtectionIntentClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProtectionIntentClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -98,10 +100,13 @@ func (client *ProtectionIntentClient) createOrUpdateCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -116,23 +121,25 @@ func (client *ProtectionIntentClient) createOrUpdateHandleResponse(resp *http.Re // Delete - Used to remove intent from an item // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - fabricName - Fabric name associated with the intent. // - intentObjectName - Intent to be deleted. // - options - ProtectionIntentClientDeleteOptions contains the optional parameters for the ProtectionIntentClient.Delete method. func (client *ProtectionIntentClient) Delete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string, options *ProtectionIntentClientDeleteOptions) (ProtectionIntentClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, vaultName, resourceGroupName, fabricName, intentObjectName, options) if err != nil { return ProtectionIntentClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProtectionIntentClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return ProtectionIntentClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ProtectionIntentClientDeleteResponse{}, err } return ProtectionIntentClientDeleteResponse{}, nil } @@ -165,7 +172,7 @@ func (client *ProtectionIntentClient) deleteCreateRequest(ctx context.Context, v return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -174,25 +181,28 @@ func (client *ProtectionIntentClient) deleteCreateRequest(ctx context.Context, v // operation, call the GetItemOperationResult API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - fabricName - Fabric name associated with the backed up item. // - intentObjectName - Backed up item name whose details are to be fetched. // - options - ProtectionIntentClientGetOptions contains the optional parameters for the ProtectionIntentClient.Get method. func (client *ProtectionIntentClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string, options *ProtectionIntentClientGetOptions) (ProtectionIntentClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, fabricName, intentObjectName, options) if err != nil { return ProtectionIntentClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProtectionIntentClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProtectionIntentClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProtectionIntentClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -223,7 +233,7 @@ func (client *ProtectionIntentClient) getCreateRequest(ctx context.Context, vaul return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -244,24 +254,27 @@ func (client *ProtectionIntentClient) getHandleResponse(resp *http.Response) (Pr // 3. Any VM related configuration passed in properties. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - azureRegion - Azure region to hit Api // - parameters - Enable backup validation request on Virtual Machine // - options - ProtectionIntentClientValidateOptions contains the optional parameters for the ProtectionIntentClient.Validate // method. func (client *ProtectionIntentClient) Validate(ctx context.Context, azureRegion string, parameters PreValidateEnableBackupRequest, options *ProtectionIntentClientValidateOptions) (ProtectionIntentClientValidateResponse, error) { + var err error req, err := client.validateCreateRequest(ctx, azureRegion, parameters, options) if err != nil { return ProtectionIntentClientValidateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProtectionIntentClientValidateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProtectionIntentClientValidateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProtectionIntentClientValidateResponse{}, err } - return client.validateHandleResponse(resp) + resp, err := client.validateHandleResponse(httpResp) + return resp, err } // validateCreateRequest creates the Validate request. @@ -280,10 +293,13 @@ func (client *ProtectionIntentClient) validateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // validateHandleResponse handles the Validate response. diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionintent_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionintent_client_example_test.go index 6ceb46f839a9..f80b2d16a2f4 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionintent_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionintent_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/ProtectionIntent_Validate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/ProtectionIntent_Validate.json func ExampleProtectionIntentClient_Validate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -51,7 +51,7 @@ func ExampleProtectionIntentClient_Validate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureWorkload/BackupProtectionIntent_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureWorkload/BackupProtectionIntent_Get.json func ExampleProtectionIntentClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -82,7 +82,7 @@ func ExampleProtectionIntentClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/ProtectionIntent_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/ProtectionIntent_CreateOrUpdate.json func ExampleProtectionIntentClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -119,7 +119,7 @@ func ExampleProtectionIntentClient_CreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureWorkload/BackupProtectionIntent_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureWorkload/BackupProtectionIntent_Delete.json func ExampleProtectionIntentClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionpolicies_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionpolicies_client.go index b6aece86efc5..5b0713541c94 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionpolicies_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionpolicies_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -48,7 +47,7 @@ func NewProtectionPoliciesClient(subscriptionID string, credential azcore.TokenC // fetched using GetPolicyOperationResult API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - policyName - Backup policy to be created. @@ -56,18 +55,21 @@ func NewProtectionPoliciesClient(subscriptionID string, credential azcore.TokenC // - options - ProtectionPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ProtectionPoliciesClient.CreateOrUpdate // method. func (client *ProtectionPoliciesClient) CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, policyName string, parameters ProtectionPolicyResource, options *ProtectionPoliciesClientCreateOrUpdateOptions) (ProtectionPoliciesClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, vaultName, resourceGroupName, policyName, parameters, options) if err != nil { return ProtectionPoliciesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProtectionPoliciesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return ProtectionPoliciesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return ProtectionPoliciesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -94,10 +96,13 @@ func (client *ProtectionPoliciesClient) createOrUpdateCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -113,7 +118,7 @@ func (client *ProtectionPoliciesClient) createOrUpdateHandleResponse(resp *http. // of the operation can be fetched using GetProtectionPolicyOperationResult API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - policyName - Backup policy to be deleted. @@ -125,7 +130,8 @@ func (client *ProtectionPoliciesClient) BeginDelete(ctx context.Context, vaultNa if err != nil { return nil, err } - return runtime.NewPoller[ProtectionPoliciesClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[ProtectionPoliciesClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[ProtectionPoliciesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -135,20 +141,22 @@ func (client *ProtectionPoliciesClient) BeginDelete(ctx context.Context, vaultNa // the operation can be fetched using GetProtectionPolicyOperationResult API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 func (client *ProtectionPoliciesClient) deleteOperation(ctx context.Context, vaultName string, resourceGroupName string, policyName string, options *ProtectionPoliciesClientBeginDeleteOptions) (*http.Response, error) { + var err error req, err := client.deleteCreateRequest(ctx, vaultName, resourceGroupName, policyName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -175,7 +183,7 @@ func (client *ProtectionPoliciesClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -185,24 +193,27 @@ func (client *ProtectionPoliciesClient) deleteCreateRequest(ctx context.Context, // Status of the operation can be fetched using GetPolicyOperationResult API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - policyName - Backup policy information to be fetched. // - options - ProtectionPoliciesClientGetOptions contains the optional parameters for the ProtectionPoliciesClient.Get method. func (client *ProtectionPoliciesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, policyName string, options *ProtectionPoliciesClientGetOptions) (ProtectionPoliciesClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, policyName, options) if err != nil { return ProtectionPoliciesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProtectionPoliciesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProtectionPoliciesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProtectionPoliciesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -229,7 +240,7 @@ func (client *ProtectionPoliciesClient) getCreateRequest(ctx context.Context, va return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionpolicies_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionpolicies_client_example_test.go index a60528d4fcf7..2789e93b86b7 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionpolicies_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionpolicies_client_example_test.go @@ -17,10 +17,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/V2Policy/v2-Get-Policy.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/V2Policy/v2-Get-Policy.json func ExampleProtectionPoliciesClient_Get_getAzureIaasVmEnhancedProtectionPolicyDetails() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -71,7 +71,7 @@ func ExampleProtectionPoliciesClient_Get_getAzureIaasVmEnhancedProtectionPolicyD // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/ProtectionPolicies_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/ProtectionPolicies_Get.json func ExampleProtectionPoliciesClient_Get_getAzureIaasVmProtectionPolicyDetails() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -119,7 +119,7 @@ func ExampleProtectionPoliciesClient_Get_getAzureIaasVmProtectionPolicyDetails() // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Daily.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Daily.json func ExampleProtectionPoliciesClient_CreateOrUpdate_createOrUpdateDailyAzureStorageProtectionPolicy() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -274,7 +274,7 @@ func ExampleProtectionPoliciesClient_CreateOrUpdate_createOrUpdateDailyAzureStor // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/V2Policy/IaaS_v2_hourly.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/V2Policy/IaaS_v2_hourly.json func ExampleProtectionPoliciesClient_CreateOrUpdate_createOrUpdateEnhancedAzureVmProtectionPolicyWithHourlyBackup() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -437,7 +437,7 @@ func ExampleProtectionPoliciesClient_CreateOrUpdate_createOrUpdateEnhancedAzureV // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/V2Policy/IaaS_v2_daily.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/V2Policy/IaaS_v2_daily.json func ExampleProtectionPoliciesClient_CreateOrUpdate_createOrUpdateEnhancedAzureVmProtectionPolicyWithDailyBackup() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -598,7 +598,7 @@ func ExampleProtectionPoliciesClient_CreateOrUpdate_createOrUpdateEnhancedAzureV // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Complex.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Complex.json func ExampleProtectionPoliciesClient_CreateOrUpdate_createOrUpdateFullAzureVmProtectionPolicy() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -756,7 +756,7 @@ func ExampleProtectionPoliciesClient_CreateOrUpdate_createOrUpdateFullAzureVmPro // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureWorkload/ProtectionPolicies_CreateOrUpdate_Complex.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureWorkload/ProtectionPolicies_CreateOrUpdate_Complex.json func ExampleProtectionPoliciesClient_CreateOrUpdate_createOrUpdateFullAzureWorkloadProtectionPolicy() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -987,7 +987,7 @@ func ExampleProtectionPoliciesClient_CreateOrUpdate_createOrUpdateFullAzureWorkl // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Hourly.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Hourly.json func ExampleProtectionPoliciesClient_CreateOrUpdate_createOrUpdateHourlyAzureStorageProtectionPolicy() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1140,7 +1140,7 @@ func ExampleProtectionPoliciesClient_CreateOrUpdate_createOrUpdateHourlyAzureSto // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Simple.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Simple.json func ExampleProtectionPoliciesClient_CreateOrUpdate_createOrUpdateSimpleAzureVmProtectionPolicy() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1210,7 +1210,7 @@ func ExampleProtectionPoliciesClient_CreateOrUpdate_createOrUpdateSimpleAzureVmP // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/ProtectionPolicies_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/ProtectionPolicies_Delete.json func ExampleProtectionPoliciesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionpolicyoperationresults_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionpolicyoperationresults_client.go index b4bf4e80d651..9bea81250d29 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionpolicyoperationresults_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionpolicyoperationresults_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -47,7 +46,7 @@ func NewProtectionPolicyOperationResultsClient(subscriptionID string, credential // Get - Provides the result of an operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - policyName - Backup policy name whose operation's result needs to be fetched. @@ -55,18 +54,21 @@ func NewProtectionPolicyOperationResultsClient(subscriptionID string, credential // - options - ProtectionPolicyOperationResultsClientGetOptions contains the optional parameters for the ProtectionPolicyOperationResultsClient.Get // method. func (client *ProtectionPolicyOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, policyName string, operationID string, options *ProtectionPolicyOperationResultsClientGetOptions) (ProtectionPolicyOperationResultsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, policyName, operationID, options) if err != nil { return ProtectionPolicyOperationResultsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProtectionPolicyOperationResultsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProtectionPolicyOperationResultsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProtectionPolicyOperationResultsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -97,7 +99,7 @@ func (client *ProtectionPolicyOperationResultsClient) getCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionpolicyoperationresults_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionpolicyoperationresults_client_example_test.go index 532e26fc930d..b1c537bddcdd 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionpolicyoperationresults_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionpolicyoperationresults_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/ProtectionPolicyOperationResults_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/ProtectionPolicyOperationResults_Get.json func ExampleProtectionPolicyOperationResultsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionpolicyoperationstatuses_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionpolicyoperationstatuses_client.go index 05f02eb41690..7ada67c5e031 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionpolicyoperationstatuses_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionpolicyoperationstatuses_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -49,7 +48,7 @@ func NewProtectionPolicyOperationStatusesClient(subscriptionID string, credentia // an operation. Some operations create jobs. This method returns the list of jobs associated with operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - policyName - Backup policy name whose operation's status needs to be fetched. @@ -57,18 +56,21 @@ func NewProtectionPolicyOperationStatusesClient(subscriptionID string, credentia // - options - ProtectionPolicyOperationStatusesClientGetOptions contains the optional parameters for the ProtectionPolicyOperationStatusesClient.Get // method. func (client *ProtectionPolicyOperationStatusesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, policyName string, operationID string, options *ProtectionPolicyOperationStatusesClientGetOptions) (ProtectionPolicyOperationStatusesClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, policyName, operationID, options) if err != nil { return ProtectionPolicyOperationStatusesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProtectionPolicyOperationStatusesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProtectionPolicyOperationStatusesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProtectionPolicyOperationStatusesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -99,7 +101,7 @@ func (client *ProtectionPolicyOperationStatusesClient) getCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionpolicyoperationstatuses_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionpolicyoperationstatuses_client_example_test.go index 8121002e44bf..bbd8eca78a31 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionpolicyoperationstatuses_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectionpolicyoperationstatuses_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/ProtectionPolicyOperationStatuses_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/ProtectionPolicyOperationStatuses_Get.json func ExampleProtectionPolicyOperationStatusesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/recoverypoints_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/recoverypoints_client.go index f847dcecb23f..63d4e2b43f37 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/recoverypoints_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/recoverypoints_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -48,7 +47,7 @@ func NewRecoveryPointsClient(subscriptionID string, credential azcore.TokenCrede // To know the status of the operation, call the GetProtectedItemOperationResult API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - fabricName - Fabric name associated with backed up item. @@ -57,18 +56,21 @@ func NewRecoveryPointsClient(subscriptionID string, credential azcore.TokenCrede // - recoveryPointID - RecoveryPointID represents the backed up data to be fetched. // - options - RecoveryPointsClientGetOptions contains the optional parameters for the RecoveryPointsClient.Get method. func (client *RecoveryPointsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, options *RecoveryPointsClientGetOptions) (RecoveryPointsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID, options) if err != nil { return RecoveryPointsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RecoveryPointsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecoveryPointsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RecoveryPointsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -107,7 +109,7 @@ func (client *RecoveryPointsClient) getCreateRequest(ctx context.Context, vaultN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -124,7 +126,7 @@ func (client *RecoveryPointsClient) getHandleResponse(resp *http.Response) (Reco // NewListPager - Lists the backup copies for the backed up item. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - fabricName - Fabric name associated with the backed up item. @@ -191,7 +193,7 @@ func (client *RecoveryPointsClient) listCreateRequest(ctx context.Context, vault return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/recoverypoints_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/recoverypoints_client_example_test.go index 1941c7984b63..8de06cba6c2a 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/recoverypoints_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/recoverypoints_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/RecoveryPoints_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/RecoveryPoints_List.json func ExampleRecoveryPointsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -118,7 +118,7 @@ func ExampleRecoveryPointsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/RecoveryPoints_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/RecoveryPoints_Get.json func ExampleRecoveryPointsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/recoverypointsrecommendedformove_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/recoverypointsrecommendedformove_client.go index 049250a56a75..9210fc20b990 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/recoverypointsrecommendedformove_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/recoverypointsrecommendedformove_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -46,7 +45,7 @@ func NewRecoveryPointsRecommendedForMoveClient(subscriptionID string, credential // NewListPager - Lists the recovery points recommended for move to another tier // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - parameters - List Recovery points Recommended for Move Request @@ -112,10 +111,13 @@ func (client *RecoveryPointsRecommendedForMoveClient) listCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // listHandleResponse handles the List response. diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/recoverypointsrecommendedformove_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/recoverypointsrecommendedformove_client_example_test.go index 9605ff28457e..08d62e45858d 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/recoverypointsrecommendedformove_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/recoverypointsrecommendedformove_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/RecoveryPointsRecommendedForMove_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/RecoveryPointsRecommendedForMove_List.json func ExampleRecoveryPointsRecommendedForMoveClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/resourceguardproxies_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/resourceguardproxies_client.go index 5cf18f7236b9..a8f42ebdd712 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/resourceguardproxies_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/resourceguardproxies_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -46,7 +45,7 @@ func NewResourceGuardProxiesClient(subscriptionID string, credential azcore.Toke // NewGetPager - List the ResourceGuardProxies under vault // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - options - ResourceGuardProxiesClientGetOptions contains the optional parameters for the ResourceGuardProxiesClient.NewGetPager @@ -99,7 +98,7 @@ func (client *ResourceGuardProxiesClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/resourceguardproxies_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/resourceguardproxies_client_example_test.go index f70cb9d4f531..af3facf73a26 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/resourceguardproxies_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/resourceguardproxies_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json func ExampleResourceGuardProxiesClient_NewGetPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/resourceguardproxy_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/resourceguardproxy_client.go index c6daf42f9191..6076f5ac66fd 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/resourceguardproxy_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/resourceguardproxy_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -47,22 +46,24 @@ func NewResourceGuardProxyClient(subscriptionID string, credential azcore.TokenC // Delete - Delete ResourceGuardProxy under vault // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - options - ResourceGuardProxyClientDeleteOptions contains the optional parameters for the ResourceGuardProxyClient.Delete // method. func (client *ResourceGuardProxyClient) Delete(ctx context.Context, vaultName string, resourceGroupName string, resourceGuardProxyName string, options *ResourceGuardProxyClientDeleteOptions) (ResourceGuardProxyClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, vaultName, resourceGroupName, resourceGuardProxyName, options) if err != nil { return ResourceGuardProxyClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceGuardProxyClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ResourceGuardProxyClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ResourceGuardProxyClientDeleteResponse{}, err } return ResourceGuardProxyClientDeleteResponse{}, nil } @@ -91,7 +92,7 @@ func (client *ResourceGuardProxyClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -100,23 +101,26 @@ func (client *ResourceGuardProxyClient) deleteCreateRequest(ctx context.Context, // Get - Returns ResourceGuardProxy under vault and with the name referenced in request // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - options - ResourceGuardProxyClientGetOptions contains the optional parameters for the ResourceGuardProxyClient.Get method. func (client *ResourceGuardProxyClient) Get(ctx context.Context, vaultName string, resourceGroupName string, resourceGuardProxyName string, options *ResourceGuardProxyClientGetOptions) (ResourceGuardProxyClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, resourceGuardProxyName, options) if err != nil { return ResourceGuardProxyClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceGuardProxyClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceGuardProxyClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceGuardProxyClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -143,7 +147,7 @@ func (client *ResourceGuardProxyClient) getCreateRequest(ctx context.Context, va return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -161,24 +165,27 @@ func (client *ResourceGuardProxyClient) getHandleResponse(resp *http.Response) ( // Put - Add or Update ResourceGuardProxy under vault Secures vault critical operations // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - parameters - Request body for operation // - options - ResourceGuardProxyClientPutOptions contains the optional parameters for the ResourceGuardProxyClient.Put method. func (client *ResourceGuardProxyClient) Put(ctx context.Context, vaultName string, resourceGroupName string, resourceGuardProxyName string, parameters ResourceGuardProxyBaseResource, options *ResourceGuardProxyClientPutOptions) (ResourceGuardProxyClientPutResponse, error) { + var err error req, err := client.putCreateRequest(ctx, vaultName, resourceGroupName, resourceGuardProxyName, parameters, options) if err != nil { return ResourceGuardProxyClientPutResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceGuardProxyClientPutResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceGuardProxyClientPutResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceGuardProxyClientPutResponse{}, err } - return client.putHandleResponse(resp) + resp, err := client.putHandleResponse(httpResp) + return resp, err } // putCreateRequest creates the Put request. @@ -205,10 +212,13 @@ func (client *ResourceGuardProxyClient) putCreateRequest(ctx context.Context, va return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // putHandleResponse handles the Put response. @@ -223,25 +233,28 @@ func (client *ResourceGuardProxyClient) putHandleResponse(resp *http.Response) ( // UnlockDelete - Secures delete ResourceGuardProxy operations. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - parameters - Request body for operation // - options - ResourceGuardProxyClientUnlockDeleteOptions contains the optional parameters for the ResourceGuardProxyClient.UnlockDelete // method. func (client *ResourceGuardProxyClient) UnlockDelete(ctx context.Context, vaultName string, resourceGroupName string, resourceGuardProxyName string, parameters UnlockDeleteRequest, options *ResourceGuardProxyClientUnlockDeleteOptions) (ResourceGuardProxyClientUnlockDeleteResponse, error) { + var err error req, err := client.unlockDeleteCreateRequest(ctx, vaultName, resourceGroupName, resourceGuardProxyName, parameters, options) if err != nil { return ResourceGuardProxyClientUnlockDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceGuardProxyClientUnlockDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceGuardProxyClientUnlockDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceGuardProxyClientUnlockDeleteResponse{}, err } - return client.unlockDeleteHandleResponse(resp) + resp, err := client.unlockDeleteHandleResponse(httpResp) + return resp, err } // unlockDeleteCreateRequest creates the UnlockDelete request. @@ -268,10 +281,13 @@ func (client *ResourceGuardProxyClient) unlockDeleteCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // unlockDeleteHandleResponse handles the UnlockDelete response. diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/resourceguardproxy_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/resourceguardproxy_client_example_test.go index 9a37b6664a91..1ca5c3550a85 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/resourceguardproxy_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/resourceguardproxy_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json func ExampleResourceGuardProxyClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -57,7 +57,7 @@ func ExampleResourceGuardProxyClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json func ExampleResourceGuardProxyClient_Put() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -100,7 +100,7 @@ func ExampleResourceGuardProxyClient_Put() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json func ExampleResourceGuardProxyClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -117,7 +117,7 @@ func ExampleResourceGuardProxyClient_Delete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json func ExampleResourceGuardProxyClient_UnlockDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/response_types.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/response_types.go index 439ea8cfe97a..5483a7d078be 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/response_types.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/response_types.go @@ -3,14 +3,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup // BMSPrepareDataMoveOperationResultClientGetResponse contains the response from method BMSPrepareDataMoveOperationResultClient.Get. type BMSPrepareDataMoveOperationResultClientGetResponse struct { + // Operation result response for Vault Storage Config VaultStorageConfigOperationResultResponseClassification } @@ -26,16 +26,19 @@ func (b *BMSPrepareDataMoveOperationResultClientGetResponse) UnmarshalJSON(data // BackupEnginesClientGetResponse contains the response from method BackupEnginesClient.Get. type BackupEnginesClientGetResponse struct { + // The base backup engine class. All workload specific backup engines derive from this class. BackupEngineBaseResource } // BackupEnginesClientListResponse contains the response from method BackupEnginesClient.NewListPager. type BackupEnginesClientListResponse struct { + // List of BackupEngineBase resources BackupEngineBaseResourceList } // BackupJobsClientListResponse contains the response from method BackupJobsClient.NewListPager. type BackupJobsClientListResponse struct { + // List of Job resources JobResourceList } @@ -46,31 +49,37 @@ type BackupOperationResultsClientGetResponse struct { // BackupOperationStatusesClientGetResponse contains the response from method BackupOperationStatusesClient.Get. type BackupOperationStatusesClientGetResponse struct { + // Operation status. OperationStatus } // BackupPoliciesClientListResponse contains the response from method BackupPoliciesClient.NewListPager. type BackupPoliciesClientListResponse struct { + // List of ProtectionPolicy resources ProtectionPolicyResourceList } // BackupProtectableItemsClientListResponse contains the response from method BackupProtectableItemsClient.NewListPager. type BackupProtectableItemsClientListResponse struct { + // List of WorkloadProtectableItem resources WorkloadProtectableItemResourceList } // BackupProtectedItemsClientListResponse contains the response from method BackupProtectedItemsClient.NewListPager. type BackupProtectedItemsClientListResponse struct { + // List of ProtectedItem resources ProtectedItemResourceList } // BackupProtectionContainersClientListResponse contains the response from method BackupProtectionContainersClient.NewListPager. type BackupProtectionContainersClientListResponse struct { + // List of ProtectionContainer resources ProtectionContainerResourceList } // BackupProtectionIntentClientListResponse contains the response from method BackupProtectionIntentClient.NewListPager. type BackupProtectionIntentClientListResponse struct { + // List of ProtectionIntent resources ProtectionIntentResourceList } @@ -86,6 +95,7 @@ type BackupResourceEncryptionConfigsClientUpdateResponse struct { // BackupResourceStorageConfigsNonCRRClientGetResponse contains the response from method BackupResourceStorageConfigsNonCRRClient.Get. type BackupResourceStorageConfigsNonCRRClientGetResponse struct { + // The resource storage details. BackupResourceConfigResource } @@ -96,36 +106,43 @@ type BackupResourceStorageConfigsNonCRRClientPatchResponse struct { // BackupResourceStorageConfigsNonCRRClientUpdateResponse contains the response from method BackupResourceStorageConfigsNonCRRClient.Update. type BackupResourceStorageConfigsNonCRRClientUpdateResponse struct { + // The resource storage details. BackupResourceConfigResource } // BackupResourceVaultConfigsClientGetResponse contains the response from method BackupResourceVaultConfigsClient.Get. type BackupResourceVaultConfigsClientGetResponse struct { + // Backup resource vault config details. BackupResourceVaultConfigResource } // BackupResourceVaultConfigsClientPutResponse contains the response from method BackupResourceVaultConfigsClient.Put. type BackupResourceVaultConfigsClientPutResponse struct { + // Backup resource vault config details. BackupResourceVaultConfigResource } // BackupResourceVaultConfigsClientUpdateResponse contains the response from method BackupResourceVaultConfigsClient.Update. type BackupResourceVaultConfigsClientUpdateResponse struct { + // Backup resource vault config details. BackupResourceVaultConfigResource } // BackupStatusClientGetResponse contains the response from method BackupStatusClient.Get. type BackupStatusClientGetResponse struct { + // BackupStatus response. BackupStatusResponse } // BackupUsageSummariesClientListResponse contains the response from method BackupUsageSummariesClient.NewListPager. type BackupUsageSummariesClientListResponse struct { + // Backup management usage for vault. BackupManagementUsageList } // BackupWorkloadItemsClientListResponse contains the response from method BackupWorkloadItemsClient.NewListPager. type BackupWorkloadItemsClientListResponse struct { + // List of WorkloadItem resources WorkloadItemResourceList } @@ -146,6 +163,7 @@ type ClientBMSTriggerDataMoveResponse struct { // ClientGetOperationStatusResponse contains the response from method Client.GetOperationStatus. type ClientGetOperationStatusResponse struct { + // Operation status. OperationStatus } @@ -156,16 +174,19 @@ type ClientMoveRecoveryPointResponse struct { // DeletedProtectionContainersClientListResponse contains the response from method DeletedProtectionContainersClient.NewListPager. type DeletedProtectionContainersClientListResponse struct { + // List of ProtectionContainer resources ProtectionContainerResourceList } // ExportJobsOperationResultsClientGetResponse contains the response from method ExportJobsOperationResultsClient.Get. type ExportJobsOperationResultsClientGetResponse struct { + // Base class for operation result info. OperationResultInfoBaseResource } // FeatureSupportClientValidateResponse contains the response from method FeatureSupportClient.Validate. type FeatureSupportClientValidateResponse struct { + // Response for feature support requests for Azure IaasVm AzureVMResourceFeatureSupportResponse } @@ -186,6 +207,7 @@ type JobCancellationsClientTriggerResponse struct { // JobDetailsClientGetResponse contains the response from method JobDetailsClient.Get. type JobDetailsClientGetResponse struct { + // Defines workload agnostic properties for a job. JobResource } @@ -206,11 +228,13 @@ type OperationClientValidateResponse struct { // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { + // Operations List response which contains list of available APIs. ClientDiscoveryResponse } // PrivateEndpointClientGetOperationStatusResponse contains the response from method PrivateEndpointClient.GetOperationStatus. type PrivateEndpointClientGetOperationStatusResponse struct { + // Operation status. OperationStatus } @@ -221,31 +245,37 @@ type PrivateEndpointConnectionClientDeleteResponse struct { // PrivateEndpointConnectionClientGetResponse contains the response from method PrivateEndpointConnectionClient.Get. type PrivateEndpointConnectionClientGetResponse struct { + // Private Endpoint Connection Response Properties PrivateEndpointConnectionResource } // PrivateEndpointConnectionClientPutResponse contains the response from method PrivateEndpointConnectionClient.BeginPut. type PrivateEndpointConnectionClientPutResponse struct { + // Private Endpoint Connection Response Properties PrivateEndpointConnectionResource } // ProtectableContainersClientListResponse contains the response from method ProtectableContainersClient.NewListPager. type ProtectableContainersClientListResponse struct { + // List of ProtectableContainer resources ProtectableContainerResourceList } // ProtectedItemOperationResultsClientGetResponse contains the response from method ProtectedItemOperationResultsClient.Get. type ProtectedItemOperationResultsClientGetResponse struct { + // Base class for backup items. ProtectedItemResource } // ProtectedItemOperationStatusesClientGetResponse contains the response from method ProtectedItemOperationStatusesClient.Get. type ProtectedItemOperationStatusesClientGetResponse struct { + // Operation status. OperationStatus } // ProtectedItemsClientCreateOrUpdateResponse contains the response from method ProtectedItemsClient.CreateOrUpdate. type ProtectedItemsClientCreateOrUpdateResponse struct { + // Base class for backup items. ProtectedItemResource } @@ -256,11 +286,13 @@ type ProtectedItemsClientDeleteResponse struct { // ProtectedItemsClientGetResponse contains the response from method ProtectedItemsClient.Get. type ProtectedItemsClientGetResponse struct { + // Base class for backup items. ProtectedItemResource } // ProtectionContainerOperationResultsClientGetResponse contains the response from method ProtectionContainerOperationResultsClient.Get. type ProtectionContainerOperationResultsClientGetResponse struct { + // Base class for container with backup items. Containers with specific workloads are derived from this class. ProtectionContainerResource } @@ -271,6 +303,7 @@ type ProtectionContainerRefreshOperationResultsClientGetResponse struct { // ProtectionContainersClientGetResponse contains the response from method ProtectionContainersClient.Get. type ProtectionContainersClientGetResponse struct { + // Base class for container with backup items. Containers with specific workloads are derived from this class. ProtectionContainerResource } @@ -286,6 +319,7 @@ type ProtectionContainersClientRefreshResponse struct { // ProtectionContainersClientRegisterResponse contains the response from method ProtectionContainersClient.Register. type ProtectionContainersClientRegisterResponse struct { + // Base class for container with backup items. Containers with specific workloads are derived from this class. ProtectionContainerResource } @@ -296,6 +330,7 @@ type ProtectionContainersClientUnregisterResponse struct { // ProtectionIntentClientCreateOrUpdateResponse contains the response from method ProtectionIntentClient.CreateOrUpdate. type ProtectionIntentClientCreateOrUpdateResponse struct { + // Base class for backup ProtectionIntent. ProtectionIntentResource } @@ -306,16 +341,19 @@ type ProtectionIntentClientDeleteResponse struct { // ProtectionIntentClientGetResponse contains the response from method ProtectionIntentClient.Get. type ProtectionIntentClientGetResponse struct { + // Base class for backup ProtectionIntent. ProtectionIntentResource } // ProtectionIntentClientValidateResponse contains the response from method ProtectionIntentClient.Validate. type ProtectionIntentClientValidateResponse struct { + // Response contract for enable backup validation request PreValidateEnableBackupResponse } // ProtectionPoliciesClientCreateOrUpdateResponse contains the response from method ProtectionPoliciesClient.CreateOrUpdate. type ProtectionPoliciesClientCreateOrUpdateResponse struct { + // Base class for backup policy. Workload-specific backup policies are derived from this class. ProtectionPolicyResource } @@ -326,36 +364,43 @@ type ProtectionPoliciesClientDeleteResponse struct { // ProtectionPoliciesClientGetResponse contains the response from method ProtectionPoliciesClient.Get. type ProtectionPoliciesClientGetResponse struct { + // Base class for backup policy. Workload-specific backup policies are derived from this class. ProtectionPolicyResource } // ProtectionPolicyOperationResultsClientGetResponse contains the response from method ProtectionPolicyOperationResultsClient.Get. type ProtectionPolicyOperationResultsClientGetResponse struct { + // Base class for backup policy. Workload-specific backup policies are derived from this class. ProtectionPolicyResource } // ProtectionPolicyOperationStatusesClientGetResponse contains the response from method ProtectionPolicyOperationStatusesClient.Get. type ProtectionPolicyOperationStatusesClientGetResponse struct { + // Operation status. OperationStatus } // RecoveryPointsClientGetResponse contains the response from method RecoveryPointsClient.Get. type RecoveryPointsClientGetResponse struct { + // Base class for backup copies. Workload-specific backup copies are derived from this class. RecoveryPointResource } // RecoveryPointsClientListResponse contains the response from method RecoveryPointsClient.NewListPager. type RecoveryPointsClientListResponse struct { + // List of RecoveryPoint resources RecoveryPointResourceList } // RecoveryPointsRecommendedForMoveClientListResponse contains the response from method RecoveryPointsRecommendedForMoveClient.NewListPager. type RecoveryPointsRecommendedForMoveClientListResponse struct { + // List of RecoveryPoint resources RecoveryPointResourceList } // ResourceGuardProxiesClientGetResponse contains the response from method ResourceGuardProxiesClient.NewGetPager. type ResourceGuardProxiesClientGetResponse struct { + // List of ResourceGuardProxyBase resources ResourceGuardProxyBaseResourceList } @@ -376,6 +421,7 @@ type ResourceGuardProxyClientPutResponse struct { // ResourceGuardProxyClientUnlockDeleteResponse contains the response from method ResourceGuardProxyClient.UnlockDelete. type ResourceGuardProxyClientUnlockDeleteResponse struct { + // Response of Unlock Delete API. UnlockDeleteResponse } @@ -386,6 +432,7 @@ type RestoresClientTriggerResponse struct { // SecurityPINsClientGetResponse contains the response from method SecurityPINsClient.Get. type SecurityPINsClientGetResponse struct { + // The token information details. TokenInformation } @@ -401,5 +448,6 @@ type ValidateOperationResultsClientGetResponse struct { // ValidateOperationStatusesClientGetResponse contains the response from method ValidateOperationStatusesClient.Get. type ValidateOperationStatusesClientGetResponse struct { + // Operation status. OperationStatus } diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/restores_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/restores_client.go index 4d6c500d3c47..abc4e2cfec18 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/restores_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/restores_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -48,7 +47,7 @@ func NewRestoresClient(subscriptionID string, credential azcore.TokenCredential, // call, use GetProtectedItemOperationResult API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - fabricName - Fabric name associated with the backed up items. @@ -63,7 +62,8 @@ func (client *RestoresClient) BeginTrigger(ctx context.Context, vaultName string if err != nil { return nil, err } - return runtime.NewPoller[RestoresClientTriggerResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[RestoresClientTriggerResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[RestoresClientTriggerResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -73,20 +73,22 @@ func (client *RestoresClient) BeginTrigger(ctx context.Context, vaultName string // use GetProtectedItemOperationResult API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 func (client *RestoresClient) trigger(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters RestoreRequestResource, options *RestoresClientBeginTriggerOptions) (*http.Response, error) { + var err error req, err := client.triggerCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // triggerCreateRequest creates the Trigger request. @@ -125,8 +127,11 @@ func (client *RestoresClient) triggerCreateRequest(ctx context.Context, vaultNam return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/restores_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/restores_client_example_test.go index d5675ca07790..bf430f41642c 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/restores_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/restores_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest.json func ExampleRestoresClient_BeginTrigger_restoreDisksWithIaasVmRestoreRequest() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -61,7 +61,7 @@ func ExampleRestoresClient_BeginTrigger_restoreDisksWithIaasVmRestoreRequest() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json func ExampleRestoresClient_BeginTrigger_restoreDisksWithIaasVmRestoreRequestWithIdentityBasedRestoreDetails() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -102,7 +102,7 @@ func ExampleRestoresClient_BeginTrigger_restoreDisksWithIaasVmRestoreRequestWith } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreWithRehydrationRequest.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreWithRehydrationRequest.json func ExampleRestoresClient_BeginTrigger_restoreDisksWithIaasVmRestoreWithRehydrationRequest() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -141,7 +141,7 @@ func ExampleRestoresClient_BeginTrigger_restoreDisksWithIaasVmRestoreWithRehydra } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest.json func ExampleRestoresClient_BeginTrigger_restoreToNewAzureIaasVmWithIaasVmRestoreRequest() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -183,7 +183,7 @@ func ExampleRestoresClient_BeginTrigger_restoreToNewAzureIaasVmWithIaasVmRestore } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json func ExampleRestoresClient_BeginTrigger_restoreToNewAzureIaasVmWithIaasVmRestoreRequestWithIdentityBasedRestoreDetails() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -227,7 +227,7 @@ func ExampleRestoresClient_BeginTrigger_restoreToNewAzureIaasVmWithIaasVmRestore } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreWithRehydrationRequest.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreWithRehydrationRequest.json func ExampleRestoresClient_BeginTrigger_restoreToNewAzureIaasVmWithIaasVmRestoreWithRehydrationRequest() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/securitypins_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/securitypins_client.go index d0af985f185c..1269b315bedf 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/securitypins_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/securitypins_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -47,23 +46,26 @@ func NewSecurityPINsClient(subscriptionID string, credential azcore.TokenCredent // Get - Get the security PIN. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - options - SecurityPINsClientGetOptions contains the optional parameters for the SecurityPINsClient.Get method. func (client *SecurityPINsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, options *SecurityPINsClientGetOptions) (SecurityPINsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, options) if err != nil { return SecurityPINsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SecurityPINsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecurityPINsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SecurityPINsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -86,11 +88,14 @@ func (client *SecurityPINsClient) getCreateRequest(ctx context.Context, vaultNam return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { - return req, runtime.MarshalAsJSON(req, *options.Parameters) + if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil { + return nil, err + } + return req, nil } return req, nil } diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/securitypins_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/securitypins_client_example_test.go index c7ec89c3015a..cb21f8967d76 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/securitypins_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/securitypins_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/BackupSecurityPin_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/Common/BackupSecurityPin_Get.json func ExampleSecurityPINsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/time_rfc3339.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/time_rfc3339.go index 38bf7b8e0001..da9cc4933c11 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/time_rfc3339.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/time_rfc3339.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/validateoperation_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/validateoperation_client.go index de152ec817f6..bdb0317ef0f6 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/validateoperation_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/validateoperation_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -48,7 +47,7 @@ func NewValidateOperationClient(subscriptionID string, credential azcore.TokenCr // headers which can be tracked using GetValidateOperationResult API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - parameters - resource validate operation request @@ -60,7 +59,8 @@ func (client *ValidateOperationClient) BeginTrigger(ctx context.Context, vaultNa if err != nil { return nil, err } - return runtime.NewPoller[ValidateOperationClientTriggerResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[ValidateOperationClientTriggerResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[ValidateOperationClientTriggerResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -70,20 +70,22 @@ func (client *ValidateOperationClient) BeginTrigger(ctx context.Context, vaultNa // which can be tracked using GetValidateOperationResult API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 func (client *ValidateOperationClient) trigger(ctx context.Context, vaultName string, resourceGroupName string, parameters ValidateOperationRequestClassification, options *ValidateOperationClientBeginTriggerOptions) (*http.Response, error) { + var err error req, err := client.triggerCreateRequest(ctx, vaultName, resourceGroupName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // triggerCreateRequest creates the Trigger request. @@ -106,8 +108,11 @@ func (client *ValidateOperationClient) triggerCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/validateoperation_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/validateoperation_client_example_test.go index 7ddce1c1c641..10271d5a7db6 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/validateoperation_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/validateoperation_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/TriggerValidateOperation_RestoreDisk.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/TriggerValidateOperation_RestoreDisk.json func ExampleValidateOperationClient_BeginTrigger() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/validateoperationresults_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/validateoperationresults_client.go index 7af14e51996e..b89cda01c805 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/validateoperationresults_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/validateoperationresults_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -47,25 +46,28 @@ func NewValidateOperationResultsClient(subscriptionID string, credential azcore. // Get - Fetches the result of a triggered validate operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - operationID - OperationID which represents the operation whose result needs to be fetched. // - options - ValidateOperationResultsClientGetOptions contains the optional parameters for the ValidateOperationResultsClient.Get // method. func (client *ValidateOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *ValidateOperationResultsClientGetOptions) (ValidateOperationResultsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, operationID, options) if err != nil { return ValidateOperationResultsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ValidateOperationResultsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return ValidateOperationResultsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return ValidateOperationResultsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -92,7 +94,7 @@ func (client *ValidateOperationResultsClient) getCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/validateoperationresults_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/validateoperationresults_client_example_test.go index 35ed6b6bd6f6..084c8261ae48 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/validateoperationresults_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/validateoperationresults_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/ValidateOperationResults.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/ValidateOperationResults.json func ExampleValidateOperationResultsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/validateoperationstatuses_client.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/validateoperationstatuses_client.go index 0f93cbf54229..094682be8ece 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/validateoperationstatuses_client.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/validateoperationstatuses_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armrecoveryservicesbackup @@ -49,25 +48,28 @@ func NewValidateOperationStatusesClient(subscriptionID string, credential azcore // operation has completed, this method returns the list of errors obtained while validating the operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-04-01 // - vaultName - The name of the recovery services vault. // - resourceGroupName - The name of the resource group where the recovery services vault is present. // - operationID - OperationID represents the operation whose status needs to be fetched. // - options - ValidateOperationStatusesClientGetOptions contains the optional parameters for the ValidateOperationStatusesClient.Get // method. func (client *ValidateOperationStatusesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *ValidateOperationStatusesClientGetOptions) (ValidateOperationStatusesClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, operationID, options) if err != nil { return ValidateOperationStatusesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ValidateOperationStatusesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ValidateOperationStatusesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ValidateOperationStatusesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -94,7 +96,7 @@ func (client *ValidateOperationStatusesClient) getCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/validateoperationstatuses_client_example_test.go b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/validateoperationstatuses_client_example_test.go index c4e03af84efa..e765d155b7e6 100644 --- a/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/validateoperationstatuses_client_example_test.go +++ b/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/validateoperationstatuses_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureIaasVm/ValidateOperationStatus.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a4ddec441435d1ef766c4f160eda658a69cc5dc2/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/AzureIaasVm/ValidateOperationStatus.json func ExampleValidateOperationStatusesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil {