From e562127f91ef1adae8957fcce8c7ea0d81c2e775 Mon Sep 17 00:00:00 2001 From: colawwj <70128817+colawwj@users.noreply.github.com> Date: Tue, 15 Jun 2021 09:58:53 +0800 Subject: [PATCH] Arm recoveryservicesbackup v4 (#15531) * arm-recoveryservicesbackup-v4 * arm-recoveryservicesbackup-v4 * update readme * Update sdk/recoveryservicesbackup/arm-recoveryservicesbackup/README.md Co-authored-by: Ramya Rao Co-authored-by: Wei Dong <40835867+dw511214992@users.noreply.github.com> Co-authored-by: Ramya Rao --- .../arm-recoveryservicesbackup/LICENSE.txt | 2 +- .../arm-recoveryservicesbackup/README.md | 112 +- .../arm-recoveryservicesbackup/package.json | 9 +- .../rollup.config.js | 14 +- .../src/models/aadPropertiesMappers.ts | 225 + ...MSPrepareDataMoveOperationResultMappers.ts | 16 + .../src/models/backupCrrJobDetailsMappers.ts | 225 + .../src/models/backupCrrJobsMappers.ts | 236 + .../src/models/backupEnginesMappers.ts | 28 +- .../src/models/backupJobsMappers.ts | 28 +- .../models/backupOperationResultsMappers.ts | 9 +- .../models/backupOperationStatusesMappers.ts | 27 +- .../src/models/backupPoliciesMappers.ts | 28 +- .../models/backupProtectableItemsMappers.ts | 28 +- .../models/backupProtectedItemsCrrMappers.ts | 236 + .../src/models/backupProtectedItemsMappers.ts | 28 +- .../backupProtectionContainersMappers.ts | 28 +- .../models/backupProtectionIntentMappers.ts | 28 +- .../backupResourceEncryptionConfigsMappers.ts | 225 + .../backupResourceStorageConfigsMappers.ts | 32 +- .../backupResourceVaultConfigsMappers.ts | 32 +- .../src/models/backupStatusMappers.ts | 4 +- .../models/backupUsageSummariesCRRMappers.ts | 17 + .../src/models/backupUsageSummariesMappers.ts | 4 +- .../src/models/backupWorkloadItemsMappers.ts | 28 +- .../src/models/backupsMappers.ts | 28 +- .../src/models/crossRegionRestoreMappers.ts | 37 + .../src/models/crrOperationResultsMappers.ts | 14 + .../src/models/crrOperationStatusMappers.ts | 43 + .../exportJobsOperationResultsMappers.ts | 4 +- .../src/models/featureSupportMappers.ts | 4 +- .../src/models/index.ts | 6087 +++++++++++------ .../itemLevelRecoveryConnectionsMappers.ts | 28 +- .../src/models/jobCancellationsMappers.ts | 9 +- .../src/models/jobDetailsMappers.ts | 28 +- .../src/models/jobOperationResultsMappers.ts | 9 +- .../src/models/jobsMappers.ts | 9 +- .../src/models/mappers.ts | 4745 ++++++++----- .../src/models/operationMappers.ts | 10 +- .../src/models/operationsMappers.ts | 4 +- .../src/models/parameters.ts | 37 +- ...vateEndpointConnectionOperationsMappers.ts | 31 +- .../privateEndpointOperationsMappers.ts | 43 + .../models/protectableContainersMappers.ts | 28 +- .../protectedItemOperationResultsMappers.ts | 28 +- .../protectedItemOperationStatusesMappers.ts | 27 +- .../src/models/protectedItemsMappers.ts | 28 +- ...tectionContainerOperationResultsMappers.ts | 28 +- ...ContainerRefreshOperationResultsMappers.ts | 9 +- .../src/models/protectionContainersMappers.ts | 28 +- .../protectionIntentOperationsMappers.ts | 28 +- .../src/models/protectionPoliciesMappers.ts | 28 +- ...protectionPolicyOperationResultsMappers.ts | 28 +- ...rotectionPolicyOperationStatusesMappers.ts | 27 +- .../src/models/recoveryPointsCrrMappers.ts | 236 + .../src/models/recoveryPointsMappers.ts | 31 +- ...recoveryPointsRecommendedForMoveMappers.ts | 235 + .../src/models/restoresMappers.ts | 28 +- .../src/models/securityPINsMappers.ts | 10 +- .../src/operations/aadProperties.ts | 89 + .../bMSPrepareDataMoveOperationResult.ts | 117 + .../src/operations/backupCrrJobDetails.ts | 105 + .../src/operations/backupCrrJobs.ts | 167 + .../src/operations/backupEngines.ts | 139 +- .../src/operations/backupJobs.ts | 84 +- .../src/operations/backupOperationResults.ts | 49 +- .../src/operations/backupOperationStatuses.ts | 49 +- .../src/operations/backupPolicies.ts | 90 +- .../src/operations/backupProtectableItems.ts | 91 +- .../src/operations/backupProtectedItems.ts | 91 +- .../src/operations/backupProtectedItemsCrr.ts | 166 + .../operations/backupProtectionContainers.ts | 90 +- .../src/operations/backupProtectionIntent.ts | 91 +- .../backupResourceEncryptionConfigs.ts | 188 + .../backupResourceStorageConfigs.ts | 161 +- .../operations/backupResourceVaultConfigs.ts | 163 +- .../src/operations/backupStatus.ts | 50 +- .../src/operations/backupUsageSummaries.ts | 55 +- .../src/operations/backupUsageSummariesCRR.ts | 103 + .../src/operations/backupWorkloadItems.ts | 93 +- .../src/operations/backups.ts | 61 +- .../src/operations/crossRegionRestore.ts | 96 + .../src/operations/crrOperationResults.ts | 91 + .../src/operations/crrOperationStatus.ts | 97 + .../operations/exportJobsOperationResults.ts | 51 +- .../src/operations/featureSupport.ts | 52 +- .../src/operations/index.ts | 30 +- .../itemLevelRecoveryConnections.ts | 121 +- .../src/operations/jobCancellations.ts | 49 +- .../src/operations/jobDetails.ts | 49 +- .../src/operations/jobOperationResults.ts | 53 +- .../src/operations/jobs.ts | 52 +- .../src/operations/operation.ts | 55 +- .../src/operations/operations.ts | 60 +- .../privateEndpointConnectionOperations.ts | 132 +- .../operations/privateEndpointOperations.ts | 123 + .../src/operations/protectableContainers.ts | 88 +- .../protectedItemOperationResults.ts | 61 +- .../protectedItemOperationStatuses.ts | 61 +- .../src/operations/protectedItems.ts | 169 +- .../protectionContainerOperationResults.ts | 59 +- ...tectionContainerRefreshOperationResults.ts | 53 +- .../src/operations/protectionContainers.ts | 252 +- .../operations/protectionIntentOperations.ts | 200 +- .../src/operations/protectionPolicies.ts | 158 +- .../protectionPolicyOperationResults.ts | 53 +- .../protectionPolicyOperationStatuses.ts | 53 +- .../src/operations/recoveryPoints.ts | 280 +- .../src/operations/recoveryPointsCrr.ts | 197 + .../recoveryPointsRecommendedForMove.ts | 208 + .../src/operations/restores.ts | 80 +- .../src/operations/securityPINs.ts | 51 +- .../src/recoveryServicesBackupClient.ts | 391 +- .../recoveryServicesBackupClientContext.ts | 38 +- 114 files changed, 14268 insertions(+), 5233 deletions(-) create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/aadPropertiesMappers.ts create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/bMSPrepareDataMoveOperationResultMappers.ts create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupCrrJobDetailsMappers.ts create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupCrrJobsMappers.ts create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectedItemsCrrMappers.ts create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupResourceEncryptionConfigsMappers.ts create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupUsageSummariesCRRMappers.ts create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/crossRegionRestoreMappers.ts create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/crrOperationResultsMappers.ts create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/crrOperationStatusMappers.ts create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/privateEndpointOperationsMappers.ts create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/recoveryPointsCrrMappers.ts create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/recoveryPointsRecommendedForMoveMappers.ts create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/aadProperties.ts create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/bMSPrepareDataMoveOperationResult.ts create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupCrrJobDetails.ts create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupCrrJobs.ts create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupProtectedItemsCrr.ts create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupResourceEncryptionConfigs.ts create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupUsageSummariesCRR.ts create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/crossRegionRestore.ts create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/crrOperationResults.ts create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/crrOperationStatus.ts create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/privateEndpointOperations.ts create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/recoveryPointsCrr.ts create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/recoveryPointsRecommendedForMove.ts diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/LICENSE.txt b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/LICENSE.txt index ea8fb1516028..2d3163745319 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/LICENSE.txt +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2020 Microsoft +Copyright (c) 2021 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/README.md b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/README.md index c9f0c165e927..7924c707fce7 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/README.md +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/README.md @@ -1,97 +1,115 @@ ## Azure RecoveryServicesBackupClient SDK for JavaScript -This package contains an isomorphic SDK for RecoveryServicesBackupClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for RecoveryServicesBackupClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. -### How to Install +### Prerequisites + +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. + +- `@azure/arm-recoveryservicesbackup` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-recoveryservicesbackup +npm install --save @azure/arm-recoveryservicesbackup @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +> If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + ### How to use -#### nodejs - Authentication, client creation and get privateEndpointConnection as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +#### nodejs - Authentication, client creation, and get backupResourceVaultConfigs as an example written in JavaScript. ##### Sample code -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { RecoveryServicesBackupClient, RecoveryServicesBackupModels, RecoveryServicesBackupMappers } from "@azure/arm-recoveryservicesbackup"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new RecoveryServicesBackupClient(creds, subscriptionId); - const vaultName = "testvaultName"; - const resourceGroupName = "testresourceGroupName"; - const privateEndpointConnectionName = "testprivateEndpointConnectionName"; - client.privateEndpointConnection.get(vaultName, resourceGroupName, privateEndpointConnectionName).then((result) => { +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new RecoveryServicesBackupClient(creds, subscriptionId); +const vaultName = "testvaultName"; +const resourceGroupName = "testresourceGroupName"; +client.backupResourceVaultConfigs + .get(vaultName, resourceGroupName) + .then((result) => { console.log("The result is:"); console.log(result); + }) + .catch((err) => { + console.log("An error occurred:"); + console.error(err); }); -}).catch((err) => { - console.error(err); -}); ``` -#### browser - Authentication, client creation and get privateEndpointConnection as an example written in JavaScript. +#### browser - Authentication, client creation, and get backupResourceVaultConfigs as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. -```bash -npm install @azure/ms-rest-browserauth -``` +- See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. +- Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-recoveryservicesbackup sample - - + diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json index e5b38c2b3f82..1cb10942f505 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json @@ -2,10 +2,11 @@ "name": "@azure/arm-recoveryservicesbackup", "author": "Microsoft Corporation", "description": "RecoveryServicesBackupClient Library with typescript type definitions for node.js and browser.", - "version": "6.1.0", + "version": "7.0.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/recoveryServicesBackupClient.js", "types": "./esm/recoveryServicesBackupClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/rollup.config.js b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/rollup.config.js index faa841bb5989..ea6687ad2d1a 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/rollup.config.js +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/rollup.config.js @@ -7,10 +7,7 @@ import sourcemaps from "rollup-plugin-sourcemaps"; */ const config = { input: "./esm/recoveryServicesBackupClient.js", - external: [ - "@azure/ms-rest-js", - "@azure/ms-rest-azure-js" - ], + external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], output: { file: "./dist/arm-recoveryservicesbackup.js", format: "umd", @@ -21,17 +18,14 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, - plugins: [ - nodeResolve({ mainFields: ['module', 'main'] }), - sourcemaps() - ] + plugins: [nodeResolve({ mainFields: ["module", "main"] }), sourcemaps()] }; export default config; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/aadPropertiesMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/aadPropertiesMappers.ts new file mode 100644 index 000000000000..f478e80e0f73 --- /dev/null +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/aadPropertiesMappers.ts @@ -0,0 +1,225 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AADProperties, + AADPropertiesResource, + AzureBackupServerContainer, + AzureBackupServerEngine, + AzureFileShareBackupRequest, + AzureFileShareProtectableItem, + AzureFileshareProtectedItem, + AzureFileshareProtectedItemExtendedInfo, + AzureFileShareProtectionPolicy, + AzureFileShareProvisionILRRequest, + AzureFileShareRecoveryPoint, + AzureFileShareRestoreRequest, + AzureIaaSClassicComputeVMContainer, + AzureIaaSClassicComputeVMProtectableItem, + AzureIaaSClassicComputeVMProtectedItem, + AzureIaaSComputeVMContainer, + AzureIaaSComputeVMProtectableItem, + AzureIaaSComputeVMProtectedItem, + AzureIaaSVMErrorInfo, + AzureIaaSVMHealthDetails, + AzureIaaSVMJob, + AzureIaaSVMJobExtendedInfo, + AzureIaaSVMJobTaskDetails, + AzureIaaSVMProtectedItem, + AzureIaaSVMProtectedItemExtendedInfo, + AzureIaaSVMProtectionPolicy, + AzureRecoveryServiceVaultProtectionIntent, + AzureResourceProtectionIntent, + AzureSQLAGWorkloadContainerProtectionContainer, + AzureSqlContainer, + AzureSqlProtectedItem, + AzureSqlProtectedItemExtendedInfo, + AzureSqlProtectionPolicy, + AzureStorageContainer, + AzureStorageErrorInfo, + AzureStorageJob, + AzureStorageJobExtendedInfo, + AzureStorageJobTaskDetails, + AzureStorageProtectableContainer, + AzureVMAppContainerProtectableContainer, + AzureVMAppContainerProtectionContainer, + AzureVmWorkloadItem, + AzureVmWorkloadProtectableItem, + AzureVmWorkloadProtectedItem, + AzureVmWorkloadProtectedItemExtendedInfo, + AzureVmWorkloadProtectionPolicy, + AzureVmWorkloadSAPAseDatabaseProtectedItem, + AzureVmWorkloadSAPAseDatabaseWorkloadItem, + AzureVmWorkloadSAPAseSystemProtectableItem, + AzureVmWorkloadSAPAseSystemWorkloadItem, + AzureVmWorkloadSAPHanaDatabaseProtectableItem, + AzureVmWorkloadSAPHanaDatabaseProtectedItem, + AzureVmWorkloadSAPHanaDatabaseWorkloadItem, + AzureVmWorkloadSAPHanaSystemProtectableItem, + AzureVmWorkloadSAPHanaSystemWorkloadItem, + AzureVmWorkloadSQLAvailabilityGroupProtectableItem, + AzureVmWorkloadSQLDatabaseProtectableItem, + AzureVmWorkloadSQLDatabaseProtectedItem, + AzureVmWorkloadSQLDatabaseWorkloadItem, + AzureVmWorkloadSQLInstanceProtectableItem, + AzureVmWorkloadSQLInstanceWorkloadItem, + AzureWorkloadAutoProtectionIntent, + AzureWorkloadBackupRequest, + AzureWorkloadContainer, + AzureWorkloadContainerExtendedInfo, + AzureWorkloadErrorInfo, + AzureWorkloadJob, + AzureWorkloadJobExtendedInfo, + AzureWorkloadJobTaskDetails, + AzureWorkloadPointInTimeRecoveryPoint, + AzureWorkloadPointInTimeRestoreRequest, + AzureWorkloadRecoveryPoint, + AzureWorkloadRestoreRequest, + AzureWorkloadSAPHanaPointInTimeRecoveryPoint, + AzureWorkloadSAPHanaPointInTimeRestoreRequest, + AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, + AzureWorkloadSAPHanaRecoveryPoint, + AzureWorkloadSAPHanaRestoreRequest, + AzureWorkloadSAPHanaRestoreWithRehydrateRequest, + AzureWorkloadSQLAutoProtectionIntent, + AzureWorkloadSQLPointInTimeRecoveryPoint, + AzureWorkloadSQLPointInTimeRestoreRequest, + AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, + AzureWorkloadSQLRecoveryPoint, + AzureWorkloadSQLRecoveryPointExtendedInfo, + AzureWorkloadSQLRestoreRequest, + AzureWorkloadSQLRestoreWithRehydrateRequest, + BackupEngineBase, + BackupEngineBaseResource, + BackupEngineExtendedInfo, + BackupRequest, + BackupRequestResource, + BackupResourceConfig, + BackupResourceConfigResource, + BackupResourceEncryptionConfig, + BackupResourceEncryptionConfigResource, + BackupResourceVaultConfig, + BackupResourceVaultConfigResource, + BaseResource, + BEKDetails, + ContainerIdentityInfo, + CrossRegionRestoreRequest, + CrossRegionRestoreRequestResource, + CrrAccessToken, + CrrAccessTokenResource, + CrrJobRequest, + CrrJobRequestResource, + DailyRetentionFormat, + DailyRetentionSchedule, + Day, + DiskExclusionProperties, + DiskInformation, + DistributedNodesInfo, + DpmBackupEngine, + DpmContainer, + DPMContainerExtendedInfo, + DpmErrorInfo, + DpmJob, + DpmJobExtendedInfo, + DpmJobTaskDetails, + DPMProtectedItem, + DPMProtectedItemExtendedInfo, + EncryptionDetails, + ErrorAdditionalInfo, + ErrorDetail, + ExtendedProperties, + GenericContainer, + GenericContainerExtendedInfo, + GenericProtectedItem, + GenericProtectionPolicy, + GenericRecoveryPoint, + IaasVMBackupRequest, + IaaSVMContainer, + IaasVMILRRegistrationRequest, + IaaSVMProtectableItem, + IaasVMRecoveryPoint, + IaasVMRestoreRequest, + IaasVMRestoreWithRehydrationRequest, + ILRRequest, + ILRRequestResource, + InquiryInfo, + InquiryValidation, + InstantRPAdditionalDetails, + Job, + JobResource, + KEKDetails, + KeyAndSecretDetails, + KPIResourceHealthDetails, + LogSchedulePolicy, + LongTermRetentionPolicy, + LongTermSchedulePolicy, + MabContainer, + MabContainerExtendedInfo, + MABContainerHealthDetails, + MabErrorInfo, + MabFileFolderProtectedItem, + MabFileFolderProtectedItemExtendedInfo, + MabJob, + MabJobExtendedInfo, + MabJobTaskDetails, + MabProtectionPolicy, + MonthlyRetentionSchedule, + NewErrorResponse, + NewErrorResponseError, + PointInTimeRange, + PreBackupValidation, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionResource, + PrivateLinkServiceConnectionState, + ProtectableContainer, + ProtectableContainerResource, + ProtectedItem, + ProtectedItemResource, + ProtectionContainer, + ProtectionContainerResource, + ProtectionIntent, + ProtectionIntentResource, + ProtectionPolicy, + ProtectionPolicyResource, + RecoveryPoint, + RecoveryPointDiskConfiguration, + RecoveryPointMoveReadinessInfo, + RecoveryPointRehydrationInfo, + RecoveryPointResource, + RecoveryPointTierInformation, + Resource, + ResourceHealthDetails, + RestoreFileSpecs, + RestoreRequest, + RestoreRequestResource, + RetentionDuration, + RetentionPolicy, + SchedulePolicy, + Settings, + SimpleRetentionPolicy, + SimpleSchedulePolicy, + SQLDataDirectory, + SQLDataDirectoryMapping, + SubProtectionPolicy, + TargetAFSRestoreInfo, + TargetRestoreInfo, + VaultJob, + VaultJobErrorInfo, + VaultJobExtendedInfo, + WeeklyRetentionFormat, + WeeklyRetentionSchedule, + WorkloadCrrAccessToken, + WorkloadInquiryDetails, + WorkloadItem, + WorkloadItemResource, + WorkloadProtectableItem, + WorkloadProtectableItemResource, + YearlyRetentionSchedule +} from "../models/mappers"; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/bMSPrepareDataMoveOperationResultMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/bMSPrepareDataMoveOperationResultMappers.ts new file mode 100644 index 000000000000..2ac6dde24d4d --- /dev/null +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/bMSPrepareDataMoveOperationResultMappers.ts @@ -0,0 +1,16 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + ErrorAdditionalInfo, + NewErrorResponse, + NewErrorResponseError, + PrepareDataMoveResponse, + VaultStorageConfigOperationResultResponse +} from "../models/mappers"; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupCrrJobDetailsMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupCrrJobDetailsMappers.ts new file mode 100644 index 000000000000..f478e80e0f73 --- /dev/null +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupCrrJobDetailsMappers.ts @@ -0,0 +1,225 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AADProperties, + AADPropertiesResource, + AzureBackupServerContainer, + AzureBackupServerEngine, + AzureFileShareBackupRequest, + AzureFileShareProtectableItem, + AzureFileshareProtectedItem, + AzureFileshareProtectedItemExtendedInfo, + AzureFileShareProtectionPolicy, + AzureFileShareProvisionILRRequest, + AzureFileShareRecoveryPoint, + AzureFileShareRestoreRequest, + AzureIaaSClassicComputeVMContainer, + AzureIaaSClassicComputeVMProtectableItem, + AzureIaaSClassicComputeVMProtectedItem, + AzureIaaSComputeVMContainer, + AzureIaaSComputeVMProtectableItem, + AzureIaaSComputeVMProtectedItem, + AzureIaaSVMErrorInfo, + AzureIaaSVMHealthDetails, + AzureIaaSVMJob, + AzureIaaSVMJobExtendedInfo, + AzureIaaSVMJobTaskDetails, + AzureIaaSVMProtectedItem, + AzureIaaSVMProtectedItemExtendedInfo, + AzureIaaSVMProtectionPolicy, + AzureRecoveryServiceVaultProtectionIntent, + AzureResourceProtectionIntent, + AzureSQLAGWorkloadContainerProtectionContainer, + AzureSqlContainer, + AzureSqlProtectedItem, + AzureSqlProtectedItemExtendedInfo, + AzureSqlProtectionPolicy, + AzureStorageContainer, + AzureStorageErrorInfo, + AzureStorageJob, + AzureStorageJobExtendedInfo, + AzureStorageJobTaskDetails, + AzureStorageProtectableContainer, + AzureVMAppContainerProtectableContainer, + AzureVMAppContainerProtectionContainer, + AzureVmWorkloadItem, + AzureVmWorkloadProtectableItem, + AzureVmWorkloadProtectedItem, + AzureVmWorkloadProtectedItemExtendedInfo, + AzureVmWorkloadProtectionPolicy, + AzureVmWorkloadSAPAseDatabaseProtectedItem, + AzureVmWorkloadSAPAseDatabaseWorkloadItem, + AzureVmWorkloadSAPAseSystemProtectableItem, + AzureVmWorkloadSAPAseSystemWorkloadItem, + AzureVmWorkloadSAPHanaDatabaseProtectableItem, + AzureVmWorkloadSAPHanaDatabaseProtectedItem, + AzureVmWorkloadSAPHanaDatabaseWorkloadItem, + AzureVmWorkloadSAPHanaSystemProtectableItem, + AzureVmWorkloadSAPHanaSystemWorkloadItem, + AzureVmWorkloadSQLAvailabilityGroupProtectableItem, + AzureVmWorkloadSQLDatabaseProtectableItem, + AzureVmWorkloadSQLDatabaseProtectedItem, + AzureVmWorkloadSQLDatabaseWorkloadItem, + AzureVmWorkloadSQLInstanceProtectableItem, + AzureVmWorkloadSQLInstanceWorkloadItem, + AzureWorkloadAutoProtectionIntent, + AzureWorkloadBackupRequest, + AzureWorkloadContainer, + AzureWorkloadContainerExtendedInfo, + AzureWorkloadErrorInfo, + AzureWorkloadJob, + AzureWorkloadJobExtendedInfo, + AzureWorkloadJobTaskDetails, + AzureWorkloadPointInTimeRecoveryPoint, + AzureWorkloadPointInTimeRestoreRequest, + AzureWorkloadRecoveryPoint, + AzureWorkloadRestoreRequest, + AzureWorkloadSAPHanaPointInTimeRecoveryPoint, + AzureWorkloadSAPHanaPointInTimeRestoreRequest, + AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, + AzureWorkloadSAPHanaRecoveryPoint, + AzureWorkloadSAPHanaRestoreRequest, + AzureWorkloadSAPHanaRestoreWithRehydrateRequest, + AzureWorkloadSQLAutoProtectionIntent, + AzureWorkloadSQLPointInTimeRecoveryPoint, + AzureWorkloadSQLPointInTimeRestoreRequest, + AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, + AzureWorkloadSQLRecoveryPoint, + AzureWorkloadSQLRecoveryPointExtendedInfo, + AzureWorkloadSQLRestoreRequest, + AzureWorkloadSQLRestoreWithRehydrateRequest, + BackupEngineBase, + BackupEngineBaseResource, + BackupEngineExtendedInfo, + BackupRequest, + BackupRequestResource, + BackupResourceConfig, + BackupResourceConfigResource, + BackupResourceEncryptionConfig, + BackupResourceEncryptionConfigResource, + BackupResourceVaultConfig, + BackupResourceVaultConfigResource, + BaseResource, + BEKDetails, + ContainerIdentityInfo, + CrossRegionRestoreRequest, + CrossRegionRestoreRequestResource, + CrrAccessToken, + CrrAccessTokenResource, + CrrJobRequest, + CrrJobRequestResource, + DailyRetentionFormat, + DailyRetentionSchedule, + Day, + DiskExclusionProperties, + DiskInformation, + DistributedNodesInfo, + DpmBackupEngine, + DpmContainer, + DPMContainerExtendedInfo, + DpmErrorInfo, + DpmJob, + DpmJobExtendedInfo, + DpmJobTaskDetails, + DPMProtectedItem, + DPMProtectedItemExtendedInfo, + EncryptionDetails, + ErrorAdditionalInfo, + ErrorDetail, + ExtendedProperties, + GenericContainer, + GenericContainerExtendedInfo, + GenericProtectedItem, + GenericProtectionPolicy, + GenericRecoveryPoint, + IaasVMBackupRequest, + IaaSVMContainer, + IaasVMILRRegistrationRequest, + IaaSVMProtectableItem, + IaasVMRecoveryPoint, + IaasVMRestoreRequest, + IaasVMRestoreWithRehydrationRequest, + ILRRequest, + ILRRequestResource, + InquiryInfo, + InquiryValidation, + InstantRPAdditionalDetails, + Job, + JobResource, + KEKDetails, + KeyAndSecretDetails, + KPIResourceHealthDetails, + LogSchedulePolicy, + LongTermRetentionPolicy, + LongTermSchedulePolicy, + MabContainer, + MabContainerExtendedInfo, + MABContainerHealthDetails, + MabErrorInfo, + MabFileFolderProtectedItem, + MabFileFolderProtectedItemExtendedInfo, + MabJob, + MabJobExtendedInfo, + MabJobTaskDetails, + MabProtectionPolicy, + MonthlyRetentionSchedule, + NewErrorResponse, + NewErrorResponseError, + PointInTimeRange, + PreBackupValidation, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionResource, + PrivateLinkServiceConnectionState, + ProtectableContainer, + ProtectableContainerResource, + ProtectedItem, + ProtectedItemResource, + ProtectionContainer, + ProtectionContainerResource, + ProtectionIntent, + ProtectionIntentResource, + ProtectionPolicy, + ProtectionPolicyResource, + RecoveryPoint, + RecoveryPointDiskConfiguration, + RecoveryPointMoveReadinessInfo, + RecoveryPointRehydrationInfo, + RecoveryPointResource, + RecoveryPointTierInformation, + Resource, + ResourceHealthDetails, + RestoreFileSpecs, + RestoreRequest, + RestoreRequestResource, + RetentionDuration, + RetentionPolicy, + SchedulePolicy, + Settings, + SimpleRetentionPolicy, + SimpleSchedulePolicy, + SQLDataDirectory, + SQLDataDirectoryMapping, + SubProtectionPolicy, + TargetAFSRestoreInfo, + TargetRestoreInfo, + VaultJob, + VaultJobErrorInfo, + VaultJobExtendedInfo, + WeeklyRetentionFormat, + WeeklyRetentionSchedule, + WorkloadCrrAccessToken, + WorkloadInquiryDetails, + WorkloadItem, + WorkloadItemResource, + WorkloadProtectableItem, + WorkloadProtectableItemResource, + YearlyRetentionSchedule +} from "../models/mappers"; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupCrrJobsMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupCrrJobsMappers.ts new file mode 100644 index 000000000000..2a64622f2f0e --- /dev/null +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupCrrJobsMappers.ts @@ -0,0 +1,236 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AADProperties, + AADPropertiesResource, + AzureBackupServerContainer, + AzureBackupServerEngine, + AzureFileShareBackupRequest, + AzureFileShareProtectableItem, + AzureFileshareProtectedItem, + AzureFileshareProtectedItemExtendedInfo, + AzureFileShareProtectionPolicy, + AzureFileShareProvisionILRRequest, + AzureFileShareRecoveryPoint, + AzureFileShareRestoreRequest, + AzureIaaSClassicComputeVMContainer, + AzureIaaSClassicComputeVMProtectableItem, + AzureIaaSClassicComputeVMProtectedItem, + AzureIaaSComputeVMContainer, + AzureIaaSComputeVMProtectableItem, + AzureIaaSComputeVMProtectedItem, + AzureIaaSVMErrorInfo, + AzureIaaSVMHealthDetails, + AzureIaaSVMJob, + AzureIaaSVMJobExtendedInfo, + AzureIaaSVMJobTaskDetails, + AzureIaaSVMProtectedItem, + AzureIaaSVMProtectedItemExtendedInfo, + AzureIaaSVMProtectionPolicy, + AzureRecoveryServiceVaultProtectionIntent, + AzureResourceProtectionIntent, + AzureSQLAGWorkloadContainerProtectionContainer, + AzureSqlContainer, + AzureSqlProtectedItem, + AzureSqlProtectedItemExtendedInfo, + AzureSqlProtectionPolicy, + AzureStorageContainer, + AzureStorageErrorInfo, + AzureStorageJob, + AzureStorageJobExtendedInfo, + AzureStorageJobTaskDetails, + AzureStorageProtectableContainer, + AzureVMAppContainerProtectableContainer, + AzureVMAppContainerProtectionContainer, + AzureVmWorkloadItem, + AzureVmWorkloadProtectableItem, + AzureVmWorkloadProtectedItem, + AzureVmWorkloadProtectedItemExtendedInfo, + AzureVmWorkloadProtectionPolicy, + AzureVmWorkloadSAPAseDatabaseProtectedItem, + AzureVmWorkloadSAPAseDatabaseWorkloadItem, + AzureVmWorkloadSAPAseSystemProtectableItem, + AzureVmWorkloadSAPAseSystemWorkloadItem, + AzureVmWorkloadSAPHanaDatabaseProtectableItem, + AzureVmWorkloadSAPHanaDatabaseProtectedItem, + AzureVmWorkloadSAPHanaDatabaseWorkloadItem, + AzureVmWorkloadSAPHanaSystemProtectableItem, + AzureVmWorkloadSAPHanaSystemWorkloadItem, + AzureVmWorkloadSQLAvailabilityGroupProtectableItem, + AzureVmWorkloadSQLDatabaseProtectableItem, + AzureVmWorkloadSQLDatabaseProtectedItem, + AzureVmWorkloadSQLDatabaseWorkloadItem, + AzureVmWorkloadSQLInstanceProtectableItem, + AzureVmWorkloadSQLInstanceWorkloadItem, + AzureWorkloadAutoProtectionIntent, + AzureWorkloadBackupRequest, + AzureWorkloadContainer, + AzureWorkloadContainerExtendedInfo, + AzureWorkloadErrorInfo, + AzureWorkloadJob, + AzureWorkloadJobExtendedInfo, + AzureWorkloadJobTaskDetails, + AzureWorkloadPointInTimeRecoveryPoint, + AzureWorkloadPointInTimeRestoreRequest, + AzureWorkloadRecoveryPoint, + AzureWorkloadRestoreRequest, + AzureWorkloadSAPHanaPointInTimeRecoveryPoint, + AzureWorkloadSAPHanaPointInTimeRestoreRequest, + AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, + AzureWorkloadSAPHanaRecoveryPoint, + AzureWorkloadSAPHanaRestoreRequest, + AzureWorkloadSAPHanaRestoreWithRehydrateRequest, + AzureWorkloadSQLAutoProtectionIntent, + AzureWorkloadSQLPointInTimeRecoveryPoint, + AzureWorkloadSQLPointInTimeRestoreRequest, + AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, + AzureWorkloadSQLRecoveryPoint, + AzureWorkloadSQLRecoveryPointExtendedInfo, + AzureWorkloadSQLRestoreRequest, + AzureWorkloadSQLRestoreWithRehydrateRequest, + BackupEngineBase, + BackupEngineBaseResource, + BackupEngineBaseResourceList, + BackupEngineExtendedInfo, + BackupRequest, + BackupRequestResource, + BackupResourceConfig, + BackupResourceConfigResource, + BackupResourceEncryptionConfig, + BackupResourceEncryptionConfigResource, + BackupResourceVaultConfig, + BackupResourceVaultConfigResource, + BaseResource, + BEKDetails, + ContainerIdentityInfo, + CrossRegionRestoreRequest, + CrossRegionRestoreRequestResource, + CrrAccessToken, + CrrAccessTokenResource, + CrrJobRequest, + CrrJobRequestResource, + DailyRetentionFormat, + DailyRetentionSchedule, + Day, + DiskExclusionProperties, + DiskInformation, + DistributedNodesInfo, + DpmBackupEngine, + DpmContainer, + DPMContainerExtendedInfo, + DpmErrorInfo, + DpmJob, + DpmJobExtendedInfo, + DpmJobTaskDetails, + DPMProtectedItem, + DPMProtectedItemExtendedInfo, + EncryptionDetails, + ErrorAdditionalInfo, + ErrorDetail, + ExtendedProperties, + GenericContainer, + GenericContainerExtendedInfo, + GenericProtectedItem, + GenericProtectionPolicy, + GenericRecoveryPoint, + IaasVMBackupRequest, + IaaSVMContainer, + IaasVMILRRegistrationRequest, + IaaSVMProtectableItem, + IaasVMRecoveryPoint, + IaasVMRestoreRequest, + IaasVMRestoreWithRehydrationRequest, + ILRRequest, + ILRRequestResource, + InquiryInfo, + InquiryValidation, + InstantRPAdditionalDetails, + Job, + JobResource, + JobResourceList, + KEKDetails, + KeyAndSecretDetails, + KPIResourceHealthDetails, + LogSchedulePolicy, + LongTermRetentionPolicy, + LongTermSchedulePolicy, + MabContainer, + MabContainerExtendedInfo, + MABContainerHealthDetails, + MabErrorInfo, + MabFileFolderProtectedItem, + MabFileFolderProtectedItemExtendedInfo, + MabJob, + MabJobExtendedInfo, + MabJobTaskDetails, + MabProtectionPolicy, + MonthlyRetentionSchedule, + NewErrorResponse, + NewErrorResponseError, + PointInTimeRange, + PreBackupValidation, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionResource, + PrivateLinkServiceConnectionState, + ProtectableContainer, + ProtectableContainerResource, + ProtectableContainerResourceList, + ProtectedItem, + ProtectedItemResource, + ProtectedItemResourceList, + ProtectionContainer, + ProtectionContainerResource, + ProtectionContainerResourceList, + ProtectionIntent, + ProtectionIntentResource, + ProtectionIntentResourceList, + ProtectionPolicy, + ProtectionPolicyResource, + ProtectionPolicyResourceList, + RecoveryPoint, + RecoveryPointDiskConfiguration, + RecoveryPointMoveReadinessInfo, + RecoveryPointRehydrationInfo, + RecoveryPointResource, + RecoveryPointResourceList, + RecoveryPointTierInformation, + Resource, + ResourceHealthDetails, + ResourceList, + RestoreFileSpecs, + RestoreRequest, + RestoreRequestResource, + RetentionDuration, + RetentionPolicy, + SchedulePolicy, + Settings, + SimpleRetentionPolicy, + SimpleSchedulePolicy, + SQLDataDirectory, + SQLDataDirectoryMapping, + SubProtectionPolicy, + TargetAFSRestoreInfo, + TargetRestoreInfo, + VaultJob, + VaultJobErrorInfo, + VaultJobExtendedInfo, + WeeklyRetentionFormat, + WeeklyRetentionSchedule, + WorkloadCrrAccessToken, + WorkloadInquiryDetails, + WorkloadItem, + WorkloadItemResource, + WorkloadItemResourceList, + WorkloadProtectableItem, + WorkloadProtectableItemResource, + WorkloadProtectableItemResourceList, + YearlyRetentionSchedule +} from "../models/mappers"; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupEnginesMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupEnginesMappers.ts index 0923aafa73b5..2b141b46a66e 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupEnginesMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupEnginesMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,6 +8,8 @@ export { discriminators, + AADProperties, + AADPropertiesResource, AzureBackupServerContainer, AzureBackupServerEngine, AzureFileShareBackupRequest, @@ -81,14 +83,18 @@ export { AzureWorkloadRestoreRequest, AzureWorkloadSAPHanaPointInTimeRecoveryPoint, AzureWorkloadSAPHanaPointInTimeRestoreRequest, + AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, AzureWorkloadSAPHanaRecoveryPoint, AzureWorkloadSAPHanaRestoreRequest, + AzureWorkloadSAPHanaRestoreWithRehydrateRequest, AzureWorkloadSQLAutoProtectionIntent, AzureWorkloadSQLPointInTimeRecoveryPoint, AzureWorkloadSQLPointInTimeRestoreRequest, + AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, AzureWorkloadSQLRecoveryPoint, AzureWorkloadSQLRecoveryPointExtendedInfo, AzureWorkloadSQLRestoreRequest, + AzureWorkloadSQLRestoreWithRehydrateRequest, BackupEngineBase, BackupEngineBaseResource, BackupEngineBaseResourceList, @@ -97,12 +103,20 @@ export { BackupRequestResource, BackupResourceConfig, BackupResourceConfigResource, + BackupResourceEncryptionConfig, + BackupResourceEncryptionConfigResource, BackupResourceVaultConfig, BackupResourceVaultConfigResource, BaseResource, BEKDetails, CloudError, ContainerIdentityInfo, + CrossRegionRestoreRequest, + CrossRegionRestoreRequestResource, + CrrAccessToken, + CrrAccessTokenResource, + CrrJobRequest, + CrrJobRequestResource, DailyRetentionFormat, DailyRetentionSchedule, Day, @@ -126,13 +140,13 @@ export { GenericProtectedItem, GenericProtectionPolicy, GenericRecoveryPoint, - HealthDetails, IaasVMBackupRequest, IaaSVMContainer, IaasVMILRRegistrationRequest, IaaSVMProtectableItem, IaasVMRecoveryPoint, IaasVMRestoreRequest, + IaasVMRestoreWithRehydrationRequest, ILRRequest, ILRRequestResource, InquiryInfo, @@ -143,6 +157,7 @@ export { JobResourceList, KEKDetails, KeyAndSecretDetails, + KPIResourceHealthDetails, LogSchedulePolicy, LongTermRetentionPolicy, LongTermSchedulePolicy, @@ -180,10 +195,13 @@ export { ProtectionPolicyResourceList, RecoveryPoint, RecoveryPointDiskConfiguration, + RecoveryPointMoveReadinessInfo, + RecoveryPointRehydrationInfo, RecoveryPointResource, RecoveryPointResourceList, RecoveryPointTierInformation, Resource, + ResourceHealthDetails, ResourceList, RestoreFileSpecs, RestoreRequest, @@ -199,8 +217,12 @@ export { SubProtectionPolicy, TargetAFSRestoreInfo, TargetRestoreInfo, + VaultJob, + VaultJobErrorInfo, + VaultJobExtendedInfo, WeeklyRetentionFormat, WeeklyRetentionSchedule, + WorkloadCrrAccessToken, WorkloadInquiryDetails, WorkloadItem, WorkloadItemResource, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupJobsMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupJobsMappers.ts index 0923aafa73b5..2b141b46a66e 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupJobsMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupJobsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,6 +8,8 @@ export { discriminators, + AADProperties, + AADPropertiesResource, AzureBackupServerContainer, AzureBackupServerEngine, AzureFileShareBackupRequest, @@ -81,14 +83,18 @@ export { AzureWorkloadRestoreRequest, AzureWorkloadSAPHanaPointInTimeRecoveryPoint, AzureWorkloadSAPHanaPointInTimeRestoreRequest, + AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, AzureWorkloadSAPHanaRecoveryPoint, AzureWorkloadSAPHanaRestoreRequest, + AzureWorkloadSAPHanaRestoreWithRehydrateRequest, AzureWorkloadSQLAutoProtectionIntent, AzureWorkloadSQLPointInTimeRecoveryPoint, AzureWorkloadSQLPointInTimeRestoreRequest, + AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, AzureWorkloadSQLRecoveryPoint, AzureWorkloadSQLRecoveryPointExtendedInfo, AzureWorkloadSQLRestoreRequest, + AzureWorkloadSQLRestoreWithRehydrateRequest, BackupEngineBase, BackupEngineBaseResource, BackupEngineBaseResourceList, @@ -97,12 +103,20 @@ export { BackupRequestResource, BackupResourceConfig, BackupResourceConfigResource, + BackupResourceEncryptionConfig, + BackupResourceEncryptionConfigResource, BackupResourceVaultConfig, BackupResourceVaultConfigResource, BaseResource, BEKDetails, CloudError, ContainerIdentityInfo, + CrossRegionRestoreRequest, + CrossRegionRestoreRequestResource, + CrrAccessToken, + CrrAccessTokenResource, + CrrJobRequest, + CrrJobRequestResource, DailyRetentionFormat, DailyRetentionSchedule, Day, @@ -126,13 +140,13 @@ export { GenericProtectedItem, GenericProtectionPolicy, GenericRecoveryPoint, - HealthDetails, IaasVMBackupRequest, IaaSVMContainer, IaasVMILRRegistrationRequest, IaaSVMProtectableItem, IaasVMRecoveryPoint, IaasVMRestoreRequest, + IaasVMRestoreWithRehydrationRequest, ILRRequest, ILRRequestResource, InquiryInfo, @@ -143,6 +157,7 @@ export { JobResourceList, KEKDetails, KeyAndSecretDetails, + KPIResourceHealthDetails, LogSchedulePolicy, LongTermRetentionPolicy, LongTermSchedulePolicy, @@ -180,10 +195,13 @@ export { ProtectionPolicyResourceList, RecoveryPoint, RecoveryPointDiskConfiguration, + RecoveryPointMoveReadinessInfo, + RecoveryPointRehydrationInfo, RecoveryPointResource, RecoveryPointResourceList, RecoveryPointTierInformation, Resource, + ResourceHealthDetails, ResourceList, RestoreFileSpecs, RestoreRequest, @@ -199,8 +217,12 @@ export { SubProtectionPolicy, TargetAFSRestoreInfo, TargetRestoreInfo, + VaultJob, + VaultJobErrorInfo, + VaultJobExtendedInfo, WeeklyRetentionFormat, WeeklyRetentionSchedule, + WorkloadCrrAccessToken, WorkloadInquiryDetails, WorkloadItem, WorkloadItemResource, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupOperationResultsMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupOperationResultsMappers.ts index 64b4448237fa..841f64f3c0bd 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupOperationResultsMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupOperationResultsMappers.ts @@ -1,12 +1,9 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export { - discriminators, - CloudError -} from "../models/mappers"; +export { discriminators, CloudError } from "../models/mappers"; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupOperationStatusesMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupOperationStatusesMappers.ts index e2b2befc32de..08be818858ae 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupOperationStatusesMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupOperationStatusesMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,13 +8,34 @@ export { discriminators, + AzureFileShareRecoveryPoint, + AzureWorkloadPointInTimeRecoveryPoint, + AzureWorkloadRecoveryPoint, + AzureWorkloadSAPHanaPointInTimeRecoveryPoint, + AzureWorkloadSAPHanaRecoveryPoint, + AzureWorkloadSQLPointInTimeRecoveryPoint, + AzureWorkloadSQLRecoveryPoint, + AzureWorkloadSQLRecoveryPointExtendedInfo, + BEKDetails, ClientScriptForConnect, CloudError, + DiskInformation, + GenericRecoveryPoint, + IaasVMRecoveryPoint, InstantItemRecoveryTarget, + KEKDetails, + KeyAndSecretDetails, OperationStatus, OperationStatusError, OperationStatusExtendedInfo, OperationStatusJobExtendedInfo, OperationStatusJobsExtendedInfo, - OperationStatusProvisionILRExtendedInfo + OperationStatusProvisionILRExtendedInfo, + OperationStatusRecoveryPointExtendedInfo, + PointInTimeRange, + RecoveryPoint, + RecoveryPointDiskConfiguration, + RecoveryPointMoveReadinessInfo, + RecoveryPointTierInformation, + SQLDataDirectory } from "../models/mappers"; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupPoliciesMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupPoliciesMappers.ts index 0923aafa73b5..2b141b46a66e 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupPoliciesMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupPoliciesMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,6 +8,8 @@ export { discriminators, + AADProperties, + AADPropertiesResource, AzureBackupServerContainer, AzureBackupServerEngine, AzureFileShareBackupRequest, @@ -81,14 +83,18 @@ export { AzureWorkloadRestoreRequest, AzureWorkloadSAPHanaPointInTimeRecoveryPoint, AzureWorkloadSAPHanaPointInTimeRestoreRequest, + AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, AzureWorkloadSAPHanaRecoveryPoint, AzureWorkloadSAPHanaRestoreRequest, + AzureWorkloadSAPHanaRestoreWithRehydrateRequest, AzureWorkloadSQLAutoProtectionIntent, AzureWorkloadSQLPointInTimeRecoveryPoint, AzureWorkloadSQLPointInTimeRestoreRequest, + AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, AzureWorkloadSQLRecoveryPoint, AzureWorkloadSQLRecoveryPointExtendedInfo, AzureWorkloadSQLRestoreRequest, + AzureWorkloadSQLRestoreWithRehydrateRequest, BackupEngineBase, BackupEngineBaseResource, BackupEngineBaseResourceList, @@ -97,12 +103,20 @@ export { BackupRequestResource, BackupResourceConfig, BackupResourceConfigResource, + BackupResourceEncryptionConfig, + BackupResourceEncryptionConfigResource, BackupResourceVaultConfig, BackupResourceVaultConfigResource, BaseResource, BEKDetails, CloudError, ContainerIdentityInfo, + CrossRegionRestoreRequest, + CrossRegionRestoreRequestResource, + CrrAccessToken, + CrrAccessTokenResource, + CrrJobRequest, + CrrJobRequestResource, DailyRetentionFormat, DailyRetentionSchedule, Day, @@ -126,13 +140,13 @@ export { GenericProtectedItem, GenericProtectionPolicy, GenericRecoveryPoint, - HealthDetails, IaasVMBackupRequest, IaaSVMContainer, IaasVMILRRegistrationRequest, IaaSVMProtectableItem, IaasVMRecoveryPoint, IaasVMRestoreRequest, + IaasVMRestoreWithRehydrationRequest, ILRRequest, ILRRequestResource, InquiryInfo, @@ -143,6 +157,7 @@ export { JobResourceList, KEKDetails, KeyAndSecretDetails, + KPIResourceHealthDetails, LogSchedulePolicy, LongTermRetentionPolicy, LongTermSchedulePolicy, @@ -180,10 +195,13 @@ export { ProtectionPolicyResourceList, RecoveryPoint, RecoveryPointDiskConfiguration, + RecoveryPointMoveReadinessInfo, + RecoveryPointRehydrationInfo, RecoveryPointResource, RecoveryPointResourceList, RecoveryPointTierInformation, Resource, + ResourceHealthDetails, ResourceList, RestoreFileSpecs, RestoreRequest, @@ -199,8 +217,12 @@ export { SubProtectionPolicy, TargetAFSRestoreInfo, TargetRestoreInfo, + VaultJob, + VaultJobErrorInfo, + VaultJobExtendedInfo, WeeklyRetentionFormat, WeeklyRetentionSchedule, + WorkloadCrrAccessToken, WorkloadInquiryDetails, WorkloadItem, WorkloadItemResource, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectableItemsMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectableItemsMappers.ts index 0923aafa73b5..2b141b46a66e 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectableItemsMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectableItemsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,6 +8,8 @@ export { discriminators, + AADProperties, + AADPropertiesResource, AzureBackupServerContainer, AzureBackupServerEngine, AzureFileShareBackupRequest, @@ -81,14 +83,18 @@ export { AzureWorkloadRestoreRequest, AzureWorkloadSAPHanaPointInTimeRecoveryPoint, AzureWorkloadSAPHanaPointInTimeRestoreRequest, + AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, AzureWorkloadSAPHanaRecoveryPoint, AzureWorkloadSAPHanaRestoreRequest, + AzureWorkloadSAPHanaRestoreWithRehydrateRequest, AzureWorkloadSQLAutoProtectionIntent, AzureWorkloadSQLPointInTimeRecoveryPoint, AzureWorkloadSQLPointInTimeRestoreRequest, + AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, AzureWorkloadSQLRecoveryPoint, AzureWorkloadSQLRecoveryPointExtendedInfo, AzureWorkloadSQLRestoreRequest, + AzureWorkloadSQLRestoreWithRehydrateRequest, BackupEngineBase, BackupEngineBaseResource, BackupEngineBaseResourceList, @@ -97,12 +103,20 @@ export { BackupRequestResource, BackupResourceConfig, BackupResourceConfigResource, + BackupResourceEncryptionConfig, + BackupResourceEncryptionConfigResource, BackupResourceVaultConfig, BackupResourceVaultConfigResource, BaseResource, BEKDetails, CloudError, ContainerIdentityInfo, + CrossRegionRestoreRequest, + CrossRegionRestoreRequestResource, + CrrAccessToken, + CrrAccessTokenResource, + CrrJobRequest, + CrrJobRequestResource, DailyRetentionFormat, DailyRetentionSchedule, Day, @@ -126,13 +140,13 @@ export { GenericProtectedItem, GenericProtectionPolicy, GenericRecoveryPoint, - HealthDetails, IaasVMBackupRequest, IaaSVMContainer, IaasVMILRRegistrationRequest, IaaSVMProtectableItem, IaasVMRecoveryPoint, IaasVMRestoreRequest, + IaasVMRestoreWithRehydrationRequest, ILRRequest, ILRRequestResource, InquiryInfo, @@ -143,6 +157,7 @@ export { JobResourceList, KEKDetails, KeyAndSecretDetails, + KPIResourceHealthDetails, LogSchedulePolicy, LongTermRetentionPolicy, LongTermSchedulePolicy, @@ -180,10 +195,13 @@ export { ProtectionPolicyResourceList, RecoveryPoint, RecoveryPointDiskConfiguration, + RecoveryPointMoveReadinessInfo, + RecoveryPointRehydrationInfo, RecoveryPointResource, RecoveryPointResourceList, RecoveryPointTierInformation, Resource, + ResourceHealthDetails, ResourceList, RestoreFileSpecs, RestoreRequest, @@ -199,8 +217,12 @@ export { SubProtectionPolicy, TargetAFSRestoreInfo, TargetRestoreInfo, + VaultJob, + VaultJobErrorInfo, + VaultJobExtendedInfo, WeeklyRetentionFormat, WeeklyRetentionSchedule, + WorkloadCrrAccessToken, WorkloadInquiryDetails, WorkloadItem, WorkloadItemResource, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectedItemsCrrMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectedItemsCrrMappers.ts new file mode 100644 index 000000000000..2a64622f2f0e --- /dev/null +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectedItemsCrrMappers.ts @@ -0,0 +1,236 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AADProperties, + AADPropertiesResource, + AzureBackupServerContainer, + AzureBackupServerEngine, + AzureFileShareBackupRequest, + AzureFileShareProtectableItem, + AzureFileshareProtectedItem, + AzureFileshareProtectedItemExtendedInfo, + AzureFileShareProtectionPolicy, + AzureFileShareProvisionILRRequest, + AzureFileShareRecoveryPoint, + AzureFileShareRestoreRequest, + AzureIaaSClassicComputeVMContainer, + AzureIaaSClassicComputeVMProtectableItem, + AzureIaaSClassicComputeVMProtectedItem, + AzureIaaSComputeVMContainer, + AzureIaaSComputeVMProtectableItem, + AzureIaaSComputeVMProtectedItem, + AzureIaaSVMErrorInfo, + AzureIaaSVMHealthDetails, + AzureIaaSVMJob, + AzureIaaSVMJobExtendedInfo, + AzureIaaSVMJobTaskDetails, + AzureIaaSVMProtectedItem, + AzureIaaSVMProtectedItemExtendedInfo, + AzureIaaSVMProtectionPolicy, + AzureRecoveryServiceVaultProtectionIntent, + AzureResourceProtectionIntent, + AzureSQLAGWorkloadContainerProtectionContainer, + AzureSqlContainer, + AzureSqlProtectedItem, + AzureSqlProtectedItemExtendedInfo, + AzureSqlProtectionPolicy, + AzureStorageContainer, + AzureStorageErrorInfo, + AzureStorageJob, + AzureStorageJobExtendedInfo, + AzureStorageJobTaskDetails, + AzureStorageProtectableContainer, + AzureVMAppContainerProtectableContainer, + AzureVMAppContainerProtectionContainer, + AzureVmWorkloadItem, + AzureVmWorkloadProtectableItem, + AzureVmWorkloadProtectedItem, + AzureVmWorkloadProtectedItemExtendedInfo, + AzureVmWorkloadProtectionPolicy, + AzureVmWorkloadSAPAseDatabaseProtectedItem, + AzureVmWorkloadSAPAseDatabaseWorkloadItem, + AzureVmWorkloadSAPAseSystemProtectableItem, + AzureVmWorkloadSAPAseSystemWorkloadItem, + AzureVmWorkloadSAPHanaDatabaseProtectableItem, + AzureVmWorkloadSAPHanaDatabaseProtectedItem, + AzureVmWorkloadSAPHanaDatabaseWorkloadItem, + AzureVmWorkloadSAPHanaSystemProtectableItem, + AzureVmWorkloadSAPHanaSystemWorkloadItem, + AzureVmWorkloadSQLAvailabilityGroupProtectableItem, + AzureVmWorkloadSQLDatabaseProtectableItem, + AzureVmWorkloadSQLDatabaseProtectedItem, + AzureVmWorkloadSQLDatabaseWorkloadItem, + AzureVmWorkloadSQLInstanceProtectableItem, + AzureVmWorkloadSQLInstanceWorkloadItem, + AzureWorkloadAutoProtectionIntent, + AzureWorkloadBackupRequest, + AzureWorkloadContainer, + AzureWorkloadContainerExtendedInfo, + AzureWorkloadErrorInfo, + AzureWorkloadJob, + AzureWorkloadJobExtendedInfo, + AzureWorkloadJobTaskDetails, + AzureWorkloadPointInTimeRecoveryPoint, + AzureWorkloadPointInTimeRestoreRequest, + AzureWorkloadRecoveryPoint, + AzureWorkloadRestoreRequest, + AzureWorkloadSAPHanaPointInTimeRecoveryPoint, + AzureWorkloadSAPHanaPointInTimeRestoreRequest, + AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, + AzureWorkloadSAPHanaRecoveryPoint, + AzureWorkloadSAPHanaRestoreRequest, + AzureWorkloadSAPHanaRestoreWithRehydrateRequest, + AzureWorkloadSQLAutoProtectionIntent, + AzureWorkloadSQLPointInTimeRecoveryPoint, + AzureWorkloadSQLPointInTimeRestoreRequest, + AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, + AzureWorkloadSQLRecoveryPoint, + AzureWorkloadSQLRecoveryPointExtendedInfo, + AzureWorkloadSQLRestoreRequest, + AzureWorkloadSQLRestoreWithRehydrateRequest, + BackupEngineBase, + BackupEngineBaseResource, + BackupEngineBaseResourceList, + BackupEngineExtendedInfo, + BackupRequest, + BackupRequestResource, + BackupResourceConfig, + BackupResourceConfigResource, + BackupResourceEncryptionConfig, + BackupResourceEncryptionConfigResource, + BackupResourceVaultConfig, + BackupResourceVaultConfigResource, + BaseResource, + BEKDetails, + ContainerIdentityInfo, + CrossRegionRestoreRequest, + CrossRegionRestoreRequestResource, + CrrAccessToken, + CrrAccessTokenResource, + CrrJobRequest, + CrrJobRequestResource, + DailyRetentionFormat, + DailyRetentionSchedule, + Day, + DiskExclusionProperties, + DiskInformation, + DistributedNodesInfo, + DpmBackupEngine, + DpmContainer, + DPMContainerExtendedInfo, + DpmErrorInfo, + DpmJob, + DpmJobExtendedInfo, + DpmJobTaskDetails, + DPMProtectedItem, + DPMProtectedItemExtendedInfo, + EncryptionDetails, + ErrorAdditionalInfo, + ErrorDetail, + ExtendedProperties, + GenericContainer, + GenericContainerExtendedInfo, + GenericProtectedItem, + GenericProtectionPolicy, + GenericRecoveryPoint, + IaasVMBackupRequest, + IaaSVMContainer, + IaasVMILRRegistrationRequest, + IaaSVMProtectableItem, + IaasVMRecoveryPoint, + IaasVMRestoreRequest, + IaasVMRestoreWithRehydrationRequest, + ILRRequest, + ILRRequestResource, + InquiryInfo, + InquiryValidation, + InstantRPAdditionalDetails, + Job, + JobResource, + JobResourceList, + KEKDetails, + KeyAndSecretDetails, + KPIResourceHealthDetails, + LogSchedulePolicy, + LongTermRetentionPolicy, + LongTermSchedulePolicy, + MabContainer, + MabContainerExtendedInfo, + MABContainerHealthDetails, + MabErrorInfo, + MabFileFolderProtectedItem, + MabFileFolderProtectedItemExtendedInfo, + MabJob, + MabJobExtendedInfo, + MabJobTaskDetails, + MabProtectionPolicy, + MonthlyRetentionSchedule, + NewErrorResponse, + NewErrorResponseError, + PointInTimeRange, + PreBackupValidation, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionResource, + PrivateLinkServiceConnectionState, + ProtectableContainer, + ProtectableContainerResource, + ProtectableContainerResourceList, + ProtectedItem, + ProtectedItemResource, + ProtectedItemResourceList, + ProtectionContainer, + ProtectionContainerResource, + ProtectionContainerResourceList, + ProtectionIntent, + ProtectionIntentResource, + ProtectionIntentResourceList, + ProtectionPolicy, + ProtectionPolicyResource, + ProtectionPolicyResourceList, + RecoveryPoint, + RecoveryPointDiskConfiguration, + RecoveryPointMoveReadinessInfo, + RecoveryPointRehydrationInfo, + RecoveryPointResource, + RecoveryPointResourceList, + RecoveryPointTierInformation, + Resource, + ResourceHealthDetails, + ResourceList, + RestoreFileSpecs, + RestoreRequest, + RestoreRequestResource, + RetentionDuration, + RetentionPolicy, + SchedulePolicy, + Settings, + SimpleRetentionPolicy, + SimpleSchedulePolicy, + SQLDataDirectory, + SQLDataDirectoryMapping, + SubProtectionPolicy, + TargetAFSRestoreInfo, + TargetRestoreInfo, + VaultJob, + VaultJobErrorInfo, + VaultJobExtendedInfo, + WeeklyRetentionFormat, + WeeklyRetentionSchedule, + WorkloadCrrAccessToken, + WorkloadInquiryDetails, + WorkloadItem, + WorkloadItemResource, + WorkloadItemResourceList, + WorkloadProtectableItem, + WorkloadProtectableItemResource, + WorkloadProtectableItemResourceList, + YearlyRetentionSchedule +} from "../models/mappers"; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectedItemsMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectedItemsMappers.ts index 0923aafa73b5..2b141b46a66e 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectedItemsMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectedItemsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,6 +8,8 @@ export { discriminators, + AADProperties, + AADPropertiesResource, AzureBackupServerContainer, AzureBackupServerEngine, AzureFileShareBackupRequest, @@ -81,14 +83,18 @@ export { AzureWorkloadRestoreRequest, AzureWorkloadSAPHanaPointInTimeRecoveryPoint, AzureWorkloadSAPHanaPointInTimeRestoreRequest, + AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, AzureWorkloadSAPHanaRecoveryPoint, AzureWorkloadSAPHanaRestoreRequest, + AzureWorkloadSAPHanaRestoreWithRehydrateRequest, AzureWorkloadSQLAutoProtectionIntent, AzureWorkloadSQLPointInTimeRecoveryPoint, AzureWorkloadSQLPointInTimeRestoreRequest, + AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, AzureWorkloadSQLRecoveryPoint, AzureWorkloadSQLRecoveryPointExtendedInfo, AzureWorkloadSQLRestoreRequest, + AzureWorkloadSQLRestoreWithRehydrateRequest, BackupEngineBase, BackupEngineBaseResource, BackupEngineBaseResourceList, @@ -97,12 +103,20 @@ export { BackupRequestResource, BackupResourceConfig, BackupResourceConfigResource, + BackupResourceEncryptionConfig, + BackupResourceEncryptionConfigResource, BackupResourceVaultConfig, BackupResourceVaultConfigResource, BaseResource, BEKDetails, CloudError, ContainerIdentityInfo, + CrossRegionRestoreRequest, + CrossRegionRestoreRequestResource, + CrrAccessToken, + CrrAccessTokenResource, + CrrJobRequest, + CrrJobRequestResource, DailyRetentionFormat, DailyRetentionSchedule, Day, @@ -126,13 +140,13 @@ export { GenericProtectedItem, GenericProtectionPolicy, GenericRecoveryPoint, - HealthDetails, IaasVMBackupRequest, IaaSVMContainer, IaasVMILRRegistrationRequest, IaaSVMProtectableItem, IaasVMRecoveryPoint, IaasVMRestoreRequest, + IaasVMRestoreWithRehydrationRequest, ILRRequest, ILRRequestResource, InquiryInfo, @@ -143,6 +157,7 @@ export { JobResourceList, KEKDetails, KeyAndSecretDetails, + KPIResourceHealthDetails, LogSchedulePolicy, LongTermRetentionPolicy, LongTermSchedulePolicy, @@ -180,10 +195,13 @@ export { ProtectionPolicyResourceList, RecoveryPoint, RecoveryPointDiskConfiguration, + RecoveryPointMoveReadinessInfo, + RecoveryPointRehydrationInfo, RecoveryPointResource, RecoveryPointResourceList, RecoveryPointTierInformation, Resource, + ResourceHealthDetails, ResourceList, RestoreFileSpecs, RestoreRequest, @@ -199,8 +217,12 @@ export { SubProtectionPolicy, TargetAFSRestoreInfo, TargetRestoreInfo, + VaultJob, + VaultJobErrorInfo, + VaultJobExtendedInfo, WeeklyRetentionFormat, WeeklyRetentionSchedule, + WorkloadCrrAccessToken, WorkloadInquiryDetails, WorkloadItem, WorkloadItemResource, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectionContainersMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectionContainersMappers.ts index 0923aafa73b5..2b141b46a66e 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectionContainersMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectionContainersMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,6 +8,8 @@ export { discriminators, + AADProperties, + AADPropertiesResource, AzureBackupServerContainer, AzureBackupServerEngine, AzureFileShareBackupRequest, @@ -81,14 +83,18 @@ export { AzureWorkloadRestoreRequest, AzureWorkloadSAPHanaPointInTimeRecoveryPoint, AzureWorkloadSAPHanaPointInTimeRestoreRequest, + AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, AzureWorkloadSAPHanaRecoveryPoint, AzureWorkloadSAPHanaRestoreRequest, + AzureWorkloadSAPHanaRestoreWithRehydrateRequest, AzureWorkloadSQLAutoProtectionIntent, AzureWorkloadSQLPointInTimeRecoveryPoint, AzureWorkloadSQLPointInTimeRestoreRequest, + AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, AzureWorkloadSQLRecoveryPoint, AzureWorkloadSQLRecoveryPointExtendedInfo, AzureWorkloadSQLRestoreRequest, + AzureWorkloadSQLRestoreWithRehydrateRequest, BackupEngineBase, BackupEngineBaseResource, BackupEngineBaseResourceList, @@ -97,12 +103,20 @@ export { BackupRequestResource, BackupResourceConfig, BackupResourceConfigResource, + BackupResourceEncryptionConfig, + BackupResourceEncryptionConfigResource, BackupResourceVaultConfig, BackupResourceVaultConfigResource, BaseResource, BEKDetails, CloudError, ContainerIdentityInfo, + CrossRegionRestoreRequest, + CrossRegionRestoreRequestResource, + CrrAccessToken, + CrrAccessTokenResource, + CrrJobRequest, + CrrJobRequestResource, DailyRetentionFormat, DailyRetentionSchedule, Day, @@ -126,13 +140,13 @@ export { GenericProtectedItem, GenericProtectionPolicy, GenericRecoveryPoint, - HealthDetails, IaasVMBackupRequest, IaaSVMContainer, IaasVMILRRegistrationRequest, IaaSVMProtectableItem, IaasVMRecoveryPoint, IaasVMRestoreRequest, + IaasVMRestoreWithRehydrationRequest, ILRRequest, ILRRequestResource, InquiryInfo, @@ -143,6 +157,7 @@ export { JobResourceList, KEKDetails, KeyAndSecretDetails, + KPIResourceHealthDetails, LogSchedulePolicy, LongTermRetentionPolicy, LongTermSchedulePolicy, @@ -180,10 +195,13 @@ export { ProtectionPolicyResourceList, RecoveryPoint, RecoveryPointDiskConfiguration, + RecoveryPointMoveReadinessInfo, + RecoveryPointRehydrationInfo, RecoveryPointResource, RecoveryPointResourceList, RecoveryPointTierInformation, Resource, + ResourceHealthDetails, ResourceList, RestoreFileSpecs, RestoreRequest, @@ -199,8 +217,12 @@ export { SubProtectionPolicy, TargetAFSRestoreInfo, TargetRestoreInfo, + VaultJob, + VaultJobErrorInfo, + VaultJobExtendedInfo, WeeklyRetentionFormat, WeeklyRetentionSchedule, + WorkloadCrrAccessToken, WorkloadInquiryDetails, WorkloadItem, WorkloadItemResource, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectionIntentMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectionIntentMappers.ts index 0923aafa73b5..2b141b46a66e 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectionIntentMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectionIntentMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,6 +8,8 @@ export { discriminators, + AADProperties, + AADPropertiesResource, AzureBackupServerContainer, AzureBackupServerEngine, AzureFileShareBackupRequest, @@ -81,14 +83,18 @@ export { AzureWorkloadRestoreRequest, AzureWorkloadSAPHanaPointInTimeRecoveryPoint, AzureWorkloadSAPHanaPointInTimeRestoreRequest, + AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, AzureWorkloadSAPHanaRecoveryPoint, AzureWorkloadSAPHanaRestoreRequest, + AzureWorkloadSAPHanaRestoreWithRehydrateRequest, AzureWorkloadSQLAutoProtectionIntent, AzureWorkloadSQLPointInTimeRecoveryPoint, AzureWorkloadSQLPointInTimeRestoreRequest, + AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, AzureWorkloadSQLRecoveryPoint, AzureWorkloadSQLRecoveryPointExtendedInfo, AzureWorkloadSQLRestoreRequest, + AzureWorkloadSQLRestoreWithRehydrateRequest, BackupEngineBase, BackupEngineBaseResource, BackupEngineBaseResourceList, @@ -97,12 +103,20 @@ export { BackupRequestResource, BackupResourceConfig, BackupResourceConfigResource, + BackupResourceEncryptionConfig, + BackupResourceEncryptionConfigResource, BackupResourceVaultConfig, BackupResourceVaultConfigResource, BaseResource, BEKDetails, CloudError, ContainerIdentityInfo, + CrossRegionRestoreRequest, + CrossRegionRestoreRequestResource, + CrrAccessToken, + CrrAccessTokenResource, + CrrJobRequest, + CrrJobRequestResource, DailyRetentionFormat, DailyRetentionSchedule, Day, @@ -126,13 +140,13 @@ export { GenericProtectedItem, GenericProtectionPolicy, GenericRecoveryPoint, - HealthDetails, IaasVMBackupRequest, IaaSVMContainer, IaasVMILRRegistrationRequest, IaaSVMProtectableItem, IaasVMRecoveryPoint, IaasVMRestoreRequest, + IaasVMRestoreWithRehydrationRequest, ILRRequest, ILRRequestResource, InquiryInfo, @@ -143,6 +157,7 @@ export { JobResourceList, KEKDetails, KeyAndSecretDetails, + KPIResourceHealthDetails, LogSchedulePolicy, LongTermRetentionPolicy, LongTermSchedulePolicy, @@ -180,10 +195,13 @@ export { ProtectionPolicyResourceList, RecoveryPoint, RecoveryPointDiskConfiguration, + RecoveryPointMoveReadinessInfo, + RecoveryPointRehydrationInfo, RecoveryPointResource, RecoveryPointResourceList, RecoveryPointTierInformation, Resource, + ResourceHealthDetails, ResourceList, RestoreFileSpecs, RestoreRequest, @@ -199,8 +217,12 @@ export { SubProtectionPolicy, TargetAFSRestoreInfo, TargetRestoreInfo, + VaultJob, + VaultJobErrorInfo, + VaultJobExtendedInfo, WeeklyRetentionFormat, WeeklyRetentionSchedule, + WorkloadCrrAccessToken, WorkloadInquiryDetails, WorkloadItem, WorkloadItemResource, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupResourceEncryptionConfigsMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupResourceEncryptionConfigsMappers.ts new file mode 100644 index 000000000000..f478e80e0f73 --- /dev/null +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupResourceEncryptionConfigsMappers.ts @@ -0,0 +1,225 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AADProperties, + AADPropertiesResource, + AzureBackupServerContainer, + AzureBackupServerEngine, + AzureFileShareBackupRequest, + AzureFileShareProtectableItem, + AzureFileshareProtectedItem, + AzureFileshareProtectedItemExtendedInfo, + AzureFileShareProtectionPolicy, + AzureFileShareProvisionILRRequest, + AzureFileShareRecoveryPoint, + AzureFileShareRestoreRequest, + AzureIaaSClassicComputeVMContainer, + AzureIaaSClassicComputeVMProtectableItem, + AzureIaaSClassicComputeVMProtectedItem, + AzureIaaSComputeVMContainer, + AzureIaaSComputeVMProtectableItem, + AzureIaaSComputeVMProtectedItem, + AzureIaaSVMErrorInfo, + AzureIaaSVMHealthDetails, + AzureIaaSVMJob, + AzureIaaSVMJobExtendedInfo, + AzureIaaSVMJobTaskDetails, + AzureIaaSVMProtectedItem, + AzureIaaSVMProtectedItemExtendedInfo, + AzureIaaSVMProtectionPolicy, + AzureRecoveryServiceVaultProtectionIntent, + AzureResourceProtectionIntent, + AzureSQLAGWorkloadContainerProtectionContainer, + AzureSqlContainer, + AzureSqlProtectedItem, + AzureSqlProtectedItemExtendedInfo, + AzureSqlProtectionPolicy, + AzureStorageContainer, + AzureStorageErrorInfo, + AzureStorageJob, + AzureStorageJobExtendedInfo, + AzureStorageJobTaskDetails, + AzureStorageProtectableContainer, + AzureVMAppContainerProtectableContainer, + AzureVMAppContainerProtectionContainer, + AzureVmWorkloadItem, + AzureVmWorkloadProtectableItem, + AzureVmWorkloadProtectedItem, + AzureVmWorkloadProtectedItemExtendedInfo, + AzureVmWorkloadProtectionPolicy, + AzureVmWorkloadSAPAseDatabaseProtectedItem, + AzureVmWorkloadSAPAseDatabaseWorkloadItem, + AzureVmWorkloadSAPAseSystemProtectableItem, + AzureVmWorkloadSAPAseSystemWorkloadItem, + AzureVmWorkloadSAPHanaDatabaseProtectableItem, + AzureVmWorkloadSAPHanaDatabaseProtectedItem, + AzureVmWorkloadSAPHanaDatabaseWorkloadItem, + AzureVmWorkloadSAPHanaSystemProtectableItem, + AzureVmWorkloadSAPHanaSystemWorkloadItem, + AzureVmWorkloadSQLAvailabilityGroupProtectableItem, + AzureVmWorkloadSQLDatabaseProtectableItem, + AzureVmWorkloadSQLDatabaseProtectedItem, + AzureVmWorkloadSQLDatabaseWorkloadItem, + AzureVmWorkloadSQLInstanceProtectableItem, + AzureVmWorkloadSQLInstanceWorkloadItem, + AzureWorkloadAutoProtectionIntent, + AzureWorkloadBackupRequest, + AzureWorkloadContainer, + AzureWorkloadContainerExtendedInfo, + AzureWorkloadErrorInfo, + AzureWorkloadJob, + AzureWorkloadJobExtendedInfo, + AzureWorkloadJobTaskDetails, + AzureWorkloadPointInTimeRecoveryPoint, + AzureWorkloadPointInTimeRestoreRequest, + AzureWorkloadRecoveryPoint, + AzureWorkloadRestoreRequest, + AzureWorkloadSAPHanaPointInTimeRecoveryPoint, + AzureWorkloadSAPHanaPointInTimeRestoreRequest, + AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, + AzureWorkloadSAPHanaRecoveryPoint, + AzureWorkloadSAPHanaRestoreRequest, + AzureWorkloadSAPHanaRestoreWithRehydrateRequest, + AzureWorkloadSQLAutoProtectionIntent, + AzureWorkloadSQLPointInTimeRecoveryPoint, + AzureWorkloadSQLPointInTimeRestoreRequest, + AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, + AzureWorkloadSQLRecoveryPoint, + AzureWorkloadSQLRecoveryPointExtendedInfo, + AzureWorkloadSQLRestoreRequest, + AzureWorkloadSQLRestoreWithRehydrateRequest, + BackupEngineBase, + BackupEngineBaseResource, + BackupEngineExtendedInfo, + BackupRequest, + BackupRequestResource, + BackupResourceConfig, + BackupResourceConfigResource, + BackupResourceEncryptionConfig, + BackupResourceEncryptionConfigResource, + BackupResourceVaultConfig, + BackupResourceVaultConfigResource, + BaseResource, + BEKDetails, + ContainerIdentityInfo, + CrossRegionRestoreRequest, + CrossRegionRestoreRequestResource, + CrrAccessToken, + CrrAccessTokenResource, + CrrJobRequest, + CrrJobRequestResource, + DailyRetentionFormat, + DailyRetentionSchedule, + Day, + DiskExclusionProperties, + DiskInformation, + DistributedNodesInfo, + DpmBackupEngine, + DpmContainer, + DPMContainerExtendedInfo, + DpmErrorInfo, + DpmJob, + DpmJobExtendedInfo, + DpmJobTaskDetails, + DPMProtectedItem, + DPMProtectedItemExtendedInfo, + EncryptionDetails, + ErrorAdditionalInfo, + ErrorDetail, + ExtendedProperties, + GenericContainer, + GenericContainerExtendedInfo, + GenericProtectedItem, + GenericProtectionPolicy, + GenericRecoveryPoint, + IaasVMBackupRequest, + IaaSVMContainer, + IaasVMILRRegistrationRequest, + IaaSVMProtectableItem, + IaasVMRecoveryPoint, + IaasVMRestoreRequest, + IaasVMRestoreWithRehydrationRequest, + ILRRequest, + ILRRequestResource, + InquiryInfo, + InquiryValidation, + InstantRPAdditionalDetails, + Job, + JobResource, + KEKDetails, + KeyAndSecretDetails, + KPIResourceHealthDetails, + LogSchedulePolicy, + LongTermRetentionPolicy, + LongTermSchedulePolicy, + MabContainer, + MabContainerExtendedInfo, + MABContainerHealthDetails, + MabErrorInfo, + MabFileFolderProtectedItem, + MabFileFolderProtectedItemExtendedInfo, + MabJob, + MabJobExtendedInfo, + MabJobTaskDetails, + MabProtectionPolicy, + MonthlyRetentionSchedule, + NewErrorResponse, + NewErrorResponseError, + PointInTimeRange, + PreBackupValidation, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionResource, + PrivateLinkServiceConnectionState, + ProtectableContainer, + ProtectableContainerResource, + ProtectedItem, + ProtectedItemResource, + ProtectionContainer, + ProtectionContainerResource, + ProtectionIntent, + ProtectionIntentResource, + ProtectionPolicy, + ProtectionPolicyResource, + RecoveryPoint, + RecoveryPointDiskConfiguration, + RecoveryPointMoveReadinessInfo, + RecoveryPointRehydrationInfo, + RecoveryPointResource, + RecoveryPointTierInformation, + Resource, + ResourceHealthDetails, + RestoreFileSpecs, + RestoreRequest, + RestoreRequestResource, + RetentionDuration, + RetentionPolicy, + SchedulePolicy, + Settings, + SimpleRetentionPolicy, + SimpleSchedulePolicy, + SQLDataDirectory, + SQLDataDirectoryMapping, + SubProtectionPolicy, + TargetAFSRestoreInfo, + TargetRestoreInfo, + VaultJob, + VaultJobErrorInfo, + VaultJobExtendedInfo, + WeeklyRetentionFormat, + WeeklyRetentionSchedule, + WorkloadCrrAccessToken, + WorkloadInquiryDetails, + WorkloadItem, + WorkloadItemResource, + WorkloadProtectableItem, + WorkloadProtectableItemResource, + YearlyRetentionSchedule +} from "../models/mappers"; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupResourceStorageConfigsMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupResourceStorageConfigsMappers.ts index 6eeea71e42b2..f478e80e0f73 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupResourceStorageConfigsMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupResourceStorageConfigsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,6 +8,8 @@ export { discriminators, + AADProperties, + AADPropertiesResource, AzureBackupServerContainer, AzureBackupServerEngine, AzureFileShareBackupRequest, @@ -81,14 +83,18 @@ export { AzureWorkloadRestoreRequest, AzureWorkloadSAPHanaPointInTimeRecoveryPoint, AzureWorkloadSAPHanaPointInTimeRestoreRequest, + AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, AzureWorkloadSAPHanaRecoveryPoint, AzureWorkloadSAPHanaRestoreRequest, + AzureWorkloadSAPHanaRestoreWithRehydrateRequest, AzureWorkloadSQLAutoProtectionIntent, AzureWorkloadSQLPointInTimeRecoveryPoint, AzureWorkloadSQLPointInTimeRestoreRequest, + AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, AzureWorkloadSQLRecoveryPoint, AzureWorkloadSQLRecoveryPointExtendedInfo, AzureWorkloadSQLRestoreRequest, + AzureWorkloadSQLRestoreWithRehydrateRequest, BackupEngineBase, BackupEngineBaseResource, BackupEngineExtendedInfo, @@ -96,12 +102,19 @@ export { BackupRequestResource, BackupResourceConfig, BackupResourceConfigResource, + BackupResourceEncryptionConfig, + BackupResourceEncryptionConfigResource, BackupResourceVaultConfig, BackupResourceVaultConfigResource, BaseResource, BEKDetails, - CloudError, ContainerIdentityInfo, + CrossRegionRestoreRequest, + CrossRegionRestoreRequestResource, + CrrAccessToken, + CrrAccessTokenResource, + CrrJobRequest, + CrrJobRequestResource, DailyRetentionFormat, DailyRetentionSchedule, Day, @@ -118,6 +131,7 @@ export { DPMProtectedItem, DPMProtectedItemExtendedInfo, EncryptionDetails, + ErrorAdditionalInfo, ErrorDetail, ExtendedProperties, GenericContainer, @@ -125,13 +139,13 @@ export { GenericProtectedItem, GenericProtectionPolicy, GenericRecoveryPoint, - HealthDetails, IaasVMBackupRequest, IaaSVMContainer, IaasVMILRRegistrationRequest, IaaSVMProtectableItem, IaasVMRecoveryPoint, IaasVMRestoreRequest, + IaasVMRestoreWithRehydrationRequest, ILRRequest, ILRRequestResource, InquiryInfo, @@ -141,6 +155,7 @@ export { JobResource, KEKDetails, KeyAndSecretDetails, + KPIResourceHealthDetails, LogSchedulePolicy, LongTermRetentionPolicy, LongTermSchedulePolicy, @@ -155,6 +170,8 @@ export { MabJobTaskDetails, MabProtectionPolicy, MonthlyRetentionSchedule, + NewErrorResponse, + NewErrorResponseError, PointInTimeRange, PreBackupValidation, PrivateEndpoint, @@ -173,9 +190,12 @@ export { ProtectionPolicyResource, RecoveryPoint, RecoveryPointDiskConfiguration, + RecoveryPointMoveReadinessInfo, + RecoveryPointRehydrationInfo, RecoveryPointResource, RecoveryPointTierInformation, Resource, + ResourceHealthDetails, RestoreFileSpecs, RestoreRequest, RestoreRequestResource, @@ -190,8 +210,12 @@ export { SubProtectionPolicy, TargetAFSRestoreInfo, TargetRestoreInfo, + VaultJob, + VaultJobErrorInfo, + VaultJobExtendedInfo, WeeklyRetentionFormat, WeeklyRetentionSchedule, + WorkloadCrrAccessToken, WorkloadInquiryDetails, WorkloadItem, WorkloadItemResource, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupResourceVaultConfigsMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupResourceVaultConfigsMappers.ts index 793cf3485a46..f478e80e0f73 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupResourceVaultConfigsMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupResourceVaultConfigsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,6 +8,8 @@ export { discriminators, + AADProperties, + AADPropertiesResource, AzureBackupServerContainer, AzureBackupServerEngine, AzureFileShareBackupRequest, @@ -81,14 +83,18 @@ export { AzureWorkloadRestoreRequest, AzureWorkloadSAPHanaPointInTimeRecoveryPoint, AzureWorkloadSAPHanaPointInTimeRestoreRequest, + AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, AzureWorkloadSAPHanaRecoveryPoint, AzureWorkloadSAPHanaRestoreRequest, + AzureWorkloadSAPHanaRestoreWithRehydrateRequest, AzureWorkloadSQLAutoProtectionIntent, AzureWorkloadSQLPointInTimeRecoveryPoint, AzureWorkloadSQLPointInTimeRestoreRequest, + AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, AzureWorkloadSQLRecoveryPoint, AzureWorkloadSQLRecoveryPointExtendedInfo, AzureWorkloadSQLRestoreRequest, + AzureWorkloadSQLRestoreWithRehydrateRequest, BackupEngineBase, BackupEngineBaseResource, BackupEngineExtendedInfo, @@ -96,12 +102,19 @@ export { BackupRequestResource, BackupResourceConfig, BackupResourceConfigResource, + BackupResourceEncryptionConfig, + BackupResourceEncryptionConfigResource, BackupResourceVaultConfig, BackupResourceVaultConfigResource, BaseResource, BEKDetails, - CloudError, ContainerIdentityInfo, + CrossRegionRestoreRequest, + CrossRegionRestoreRequestResource, + CrrAccessToken, + CrrAccessTokenResource, + CrrJobRequest, + CrrJobRequestResource, DailyRetentionFormat, DailyRetentionSchedule, Day, @@ -120,20 +133,19 @@ export { EncryptionDetails, ErrorAdditionalInfo, ErrorDetail, - ErrorResponse, ExtendedProperties, GenericContainer, GenericContainerExtendedInfo, GenericProtectedItem, GenericProtectionPolicy, GenericRecoveryPoint, - HealthDetails, IaasVMBackupRequest, IaaSVMContainer, IaasVMILRRegistrationRequest, IaaSVMProtectableItem, IaasVMRecoveryPoint, IaasVMRestoreRequest, + IaasVMRestoreWithRehydrationRequest, ILRRequest, ILRRequestResource, InquiryInfo, @@ -143,6 +155,7 @@ export { JobResource, KEKDetails, KeyAndSecretDetails, + KPIResourceHealthDetails, LogSchedulePolicy, LongTermRetentionPolicy, LongTermSchedulePolicy, @@ -157,6 +170,8 @@ export { MabJobTaskDetails, MabProtectionPolicy, MonthlyRetentionSchedule, + NewErrorResponse, + NewErrorResponseError, PointInTimeRange, PreBackupValidation, PrivateEndpoint, @@ -175,9 +190,12 @@ export { ProtectionPolicyResource, RecoveryPoint, RecoveryPointDiskConfiguration, + RecoveryPointMoveReadinessInfo, + RecoveryPointRehydrationInfo, RecoveryPointResource, RecoveryPointTierInformation, Resource, + ResourceHealthDetails, RestoreFileSpecs, RestoreRequest, RestoreRequestResource, @@ -192,8 +210,12 @@ export { SubProtectionPolicy, TargetAFSRestoreInfo, TargetRestoreInfo, + VaultJob, + VaultJobErrorInfo, + VaultJobExtendedInfo, WeeklyRetentionFormat, WeeklyRetentionSchedule, + WorkloadCrrAccessToken, WorkloadInquiryDetails, WorkloadItem, WorkloadItemResource, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupStatusMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupStatusMappers.ts index eb8ecfd230d1..195ec26f67a5 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupStatusMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupStatusMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupUsageSummariesCRRMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupUsageSummariesCRRMappers.ts new file mode 100644 index 000000000000..387b0f7f5b1d --- /dev/null +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupUsageSummariesCRRMappers.ts @@ -0,0 +1,17 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + BackupManagementUsage, + BackupManagementUsageList, + ErrorAdditionalInfo, + NameInfo, + NewErrorResponse, + NewErrorResponseError +} from "../models/mappers"; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupUsageSummariesMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupUsageSummariesMappers.ts index 0a5ba2f9e04b..a09f6df2d285 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupUsageSummariesMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupUsageSummariesMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupWorkloadItemsMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupWorkloadItemsMappers.ts index 0923aafa73b5..2b141b46a66e 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupWorkloadItemsMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupWorkloadItemsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,6 +8,8 @@ export { discriminators, + AADProperties, + AADPropertiesResource, AzureBackupServerContainer, AzureBackupServerEngine, AzureFileShareBackupRequest, @@ -81,14 +83,18 @@ export { AzureWorkloadRestoreRequest, AzureWorkloadSAPHanaPointInTimeRecoveryPoint, AzureWorkloadSAPHanaPointInTimeRestoreRequest, + AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, AzureWorkloadSAPHanaRecoveryPoint, AzureWorkloadSAPHanaRestoreRequest, + AzureWorkloadSAPHanaRestoreWithRehydrateRequest, AzureWorkloadSQLAutoProtectionIntent, AzureWorkloadSQLPointInTimeRecoveryPoint, AzureWorkloadSQLPointInTimeRestoreRequest, + AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, AzureWorkloadSQLRecoveryPoint, AzureWorkloadSQLRecoveryPointExtendedInfo, AzureWorkloadSQLRestoreRequest, + AzureWorkloadSQLRestoreWithRehydrateRequest, BackupEngineBase, BackupEngineBaseResource, BackupEngineBaseResourceList, @@ -97,12 +103,20 @@ export { BackupRequestResource, BackupResourceConfig, BackupResourceConfigResource, + BackupResourceEncryptionConfig, + BackupResourceEncryptionConfigResource, BackupResourceVaultConfig, BackupResourceVaultConfigResource, BaseResource, BEKDetails, CloudError, ContainerIdentityInfo, + CrossRegionRestoreRequest, + CrossRegionRestoreRequestResource, + CrrAccessToken, + CrrAccessTokenResource, + CrrJobRequest, + CrrJobRequestResource, DailyRetentionFormat, DailyRetentionSchedule, Day, @@ -126,13 +140,13 @@ export { GenericProtectedItem, GenericProtectionPolicy, GenericRecoveryPoint, - HealthDetails, IaasVMBackupRequest, IaaSVMContainer, IaasVMILRRegistrationRequest, IaaSVMProtectableItem, IaasVMRecoveryPoint, IaasVMRestoreRequest, + IaasVMRestoreWithRehydrationRequest, ILRRequest, ILRRequestResource, InquiryInfo, @@ -143,6 +157,7 @@ export { JobResourceList, KEKDetails, KeyAndSecretDetails, + KPIResourceHealthDetails, LogSchedulePolicy, LongTermRetentionPolicy, LongTermSchedulePolicy, @@ -180,10 +195,13 @@ export { ProtectionPolicyResourceList, RecoveryPoint, RecoveryPointDiskConfiguration, + RecoveryPointMoveReadinessInfo, + RecoveryPointRehydrationInfo, RecoveryPointResource, RecoveryPointResourceList, RecoveryPointTierInformation, Resource, + ResourceHealthDetails, ResourceList, RestoreFileSpecs, RestoreRequest, @@ -199,8 +217,12 @@ export { SubProtectionPolicy, TargetAFSRestoreInfo, TargetRestoreInfo, + VaultJob, + VaultJobErrorInfo, + VaultJobExtendedInfo, WeeklyRetentionFormat, WeeklyRetentionSchedule, + WorkloadCrrAccessToken, WorkloadInquiryDetails, WorkloadItem, WorkloadItemResource, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupsMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupsMappers.ts index 6eeea71e42b2..a7719f9e3a6a 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupsMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,6 +8,8 @@ export { discriminators, + AADProperties, + AADPropertiesResource, AzureBackupServerContainer, AzureBackupServerEngine, AzureFileShareBackupRequest, @@ -81,14 +83,18 @@ export { AzureWorkloadRestoreRequest, AzureWorkloadSAPHanaPointInTimeRecoveryPoint, AzureWorkloadSAPHanaPointInTimeRestoreRequest, + AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, AzureWorkloadSAPHanaRecoveryPoint, AzureWorkloadSAPHanaRestoreRequest, + AzureWorkloadSAPHanaRestoreWithRehydrateRequest, AzureWorkloadSQLAutoProtectionIntent, AzureWorkloadSQLPointInTimeRecoveryPoint, AzureWorkloadSQLPointInTimeRestoreRequest, + AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, AzureWorkloadSQLRecoveryPoint, AzureWorkloadSQLRecoveryPointExtendedInfo, AzureWorkloadSQLRestoreRequest, + AzureWorkloadSQLRestoreWithRehydrateRequest, BackupEngineBase, BackupEngineBaseResource, BackupEngineExtendedInfo, @@ -96,12 +102,20 @@ export { BackupRequestResource, BackupResourceConfig, BackupResourceConfigResource, + BackupResourceEncryptionConfig, + BackupResourceEncryptionConfigResource, BackupResourceVaultConfig, BackupResourceVaultConfigResource, BaseResource, BEKDetails, CloudError, ContainerIdentityInfo, + CrossRegionRestoreRequest, + CrossRegionRestoreRequestResource, + CrrAccessToken, + CrrAccessTokenResource, + CrrJobRequest, + CrrJobRequestResource, DailyRetentionFormat, DailyRetentionSchedule, Day, @@ -125,13 +139,13 @@ export { GenericProtectedItem, GenericProtectionPolicy, GenericRecoveryPoint, - HealthDetails, IaasVMBackupRequest, IaaSVMContainer, IaasVMILRRegistrationRequest, IaaSVMProtectableItem, IaasVMRecoveryPoint, IaasVMRestoreRequest, + IaasVMRestoreWithRehydrationRequest, ILRRequest, ILRRequestResource, InquiryInfo, @@ -141,6 +155,7 @@ export { JobResource, KEKDetails, KeyAndSecretDetails, + KPIResourceHealthDetails, LogSchedulePolicy, LongTermRetentionPolicy, LongTermSchedulePolicy, @@ -173,9 +188,12 @@ export { ProtectionPolicyResource, RecoveryPoint, RecoveryPointDiskConfiguration, + RecoveryPointMoveReadinessInfo, + RecoveryPointRehydrationInfo, RecoveryPointResource, RecoveryPointTierInformation, Resource, + ResourceHealthDetails, RestoreFileSpecs, RestoreRequest, RestoreRequestResource, @@ -190,8 +208,12 @@ export { SubProtectionPolicy, TargetAFSRestoreInfo, TargetRestoreInfo, + VaultJob, + VaultJobErrorInfo, + VaultJobExtendedInfo, WeeklyRetentionFormat, WeeklyRetentionSchedule, + WorkloadCrrAccessToken, WorkloadInquiryDetails, WorkloadItem, WorkloadItemResource, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/crossRegionRestoreMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/crossRegionRestoreMappers.ts new file mode 100644 index 000000000000..3b9a9f884247 --- /dev/null +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/crossRegionRestoreMappers.ts @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AzureFileShareRestoreRequest, + AzureWorkloadPointInTimeRestoreRequest, + AzureWorkloadRestoreRequest, + AzureWorkloadSAPHanaPointInTimeRestoreRequest, + AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, + AzureWorkloadSAPHanaRestoreRequest, + AzureWorkloadSAPHanaRestoreWithRehydrateRequest, + AzureWorkloadSQLPointInTimeRestoreRequest, + AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, + AzureWorkloadSQLRestoreRequest, + AzureWorkloadSQLRestoreWithRehydrateRequest, + CrossRegionRestoreRequest, + CrrAccessToken, + EncryptionDetails, + ErrorAdditionalInfo, + IaasVMRestoreRequest, + IaasVMRestoreWithRehydrationRequest, + NewErrorResponse, + NewErrorResponseError, + RecoveryPointRehydrationInfo, + RestoreFileSpecs, + RestoreRequest, + SQLDataDirectoryMapping, + TargetAFSRestoreInfo, + TargetRestoreInfo, + WorkloadCrrAccessToken +} from "../models/mappers"; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/crrOperationResultsMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/crrOperationResultsMappers.ts new file mode 100644 index 000000000000..6b281afdf294 --- /dev/null +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/crrOperationResultsMappers.ts @@ -0,0 +1,14 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + ErrorAdditionalInfo, + NewErrorResponse, + NewErrorResponseError +} from "../models/mappers"; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/crrOperationStatusMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/crrOperationStatusMappers.ts new file mode 100644 index 000000000000..61a4fde86431 --- /dev/null +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/crrOperationStatusMappers.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AzureFileShareRecoveryPoint, + AzureWorkloadPointInTimeRecoveryPoint, + AzureWorkloadRecoveryPoint, + AzureWorkloadSAPHanaPointInTimeRecoveryPoint, + AzureWorkloadSAPHanaRecoveryPoint, + AzureWorkloadSQLPointInTimeRecoveryPoint, + AzureWorkloadSQLRecoveryPoint, + AzureWorkloadSQLRecoveryPointExtendedInfo, + BEKDetails, + ClientScriptForConnect, + DiskInformation, + ErrorAdditionalInfo, + GenericRecoveryPoint, + IaasVMRecoveryPoint, + InstantItemRecoveryTarget, + KEKDetails, + KeyAndSecretDetails, + NewErrorResponse, + NewErrorResponseError, + OperationStatus, + OperationStatusError, + OperationStatusExtendedInfo, + OperationStatusJobExtendedInfo, + OperationStatusJobsExtendedInfo, + OperationStatusProvisionILRExtendedInfo, + OperationStatusRecoveryPointExtendedInfo, + PointInTimeRange, + RecoveryPoint, + RecoveryPointDiskConfiguration, + RecoveryPointMoveReadinessInfo, + RecoveryPointTierInformation, + SQLDataDirectory +} from "../models/mappers"; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/exportJobsOperationResultsMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/exportJobsOperationResultsMappers.ts index bfdd6ba7cea8..b1eb0d5f7cc9 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/exportJobsOperationResultsMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/exportJobsOperationResultsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/featureSupportMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/featureSupportMappers.ts index 1459a86aad1e..ec3de8eb31f0 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/featureSupportMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/featureSupportMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts index c210583ac571..4d1ebf9b4cf2 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -12,67 +12,74 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; /** - * Error information associated with operation status call. + * An interface representing BackupResourceEncryptionConfig. */ -export interface OperationStatusError { +export interface BackupResourceEncryptionConfig { /** - * Error code of the operation failure. + * Encryption At Rest Type. Possible values include: 'Invalid', 'MicrosoftManaged', + * 'CustomerManaged' */ - code?: string; + encryptionAtRestType?: EncryptionAtRestType; /** - * Error message displayed if the operation failure. + * Key Vault Key URI */ - message?: string; -} - -/** - * Contains the possible cases for OperationStatusExtendedInfo. - */ -export type OperationStatusExtendedInfoUnion = OperationStatusExtendedInfo | OperationStatusJobExtendedInfo | OperationStatusJobsExtendedInfo | OperationStatusProvisionILRExtendedInfo; - -/** - * Base class for additional information of operation status. - */ -export interface OperationStatusExtendedInfo { + keyUri?: string; /** - * Polymorphic Discriminator + * Key Vault Subscription Id */ - objectType: "OperationStatusExtendedInfo"; + subscriptionId?: string; + /** + * Possible values include: 'Invalid', 'NotEnabled', 'PartiallySucceeded', 'PartiallyFailed', + * 'Failed', 'Succeeded' + */ + lastUpdateStatus?: LastUpdateStatus; + /** + * Possible values include: 'Invalid', 'Disabled', 'Enabled' + */ + infrastructureEncryptionState?: InfrastructureEncryptionState; } /** - * Operation status. + * ARM Resource. */ -export interface OperationStatus { +export interface Resource extends BaseResource { /** - * ID of the operation. + * Resource Id represents the complete path to the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - id?: string; + readonly id?: string; /** - * Name of the operation. + * Resource name associated with the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - name?: string; + readonly name?: string; /** - * Operation status. Possible values include: 'Invalid', 'InProgress', 'Succeeded', 'Failed', - * 'Canceled' + * Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - status?: OperationStatusValues; + readonly type?: string; /** - * Operation start time. Format: ISO-8601. + * Resource location. */ - startTime?: Date; + location?: string; /** - * Operation end time. Format: ISO-8601. + * Resource tags. */ - endTime?: Date; + tags?: { [propertyName: string]: string }; /** - * Error information related to this operation. + * Optional ETag. */ - error?: OperationStatusError; + eTag?: string; +} + +/** + * An interface representing BackupResourceEncryptionConfigResource. + */ +export interface BackupResourceEncryptionConfigResource extends Resource { /** - * Additional information associated with this operation. + * BackupResourceEncryptionConfigResource properties */ - properties?: OperationStatusExtendedInfoUnion; + properties?: BackupResourceEncryptionConfig; } /** @@ -123,39 +130,6 @@ export interface PrivateEndpointConnection { privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; } -/** - * ARM Resource. - */ -export interface Resource extends BaseResource { - /** - * Resource Id represents the complete path to the resource. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Resource name associated with the resource. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * Resource location. - */ - location?: string; - /** - * Resource tags. - */ - tags?: { [propertyName: string]: string }; - /** - * Optional ETag. - */ - eTag?: string; -} - /** * Private Endpoint Connection Response Properties */ @@ -183,9 +157,9 @@ export interface ErrorAdditionalInfo { } /** - * The resource management error response. + * The error object. */ -export interface ErrorResponse { +export interface NewErrorResponseError { /** * The error code. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -205,7 +179,7 @@ export interface ErrorResponse { * The error details. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly details?: ErrorResponse[]; + readonly details?: NewErrorResponse[]; /** * The error additional info. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -213,10 +187,20 @@ export interface ErrorResponse { readonly additionalInfo?: ErrorAdditionalInfo[]; } +/** + * The resource management error response. + */ +export interface NewErrorResponse { + /** + * The error object. + */ + error?: NewErrorResponseError; +} + /** * Health Details for backup items. */ -export interface HealthDetails { +export interface ResourceHealthDetails { /** * Health Code * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -239,6 +223,21 @@ export interface HealthDetails { readonly recommendations?: string[]; } +/** + * KPI Resource Health Details + */ +export interface KPIResourceHealthDetails { + /** + * Resource Health Status. Possible values include: 'Healthy', 'TransientDegraded', + * 'PersistentDegraded', 'TransientUnhealthy', 'PersistentUnhealthy', 'Invalid' + */ + resourceHealthStatus?: ResourceHealthStatus; + /** + * Resource Health Status + */ + resourceHealthDetails?: ResourceHealthDetails[]; +} + /** * Additional information about Azure File Share backup item. */ @@ -271,7 +270,15 @@ export interface AzureFileshareProtectedItemExtendedInfo { /** * Contains the possible cases for ProtectedItem. */ -export type ProtectedItemUnion = ProtectedItem | AzureFileshareProtectedItem | AzureIaaSVMProtectedItemUnion | AzureSqlProtectedItem | AzureVmWorkloadProtectedItemUnion | DPMProtectedItem | GenericProtectedItem | MabFileFolderProtectedItem; +export type ProtectedItemUnion = + | ProtectedItem + | AzureFileshareProtectedItem + | AzureIaaSVMProtectedItemUnion + | AzureSqlProtectedItem + | AzureVmWorkloadProtectedItemUnion + | DPMProtectedItem + | GenericProtectedItem + | MabFileFolderProtectedItem; /** * Base class for backup items. @@ -418,16 +425,6 @@ export interface AzureFileshareProtectedItem { * 'Protected', 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' */ protectionState?: ProtectionState; - /** - * Health status of protected item. Possible values include: 'Passed', 'ActionRequired', - * 'ActionSuggested', 'Healthy', 'TransientDegraded', 'PersistentDegraded', 'TransientUnhealthy', - * 'PersistentUnhealthy', 'Invalid' - */ - healthStatus?: HealthStatus; - /** - * Health details on this backup item. - */ - healthDetails?: HealthDetails[]; /** * Last backup operation status. Possible values: Healthy, Unhealthy. */ @@ -436,16 +433,30 @@ export interface AzureFileshareProtectedItem { * Timestamp of the last backup operation on this backup item. */ lastBackupTime?: Date; + /** + * Health details of different KPIs + */ + kpisHealths?: { [propertyName: string]: KPIResourceHealthDetails }; /** * Additional information with this backup item. */ extendedInfo?: AzureFileshareProtectedItemExtendedInfo; + /** + * backups running status for this backup item. Possible values include: 'Passed', + * 'ActionRequired', 'ActionSuggested', 'Invalid' + */ + healthStatus?: HealthStatus; } /** * Contains the possible cases for RecoveryPoint. */ -export type RecoveryPointUnion = RecoveryPoint | AzureFileShareRecoveryPoint | AzureWorkloadRecoveryPointUnion | GenericRecoveryPoint | IaasVMRecoveryPoint; +export type RecoveryPointUnion = + | RecoveryPoint + | AzureFileShareRecoveryPoint + | AzureWorkloadRecoveryPointUnion + | GenericRecoveryPoint + | IaasVMRecoveryPoint; /** * Base class for backup copies. Workload-specific backup copies are derived from this class. @@ -522,7 +533,11 @@ export interface TargetAFSRestoreInfo { /** * Contains the possible cases for RestoreRequest. */ -export type RestoreRequestUnion = RestoreRequest | AzureFileShareRestoreRequest | AzureWorkloadRestoreRequestUnion | IaasVMRestoreRequest; +export type RestoreRequestUnion = + | RestoreRequest + | AzureFileShareRestoreRequest + | AzureWorkloadRestoreRequestUnion + | IaasVMRestoreRequestUnion; /** * Base class for restore request. Workload-specific restore requests are derived from this class. @@ -593,7 +608,11 @@ export interface Settings { /** * Contains the possible cases for SchedulePolicy. */ -export type SchedulePolicyUnion = SchedulePolicy | LogSchedulePolicy | LongTermSchedulePolicy | SimpleSchedulePolicy; +export type SchedulePolicyUnion = + | SchedulePolicy + | LogSchedulePolicy + | LongTermSchedulePolicy + | SimpleSchedulePolicy; /** * Base class for backup schedule. @@ -608,7 +627,10 @@ export interface SchedulePolicy { /** * Contains the possible cases for RetentionPolicy. */ -export type RetentionPolicyUnion = RetentionPolicy | LongTermRetentionPolicy | SimpleRetentionPolicy; +export type RetentionPolicyUnion = + | RetentionPolicy + | LongTermRetentionPolicy + | SimpleRetentionPolicy; /** * Base class for retention policy. @@ -626,7 +648,7 @@ export interface RetentionPolicy { export interface SubProtectionPolicy { /** * Type of backup policy type. Possible values include: 'Invalid', 'Full', 'Differential', 'Log', - * 'CopyOnlyFull' + * 'CopyOnlyFull', 'Incremental' */ policyType?: PolicyType; /** @@ -642,7 +664,14 @@ export interface SubProtectionPolicy { /** * Contains the possible cases for ProtectionPolicy. */ -export type ProtectionPolicyUnion = ProtectionPolicy | AzureVmWorkloadProtectionPolicy | AzureFileShareProtectionPolicy | AzureIaaSVMProtectionPolicy | AzureSqlProtectionPolicy | GenericProtectionPolicy | MabProtectionPolicy; +export type ProtectionPolicyUnion = + | ProtectionPolicy + | AzureVmWorkloadProtectionPolicy + | AzureFileShareProtectionPolicy + | AzureIaaSVMProtectionPolicy + | AzureSqlProtectionPolicy + | GenericProtectionPolicy + | MabProtectionPolicy; /** * Base class for backup policy. Workload-specific backup policies are derived from this class. @@ -727,7 +756,10 @@ export interface AzureFileShareProtectionPolicy { /** * Contains the possible cases for AzureIaaSVMProtectedItem. */ -export type AzureIaaSVMProtectedItemUnion = AzureIaaSVMProtectedItem | AzureIaaSClassicComputeVMProtectedItem | AzureIaaSComputeVMProtectedItem; +export type AzureIaaSVMProtectedItemUnion = + | AzureIaaSVMProtectedItem + | AzureIaaSClassicComputeVMProtectedItem + | AzureIaaSComputeVMProtectedItem; /** * IaaS VM workload-specific backup item. @@ -813,14 +845,17 @@ export interface AzureIaaSVMProtectedItem { protectionState?: ProtectionState; /** * Health status of protected item. Possible values include: 'Passed', 'ActionRequired', - * 'ActionSuggested', 'Healthy', 'TransientDegraded', 'PersistentDegraded', 'TransientUnhealthy', - * 'PersistentUnhealthy', 'Invalid' + * 'ActionSuggested', 'Invalid' */ healthStatus?: HealthStatus; /** * Health details on this backup item. */ healthDetails?: AzureIaaSVMHealthDetails[]; + /** + * Health details of different KPIs + */ + kpisHealths?: { [propertyName: string]: KPIResourceHealthDetails }; /** * Last backup operation status. */ @@ -924,14 +959,17 @@ export interface AzureIaaSClassicComputeVMProtectedItem { protectionState?: ProtectionState; /** * Health status of protected item. Possible values include: 'Passed', 'ActionRequired', - * 'ActionSuggested', 'Healthy', 'TransientDegraded', 'PersistentDegraded', 'TransientUnhealthy', - * 'PersistentUnhealthy', 'Invalid' + * 'ActionSuggested', 'Invalid' */ healthStatus?: HealthStatus; /** * Health details on this backup item. */ healthDetails?: AzureIaaSVMHealthDetails[]; + /** + * Health details of different KPIs + */ + kpisHealths?: { [propertyName: string]: KPIResourceHealthDetails }; /** * Last backup operation status. */ @@ -1035,14 +1073,17 @@ export interface AzureIaaSComputeVMProtectedItem { protectionState?: ProtectionState; /** * Health status of protected item. Possible values include: 'Passed', 'ActionRequired', - * 'ActionSuggested', 'Healthy', 'TransientDegraded', 'PersistentDegraded', 'TransientUnhealthy', - * 'PersistentUnhealthy', 'Invalid' + * 'ActionSuggested', 'Invalid' */ healthStatus?: HealthStatus; /** * Health details on this backup item. */ healthDetails?: AzureIaaSVMHealthDetails[]; + /** + * Health details of different KPIs + */ + kpisHealths?: { [propertyName: string]: KPIResourceHealthDetails }; /** * Last backup operation status. */ @@ -1091,8 +1132,7 @@ export interface AzureIaaSVMErrorInfo { /** * Azure IaaS VM workload-specific Health Details. */ -export interface AzureIaaSVMHealthDetails extends HealthDetails { -} +export interface AzureIaaSVMHealthDetails extends ResourceHealthDetails {} /** * Azure IaaS VM workload-specific job task details. @@ -1166,7 +1206,14 @@ export interface AzureIaaSVMJobExtendedInfo { /** * Contains the possible cases for Job. */ -export type JobUnion = Job | AzureIaaSVMJob | AzureStorageJob | AzureWorkloadJob | DpmJob | MabJob; +export type JobUnion = + | Job + | AzureIaaSVMJob + | AzureStorageJob + | AzureWorkloadJob + | DpmJob + | MabJob + | VaultJob; /** * Defines workload agnostic properties for a job. @@ -1622,7 +1669,11 @@ export interface AzureVmWorkloadProtectedItemExtendedInfo { /** * Contains the possible cases for AzureVmWorkloadProtectedItem. */ -export type AzureVmWorkloadProtectedItemUnion = AzureVmWorkloadProtectedItem | AzureVmWorkloadSAPAseDatabaseProtectedItem | AzureVmWorkloadSAPHanaDatabaseProtectedItem | AzureVmWorkloadSQLDatabaseProtectedItem; +export type AzureVmWorkloadProtectedItemUnion = + | AzureVmWorkloadProtectedItem + | AzureVmWorkloadSAPAseDatabaseProtectedItem + | AzureVmWorkloadSAPHanaDatabaseProtectedItem + | AzureVmWorkloadSQLDatabaseProtectedItem; /** * Azure VM workload-specific protected item. @@ -1736,20 +1787,14 @@ export interface AzureVmWorkloadProtectedItem { * include: 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', 'IRPending' */ protectedItemHealthStatus?: ProtectedItemHealthStatus; - /** - * Health status of protected item. Possible values include: 'Passed', 'ActionRequired', - * 'ActionSuggested', 'Healthy', 'TransientDegraded', 'PersistentDegraded', 'TransientUnhealthy', - * 'PersistentUnhealthy', 'Invalid' - */ - healthStatus?: HealthStatus; - /** - * Health details on this backup item. - */ - healthDetails?: HealthDetails[]; /** * Additional information for this backup item. */ extendedInfo?: AzureVmWorkloadProtectedItemExtendedInfo; + /** + * Health details of different KPIs + */ + kpisHealths?: { [propertyName: string]: KPIResourceHealthDetails }; } /** @@ -1864,20 +1909,14 @@ export interface AzureVmWorkloadSAPAseDatabaseProtectedItem { * include: 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', 'IRPending' */ protectedItemHealthStatus?: ProtectedItemHealthStatus; - /** - * Health status of protected item. Possible values include: 'Passed', 'ActionRequired', - * 'ActionSuggested', 'Healthy', 'TransientDegraded', 'PersistentDegraded', 'TransientUnhealthy', - * 'PersistentUnhealthy', 'Invalid' - */ - healthStatus?: HealthStatus; - /** - * Health details on this backup item. - */ - healthDetails?: HealthDetails[]; /** * Additional information for this backup item. */ extendedInfo?: AzureVmWorkloadProtectedItemExtendedInfo; + /** + * Health details of different KPIs + */ + kpisHealths?: { [propertyName: string]: KPIResourceHealthDetails }; } /** @@ -1992,20 +2031,14 @@ export interface AzureVmWorkloadSAPHanaDatabaseProtectedItem { * include: 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', 'IRPending' */ protectedItemHealthStatus?: ProtectedItemHealthStatus; - /** - * Health status of protected item. Possible values include: 'Passed', 'ActionRequired', - * 'ActionSuggested', 'Healthy', 'TransientDegraded', 'PersistentDegraded', 'TransientUnhealthy', - * 'PersistentUnhealthy', 'Invalid' - */ - healthStatus?: HealthStatus; - /** - * Health details on this backup item. - */ - healthDetails?: HealthDetails[]; /** * Additional information for this backup item. */ extendedInfo?: AzureVmWorkloadProtectedItemExtendedInfo; + /** + * Health details of different KPIs + */ + kpisHealths?: { [propertyName: string]: KPIResourceHealthDetails }; } /** @@ -2120,20 +2153,14 @@ export interface AzureVmWorkloadSQLDatabaseProtectedItem { * include: 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', 'IRPending' */ protectedItemHealthStatus?: ProtectedItemHealthStatus; - /** - * Health status of protected item. Possible values include: 'Passed', 'ActionRequired', - * 'ActionSuggested', 'Healthy', 'TransientDegraded', 'PersistentDegraded', 'TransientUnhealthy', - * 'PersistentUnhealthy', 'Invalid' - */ - healthStatus?: HealthStatus; - /** - * Health details on this backup item. - */ - healthDetails?: HealthDetails[]; /** * Additional information for this backup item. */ extendedInfo?: AzureVmWorkloadProtectedItemExtendedInfo; + /** + * Health details of different KPIs + */ + kpisHealths?: { [propertyName: string]: KPIResourceHealthDetails }; } /** @@ -2271,7 +2298,11 @@ export interface PointInTimeRange { /** * Contains the possible cases for AzureWorkloadRecoveryPoint. */ -export type AzureWorkloadRecoveryPointUnion = AzureWorkloadRecoveryPoint | AzureWorkloadPointInTimeRecoveryPointUnion | AzureWorkloadSAPHanaRecoveryPoint | AzureWorkloadSQLRecoveryPointUnion; +export type AzureWorkloadRecoveryPointUnion = + | AzureWorkloadRecoveryPoint + | AzureWorkloadPointInTimeRecoveryPointUnion + | AzureWorkloadSAPHanaRecoveryPoint + | AzureWorkloadSQLRecoveryPointUnion; /** * Workload specific recovery point, specifically encapsulates full/diff recovery point @@ -2287,16 +2318,27 @@ export interface AzureWorkloadRecoveryPoint { */ readonly recoveryPointTimeInUTC?: Date; /** - * Type of restore point. Possible values include: 'Invalid', 'Full', 'Log', 'Differential' + * Type of restore point. Possible values include: 'Invalid', 'Full', 'Log', 'Differential', + * 'Incremental' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: RestorePointType; + /** + * Recovery point tier information. + */ + recoveryPointTierDetails?: RecoveryPointTierInformation[]; + /** + * Eligibility of RP to be moved to another tier + */ + recoveryPointMoveReadinessInfo?: { [propertyName: string]: RecoveryPointMoveReadinessInfo }; } /** * Contains the possible cases for AzureWorkloadPointInTimeRecoveryPoint. */ -export type AzureWorkloadPointInTimeRecoveryPointUnion = AzureWorkloadPointInTimeRecoveryPoint | AzureWorkloadSAPHanaPointInTimeRecoveryPoint; +export type AzureWorkloadPointInTimeRecoveryPointUnion = + | AzureWorkloadPointInTimeRecoveryPoint + | AzureWorkloadSAPHanaPointInTimeRecoveryPoint; /** * Recovery point specific to PointInTime @@ -2312,10 +2354,19 @@ export interface AzureWorkloadPointInTimeRecoveryPoint { */ readonly recoveryPointTimeInUTC?: Date; /** - * Type of restore point. Possible values include: 'Invalid', 'Full', 'Log', 'Differential' + * Type of restore point. Possible values include: 'Invalid', 'Full', 'Log', 'Differential', + * 'Incremental' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: RestorePointType; + /** + * Recovery point tier information. + */ + recoveryPointTierDetails?: RecoveryPointTierInformation[]; + /** + * Eligibility of RP to be moved to another tier + */ + recoveryPointMoveReadinessInfo?: { [propertyName: string]: RecoveryPointMoveReadinessInfo }; /** * List of log ranges */ @@ -2325,7 +2376,11 @@ export interface AzureWorkloadPointInTimeRecoveryPoint { /** * Contains the possible cases for AzureWorkloadRestoreRequest. */ -export type AzureWorkloadRestoreRequestUnion = AzureWorkloadRestoreRequest | AzureWorkloadPointInTimeRestoreRequest | AzureWorkloadSAPHanaRestoreRequestUnion | AzureWorkloadSQLRestoreRequestUnion; +export type AzureWorkloadRestoreRequestUnion = + | AzureWorkloadRestoreRequest + | AzureWorkloadPointInTimeRestoreRequest + | AzureWorkloadSAPHanaRestoreRequestUnion + | AzureWorkloadSQLRestoreRequestUnion; /** * AzureWorkload-specific restore. @@ -2357,6 +2412,12 @@ export interface AzureWorkloadRestoreRequest { * include: 'Invalid', 'FileRecovery', 'WorkloadRecovery' */ recoveryMode?: RecoveryMode; + /** + * This is the complete ARM Id of the target VM + * For e.g. + * /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + */ + targetVirtualMachineId?: string; } /** @@ -2389,12 +2450,46 @@ export interface AzureWorkloadPointInTimeRestoreRequest { * include: 'Invalid', 'FileRecovery', 'WorkloadRecovery' */ recoveryMode?: RecoveryMode; + /** + * This is the complete ARM Id of the target VM + * For e.g. + * /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + */ + targetVirtualMachineId?: string; /** * PointInTime value */ pointInTime?: Date; } +/** + * Recovery point tier information. + */ +export interface RecoveryPointTierInformation { + /** + * Recovery point tier type. Possible values include: 'Invalid', 'InstantRP', 'HardenedRP', + * 'ArchivedRP' + */ + type?: RecoveryPointTierType; + /** + * Recovery point tier status. Possible values include: 'Invalid', 'Valid', 'Disabled', + * 'Deleted', 'Rehydrated' + */ + status?: RecoveryPointTierStatus; + /** + * Recovery point tier status. + */ + extendedInfo?: { [propertyName: string]: string }; +} + +/** + * An interface representing RecoveryPointMoveReadinessInfo. + */ +export interface RecoveryPointMoveReadinessInfo { + isReadyForMove?: boolean; + additionalInfo?: string; +} + /** * Details about target workload during restore operation. */ @@ -2432,10 +2527,19 @@ export interface AzureWorkloadSAPHanaPointInTimeRecoveryPoint { */ readonly recoveryPointTimeInUTC?: Date; /** - * Type of restore point. Possible values include: 'Invalid', 'Full', 'Log', 'Differential' + * Type of restore point. Possible values include: 'Invalid', 'Full', 'Log', 'Differential', + * 'Incremental' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: RestorePointType; + /** + * Recovery point tier information. + */ + recoveryPointTierDetails?: RecoveryPointTierInformation[]; + /** + * Eligibility of RP to be moved to another tier + */ + recoveryPointMoveReadinessInfo?: { [propertyName: string]: RecoveryPointMoveReadinessInfo }; /** * List of log ranges */ @@ -2445,7 +2549,10 @@ export interface AzureWorkloadSAPHanaPointInTimeRecoveryPoint { /** * Contains the possible cases for AzureWorkloadSAPHanaRestoreRequest. */ -export type AzureWorkloadSAPHanaRestoreRequestUnion = AzureWorkloadSAPHanaRestoreRequest | AzureWorkloadSAPHanaPointInTimeRestoreRequest; +export type AzureWorkloadSAPHanaRestoreRequestUnion = + | AzureWorkloadSAPHanaRestoreRequest + | AzureWorkloadSAPHanaPointInTimeRestoreRequestUnion + | AzureWorkloadSAPHanaRestoreWithRehydrateRequest; /** * AzureWorkload SAP Hana-specific restore. @@ -2477,8 +2584,21 @@ export interface AzureWorkloadSAPHanaRestoreRequest { * include: 'Invalid', 'FileRecovery', 'WorkloadRecovery' */ recoveryMode?: RecoveryMode; + /** + * This is the complete ARM Id of the target VM + * For e.g. + * /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + */ + targetVirtualMachineId?: string; } +/** + * Contains the possible cases for AzureWorkloadSAPHanaPointInTimeRestoreRequest. + */ +export type AzureWorkloadSAPHanaPointInTimeRestoreRequestUnion = + | AzureWorkloadSAPHanaPointInTimeRestoreRequest + | AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest; + /** * AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log restore */ @@ -2509,6 +2629,12 @@ export interface AzureWorkloadSAPHanaPointInTimeRestoreRequest { * include: 'Invalid', 'FileRecovery', 'WorkloadRecovery' */ recoveryMode?: RecoveryMode; + /** + * This is the complete ARM Id of the target VM + * For e.g. + * /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + */ + targetVirtualMachineId?: string; /** * PointInTime value */ @@ -2529,16 +2655,27 @@ export interface AzureWorkloadSAPHanaRecoveryPoint { */ readonly recoveryPointTimeInUTC?: Date; /** - * Type of restore point. Possible values include: 'Invalid', 'Full', 'Log', 'Differential' + * Type of restore point. Possible values include: 'Invalid', 'Full', 'Log', 'Differential', + * 'Incremental' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: RestorePointType; + /** + * Recovery point tier information. + */ + recoveryPointTierDetails?: RecoveryPointTierInformation[]; + /** + * Eligibility of RP to be moved to another tier + */ + recoveryPointMoveReadinessInfo?: { [propertyName: string]: RecoveryPointMoveReadinessInfo }; } /** * Contains the possible cases for AzureWorkloadSQLRecoveryPoint. */ -export type AzureWorkloadSQLRecoveryPointUnion = AzureWorkloadSQLRecoveryPoint | AzureWorkloadSQLPointInTimeRecoveryPoint; +export type AzureWorkloadSQLRecoveryPointUnion = + | AzureWorkloadSQLRecoveryPoint + | AzureWorkloadSQLPointInTimeRecoveryPoint; /** * SQL specific recoverypoint, specifically encapsulates full/diff recoverypoint along with @@ -2555,10 +2692,19 @@ export interface AzureWorkloadSQLRecoveryPoint { */ readonly recoveryPointTimeInUTC?: Date; /** - * Type of restore point. Possible values include: 'Invalid', 'Full', 'Log', 'Differential' + * Type of restore point. Possible values include: 'Invalid', 'Full', 'Log', 'Differential', + * 'Incremental' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: RestorePointType; + /** + * Recovery point tier information. + */ + recoveryPointTierDetails?: RecoveryPointTierInformation[]; + /** + * Eligibility of RP to be moved to another tier + */ + recoveryPointMoveReadinessInfo?: { [propertyName: string]: RecoveryPointMoveReadinessInfo }; /** * Extended Info that provides data directory details. Will be populated in two cases: * When a specific recovery point is accessed using GetRecoveryPoint @@ -2581,10 +2727,19 @@ export interface AzureWorkloadSQLPointInTimeRecoveryPoint { */ readonly recoveryPointTimeInUTC?: Date; /** - * Type of restore point. Possible values include: 'Invalid', 'Full', 'Log', 'Differential' + * Type of restore point. Possible values include: 'Invalid', 'Full', 'Log', 'Differential', + * 'Incremental' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: RestorePointType; + /** + * Recovery point tier information. + */ + recoveryPointTierDetails?: RecoveryPointTierInformation[]; + /** + * Eligibility of RP to be moved to another tier + */ + recoveryPointMoveReadinessInfo?: { [propertyName: string]: RecoveryPointMoveReadinessInfo }; /** * Extended Info that provides data directory details. Will be populated in two cases: * When a specific recovery point is accessed using GetRecoveryPoint @@ -2600,7 +2755,10 @@ export interface AzureWorkloadSQLPointInTimeRecoveryPoint { /** * Contains the possible cases for AzureWorkloadSQLRestoreRequest. */ -export type AzureWorkloadSQLRestoreRequestUnion = AzureWorkloadSQLRestoreRequest | AzureWorkloadSQLPointInTimeRestoreRequest; +export type AzureWorkloadSQLRestoreRequestUnion = + | AzureWorkloadSQLRestoreRequest + | AzureWorkloadSQLPointInTimeRestoreRequestUnion + | AzureWorkloadSQLRestoreWithRehydrateRequest; /** * AzureWorkload SQL -specific restore. Specifically for full/diff restore @@ -2632,6 +2790,12 @@ export interface AzureWorkloadSQLRestoreRequest { * include: 'Invalid', 'FileRecovery', 'WorkloadRecovery' */ recoveryMode?: RecoveryMode; + /** + * This is the complete ARM Id of the target VM + * For e.g. + * /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + */ + targetVirtualMachineId?: string; /** * Default option set to true. If this is set to false, alternate data directory must be provided */ @@ -2646,6 +2810,13 @@ export interface AzureWorkloadSQLRestoreRequest { alternateDirectoryPaths?: SQLDataDirectoryMapping[]; } +/** + * Contains the possible cases for AzureWorkloadSQLPointInTimeRestoreRequest. + */ +export type AzureWorkloadSQLPointInTimeRestoreRequestUnion = + | AzureWorkloadSQLPointInTimeRestoreRequest + | AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest; + /** * AzureWorkload SQL -specific restore. Specifically for PointInTime/Log restore */ @@ -2677,9 +2848,15 @@ export interface AzureWorkloadSQLPointInTimeRestoreRequest { */ recoveryMode?: RecoveryMode; /** - * Default option set to true. If this is set to false, alternate data directory must be provided + * This is the complete ARM Id of the target VM + * For e.g. + * /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} */ - shouldUseAlternateTargetLocation?: boolean; + targetVirtualMachineId?: string; + /** + * Default option set to true. If this is set to false, alternate data directory must be provided + */ + shouldUseAlternateTargetLocation?: boolean; /** * SQL specific property where user can chose to set no-recovery when restore operation is tried */ @@ -2750,43 +2927,6 @@ export interface SQLDataDirectoryMapping { targetPath?: string; } -/** - * Backup resource vault config details. - */ -export interface BackupResourceVaultConfig { - /** - * Storage type. Possible values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant' - */ - storageModelType?: StorageType; - /** - * Storage type. Possible values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant' - */ - storageType?: StorageType; - /** - * Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is - * always Locked. Possible values include: 'Invalid', 'Locked', 'Unlocked' - */ - storageTypeState?: StorageTypeState; - /** - * Enabled or Disabled. Possible values include: 'Invalid', 'Enabled', 'Disabled' - */ - enhancedSecurityState?: EnhancedSecurityState; - /** - * Soft Delete feature state. Possible values include: 'Invalid', 'Enabled', 'Disabled' - */ - softDeleteFeatureState?: SoftDeleteFeatureState; -} - -/** - * Backup resource vault config details. - */ -export interface BackupResourceVaultConfigResource extends Resource { - /** - * BackupResourceVaultConfigResource properties - */ - properties?: BackupResourceVaultConfig; -} - /** * BEK is bitlocker encryption key. */ @@ -2819,13 +2959,17 @@ export interface BMSRPQueryObject { endDate?: Date; /** * RestorePoint type. Possible values include: 'Invalid', 'Full', 'Log', 'Differential', - * 'FullAndDifferential', 'All' + * 'FullAndDifferential', 'All', 'Incremental' */ restorePointQueryType?: RestorePointQueryType; /** * In Get Recovery Point, it tells whether extended information about recovery point is asked. */ extendedInfo?: boolean; + /** + * Whether the RP can be moved to another tier + */ + moveReadyRPOnly?: boolean; } /** @@ -3196,7 +3340,10 @@ export interface EncryptionDetails { /** * Contains the possible cases for OperationResultInfoBase. */ -export type OperationResultInfoBaseUnion = OperationResultInfoBase | ExportJobsOperationResultInfo | OperationResultInfo; +export type OperationResultInfoBaseUnion = + | OperationResultInfoBase + | ExportJobsOperationResultInfo + | OperationResultInfo; /** * Base class for operation result info. @@ -3430,20 +3577,6 @@ export interface KeyAndSecretDetails { encryptionMechanism?: string; } -/** - * Recovery point tier information. - */ -export interface RecoveryPointTierInformation { - /** - * Recovery point tier type. Possible values include: 'Invalid', 'InstantRP', 'HardenedRP' - */ - type?: RecoveryPointTierType; - /** - * Recovery point tier status. Possible values include: 'Invalid', 'Valid', 'Disabled', 'Deleted' - */ - status?: RecoveryPointTierStatus; -} - /** * Disk configuration */ @@ -3532,8 +3665,21 @@ export interface IaasVMRecoveryPoint { * Disk configuration */ recoveryPointDiskConfiguration?: RecoveryPointDiskConfiguration; + /** + * Identifies the zone of the VM at the time of backup. Applicable only for zone-pinned Vms + */ + zones?: string[]; + /** + * Eligibility of RP to be moved to another tier + */ + recoveryPointMoveReadinessInfo?: { [propertyName: string]: RecoveryPointMoveReadinessInfo }; } +/** + * Contains the possible cases for IaasVMRestoreRequest. + */ +export type IaasVMRestoreRequestUnion = IaasVMRestoreRequest | IaasVMRestoreWithRehydrationRequest; + /** * IaaS VM workload-specific restore. */ @@ -3616,6 +3762,19 @@ export interface IaasVMRestoreRequest { * List of Disk LUNs for partial restore */ restoreDiskLunList?: number[]; + /** + * Flag to denote of an Unmanaged disk VM should be restored with Managed disks. + */ + restoreWithManagedDisks?: boolean; + /** + * DiskEncryptionSet's ID - needed if the VM needs to be encrypted at rest during restore with + * customer managed key. + */ + diskEncryptionSetId?: string; + /** + * Target zone where the VM and its disks should be restored. + */ + zones?: string[]; } /** @@ -3636,7 +3795,7 @@ export interface JobQueryObject { /** * Type of operation. Possible values include: 'Invalid', 'Register', 'UnRegister', * 'ConfigureBackup', 'Backup', 'Restore', 'DisableBackup', 'DeleteBackupData', - * 'CrossRegionRestore', 'Undelete' + * 'CrossRegionRestore', 'Undelete', 'UpdateCustomerManagedKey' */ operation?: JobOperationType; /** @@ -4085,6 +4244,98 @@ export interface OperationResultInfo { jobList?: string[]; } +/** + * Prepare DataMove Request + */ +export interface PrepareDataMoveRequest { + /** + * ARM Id of target vault + */ + targetResourceId: string; + /** + * Target Region + */ + targetRegion: string; + /** + * DataMove Level. Possible values include: 'Invalid', 'Vault', 'Container' + */ + dataMoveLevel: DataMoveLevel; + /** + * Source Container ArmIds + * This needs to be populated only if DataMoveLevel is set to container + */ + sourceContainerArmIds?: string[]; + /** + * Ignore the artifacts which are already moved. + */ + ignoreMoved?: boolean; +} + +/** + * Contains the possible cases for VaultStorageConfigOperationResultResponse. + */ +export type VaultStorageConfigOperationResultResponseUnion = + | VaultStorageConfigOperationResultResponse + | PrepareDataMoveResponse; + +/** + * Operation result response for Vault Storage Config + */ +export interface VaultStorageConfigOperationResultResponse { + /** + * Polymorphic Discriminator + */ + objectType: "VaultStorageConfigOperationResultResponse"; +} + +/** + * Prepare DataMove Response + */ +export interface PrepareDataMoveResponse { + /** + * Polymorphic Discriminator + */ + objectType: "PrepareDataMoveResponse"; + /** + * Co-relationId for move operation + */ + correlationId?: string; + /** + * Source Vault Properties + */ + sourceVaultProperties?: { [propertyName: string]: string }; +} + +/** + * Trigger DataMove Request + */ +export interface TriggerDataMoveRequest { + /** + * ARM Id of source vault + */ + sourceResourceId: string; + /** + * Source Region + */ + sourceRegion: string; + /** + * DataMove Level. Possible values include: 'Invalid', 'Vault', 'Container' + */ + dataMoveLevel: DataMoveLevel; + /** + * Correlation Id + */ + correlationId: string; + /** + * Source Container ArmIds + */ + sourceContainerArmIds?: string[]; + /** + * Pause GC + */ + pauseGC?: boolean; +} + /** * This is the base class for operation result responses. */ @@ -4282,7 +4533,9 @@ export interface SimpleSchedulePolicy { /** * Contains the possible cases for ValidateOperationRequest. */ -export type ValidateOperationRequestUnion = ValidateOperationRequest | ValidateRestoreOperationRequestUnion; +export type ValidateOperationRequestUnion = + | ValidateOperationRequest + | ValidateRestoreOperationRequestUnion; /** * Base class for validate operation request. @@ -4297,7 +4550,9 @@ export interface ValidateOperationRequest { /** * Contains the possible cases for ValidateRestoreOperationRequest. */ -export type ValidateRestoreOperationRequestUnion = ValidateRestoreOperationRequest | ValidateIaasVMRestoreOperationRequest; +export type ValidateRestoreOperationRequestUnion = + | ValidateRestoreOperationRequest + | ValidateIaasVMRestoreOperationRequest; /** * AzureRestoreValidation request. @@ -4345,515 +4600,580 @@ export interface ValidateOperationsResponse { } /** - * Contains the possible cases for FeatureSupportRequest. + * Backup resource vault config details. */ -export type FeatureSupportRequestUnion = FeatureSupportRequest | AzureBackupGoalFeatureSupportRequest | AzureVMResourceFeatureSupportRequest; +export interface BackupResourceVaultConfig { + /** + * Storage type. Possible values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant', + * 'ZoneRedundant', 'ReadAccessGeoZoneRedundant' + */ + storageModelType?: StorageType; + /** + * Storage type. Possible values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant', + * 'ZoneRedundant', 'ReadAccessGeoZoneRedundant' + */ + storageType?: StorageType; + /** + * Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is + * always Locked. Possible values include: 'Invalid', 'Locked', 'Unlocked' + */ + storageTypeState?: StorageTypeState; + /** + * Enabled or Disabled. Possible values include: 'Invalid', 'Enabled', 'Disabled' + */ + enhancedSecurityState?: EnhancedSecurityState; + /** + * Soft Delete feature state. Possible values include: 'Invalid', 'Enabled', 'Disabled' + */ + softDeleteFeatureState?: SoftDeleteFeatureState; +} /** - * Base class for feature request + * Backup resource vault config details. */ -export interface FeatureSupportRequest { +export interface BackupResourceVaultConfigResource extends Resource { /** - * Polymorphic Discriminator + * BackupResourceVaultConfigResource properties */ - featureType: "FeatureSupportRequest"; + properties?: BackupResourceVaultConfig; } /** - * Azure backup goal feature specific request. + * Vault Job specific error information */ -export interface AzureBackupGoalFeatureSupportRequest { +export interface VaultJobErrorInfo { /** - * Polymorphic Discriminator + * Error code. */ - featureType: "AzureBackupGoals"; + errorCode?: number; + /** + * Localized error string. + */ + errorString?: string; + /** + * List of localized recommendations for above error code. + */ + recommendations?: string[]; } /** - * Contains the possible cases for ProtectionIntent. + * Vault Job for CMK - has CMK specific info. */ -export type ProtectionIntentUnion = ProtectionIntent | AzureRecoveryServiceVaultProtectionIntentUnion | AzureResourceProtectionIntent; +export interface VaultJobExtendedInfo { + /** + * Job properties. + */ + propertyBag?: { [propertyName: string]: string }; +} /** - * Base class for backup ProtectionIntent. + * Vault level Job */ -export interface ProtectionIntent { +export interface VaultJob { /** * Polymorphic Discriminator */ - protectionIntentItemType: "ProtectionIntent"; + jobType: "VaultJob"; /** - * Type of backup management for the backed up item. Possible values include: 'Invalid', + * Friendly name of the entity on which the current job is executing. + */ + entityFriendlyName?: string; + /** + * Backup management type to execute the current job. Possible values include: 'Invalid', * 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', * 'DefaultBackup' */ backupManagementType?: BackupManagementType; /** - * ARM ID of the resource to be backed up. + * The operation name. */ - sourceResourceId?: string; + operation?: string; /** - * ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + * Job status. */ - itemId?: string; + status?: string; /** - * ID of the backup policy with which this item is backed up. + * The start time. */ - policyId?: string; + startTime?: Date; /** - * Backup state of this backup item. Possible values include: 'Invalid', 'NotProtected', - * 'Protecting', 'Protected', 'ProtectionFailed' + * The end time. */ - protectionState?: ProtectionStatus; + endTime?: Date; + /** + * ActivityId of job. + */ + activityId?: string; + /** + * Time elapsed during the execution of this job. + */ + duration?: string; + /** + * Gets or sets the state/actions applicable on this job like cancel/retry. + */ + actionsInfo?: JobSupportedAction[]; + /** + * Error details on execution of this job. + */ + errorDetails?: VaultJobErrorInfo[]; + /** + * Additional information about the job. + */ + extendedInfo?: VaultJobExtendedInfo; } /** - * Contains the possible cases for AzureRecoveryServiceVaultProtectionIntent. + * Contains the possible cases for ProtectionContainer. */ -export type AzureRecoveryServiceVaultProtectionIntentUnion = AzureRecoveryServiceVaultProtectionIntent | AzureWorkloadAutoProtectionIntentUnion; +export type ProtectionContainerUnion = + | ProtectionContainer + | AzureSqlContainer + | AzureStorageContainer + | AzureWorkloadContainerUnion + | DpmContainerUnion + | GenericContainer + | IaaSVMContainerUnion + | MabContainer; /** - * Azure Recovery Services Vault specific protection intent item. + * Base class for container with backup items. Containers with specific workloads are derived from + * this class. */ -export interface AzureRecoveryServiceVaultProtectionIntent { +export interface ProtectionContainer { /** * Polymorphic Discriminator */ - protectionIntentItemType: "RecoveryServiceVaultItem"; + containerType: "ProtectionContainer"; /** - * Type of backup management for the backed up item. Possible values include: 'Invalid', + * Friendly name of the container. + */ + friendlyName?: string; + /** + * Type of backup management for the container. Possible values include: 'Invalid', * 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', * 'DefaultBackup' */ backupManagementType?: BackupManagementType; /** - * ARM ID of the resource to be backed up. - */ - sourceResourceId?: string; - /** - * ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId - */ - itemId?: string; - /** - * ID of the backup policy with which this item is backed up. + * Status of registration of the container with the Recovery Services Vault. */ - policyId?: string; + registrationStatus?: string; /** - * Backup state of this backup item. Possible values include: 'Invalid', 'NotProtected', - * 'Protecting', 'Protected', 'ProtectionFailed' + * Status of health of the container. */ - protectionState?: ProtectionStatus; + healthStatus?: string; } /** - * IaaS VM specific backup protection intent item. + * Contains the possible cases for DpmContainer. */ -export interface AzureResourceProtectionIntent { +export type DpmContainerUnion = DpmContainer | AzureBackupServerContainer; + +/** + * DPM workload-specific protection container. + */ +export interface DpmContainer { /** * Polymorphic Discriminator */ - protectionIntentItemType: "AzureResourceItem"; + containerType: "DPMContainer"; /** - * Type of backup management for the backed up item. Possible values include: 'Invalid', + * Friendly name of the container. + */ + friendlyName?: string; + /** + * Type of backup management for the container. Possible values include: 'Invalid', * 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', * 'DefaultBackup' */ backupManagementType?: BackupManagementType; /** - * ARM ID of the resource to be backed up. + * Status of registration of the container with the Recovery Services Vault. */ - sourceResourceId?: string; + registrationStatus?: string; /** - * ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + * Status of health of the container. */ - itemId?: string; + healthStatus?: string; /** - * ID of the backup policy with which this item is backed up. + * Specifies whether the container is re-registrable. */ - policyId?: string; + canReRegister?: boolean; /** - * Backup state of this backup item. Possible values include: 'Invalid', 'NotProtected', - * 'Protecting', 'Protected', 'ProtectionFailed' + * ID of container. */ - protectionState?: ProtectionStatus; + containerId?: string; /** - * Friendly name of the VM represented by this backup item. + * Number of protected items in the BackupEngine */ - friendlyName?: string; -} - -/** - * AzureResource(IaaS VM) Specific feature support request - */ -export interface AzureVMResourceFeatureSupportRequest { + protectedItemCount?: number; /** - * Polymorphic Discriminator + * Backup engine Agent version */ - featureType: "AzureVMResourceBackup"; + dpmAgentVersion?: string; /** - * Size of the resource: VM size(A/D series etc) in case of IaasVM + * List of BackupEngines protecting the container */ - vmSize?: string; + dpmServers?: string[]; /** - * SKUs (Premium/Managed etc) in case of IaasVM + * To check if upgrade available */ - vmSku?: string; -} - -/** - * Response for feature support requests for Azure IaasVm - */ -export interface AzureVMResourceFeatureSupportResponse { + upgradeAvailable?: boolean; /** - * Support status of feature. Possible values include: 'Invalid', 'Supported', 'DefaultOFF', - * 'DefaultON', 'NotSupported' + * Protection status of the container. */ - supportStatus?: SupportStatus; + protectionStatus?: string; + /** + * Extended Info of the container. + */ + extendedInfo?: DPMContainerExtendedInfo; } /** - * Contains the possible cases for AzureWorkloadAutoProtectionIntent. - */ -export type AzureWorkloadAutoProtectionIntentUnion = AzureWorkloadAutoProtectionIntent | AzureWorkloadSQLAutoProtectionIntent; - -/** - * Azure Recovery Services Vault specific protection intent item. + * AzureBackupServer (DPMVenus) workload-specific protection container. */ -export interface AzureWorkloadAutoProtectionIntent { +export interface AzureBackupServerContainer { /** * Polymorphic Discriminator */ - protectionIntentItemType: "AzureWorkloadAutoProtectionIntent"; + containerType: "AzureBackupServerContainer"; /** - * Type of backup management for the backed up item. Possible values include: 'Invalid', + * Friendly name of the container. + */ + friendlyName?: string; + /** + * Type of backup management for the container. Possible values include: 'Invalid', * 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', * 'DefaultBackup' */ backupManagementType?: BackupManagementType; /** - * ARM ID of the resource to be backed up. - */ - sourceResourceId?: string; - /** - * ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + * Status of registration of the container with the Recovery Services Vault. */ - itemId?: string; + registrationStatus?: string; /** - * ID of the backup policy with which this item is backed up. + * Status of health of the container. */ - policyId?: string; + healthStatus?: string; /** - * Backup state of this backup item. Possible values include: 'Invalid', 'NotProtected', - * 'Protecting', 'Protected', 'ProtectionFailed' + * Specifies whether the container is re-registrable. */ - protectionState?: ProtectionStatus; -} - -/** - * Azure Workload SQL Auto Protection intent item. - */ -export interface AzureWorkloadSQLAutoProtectionIntent { + canReRegister?: boolean; /** - * Polymorphic Discriminator + * ID of container. */ - protectionIntentItemType: "AzureWorkloadSQLAutoProtectionIntent"; + containerId?: string; /** - * Type of backup management for the backed up item. Possible values include: 'Invalid', - * 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - * 'DefaultBackup' + * Number of protected items in the BackupEngine */ - backupManagementType?: BackupManagementType; + protectedItemCount?: number; /** - * ARM ID of the resource to be backed up. + * Backup engine Agent version */ - sourceResourceId?: string; + dpmAgentVersion?: string; /** - * ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + * List of BackupEngines protecting the container */ - itemId?: string; + dpmServers?: string[]; /** - * ID of the backup policy with which this item is backed up. + * To check if upgrade available */ - policyId?: string; + upgradeAvailable?: boolean; /** - * Backup state of this backup item. Possible values include: 'Invalid', 'NotProtected', - * 'Protecting', 'Protected', 'ProtectionFailed' + * Protection status of the container. */ - protectionState?: ProtectionStatus; + protectionStatus?: string; /** - * Workload item type of the item for which intent is to be set. Possible values include: - * 'Invalid', 'SQLInstance', 'SQLDataBase', 'SAPHanaSystem', 'SAPHanaDatabase', 'SAPAseSystem', - * 'SAPAseDatabase' + * Extended Info of the container. */ - workloadItemType?: WorkloadItemType; + extendedInfo?: DPMContainerExtendedInfo; } /** - * The name of usage. + * Contains the possible cases for BackupEngineBase. */ -export interface NameInfo { +export type BackupEngineBaseUnion = BackupEngineBase | AzureBackupServerEngine | DpmBackupEngine; + +/** + * The base backup engine class. All workload specific backup engines derive from this class. + */ +export interface BackupEngineBase { /** - * Value of usage. + * Polymorphic Discriminator */ - value?: string; + backupEngineType: "BackupEngineBase"; /** - * Localized value of usage. + * Friendly name of the backup engine. */ - localizedValue?: string; -} - -/** - * Backup management usages of a vault. - */ -export interface BackupManagementUsage { + friendlyName?: string; /** - * Unit of the usage. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', - * 'CountPerSecond', 'BytesPerSecond' + * Type of backup management for the backup engine. Possible values include: 'Invalid', + * 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + * 'DefaultBackup' */ - unit?: UsagesUnit; + backupManagementType?: BackupManagementType; /** - * Quota period of usage. + * Registration status of the backup engine with the Recovery Services Vault. */ - quotaPeriod?: string; + registrationStatus?: string; /** - * Next reset time of usage. + * Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} */ - nextResetTime?: Date; + backupEngineState?: string; /** - * Current value of usage. + * Backup status of the backup engine. */ - currentValue?: number; + healthStatus?: string; /** - * Limit of usage. + * Flag indicating if the backup engine be registered, once already registered. */ - limit?: number; + canReRegister?: boolean; /** - * Name of usage. + * ID of the backup engine. */ - name?: NameInfo; -} - -/** - * BackupStatus request. - */ -export interface BackupStatusRequest { + backupEngineId?: string; /** - * Container Type - VM, SQLPaaS, DPM, AzureFileShare. Possible values include: 'Invalid', 'VM', - * 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', - * 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', - * 'SAPAseDatabase' + * Backup engine version */ - resourceType?: DataSourceType; + dpmVersion?: string; /** - * Entire ARM resource id of the resource + * Backup agent version */ - resourceId?: string; + azureBackupAgentVersion?: string; /** - * Protectable Item Logical Name + * To check if backup agent upgrade available */ - poLogicalName?: string; + isAzureBackupAgentUpgradeAvailable?: boolean; + /** + * To check if backup engine upgrade available + */ + isDpmUpgradeAvailable?: boolean; + /** + * Extended info of the backupengine + */ + extendedInfo?: BackupEngineExtendedInfo; } /** - * BackupStatus response. + * Backup engine type when Azure Backup Server is used to manage the backups. */ -export interface BackupStatusResponse { +export interface AzureBackupServerEngine { /** - * Specifies whether the container is registered or not. Possible values include: 'Invalid', - * 'NotProtected', 'Protecting', 'Protected', 'ProtectionFailed' + * Polymorphic Discriminator */ - protectionStatus?: ProtectionStatus; + backupEngineType: "AzureBackupServerEngine"; /** - * Specifies the arm resource id of the vault + * Friendly name of the backup engine. */ - vaultId?: string; + friendlyName?: string; /** - * Specifies the fabric name - Azure or AD. Possible values include: 'Invalid', 'Azure' + * Type of backup management for the backup engine. Possible values include: 'Invalid', + * 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + * 'DefaultBackup' */ - fabricName?: FabricName; + backupManagementType?: BackupManagementType; /** - * Specifies the product specific container name. E.g. - * iaasvmcontainer;iaasvmcontainer;csname;vmname. + * Registration status of the backup engine with the Recovery Services Vault. */ - containerName?: string; + registrationStatus?: string; /** - * Specifies the product specific ds name. E.g. vm;iaasvmcontainer;csname;vmname. + * Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} */ - protectedItemName?: string; + backupEngineState?: string; /** - * ErrorCode in case of intent failed + * Backup status of the backup engine. */ - errorCode?: string; + healthStatus?: string; /** - * ErrorMessage in case of intent failed. + * Flag indicating if the backup engine be registered, once already registered. */ - errorMessage?: string; + canReRegister?: boolean; /** - * Specifies the policy name which is used for protection + * ID of the backup engine. */ - policyName?: string; + backupEngineId?: string; /** - * Container registration status + * Backup engine version */ - registrationStatus?: string; -} - -/** - * Query parameters to fetch backup summaries. - */ -export interface BMSBackupSummariesQueryObject { + dpmVersion?: string; /** - * Backup management type for this container. Possible values include: 'Invalid', - * 'BackupProtectedItemCountSummary', 'BackupProtectionContainerCountSummary' + * Backup agent version */ - type?: Type; -} - -/** - * Contract to validate if backup can be enabled on the given resource in a given vault and given - * configuration. - * It will validate followings - * 1. Vault capacity - * 2. VM is already protected - * 3. Any VM related configuration passed in properties. - */ -export interface PreValidateEnableBackupRequest { + azureBackupAgentVersion?: string; /** - * ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc. Possible values include: 'Invalid', - * 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - * 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', - * 'SAPHanaDatabase', 'SAPAseDatabase' + * To check if backup agent upgrade available */ - resourceType?: DataSourceType; + isAzureBackupAgentUpgradeAvailable?: boolean; /** - * ARM Virtual Machine Id + * To check if backup engine upgrade available */ - resourceId?: string; + isDpmUpgradeAvailable?: boolean; /** - * ARM id of the Recovery Services Vault + * Extended info of the backupengine */ - vaultId?: string; + extendedInfo?: BackupEngineExtendedInfo; +} + +/** + * Contains the possible cases for BackupRequest. + */ +export type BackupRequestUnion = + | BackupRequest + | AzureFileShareBackupRequest + | AzureWorkloadBackupRequest + | IaasVMBackupRequest; + +/** + * Base class for backup request. Workload-specific backup requests are derived from this class. + */ +export interface BackupRequest { /** - * Configuration of VM if any needs to be validated like OS type etc + * Polymorphic Discriminator */ - properties?: string; + objectType: "BackupRequest"; } /** - * Response contract for enable backup validation request + * AzureFileShare workload-specific backup request. */ -export interface PreValidateEnableBackupResponse { +export interface AzureFileShareBackupRequest { /** - * Validation Status. Possible values include: 'Invalid', 'Succeeded', 'Failed' + * Polymorphic Discriminator */ - status?: ValidationStatus; + objectType: "AzureFileShareBackupRequest"; /** - * Response error code + * Backup copy will expire after the time specified (UTC). */ - errorCode?: string; + recoveryPointExpiryTimeInUTC?: Date; +} + +/** + * Contains the possible cases for WorkloadProtectableItem. + */ +export type WorkloadProtectableItemUnion = + | WorkloadProtectableItem + | AzureFileShareProtectableItem + | AzureVmWorkloadProtectableItemUnion + | IaaSVMProtectableItemUnion; + +/** + * Base class for backup item. Workload-specific backup items are derived from this class. + */ +export interface WorkloadProtectableItem { /** - * Response error message + * Polymorphic Discriminator */ - errorMessage?: string; + protectableItemType: "WorkloadProtectableItem"; /** - * Recommended action for user + * Type of backup management to backup an item. */ - recommendation?: string; + backupManagementType?: string; /** - * Specifies the product specific container name. E.g. - * iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required - * for portal + * Type of workload for the backup management */ - containerName?: string; + workloadType?: string; /** - * Specifies the product specific ds name. E.g. vm;iaasvmcontainer;rgname;vmname. This is - * required for portal + * Friendly name of the backup item. */ - protectedItemName?: string; + friendlyName?: string; + /** + * State of the back up item. Possible values include: 'Invalid', 'NotProtected', 'Protecting', + * 'Protected', 'ProtectionFailed' + */ + protectionState?: ProtectionStatus; } /** - * Filters to list protection intent. + * Protectable item for Azure Fileshare workloads. */ -export interface ProtectionIntentQueryObject { +export interface AzureFileShareProtectableItem { /** - * Backup management type for the backed up item. Possible values include: 'Invalid', - * 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - * 'DefaultBackup' + * Polymorphic Discriminator */ - backupManagementType?: BackupManagementType; + protectableItemType: "AzureFileShare"; /** - * Type of workload this item represents. Possible values include: 'Invalid', 'SQLInstance', - * 'SQLAvailabilityGroupContainer' + * Type of backup management to backup an item. */ - itemType?: IntentItemType; + backupManagementType?: string; /** - * Parent name of the intent + * Type of workload for the backup management */ - parentName?: string; + workloadType?: string; /** - * Item name of the intent + * Friendly name of the backup item. */ - itemName?: string; -} - -/** - * Base class for backup ProtectionIntent. - */ -export interface ProtectionIntentResource extends Resource { + friendlyName?: string; /** - * ProtectionIntentResource properties + * State of the back up item. Possible values include: 'Invalid', 'NotProtected', 'Protecting', + * 'Protected', 'ProtectionFailed' */ - properties?: ProtectionIntentUnion; + protectionState?: ProtectionStatus; + /** + * Full Fabric ID of container to which this protectable item belongs. For example, ARM ID. + */ + parentContainerFabricId?: string; + /** + * Friendly name of container to which this protectable item belongs. + */ + parentContainerFriendlyName?: string; + /** + * File Share type XSync or XSMB. Possible values include: 'Invalid', 'XSMB', 'XSync' + */ + azureFileShareType?: AzureFileShareType; } /** - * Contains the possible cases for ProtectionContainer. + * Contains the possible cases for ILRRequest. */ -export type ProtectionContainerUnion = ProtectionContainer | AzureSqlContainer | AzureStorageContainer | AzureWorkloadContainerUnion | DpmContainerUnion | GenericContainer | IaaSVMContainerUnion | MabContainer; +export type ILRRequestUnion = + | ILRRequest + | AzureFileShareProvisionILRRequest + | IaasVMILRRegistrationRequest; /** - * Base class for container with backup items. Containers with specific workloads are derived from - * this class. + * Parameters to Provision ILR API. */ -export interface ProtectionContainer { +export interface ILRRequest { /** * Polymorphic Discriminator */ - containerType: "ProtectionContainer"; - /** - * Friendly name of the container. - */ - friendlyName?: string; + objectType: "ILRRequest"; +} + +/** + * Update snapshot Uri with the correct friendly Name of the source Azure file share. + */ +export interface AzureFileShareProvisionILRRequest { /** - * Type of backup management for the container. Possible values include: 'Invalid', - * 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - * 'DefaultBackup' + * Polymorphic Discriminator */ - backupManagementType?: BackupManagementType; + objectType: "AzureFileShareProvisionILRRequest"; /** - * Status of registration of the container with the Recovery Services Vault. + * Recovery point ID. */ - registrationStatus?: string; + recoveryPointId?: string; /** - * Status of health of the container. + * Source Storage account ARM Id */ - healthStatus?: string; + sourceResourceId?: string; } /** - * Contains the possible cases for DpmContainer. + * Contains the possible cases for IaaSVMContainer. */ -export type DpmContainerUnion = DpmContainer | AzureBackupServerContainer; +export type IaaSVMContainerUnion = + | IaaSVMContainer + | AzureIaaSClassicComputeVMContainer + | AzureIaaSComputeVMContainer; /** - * DPM workload-specific protection container. + * IaaS VM workload-specific container. */ -export interface DpmContainer { +export interface IaaSVMContainer { /** * Polymorphic Discriminator */ - containerType: "DPMContainer"; + containerType: "IaaSVMContainer"; /** * Friendly name of the container. */ @@ -4873,47 +5193,27 @@ export interface DpmContainer { */ healthStatus?: string; /** - * Specifies whether the container is re-registrable. - */ - canReRegister?: boolean; - /** - * ID of container. - */ - containerId?: string; - /** - * Number of protected items in the BackupEngine - */ - protectedItemCount?: number; - /** - * Backup engine Agent version - */ - dpmAgentVersion?: string; - /** - * List of BackupEngines protecting the container - */ - dpmServers?: string[]; - /** - * To check if upgrade available + * Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. */ - upgradeAvailable?: boolean; + virtualMachineId?: string; /** - * Protection status of the container. + * Specifies whether the container represents a Classic or an Azure Resource Manager VM. */ - protectionStatus?: string; + virtualMachineVersion?: string; /** - * Extended Info of the container. + * Resource group name of Recovery Services Vault. */ - extendedInfo?: DPMContainerExtendedInfo; + resourceGroup?: string; } /** - * AzureBackupServer (DPMVenus) workload-specific protection container. + * IaaS VM workload-specific backup item representing a classic virtual machine. */ -export interface AzureBackupServerContainer { +export interface AzureIaaSClassicComputeVMContainer { /** * Polymorphic Discriminator */ - containerType: "AzureBackupServerContainer"; + containerType: "Microsoft.ClassicCompute/virtualMachines"; /** * Friendly name of the container. */ @@ -4933,206 +5233,137 @@ export interface AzureBackupServerContainer { */ healthStatus?: string; /** - * Specifies whether the container is re-registrable. + * Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. */ - canReRegister?: boolean; + virtualMachineId?: string; /** - * ID of container. + * Specifies whether the container represents a Classic or an Azure Resource Manager VM. */ - containerId?: string; + virtualMachineVersion?: string; /** - * Number of protected items in the BackupEngine + * Resource group name of Recovery Services Vault. */ - protectedItemCount?: number; + resourceGroup?: string; +} + +/** + * Contains the possible cases for IaaSVMProtectableItem. + */ +export type IaaSVMProtectableItemUnion = + | IaaSVMProtectableItem + | AzureIaaSClassicComputeVMProtectableItem + | AzureIaaSComputeVMProtectableItem; + +/** + * IaaS VM workload-specific backup item. + */ +export interface IaaSVMProtectableItem { /** - * Backup engine Agent version + * Polymorphic Discriminator */ - dpmAgentVersion?: string; + protectableItemType: "IaaSVMProtectableItem"; /** - * List of BackupEngines protecting the container + * Type of backup management to backup an item. */ - dpmServers?: string[]; + backupManagementType?: string; /** - * To check if upgrade available + * Type of workload for the backup management */ - upgradeAvailable?: boolean; + workloadType?: string; /** - * Protection status of the container. + * Friendly name of the backup item. */ - protectionStatus?: string; + friendlyName?: string; /** - * Extended Info of the container. + * State of the back up item. Possible values include: 'Invalid', 'NotProtected', 'Protecting', + * 'Protected', 'ProtectionFailed' */ - extendedInfo?: DPMContainerExtendedInfo; + protectionState?: ProtectionStatus; + /** + * Fully qualified ARM ID of the virtual machine. + */ + virtualMachineId?: string; } /** - * Contains the possible cases for BackupEngineBase. - */ -export type BackupEngineBaseUnion = BackupEngineBase | AzureBackupServerEngine | DpmBackupEngine; - -/** - * The base backup engine class. All workload specific backup engines derive from this class. + * IaaS VM workload-specific backup item representing the Classic Compute VM. */ -export interface BackupEngineBase { +export interface AzureIaaSClassicComputeVMProtectableItem { /** * Polymorphic Discriminator */ - backupEngineType: "BackupEngineBase"; - /** - * Friendly name of the backup engine. - */ - friendlyName?: string; - /** - * Type of backup management for the backup engine. Possible values include: 'Invalid', - * 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - * 'DefaultBackup' - */ - backupManagementType?: BackupManagementType; - /** - * Registration status of the backup engine with the Recovery Services Vault. - */ - registrationStatus?: string; - /** - * Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} - */ - backupEngineState?: string; - /** - * Backup status of the backup engine. - */ - healthStatus?: string; - /** - * Flag indicating if the backup engine be registered, once already registered. - */ - canReRegister?: boolean; - /** - * ID of the backup engine. - */ - backupEngineId?: string; + protectableItemType: "Microsoft.ClassicCompute/virtualMachines"; /** - * Backup engine version + * Type of backup management to backup an item. */ - dpmVersion?: string; + backupManagementType?: string; /** - * Backup agent version + * Type of workload for the backup management */ - azureBackupAgentVersion?: string; + workloadType?: string; /** - * To check if backup agent upgrade available + * Friendly name of the backup item. */ - isAzureBackupAgentUpgradeAvailable?: boolean; + friendlyName?: string; /** - * To check if backup engine upgrade available + * State of the back up item. Possible values include: 'Invalid', 'NotProtected', 'Protecting', + * 'Protected', 'ProtectionFailed' */ - isDpmUpgradeAvailable?: boolean; + protectionState?: ProtectionStatus; /** - * Extended info of the backupengine + * Fully qualified ARM ID of the virtual machine. */ - extendedInfo?: BackupEngineExtendedInfo; + virtualMachineId?: string; } /** - * Backup engine type when Azure Backup Server is used to manage the backups. + * IaaS VM workload-specific backup item representing an Azure Resource Manager virtual machine. */ -export interface AzureBackupServerEngine { +export interface AzureIaaSComputeVMContainer { /** * Polymorphic Discriminator */ - backupEngineType: "AzureBackupServerEngine"; + containerType: "Microsoft.Compute/virtualMachines"; /** - * Friendly name of the backup engine. + * Friendly name of the container. */ friendlyName?: string; /** - * Type of backup management for the backup engine. Possible values include: 'Invalid', + * Type of backup management for the container. Possible values include: 'Invalid', * 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', * 'DefaultBackup' */ backupManagementType?: BackupManagementType; /** - * Registration status of the backup engine with the Recovery Services Vault. + * Status of registration of the container with the Recovery Services Vault. */ registrationStatus?: string; /** - * Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} - */ - backupEngineState?: string; - /** - * Backup status of the backup engine. + * Status of health of the container. */ healthStatus?: string; /** - * Flag indicating if the backup engine be registered, once already registered. - */ - canReRegister?: boolean; - /** - * ID of the backup engine. - */ - backupEngineId?: string; - /** - * Backup engine version - */ - dpmVersion?: string; - /** - * Backup agent version - */ - azureBackupAgentVersion?: string; - /** - * To check if backup agent upgrade available - */ - isAzureBackupAgentUpgradeAvailable?: boolean; - /** - * To check if backup engine upgrade available - */ - isDpmUpgradeAvailable?: boolean; - /** - * Extended info of the backupengine - */ - extendedInfo?: BackupEngineExtendedInfo; -} - -/** - * Contains the possible cases for BackupRequest. - */ -export type BackupRequestUnion = BackupRequest | AzureFileShareBackupRequest | AzureWorkloadBackupRequest | IaasVMBackupRequest; - -/** - * Base class for backup request. Workload-specific backup requests are derived from this class. - */ -export interface BackupRequest { - /** - * Polymorphic Discriminator + * Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. */ - objectType: "BackupRequest"; -} - -/** - * AzureFileShare workload-specific backup request. - */ -export interface AzureFileShareBackupRequest { + virtualMachineId?: string; /** - * Polymorphic Discriminator + * Specifies whether the container represents a Classic or an Azure Resource Manager VM. */ - objectType: "AzureFileShareBackupRequest"; + virtualMachineVersion?: string; /** - * Backup copy will expire after the time specified (UTC). + * Resource group name of Recovery Services Vault. */ - recoveryPointExpiryTimeInUTC?: Date; + resourceGroup?: string; } /** - * Contains the possible cases for WorkloadProtectableItem. - */ -export type WorkloadProtectableItemUnion = WorkloadProtectableItem | AzureFileShareProtectableItem | AzureVmWorkloadProtectableItemUnion | IaaSVMProtectableItemUnion; - -/** - * Base class for backup item. Workload-specific backup items are derived from this class. + * IaaS VM workload-specific backup item representing the Azure Resource Manager VM. */ -export interface WorkloadProtectableItem { +export interface AzureIaaSComputeVMProtectableItem { /** * Polymorphic Discriminator */ - protectableItemType: "WorkloadProtectableItem"; + protectableItemType: "Microsoft.Compute/virtualMachines"; /** * Type of backup management to backup an item. */ @@ -5150,93 +5381,79 @@ export interface WorkloadProtectableItem { * 'Protected', 'ProtectionFailed' */ protectionState?: ProtectionStatus; + /** + * Fully qualified ARM ID of the virtual machine. + */ + virtualMachineId?: string; } /** - * Protectable item for Azure Fileshare workloads. + * Contains the possible cases for AzureWorkloadContainer. */ -export interface AzureFileShareProtectableItem { +export type AzureWorkloadContainerUnion = + | AzureWorkloadContainer + | AzureSQLAGWorkloadContainerProtectionContainer + | AzureVMAppContainerProtectionContainer; + +/** + * Container for the workloads running inside Azure Compute or Classic Compute. + */ +export interface AzureWorkloadContainer { /** * Polymorphic Discriminator */ - protectableItemType: "AzureFileShare"; - /** - * Type of backup management to backup an item. - */ - backupManagementType?: string; - /** - * Type of workload for the backup management - */ - workloadType?: string; + containerType: "AzureWorkloadContainer"; /** - * Friendly name of the backup item. + * Friendly name of the container. */ friendlyName?: string; /** - * State of the back up item. Possible values include: 'Invalid', 'NotProtected', 'Protecting', - * 'Protected', 'ProtectionFailed' + * Type of backup management for the container. Possible values include: 'Invalid', + * 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + * 'DefaultBackup' */ - protectionState?: ProtectionStatus; + backupManagementType?: BackupManagementType; /** - * Full Fabric ID of container to which this protectable item belongs. For example, ARM ID. + * Status of registration of the container with the Recovery Services Vault. */ - parentContainerFabricId?: string; + registrationStatus?: string; /** - * Friendly name of container to which this protectable item belongs. + * Status of health of the container. */ - parentContainerFriendlyName?: string; + healthStatus?: string; /** - * File Share type XSync or XSMB. Possible values include: 'Invalid', 'XSMB', 'XSync' + * ARM ID of the virtual machine represented by this Azure Workload Container */ - azureFileShareType?: AzureFileShareType; -} - -/** - * Contains the possible cases for ILRRequest. - */ -export type ILRRequestUnion = ILRRequest | AzureFileShareProvisionILRRequest | IaasVMILRRegistrationRequest; - -/** - * Parameters to Provision ILR API. - */ -export interface ILRRequest { + sourceResourceId?: string; /** - * Polymorphic Discriminator + * Time stamp when this container was updated. */ - objectType: "ILRRequest"; -} - -/** - * Update snapshot Uri with the correct friendly Name of the source Azure file share. - */ -export interface AzureFileShareProvisionILRRequest { + lastUpdatedTime?: Date; /** - * Polymorphic Discriminator + * Additional details of a workload container. */ - objectType: "AzureFileShareProvisionILRRequest"; + extendedInfo?: AzureWorkloadContainerExtendedInfo; /** - * Recovery point ID. + * Workload type for which registration was sent. Possible values include: 'Invalid', 'VM', + * 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', + * 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + * 'SAPAseDatabase' */ - recoveryPointId?: string; + workloadType?: WorkloadType; /** - * Source Storage account ARM Id + * Re-Do Operation. Possible values include: 'Invalid', 'Register', 'Reregister' */ - sourceResourceId?: string; + operationType?: OperationType; } /** - * Contains the possible cases for IaaSVMContainer. - */ -export type IaaSVMContainerUnion = IaaSVMContainer | AzureIaaSClassicComputeVMContainer | AzureIaaSComputeVMContainer; - -/** - * IaaS VM workload-specific container. + * Container for SQL workloads under SQL Availability Group. */ -export interface IaaSVMContainer { +export interface AzureSQLAGWorkloadContainerProtectionContainer { /** * Polymorphic Discriminator */ - containerType: "IaaSVMContainer"; + containerType: "SQLAGWorkLoadContainer"; /** * Friendly name of the container. */ @@ -5256,27 +5473,38 @@ export interface IaaSVMContainer { */ healthStatus?: string; /** - * Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. + * ARM ID of the virtual machine represented by this Azure Workload Container */ - virtualMachineId?: string; + sourceResourceId?: string; /** - * Specifies whether the container represents a Classic or an Azure Resource Manager VM. + * Time stamp when this container was updated. */ - virtualMachineVersion?: string; + lastUpdatedTime?: Date; /** - * Resource group name of Recovery Services Vault. + * Additional details of a workload container. */ - resourceGroup?: string; + extendedInfo?: AzureWorkloadContainerExtendedInfo; + /** + * Workload type for which registration was sent. Possible values include: 'Invalid', 'VM', + * 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', + * 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + * 'SAPAseDatabase' + */ + workloadType?: WorkloadType; + /** + * Re-Do Operation. Possible values include: 'Invalid', 'Register', 'Reregister' + */ + operationType?: OperationType; } /** - * IaaS VM workload-specific backup item representing a classic virtual machine. + * Azure Sql workload-specific container. */ -export interface AzureIaaSClassicComputeVMContainer { +export interface AzureSqlContainer { /** * Polymorphic Discriminator */ - containerType: "Microsoft.ClassicCompute/virtualMachines"; + containerType: "AzureSqlContainer"; /** * Friendly name of the container. */ @@ -5295,95 +5523,68 @@ export interface AzureIaaSClassicComputeVMContainer { * Status of health of the container. */ healthStatus?: string; - /** - * Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. - */ - virtualMachineId?: string; - /** - * Specifies whether the container represents a Classic or an Azure Resource Manager VM. - */ - virtualMachineVersion?: string; - /** - * Resource group name of Recovery Services Vault. - */ - resourceGroup?: string; } /** - * Contains the possible cases for IaaSVMProtectableItem. - */ -export type IaaSVMProtectableItemUnion = IaaSVMProtectableItem | AzureIaaSClassicComputeVMProtectableItem | AzureIaaSComputeVMProtectableItem; - -/** - * IaaS VM workload-specific backup item. + * Azure Storage Account workload-specific container. */ -export interface IaaSVMProtectableItem { +export interface AzureStorageContainer { /** * Polymorphic Discriminator */ - protectableItemType: "IaaSVMProtectableItem"; - /** - * Type of backup management to backup an item. - */ - backupManagementType?: string; - /** - * Type of workload for the backup management - */ - workloadType?: string; + containerType: "StorageContainer"; /** - * Friendly name of the backup item. + * Friendly name of the container. */ friendlyName?: string; /** - * State of the back up item. Possible values include: 'Invalid', 'NotProtected', 'Protecting', - * 'Protected', 'ProtectionFailed' - */ - protectionState?: ProtectionStatus; - /** - * Fully qualified ARM ID of the virtual machine. + * Type of backup management for the container. Possible values include: 'Invalid', + * 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + * 'DefaultBackup' */ - virtualMachineId?: string; -} - -/** - * IaaS VM workload-specific backup item representing the Classic Compute VM. - */ -export interface AzureIaaSClassicComputeVMProtectableItem { + backupManagementType?: BackupManagementType; /** - * Polymorphic Discriminator + * Status of registration of the container with the Recovery Services Vault. */ - protectableItemType: "Microsoft.ClassicCompute/virtualMachines"; + registrationStatus?: string; /** - * Type of backup management to backup an item. + * Status of health of the container. */ - backupManagementType?: string; + healthStatus?: string; /** - * Type of workload for the backup management + * Fully qualified ARM url. */ - workloadType?: string; + sourceResourceId?: string; /** - * Friendly name of the backup item. + * Storage account version. */ - friendlyName?: string; + storageAccountVersion?: string; /** - * State of the back up item. Possible values include: 'Invalid', 'NotProtected', 'Protecting', - * 'Protected', 'ProtectionFailed' + * Resource group name of Recovery Services Vault. */ - protectionState?: ProtectionStatus; + resourceGroup?: string; /** - * Fully qualified ARM ID of the virtual machine. + * Number of items backed up in this container. */ - virtualMachineId?: string; + protectedItemCount?: number; } /** - * IaaS VM workload-specific backup item representing an Azure Resource Manager virtual machine. + * Contains the possible cases for ProtectableContainer. */ -export interface AzureIaaSComputeVMContainer { +export type ProtectableContainerUnion = + | ProtectableContainer + | AzureStorageProtectableContainer + | AzureVMAppContainerProtectableContainer; + +/** + * Protectable Container Class. + */ +export interface ProtectableContainer { /** * Polymorphic Discriminator */ - containerType: "Microsoft.Compute/virtualMachines"; + protectableContainerType: "ProtectableContainer"; /** * Friendly name of the container. */ @@ -5394,72 +5595,52 @@ export interface AzureIaaSComputeVMContainer { * 'DefaultBackup' */ backupManagementType?: BackupManagementType; - /** - * Status of registration of the container with the Recovery Services Vault. - */ - registrationStatus?: string; /** * Status of health of the container. */ healthStatus?: string; /** - * Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. - */ - virtualMachineId?: string; - /** - * Specifies whether the container represents a Classic or an Azure Resource Manager VM. - */ - virtualMachineVersion?: string; - /** - * Resource group name of Recovery Services Vault. + * Fabric Id of the container such as ARM Id. */ - resourceGroup?: string; + containerId?: string; } /** - * IaaS VM workload-specific backup item representing the Azure Resource Manager VM. + * Azure Storage-specific protectable containers */ -export interface AzureIaaSComputeVMProtectableItem { +export interface AzureStorageProtectableContainer { /** * Polymorphic Discriminator */ - protectableItemType: "Microsoft.Compute/virtualMachines"; - /** - * Type of backup management to backup an item. - */ - backupManagementType?: string; + protectableContainerType: "StorageContainer"; /** - * Type of workload for the backup management + * Friendly name of the container. */ - workloadType?: string; + friendlyName?: string; /** - * Friendly name of the backup item. + * Type of backup management for the container. Possible values include: 'Invalid', + * 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + * 'DefaultBackup' */ - friendlyName?: string; + backupManagementType?: BackupManagementType; /** - * State of the back up item. Possible values include: 'Invalid', 'NotProtected', 'Protecting', - * 'Protected', 'ProtectionFailed' + * Status of health of the container. */ - protectionState?: ProtectionStatus; + healthStatus?: string; /** - * Fully qualified ARM ID of the virtual machine. + * Fabric Id of the container such as ARM Id. */ - virtualMachineId?: string; + containerId?: string; } /** - * Contains the possible cases for AzureWorkloadContainer. - */ -export type AzureWorkloadContainerUnion = AzureWorkloadContainer | AzureSQLAGWorkloadContainerProtectionContainer | AzureVMAppContainerProtectionContainer; - -/** - * Container for the workloads running inside Azure Compute or Classic Compute. + * Azure workload-specific container */ -export interface AzureWorkloadContainer { +export interface AzureVMAppContainerProtectableContainer { /** * Polymorphic Discriminator */ - containerType: "AzureWorkloadContainer"; + protectableContainerType: "VMAppContainer"; /** * Friendly name of the container. */ @@ -5470,47 +5651,24 @@ export interface AzureWorkloadContainer { * 'DefaultBackup' */ backupManagementType?: BackupManagementType; - /** - * Status of registration of the container with the Recovery Services Vault. - */ - registrationStatus?: string; /** * Status of health of the container. */ healthStatus?: string; /** - * ARM ID of the virtual machine represented by this Azure Workload Container - */ - sourceResourceId?: string; - /** - * Time stamp when this container was updated. - */ - lastUpdatedTime?: Date; - /** - * Additional details of a workload container. - */ - extendedInfo?: AzureWorkloadContainerExtendedInfo; - /** - * Workload type for which registration was sent. Possible values include: 'Invalid', 'VM', - * 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', - * 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', - * 'SAPAseDatabase' - */ - workloadType?: WorkloadType; - /** - * Re-Do Operation. Possible values include: 'Invalid', 'Register', 'Reregister' + * Fabric Id of the container such as ARM Id. */ - operationType?: OperationType; + containerId?: string; } /** - * Container for SQL workloads under SQL Availability Group. + * Container for SQL workloads under Azure Virtual Machines. */ -export interface AzureSQLAGWorkloadContainerProtectionContainer { +export interface AzureVMAppContainerProtectionContainer { /** * Polymorphic Discriminator */ - containerType: "SQLAGWorkLoadContainer"; + containerType: "VMAppContainer"; /** * Friendly name of the container. */ @@ -5555,283 +5713,78 @@ export interface AzureSQLAGWorkloadContainerProtectionContainer { } /** - * Azure Sql workload-specific container. + * Contains the possible cases for WorkloadItem. */ -export interface AzureSqlContainer { +export type WorkloadItemUnion = WorkloadItem | AzureVmWorkloadItemUnion; + +/** + * Base class for backup item. Workload-specific backup items are derived from this class. + */ +export interface WorkloadItem { /** * Polymorphic Discriminator */ - containerType: "AzureSqlContainer"; + workloadItemType: "WorkloadItem"; /** - * Friendly name of the container. + * Type of backup management to backup an item. */ - friendlyName?: string; + backupManagementType?: string; /** - * Type of backup management for the container. Possible values include: 'Invalid', - * 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - * 'DefaultBackup' + * Type of workload for the backup management */ - backupManagementType?: BackupManagementType; + workloadType?: string; /** - * Status of registration of the container with the Recovery Services Vault. + * Friendly name of the backup item. */ - registrationStatus?: string; + friendlyName?: string; /** - * Status of health of the container. + * State of the back up item. Possible values include: 'Invalid', 'NotProtected', 'Protecting', + * 'Protected', 'ProtectionFailed' */ - healthStatus?: string; + protectionState?: ProtectionStatus; } /** - * Azure Storage Account workload-specific container. + * Contains the possible cases for AzureVmWorkloadItem. */ -export interface AzureStorageContainer { +export type AzureVmWorkloadItemUnion = + | AzureVmWorkloadItem + | AzureVmWorkloadSAPAseDatabaseWorkloadItem + | AzureVmWorkloadSAPAseSystemWorkloadItem + | AzureVmWorkloadSAPHanaDatabaseWorkloadItem + | AzureVmWorkloadSAPHanaSystemWorkloadItem + | AzureVmWorkloadSQLDatabaseWorkloadItem + | AzureVmWorkloadSQLInstanceWorkloadItem; + +/** + * Azure VM workload-specific workload item. + */ +export interface AzureVmWorkloadItem { /** * Polymorphic Discriminator */ - containerType: "StorageContainer"; + workloadItemType: "AzureVmWorkloadItem"; /** - * Friendly name of the container. + * Type of backup management to backup an item. */ - friendlyName?: string; + backupManagementType?: string; /** - * Type of backup management for the container. Possible values include: 'Invalid', - * 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - * 'DefaultBackup' + * Type of workload for the backup management */ - backupManagementType?: BackupManagementType; + workloadType?: string; /** - * Status of registration of the container with the Recovery Services Vault. + * Friendly name of the backup item. */ - registrationStatus?: string; + friendlyName?: string; /** - * Status of health of the container. + * State of the back up item. Possible values include: 'Invalid', 'NotProtected', 'Protecting', + * 'Protected', 'ProtectionFailed' */ - healthStatus?: string; + protectionState?: ProtectionStatus; /** - * Fully qualified ARM url. + * Name for instance or AG */ - sourceResourceId?: string; - /** - * Storage account version. - */ - storageAccountVersion?: string; - /** - * Resource group name of Recovery Services Vault. - */ - resourceGroup?: string; - /** - * Number of items backed up in this container. - */ - protectedItemCount?: number; -} - -/** - * Contains the possible cases for ProtectableContainer. - */ -export type ProtectableContainerUnion = ProtectableContainer | AzureStorageProtectableContainer | AzureVMAppContainerProtectableContainer; - -/** - * Protectable Container Class. - */ -export interface ProtectableContainer { - /** - * Polymorphic Discriminator - */ - protectableContainerType: "ProtectableContainer"; - /** - * Friendly name of the container. - */ - friendlyName?: string; - /** - * Type of backup management for the container. Possible values include: 'Invalid', - * 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - * 'DefaultBackup' - */ - backupManagementType?: BackupManagementType; - /** - * Status of health of the container. - */ - healthStatus?: string; - /** - * Fabric Id of the container such as ARM Id. - */ - containerId?: string; -} - -/** - * Azure Storage-specific protectable containers - */ -export interface AzureStorageProtectableContainer { - /** - * Polymorphic Discriminator - */ - protectableContainerType: "StorageContainer"; - /** - * Friendly name of the container. - */ - friendlyName?: string; - /** - * Type of backup management for the container. Possible values include: 'Invalid', - * 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - * 'DefaultBackup' - */ - backupManagementType?: BackupManagementType; - /** - * Status of health of the container. - */ - healthStatus?: string; - /** - * Fabric Id of the container such as ARM Id. - */ - containerId?: string; -} - -/** - * Azure workload-specific container - */ -export interface AzureVMAppContainerProtectableContainer { - /** - * Polymorphic Discriminator - */ - protectableContainerType: "VMAppContainer"; - /** - * Friendly name of the container. - */ - friendlyName?: string; - /** - * Type of backup management for the container. Possible values include: 'Invalid', - * 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - * 'DefaultBackup' - */ - backupManagementType?: BackupManagementType; - /** - * Status of health of the container. - */ - healthStatus?: string; - /** - * Fabric Id of the container such as ARM Id. - */ - containerId?: string; -} - -/** - * Container for SQL workloads under Azure Virtual Machines. - */ -export interface AzureVMAppContainerProtectionContainer { - /** - * Polymorphic Discriminator - */ - containerType: "VMAppContainer"; - /** - * Friendly name of the container. - */ - friendlyName?: string; - /** - * Type of backup management for the container. Possible values include: 'Invalid', - * 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - * 'DefaultBackup' - */ - backupManagementType?: BackupManagementType; - /** - * Status of registration of the container with the Recovery Services Vault. - */ - registrationStatus?: string; - /** - * Status of health of the container. - */ - healthStatus?: string; - /** - * ARM ID of the virtual machine represented by this Azure Workload Container - */ - sourceResourceId?: string; - /** - * Time stamp when this container was updated. - */ - lastUpdatedTime?: Date; - /** - * Additional details of a workload container. - */ - extendedInfo?: AzureWorkloadContainerExtendedInfo; - /** - * Workload type for which registration was sent. Possible values include: 'Invalid', 'VM', - * 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', - * 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', - * 'SAPAseDatabase' - */ - workloadType?: WorkloadType; - /** - * Re-Do Operation. Possible values include: 'Invalid', 'Register', 'Reregister' - */ - operationType?: OperationType; -} - -/** - * Contains the possible cases for WorkloadItem. - */ -export type WorkloadItemUnion = WorkloadItem | AzureVmWorkloadItemUnion; - -/** - * Base class for backup item. Workload-specific backup items are derived from this class. - */ -export interface WorkloadItem { - /** - * Polymorphic Discriminator - */ - workloadItemType: "WorkloadItem"; - /** - * Type of backup management to backup an item. - */ - backupManagementType?: string; - /** - * Type of workload for the backup management - */ - workloadType?: string; - /** - * Friendly name of the backup item. - */ - friendlyName?: string; - /** - * State of the back up item. Possible values include: 'Invalid', 'NotProtected', 'Protecting', - * 'Protected', 'ProtectionFailed' - */ - protectionState?: ProtectionStatus; -} - -/** - * Contains the possible cases for AzureVmWorkloadItem. - */ -export type AzureVmWorkloadItemUnion = AzureVmWorkloadItem | AzureVmWorkloadSAPAseDatabaseWorkloadItem | AzureVmWorkloadSAPAseSystemWorkloadItem | AzureVmWorkloadSAPHanaDatabaseWorkloadItem | AzureVmWorkloadSAPHanaSystemWorkloadItem | AzureVmWorkloadSQLDatabaseWorkloadItem | AzureVmWorkloadSQLInstanceWorkloadItem; - -/** - * Azure VM workload-specific workload item. - */ -export interface AzureVmWorkloadItem { - /** - * Polymorphic Discriminator - */ - workloadItemType: "AzureVmWorkloadItem"; - /** - * Type of backup management to backup an item. - */ - backupManagementType?: string; - /** - * Type of workload for the backup management - */ - workloadType?: string; - /** - * Friendly name of the backup item. - */ - friendlyName?: string; - /** - * State of the back up item. Possible values include: 'Invalid', 'NotProtected', 'Protecting', - * 'Protected', 'ProtectionFailed' - */ - protectionState?: ProtectionStatus; - /** - * Name for instance or AG - */ - parentName?: string; + parentName?: string; /** * Host/Cluster Name for instance or AG */ @@ -5872,7 +5825,14 @@ export interface PreBackupValidation { /** * Contains the possible cases for AzureVmWorkloadProtectableItem. */ -export type AzureVmWorkloadProtectableItemUnion = AzureVmWorkloadProtectableItem | AzureVmWorkloadSAPAseSystemProtectableItem | AzureVmWorkloadSAPHanaDatabaseProtectableItem | AzureVmWorkloadSAPHanaSystemProtectableItem | AzureVmWorkloadSQLAvailabilityGroupProtectableItem | AzureVmWorkloadSQLDatabaseProtectableItem | AzureVmWorkloadSQLInstanceProtectableItem; +export type AzureVmWorkloadProtectableItemUnion = + | AzureVmWorkloadProtectableItem + | AzureVmWorkloadSAPAseSystemProtectableItem + | AzureVmWorkloadSAPHanaDatabaseProtectableItem + | AzureVmWorkloadSAPHanaSystemProtectableItem + | AzureVmWorkloadSQLAvailabilityGroupProtectableItem + | AzureVmWorkloadSQLDatabaseProtectableItem + | AzureVmWorkloadSQLInstanceProtectableItem; /** * Azure VM workload-specific protectable item. @@ -6590,7 +6550,7 @@ export interface AzureWorkloadBackupRequest { objectType: "AzureWorkloadBackupRequest"; /** * Type of backup, viz. Full, Differential, Log or CopyOnlyFull. Possible values include: - * 'Invalid', 'Full', 'Differential', 'Log', 'CopyOnlyFull' + * 'Invalid', 'Full', 'Differential', 'Log', 'CopyOnlyFull', 'Incremental' */ backupType?: BackupType; /** @@ -6755,35 +6715,6 @@ export interface BackupRequestResource extends Resource { properties?: BackupRequestUnion; } -/** - * The resource storage details. - */ -export interface BackupResourceConfig { - /** - * Storage type. Possible values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant' - */ - storageModelType?: StorageType; - /** - * Storage type. Possible values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant' - */ - storageType?: StorageType; - /** - * Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is - * always Locked. Possible values include: 'Invalid', 'Locked', 'Unlocked' - */ - storageTypeState?: StorageTypeState; -} - -/** - * The resource storage details. - */ -export interface BackupResourceConfigResource extends Resource { - /** - * BackupResourceConfigResource properties - */ - properties?: BackupResourceConfig; -} - /** * Query parameters to fetch list of backup engines. */ @@ -7256,263 +7187,1763 @@ export interface MabContainer { */ containerId?: number; /** - * Number of items backed up in this container. + * Number of items backed up in this container. + */ + protectedItemCount?: number; + /** + * Agent version of this container. + */ + agentVersion?: string; + /** + * Additional information for this container + */ + extendedInfo?: MabContainerExtendedInfo; + /** + * Health details on this mab container. + */ + mabContainerHealthDetails?: MABContainerHealthDetails[]; + /** + * Health state of mab container. + */ + containerHealthState?: string; +} + +/** + * Error information associated with operation status call. + */ +export interface OperationStatusError { + /** + * Error code of the operation failure. + */ + code?: string; + /** + * Error message displayed if the operation failure. + */ + message?: string; +} + +/** + * Contains the possible cases for OperationStatusExtendedInfo. + */ +export type OperationStatusExtendedInfoUnion = + | OperationStatusExtendedInfo + | OperationStatusJobExtendedInfo + | OperationStatusJobsExtendedInfo + | OperationStatusProvisionILRExtendedInfo + | OperationStatusRecoveryPointExtendedInfo; + +/** + * Base class for additional information of operation status. + */ +export interface OperationStatusExtendedInfo { + /** + * Polymorphic Discriminator + */ + objectType: "OperationStatusExtendedInfo"; +} + +/** + * Operation status. + */ +export interface OperationStatus { + /** + * ID of the operation. + */ + id?: string; + /** + * Name of the operation. + */ + name?: string; + /** + * Operation status. Possible values include: 'Invalid', 'InProgress', 'Succeeded', 'Failed', + * 'Canceled' + */ + status?: OperationStatusValues; + /** + * Operation start time. Format: ISO-8601. + */ + startTime?: Date; + /** + * Operation end time. Format: ISO-8601. + */ + endTime?: Date; + /** + * Error information related to this operation. + */ + error?: OperationStatusError; + /** + * Additional information associated with this operation. + */ + properties?: OperationStatusExtendedInfoUnion; +} + +/** + * Operation status job extended info. + */ +export interface OperationStatusJobExtendedInfo { + /** + * Polymorphic Discriminator + */ + objectType: "OperationStatusJobExtendedInfo"; + /** + * ID of the job created for this protected item. + */ + jobId?: string; +} + +/** + * Operation status extended info for list of jobs. + */ +export interface OperationStatusJobsExtendedInfo { + /** + * Polymorphic Discriminator + */ + objectType: "OperationStatusJobsExtendedInfo"; + /** + * IDs of the jobs created for the protected item. + */ + jobIds?: string[]; + /** + * Stores all the failed jobs along with the corresponding error codes. + */ + failedJobsError?: { [propertyName: string]: string }; +} + +/** + * Operation status extended info for ILR provision action. + */ +export interface OperationStatusProvisionILRExtendedInfo { + /** + * Polymorphic Discriminator + */ + objectType: "OperationStatusProvisionILRExtendedInfo"; + /** + * Target details for file / folder restore. + */ + recoveryTarget?: InstantItemRecoveryTarget; +} + +/** + * Protectable Container Class. + */ +export interface ProtectableContainerResource extends Resource { + /** + * ProtectableContainerResource properties + */ + properties?: ProtectableContainerUnion; +} + +/** + * Base class for container with backup items. Containers with specific workloads are derived from + * this class. + */ +export interface ProtectionContainerResource extends Resource { + /** + * ProtectionContainerResource properties + */ + properties?: ProtectionContainerUnion; +} + +/** + * The token information details. + */ +export interface TokenInformation { + /** + * Token value. + */ + token?: string; + /** + * Expiry time of token. + */ + expiryTimeInUtcTicks?: number; + /** + * Security PIN + */ + securityPIN?: string; +} + +/** + * Base class for backup item. Workload-specific backup items are derived from this class. + */ +export interface WorkloadItemResource extends Resource { + /** + * WorkloadItemResource properties + */ + properties?: WorkloadItemUnion; +} + +/** + * Base class for backup item. Workload-specific backup items are derived from this class. + */ +export interface WorkloadProtectableItemResource extends Resource { + /** + * WorkloadProtectableItemResource properties + */ + properties?: WorkloadProtectableItemUnion; +} + +/** + * RP Rehydration Info + */ +export interface RecoveryPointRehydrationInfo { + /** + * How long the rehydrated RP should be kept + * Should be ISO8601 Duration format e.g. "P7D" + */ + rehydrationRetentionDuration?: string; + /** + * Rehydration Priority. Possible values include: 'Standard', 'High' + */ + rehydrationPriority?: RehydrationPriority; +} + +/** + * AzureWorkload SAP Hana-specific restore with integrated rehydration of recovery point. + */ +export interface AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest { + /** + * Polymorphic Discriminator + */ + objectType: "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest"; + /** + * Type of this recovery. Possible values include: 'Invalid', 'OriginalLocation', + * 'AlternateLocation', 'RestoreDisks', 'Offline' + */ + recoveryType?: RecoveryType; + /** + * Fully qualified ARM ID of the VM on which workload that was running is being recovered. + */ + sourceResourceId?: string; + /** + * Workload specific property bag. + */ + propertyBag?: { [propertyName: string]: string }; + /** + * Details of target database + */ + targetInfo?: TargetRestoreInfo; + /** + * Defines whether the current recovery mode is file restore or database restore. Possible values + * include: 'Invalid', 'FileRecovery', 'WorkloadRecovery' + */ + recoveryMode?: RecoveryMode; + /** + * This is the complete ARM Id of the target VM + * For e.g. + * /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + */ + targetVirtualMachineId?: string; + /** + * PointInTime value + */ + pointInTime?: Date; + /** + * RP Rehydration Info + */ + recoveryPointRehydrationInfo?: RecoveryPointRehydrationInfo; +} + +/** + * AzureWorkload SAP Hana-specific restore with integrated rehydration of recovery point. + */ +export interface AzureWorkloadSAPHanaRestoreWithRehydrateRequest { + /** + * Polymorphic Discriminator + */ + objectType: "AzureWorkloadSAPHanaRestoreWithRehydrateRequest"; + /** + * Type of this recovery. Possible values include: 'Invalid', 'OriginalLocation', + * 'AlternateLocation', 'RestoreDisks', 'Offline' + */ + recoveryType?: RecoveryType; + /** + * Fully qualified ARM ID of the VM on which workload that was running is being recovered. + */ + sourceResourceId?: string; + /** + * Workload specific property bag. + */ + propertyBag?: { [propertyName: string]: string }; + /** + * Details of target database + */ + targetInfo?: TargetRestoreInfo; + /** + * Defines whether the current recovery mode is file restore or database restore. Possible values + * include: 'Invalid', 'FileRecovery', 'WorkloadRecovery' + */ + recoveryMode?: RecoveryMode; + /** + * This is the complete ARM Id of the target VM + * For e.g. + * /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + */ + targetVirtualMachineId?: string; + /** + * RP Rehydration Info + */ + recoveryPointRehydrationInfo?: RecoveryPointRehydrationInfo; +} + +/** + * AzureWorkload SQL-specific restore with integrated rehydration of recovery point. + */ +export interface AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest { + /** + * Polymorphic Discriminator + */ + objectType: "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest"; + /** + * Type of this recovery. Possible values include: 'Invalid', 'OriginalLocation', + * 'AlternateLocation', 'RestoreDisks', 'Offline' + */ + recoveryType?: RecoveryType; + /** + * Fully qualified ARM ID of the VM on which workload that was running is being recovered. + */ + sourceResourceId?: string; + /** + * Workload specific property bag. + */ + propertyBag?: { [propertyName: string]: string }; + /** + * Details of target database + */ + targetInfo?: TargetRestoreInfo; + /** + * Defines whether the current recovery mode is file restore or database restore. Possible values + * include: 'Invalid', 'FileRecovery', 'WorkloadRecovery' + */ + recoveryMode?: RecoveryMode; + /** + * This is the complete ARM Id of the target VM + * For e.g. + * /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + */ + targetVirtualMachineId?: string; + /** + * Default option set to true. If this is set to false, alternate data directory must be provided + */ + shouldUseAlternateTargetLocation?: boolean; + /** + * SQL specific property where user can chose to set no-recovery when restore operation is tried + */ + isNonRecoverable?: boolean; + /** + * Data directory details + */ + alternateDirectoryPaths?: SQLDataDirectoryMapping[]; + /** + * PointInTime value + */ + pointInTime?: Date; + /** + * RP Rehydration Info + */ + recoveryPointRehydrationInfo?: RecoveryPointRehydrationInfo; +} + +/** + * AzureWorkload SQL-specific restore with integrated rehydration of recovery point + */ +export interface AzureWorkloadSQLRestoreWithRehydrateRequest { + /** + * Polymorphic Discriminator + */ + objectType: "AzureWorkloadSQLRestoreWithRehydrateRequest"; + /** + * Type of this recovery. Possible values include: 'Invalid', 'OriginalLocation', + * 'AlternateLocation', 'RestoreDisks', 'Offline' + */ + recoveryType?: RecoveryType; + /** + * Fully qualified ARM ID of the VM on which workload that was running is being recovered. + */ + sourceResourceId?: string; + /** + * Workload specific property bag. + */ + propertyBag?: { [propertyName: string]: string }; + /** + * Details of target database + */ + targetInfo?: TargetRestoreInfo; + /** + * Defines whether the current recovery mode is file restore or database restore. Possible values + * include: 'Invalid', 'FileRecovery', 'WorkloadRecovery' + */ + recoveryMode?: RecoveryMode; + /** + * This is the complete ARM Id of the target VM + * For e.g. + * /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + */ + targetVirtualMachineId?: string; + /** + * Default option set to true. If this is set to false, alternate data directory must be provided + */ + shouldUseAlternateTargetLocation?: boolean; + /** + * SQL specific property where user can chose to set no-recovery when restore operation is tried + */ + isNonRecoverable?: boolean; + /** + * Data directory details + */ + alternateDirectoryPaths?: SQLDataDirectoryMapping[]; + /** + * RP Rehydration Info + */ + recoveryPointRehydrationInfo?: RecoveryPointRehydrationInfo; +} + +/** + * IaaS VM workload-specific restore with integrated rehydration of recovery point. + */ +export interface IaasVMRestoreWithRehydrationRequest { + /** + * Polymorphic Discriminator + */ + objectType: "IaasVMRestoreWithRehydrationRequest"; + /** + * ID of the backup copy to be recovered. + */ + recoveryPointId?: string; + /** + * Type of this recovery. Possible values include: 'Invalid', 'OriginalLocation', + * 'AlternateLocation', 'RestoreDisks', 'Offline' + */ + recoveryType?: RecoveryType; + /** + * Fully qualified ARM ID of the VM which is being recovered. + */ + sourceResourceId?: string; + /** + * This is the complete ARM Id of the VM that will be created. + * For e.g. + * /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + */ + targetVirtualMachineId?: string; + /** + * This is the ARM Id of the resource group that you want to create for this Virtual machine and + * other artifacts. + * For e.g. /subscriptions/{subId}/resourcegroups/{rg} + */ + targetResourceGroupId?: string; + /** + * Fully qualified ARM ID of the storage account to which the VM has to be restored. + */ + storageAccountId?: string; + /** + * This is the virtual network Id of the vnet that will be attached to the virtual machine. + * User will be validated for join action permissions in the linked access. + */ + virtualNetworkId?: string; + /** + * Subnet ID, is the subnet ID associated with the to be restored VM. For Classic VMs it would be + * {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it would be ARM resource + * ID used to represent + * the subnet. + */ + subnetId?: string; + /** + * Fully qualified ARM ID of the domain name to be associated to the VM being restored. This + * applies only to Classic + * Virtual Machines. + */ + targetDomainNameId?: string; + /** + * Region in which the virtual machine is restored. + */ + region?: string; + /** + * Affinity group associated to VM to be restored. Used only for Classic Compute Virtual + * Machines. + */ + affinityGroup?: string; + /** + * Should a new cloud service be created while restoring the VM. If this is false, VM will be + * restored to the same + * cloud service as it was at the time of backup. + */ + createNewCloudService?: boolean; + /** + * Original Storage Account Option + */ + originalStorageAccountOption?: boolean; + /** + * Details needed if the VM was encrypted at the time of backup. + */ + encryptionDetails?: EncryptionDetails; + /** + * List of Disk LUNs for partial restore + */ + restoreDiskLunList?: number[]; + /** + * Flag to denote of an Unmanaged disk VM should be restored with Managed disks. + */ + restoreWithManagedDisks?: boolean; + /** + * DiskEncryptionSet's ID - needed if the VM needs to be encrypted at rest during restore with + * customer managed key. + */ + diskEncryptionSetId?: string; + /** + * Target zone where the VM and its disks should be restored. + */ + zones?: string[]; + /** + * RP Rehydration Info + */ + recoveryPointRehydrationInfo?: RecoveryPointRehydrationInfo; +} + +/** + * An interface representing MoveRPAcrossTiersRequest. + */ +export interface MoveRPAcrossTiersRequest { + /** + * Gets the class type. + */ + objectType?: string; + /** + * Source tier from where RP needs to be moved. Possible values include: 'Invalid', 'InstantRP', + * 'HardenedRP', 'ArchivedRP' + */ + sourceTierType?: RecoveryPointTierType; + /** + * Target tier where RP needs to be moved. Possible values include: 'Invalid', 'InstantRP', + * 'HardenedRP', 'ArchivedRP' + */ + targetTierType?: RecoveryPointTierType; +} + +/** + * ListRecoveryPointsRecommendedForMoveRequest Request + */ +export interface ListRecoveryPointsRecommendedForMoveRequest { + /** + * Gets the class type. + */ + objectType?: string; + /** + * List of Recovery Points excluded from Move + */ + excludedRPList?: string[]; +} + +/** + * The name of usage. + */ +export interface NameInfo { + /** + * Value of usage. + */ + value?: string; + /** + * Localized value of usage. + */ + localizedValue?: string; +} + +/** + * Backup management usages of a vault. + */ +export interface BackupManagementUsage { + /** + * Unit of the usage. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', + * 'CountPerSecond', 'BytesPerSecond' + */ + unit?: UsagesUnit; + /** + * Quota period of usage. + */ + quotaPeriod?: string; + /** + * Next reset time of usage. + */ + nextResetTime?: Date; + /** + * Current value of usage. + */ + currentValue?: number; + /** + * Limit of usage. + */ + limit?: number; + /** + * Name of usage. + */ + name?: NameInfo; +} + +/** + * Query parameters to fetch backup summaries. + */ +export interface BMSBackupSummariesQueryObject { + /** + * Backup management type for this container. Possible values include: 'Invalid', + * 'BackupProtectedItemCountSummary', 'BackupProtectionContainerCountSummary' + */ + type?: Type; +} + +/** + * An interface representing AADProperties. + */ +export interface AADProperties { + servicePrincipalClientId?: string; + tenantId?: string; + authority?: string; + audience?: string; + servicePrincipalObjectId?: string; +} + +/** + * An interface representing AADPropertiesResource. + */ +export interface AADPropertiesResource extends Resource { + /** + * AADPropertiesResource properties + */ + properties?: AADProperties; +} + +/** + * The resource storage details. + */ +export interface BackupResourceConfig { + /** + * Storage type. Possible values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant', + * 'ZoneRedundant', 'ReadAccessGeoZoneRedundant' + */ + storageModelType?: StorageType; + /** + * Storage type. Possible values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant', + * 'ZoneRedundant', 'ReadAccessGeoZoneRedundant' + */ + storageType?: StorageType; + /** + * Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is + * always Locked. Possible values include: 'Invalid', 'Locked', 'Unlocked' + */ + storageTypeState?: StorageTypeState; + /** + * Opt in details of Cross Region Restore feature. + */ + crossRegionRestoreFlag?: boolean; +} + +/** + * Request object for fetching CRR jobs. + */ +export interface CrrJobRequest { + /** + * Entire ARM resource id of the resource + */ + resourceId?: string; + /** + * Job Name of the job to be fetched + */ + jobName?: string; +} + +/** + * Request object for fetching CRR jobs. + */ +export interface CrrJobRequestResource extends Resource { + /** + * CrrJobRequestResource properties + */ + properties?: CrrJobRequest; +} + +/** + * The resource storage details. + */ +export interface BackupResourceConfigResource extends Resource { + /** + * BackupResourceConfigResource properties + */ + properties?: BackupResourceConfig; +} + +/** + * Contains the possible cases for CrrAccessToken. + */ +export type CrrAccessTokenUnion = CrrAccessToken | WorkloadCrrAccessToken; + +/** + * An interface representing CrrAccessToken. + */ +export interface CrrAccessToken { + /** + * Polymorphic Discriminator + */ + objectType: "CrrAccessToken"; + /** + * Access token used for authentication + */ + accessTokenString?: string; + /** + * Subscription Id of the source vault + */ + subscriptionId?: string; + /** + * Resource Group name of the source vault + */ + resourceGroupName?: string; + /** + * Resource Name of the source vault + */ + resourceName?: string; + /** + * Resource Id of the source vault + */ + resourceId?: string; + /** + * Protected item container id + */ + protectionContainerId?: number; + /** + * Recovery Point Id + */ + recoveryPointId?: string; + /** + * Recovery Point Time + */ + recoveryPointTime?: string; + /** + * Container Unique name + */ + containerName?: string; + /** + * Container Type + */ + containerType?: string; + /** + * Backup Management Type + */ + backupManagementType?: string; + /** + * Datasource Type + */ + datasourceType?: string; + /** + * Datasource Friendly Name + */ + datasourceName?: string; + /** + * Datasource Id + */ + datasourceId?: string; + /** + * Datasource Container Unique Name + */ + datasourceContainerName?: string; + /** + * CoordinatorServiceStampId to be used by BCM in restore call + */ + coordinatorServiceStampId?: string; + /** + * CoordinatorServiceStampUri to be used by BCM in restore call + */ + coordinatorServiceStampUri?: string; + /** + * ProtectionServiceStampId to be used by BCM in restore call + */ + protectionServiceStampId?: string; + /** + * ProtectionServiceStampUri to be used by BCM in restore call + */ + protectionServiceStampUri?: string; + /** + * Extended Information about the token like FileSpec etc. + */ + tokenExtendedInformation?: string; + /** + * Recovery point Tier Information + */ + rpTierInformation?: { [propertyName: string]: string }; + /** + * Recovery point information: Original SA option + */ + rpOriginalSAOption?: boolean; + /** + * Recovery point information: Managed virtual machine + */ + rpIsManagedVirtualMachine?: boolean; + /** + * Recovery point information: VM size description + */ + rpVMSizeDescription?: string; + /** + * Active region name of BMS Stamp + */ + bMSActiveRegion?: string; +} + +/** + * An interface representing CrossRegionRestoreRequest. + */ +export interface CrossRegionRestoreRequest { + /** + * Access details for cross region restore + */ + crossRegionRestoreAccessDetails?: CrrAccessTokenUnion; + /** + * Request object for triggering restore + */ + restoreRequest?: RestoreRequestUnion; +} + +/** + * An interface representing CrossRegionRestoreRequestResource. + */ +export interface CrossRegionRestoreRequestResource extends Resource { + /** + * CrossRegionRestoreRequestResource properties + */ + properties?: CrossRegionRestoreRequest; +} + +/** + * An interface representing CrrAccessTokenResource. + */ +export interface CrrAccessTokenResource extends Resource { + /** + * CrrAccessTokenResource properties + */ + properties?: CrrAccessTokenUnion; +} + +/** + * Filters to list backup items. + */ +export interface BMSAADPropertiesQueryObject { + /** + * Backup management type for the backed up item. Possible values include: 'Invalid', + * 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + * 'DefaultBackup' + */ + backupManagementType?: BackupManagementType; +} + +/** + * Operation status extended info for Updated Recovery Point. + */ +export interface OperationStatusRecoveryPointExtendedInfo { + /** + * Polymorphic Discriminator + */ + objectType: "OperationStatusRecoveryPointExtendedInfo"; + /** + * Recovery Point info with updated source snapshot URI + */ + updatedRecoveryPoint?: RecoveryPointUnion; + /** + * In case the share is in soft-deleted state, populate this field with deleted backup item + */ + deletedBackupItemVersion?: string; +} + +/** + * An interface representing WorkloadCrrAccessToken. + */ +export interface WorkloadCrrAccessToken { + /** + * Polymorphic Discriminator + */ + objectType: "WorkloadCrrAccessToken"; + /** + * Access token used for authentication + */ + accessTokenString?: string; + /** + * Subscription Id of the source vault + */ + subscriptionId?: string; + /** + * Resource Group name of the source vault + */ + resourceGroupName?: string; + /** + * Resource Name of the source vault + */ + resourceName?: string; + /** + * Resource Id of the source vault + */ + resourceId?: string; + /** + * Protected item container id + */ + protectionContainerId?: number; + /** + * Recovery Point Id + */ + recoveryPointId?: string; + /** + * Recovery Point Time + */ + recoveryPointTime?: string; + /** + * Container Unique name + */ + containerName?: string; + /** + * Container Type + */ + containerType?: string; + /** + * Backup Management Type + */ + backupManagementType?: string; + /** + * Datasource Type + */ + datasourceType?: string; + /** + * Datasource Friendly Name + */ + datasourceName?: string; + /** + * Datasource Id + */ + datasourceId?: string; + /** + * Datasource Container Unique Name + */ + datasourceContainerName?: string; + /** + * CoordinatorServiceStampId to be used by BCM in restore call + */ + coordinatorServiceStampId?: string; + /** + * CoordinatorServiceStampUri to be used by BCM in restore call + */ + coordinatorServiceStampUri?: string; + /** + * ProtectionServiceStampId to be used by BCM in restore call + */ + protectionServiceStampId?: string; + /** + * ProtectionServiceStampUri to be used by BCM in restore call + */ + protectionServiceStampUri?: string; + /** + * Extended Information about the token like FileSpec etc. + */ + tokenExtendedInformation?: string; + /** + * Recovery point Tier Information + */ + rpTierInformation?: { [propertyName: string]: string }; + /** + * Recovery point information: Original SA option + */ + rpOriginalSAOption?: boolean; + /** + * Recovery point information: Managed virtual machine + */ + rpIsManagedVirtualMachine?: boolean; + /** + * Recovery point information: VM size description + */ + rpVMSizeDescription?: string; + /** + * Active region name of BMS Stamp + */ + bMSActiveRegion?: string; + protectableObjectUniqueName?: string; + protectableObjectFriendlyName?: string; + protectableObjectWorkloadType?: string; + protectableObjectProtectionState?: string; + protectableObjectContainerHostOsName?: string; + protectableObjectParentLogicalContainerName?: string; + /** + * Container Id + */ + containerId?: string; + /** + * Policy Name + */ + policyName?: string; + /** + * Policy Id + */ + policyId?: string; +} + +/** + * Contains the possible cases for FeatureSupportRequest. + */ +export type FeatureSupportRequestUnion = + | FeatureSupportRequest + | AzureBackupGoalFeatureSupportRequest + | AzureVMResourceFeatureSupportRequest; + +/** + * Base class for feature request + */ +export interface FeatureSupportRequest { + /** + * Polymorphic Discriminator + */ + featureType: "FeatureSupportRequest"; +} + +/** + * Azure backup goal feature specific request. + */ +export interface AzureBackupGoalFeatureSupportRequest { + /** + * Polymorphic Discriminator + */ + featureType: "AzureBackupGoals"; +} + +/** + * Contains the possible cases for ProtectionIntent. + */ +export type ProtectionIntentUnion = + | ProtectionIntent + | AzureRecoveryServiceVaultProtectionIntentUnion + | AzureResourceProtectionIntent; + +/** + * Base class for backup ProtectionIntent. + */ +export interface ProtectionIntent { + /** + * Polymorphic Discriminator + */ + protectionIntentItemType: "ProtectionIntent"; + /** + * Type of backup management for the backed up item. Possible values include: 'Invalid', + * 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + * 'DefaultBackup' + */ + backupManagementType?: BackupManagementType; + /** + * ARM ID of the resource to be backed up. + */ + sourceResourceId?: string; + /** + * ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + */ + itemId?: string; + /** + * ID of the backup policy with which this item is backed up. + */ + policyId?: string; + /** + * Backup state of this backup item. Possible values include: 'Invalid', 'NotProtected', + * 'Protecting', 'Protected', 'ProtectionFailed' + */ + protectionState?: ProtectionStatus; +} + +/** + * Contains the possible cases for AzureRecoveryServiceVaultProtectionIntent. + */ +export type AzureRecoveryServiceVaultProtectionIntentUnion = + | AzureRecoveryServiceVaultProtectionIntent + | AzureWorkloadAutoProtectionIntentUnion; + +/** + * Azure Recovery Services Vault specific protection intent item. + */ +export interface AzureRecoveryServiceVaultProtectionIntent { + /** + * Polymorphic Discriminator + */ + protectionIntentItemType: "RecoveryServiceVaultItem"; + /** + * Type of backup management for the backed up item. Possible values include: 'Invalid', + * 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + * 'DefaultBackup' + */ + backupManagementType?: BackupManagementType; + /** + * ARM ID of the resource to be backed up. + */ + sourceResourceId?: string; + /** + * ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + */ + itemId?: string; + /** + * ID of the backup policy with which this item is backed up. + */ + policyId?: string; + /** + * Backup state of this backup item. Possible values include: 'Invalid', 'NotProtected', + * 'Protecting', 'Protected', 'ProtectionFailed' + */ + protectionState?: ProtectionStatus; +} + +/** + * IaaS VM specific backup protection intent item. + */ +export interface AzureResourceProtectionIntent { + /** + * Polymorphic Discriminator + */ + protectionIntentItemType: "AzureResourceItem"; + /** + * Type of backup management for the backed up item. Possible values include: 'Invalid', + * 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + * 'DefaultBackup' + */ + backupManagementType?: BackupManagementType; + /** + * ARM ID of the resource to be backed up. + */ + sourceResourceId?: string; + /** + * ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + */ + itemId?: string; + /** + * ID of the backup policy with which this item is backed up. + */ + policyId?: string; + /** + * Backup state of this backup item. Possible values include: 'Invalid', 'NotProtected', + * 'Protecting', 'Protected', 'ProtectionFailed' + */ + protectionState?: ProtectionStatus; + /** + * Friendly name of the VM represented by this backup item. + */ + friendlyName?: string; +} + +/** + * AzureResource(IaaS VM) Specific feature support request + */ +export interface AzureVMResourceFeatureSupportRequest { + /** + * Polymorphic Discriminator + */ + featureType: "AzureVMResourceBackup"; + /** + * Size of the resource: VM size(A/D series etc) in case of IaasVM + */ + vmSize?: string; + /** + * SKUs (Premium/Managed etc) in case of IaasVM + */ + vmSku?: string; +} + +/** + * Response for feature support requests for Azure IaasVm + */ +export interface AzureVMResourceFeatureSupportResponse { + /** + * Support status of feature. Possible values include: 'Invalid', 'Supported', 'DefaultOFF', + * 'DefaultON', 'NotSupported' + */ + supportStatus?: SupportStatus; +} + +/** + * Contains the possible cases for AzureWorkloadAutoProtectionIntent. + */ +export type AzureWorkloadAutoProtectionIntentUnion = + | AzureWorkloadAutoProtectionIntent + | AzureWorkloadSQLAutoProtectionIntent; + +/** + * Azure Recovery Services Vault specific protection intent item. + */ +export interface AzureWorkloadAutoProtectionIntent { + /** + * Polymorphic Discriminator + */ + protectionIntentItemType: "AzureWorkloadAutoProtectionIntent"; + /** + * Type of backup management for the backed up item. Possible values include: 'Invalid', + * 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + * 'DefaultBackup' + */ + backupManagementType?: BackupManagementType; + /** + * ARM ID of the resource to be backed up. + */ + sourceResourceId?: string; + /** + * ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + */ + itemId?: string; + /** + * ID of the backup policy with which this item is backed up. + */ + policyId?: string; + /** + * Backup state of this backup item. Possible values include: 'Invalid', 'NotProtected', + * 'Protecting', 'Protected', 'ProtectionFailed' + */ + protectionState?: ProtectionStatus; +} + +/** + * Azure Workload SQL Auto Protection intent item. + */ +export interface AzureWorkloadSQLAutoProtectionIntent { + /** + * Polymorphic Discriminator + */ + protectionIntentItemType: "AzureWorkloadSQLAutoProtectionIntent"; + /** + * Type of backup management for the backed up item. Possible values include: 'Invalid', + * 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + * 'DefaultBackup' + */ + backupManagementType?: BackupManagementType; + /** + * ARM ID of the resource to be backed up. + */ + sourceResourceId?: string; + /** + * ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + */ + itemId?: string; + /** + * ID of the backup policy with which this item is backed up. + */ + policyId?: string; + /** + * Backup state of this backup item. Possible values include: 'Invalid', 'NotProtected', + * 'Protecting', 'Protected', 'ProtectionFailed' + */ + protectionState?: ProtectionStatus; + /** + * Workload item type of the item for which intent is to be set. Possible values include: + * 'Invalid', 'SQLInstance', 'SQLDataBase', 'SAPHanaSystem', 'SAPHanaDatabase', 'SAPAseSystem', + * 'SAPAseDatabase' + */ + workloadItemType?: WorkloadItemType; +} + +/** + * BackupStatus request. + */ +export interface BackupStatusRequest { + /** + * Container Type - VM, SQLPaaS, DPM, AzureFileShare. Possible values include: 'Invalid', 'VM', + * 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', + * 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + * 'SAPAseDatabase' + */ + resourceType?: DataSourceType; + /** + * Entire ARM resource id of the resource + */ + resourceId?: string; + /** + * Protectable Item Logical Name + */ + poLogicalName?: string; +} + +/** + * BackupStatus response. + */ +export interface BackupStatusResponse { + /** + * Specifies whether the container is registered or not. Possible values include: 'Invalid', + * 'NotProtected', 'Protecting', 'Protected', 'ProtectionFailed' + */ + protectionStatus?: ProtectionStatus; + /** + * Specifies the arm resource id of the vault + */ + vaultId?: string; + /** + * Specifies the fabric name - Azure or AD. Possible values include: 'Invalid', 'Azure' + */ + fabricName?: FabricName; + /** + * Specifies the product specific container name. E.g. + * iaasvmcontainer;iaasvmcontainer;csname;vmname. + */ + containerName?: string; + /** + * Specifies the product specific ds name. E.g. vm;iaasvmcontainer;csname;vmname. + */ + protectedItemName?: string; + /** + * ErrorCode in case of intent failed + */ + errorCode?: string; + /** + * ErrorMessage in case of intent failed. + */ + errorMessage?: string; + /** + * Specifies the policy name which is used for protection + */ + policyName?: string; + /** + * Container registration status + */ + registrationStatus?: string; +} + +/** + * Contract to validate if backup can be enabled on the given resource in a given vault and given + * configuration. + * It will validate followings + * 1. Vault capacity + * 2. VM is already protected + * 3. Any VM related configuration passed in properties. + */ +export interface PreValidateEnableBackupRequest { + /** + * ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc. Possible values include: 'Invalid', + * 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', + * 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', + * 'SAPHanaDatabase', 'SAPAseDatabase' + */ + resourceType?: DataSourceType; + /** + * ARM Virtual Machine Id + */ + resourceId?: string; + /** + * ARM id of the Recovery Services Vault + */ + vaultId?: string; + /** + * Configuration of VM if any needs to be validated like OS type etc + */ + properties?: string; +} + +/** + * Response contract for enable backup validation request + */ +export interface PreValidateEnableBackupResponse { + /** + * Validation Status. Possible values include: 'Invalid', 'Succeeded', 'Failed' + */ + status?: ValidationStatus; + /** + * Response error code + */ + errorCode?: string; + /** + * Response error message + */ + errorMessage?: string; + /** + * Recommended action for user + */ + recommendation?: string; + /** + * Specifies the product specific container name. E.g. + * iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required + * for portal + */ + containerName?: string; + /** + * Specifies the product specific ds name. E.g. vm;iaasvmcontainer;rgname;vmname. This is + * required for portal + */ + protectedItemName?: string; +} + +/** + * Filters to list protection intent. + */ +export interface ProtectionIntentQueryObject { + /** + * Backup management type for the backed up item. Possible values include: 'Invalid', + * 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + * 'DefaultBackup' + */ + backupManagementType?: BackupManagementType; + /** + * Type of workload this item represents. Possible values include: 'Invalid', 'SQLInstance', + * 'SQLAvailabilityGroupContainer' + */ + itemType?: IntentItemType; + /** + * Parent name of the intent + */ + parentName?: string; + /** + * Item name of the intent + */ + itemName?: string; +} + +/** + * Base class for backup ProtectionIntent. + */ +export interface ProtectionIntentResource extends Resource { + /** + * ProtectionIntentResource properties + */ + properties?: ProtectionIntentUnion; +} + +/** + * Localized display information of an operation. + */ +export interface ClientDiscoveryDisplay { + /** + * Name of the provider for display purposes + */ + provider?: string; + /** + * ResourceType for which this Operation can be performed. + */ + resource?: string; + /** + * Operations Name itself. */ - protectedItemCount?: number; + operation?: string; /** - * Agent version of this container. + * Description of the operation having details of what operation is about. */ - agentVersion?: string; + description?: string; +} + +/** + * Class to represent shoebox log specification in json client discovery. + */ +export interface ClientDiscoveryForLogSpecification { /** - * Additional information for this container + * Name for shoebox log specification. */ - extendedInfo?: MabContainerExtendedInfo; + name?: string; /** - * Health details on this mab container. + * Localized display name */ - mabContainerHealthDetails?: MABContainerHealthDetails[]; + displayName?: string; /** - * Health state of mab container. + * blob duration of shoebox log specification */ - containerHealthState?: string; + blobDuration?: string; } /** - * Operation status job extended info. + * Class to represent shoebox service specification in json client discovery. */ -export interface OperationStatusJobExtendedInfo { +export interface ClientDiscoveryForServiceSpecification { /** - * Polymorphic Discriminator + * List of log specifications of this operation. */ - objectType: "OperationStatusJobExtendedInfo"; + logSpecifications?: ClientDiscoveryForLogSpecification[]; +} + +/** + * Class to represent shoebox properties in json client discovery. + */ +export interface ClientDiscoveryForProperties { /** - * ID of the job created for this protected item. + * Operation properties. */ - jobId?: string; + serviceSpecification?: ClientDiscoveryForServiceSpecification; } /** - * Operation status extended info for list of jobs. + * Available operation details. */ -export interface OperationStatusJobsExtendedInfo { +export interface ClientDiscoveryValueForSingleApi { /** - * Polymorphic Discriminator + * Name of the Operation. */ - objectType: "OperationStatusJobsExtendedInfo"; + name?: string; /** - * IDs of the jobs created for the protected item. + * Contains the localized display information for this particular operation */ - jobIds?: string[]; + display?: ClientDiscoveryDisplay; /** - * Stores all the failed jobs along with the corresponding error codes. + * The intended executor of the operation;governs the display of the operation in the RBAC UX and + * the audit logs UX */ - failedJobsError?: { [propertyName: string]: string }; + origin?: string; + /** + * ShoeBox properties for the given operation. + */ + properties?: ClientDiscoveryForProperties; } /** - * Operation status extended info for ILR provision action. + * Optional Parameters. */ -export interface OperationStatusProvisionILRExtendedInfo { +export interface ProtectedItemsGetOptionalParams extends msRest.RequestOptionsBase { /** - * Polymorphic Discriminator + * OData filter options. */ - objectType: "OperationStatusProvisionILRExtendedInfo"; + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface RecoveryPointsListOptionalParams extends msRest.RequestOptionsBase { /** - * Target details for file / folder restore. + * OData filter options. */ - recoveryTarget?: InstantItemRecoveryTarget; + filter?: string; } /** - * Protectable Container Class. + * Optional Parameters. */ -export interface ProtectableContainerResource extends Resource { +export interface RecoveryPointsListNextOptionalParams extends msRest.RequestOptionsBase { /** - * ProtectableContainerResource properties + * OData filter options. */ - properties?: ProtectableContainerUnion; + filter?: string; } /** - * Base class for container with backup items. Containers with specific workloads are derived from - * this class. + * Optional Parameters. */ -export interface ProtectionContainerResource extends Resource { +export interface BackupPoliciesListOptionalParams extends msRest.RequestOptionsBase { /** - * ProtectionContainerResource properties + * OData filter options. */ - properties?: ProtectionContainerUnion; + filter?: string; } /** - * The token information details. + * Optional Parameters. */ -export interface TokenInformation { +export interface BackupPoliciesListNextOptionalParams extends msRest.RequestOptionsBase { /** - * Token value. + * OData filter options. */ - token?: string; + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface BackupJobsListOptionalParams extends msRest.RequestOptionsBase { /** - * Expiry time of token. + * OData filter options. */ - expiryTimeInUtcTicks?: number; + filter?: string; /** - * Security PIN + * skipToken Filter. */ - securityPIN?: string; + skipToken?: string; } /** - * Base class for backup item. Workload-specific backup items are derived from this class. + * Optional Parameters. */ -export interface WorkloadItemResource extends Resource { +export interface BackupJobsListNextOptionalParams extends msRest.RequestOptionsBase { /** - * WorkloadItemResource properties + * OData filter options. */ - properties?: WorkloadItemUnion; + filter?: string; + /** + * skipToken Filter. + */ + skipToken?: string; } /** - * Base class for backup item. Workload-specific backup items are derived from this class. + * Optional Parameters. */ -export interface WorkloadProtectableItemResource extends Resource { +export interface JobsExportMethodOptionalParams extends msRest.RequestOptionsBase { /** - * WorkloadProtectableItemResource properties + * OData filter options. */ - properties?: WorkloadProtectableItemUnion; + filter?: string; } /** - * Localized display information of an operation. + * Optional Parameters. */ -export interface ClientDiscoveryDisplay { +export interface BackupProtectedItemsListOptionalParams extends msRest.RequestOptionsBase { /** - * Name of the provider for display purposes + * OData filter options. */ - provider?: string; + filter?: string; /** - * ResourceType for which this Operation can be performed. + * skipToken Filter. */ - resource?: string; + skipToken?: string; +} + +/** + * Optional Parameters. + */ +export interface BackupProtectedItemsListNextOptionalParams extends msRest.RequestOptionsBase { /** - * Operations Name itself. + * OData filter options. */ - operation?: string; + filter?: string; /** - * Description of the operation having details of what operation is about. + * skipToken Filter. */ - description?: string; + skipToken?: string; } /** - * Class to represent shoebox log specification in json client discovery. + * Optional Parameters. */ -export interface ClientDiscoveryForLogSpecification { +export interface BackupEnginesListOptionalParams extends msRest.RequestOptionsBase { /** - * Name for shoebox log specification. + * OData filter options. */ - name?: string; + filter?: string; /** - * Localized display name + * skipToken Filter. */ - displayName?: string; + skipToken?: string; +} + +/** + * Optional Parameters. + */ +export interface BackupEnginesGetOptionalParams extends msRest.RequestOptionsBase { /** - * blob duration of shoebox log specification + * OData filter options. */ - blobDuration?: string; + filter?: string; + /** + * skipToken Filter. + */ + skipToken?: string; } /** - * Class to represent shoebox service specification in json client discovery. + * Optional Parameters. */ -export interface ClientDiscoveryForServiceSpecification { +export interface BackupEnginesListNextOptionalParams extends msRest.RequestOptionsBase { /** - * List of log specifications of this operation. + * OData filter options. */ - logSpecifications?: ClientDiscoveryForLogSpecification[]; + filter?: string; + /** + * skipToken Filter. + */ + skipToken?: string; } /** - * Class to represent shoebox properties in json client discovery. + * Optional Parameters. */ -export interface ClientDiscoveryForProperties { +export interface ProtectableContainersListOptionalParams extends msRest.RequestOptionsBase { /** - * Operation properties. + * OData filter options. */ - serviceSpecification?: ClientDiscoveryForServiceSpecification; + filter?: string; } /** - * Available operation details. + * Optional Parameters. */ -export interface ClientDiscoveryValueForSingleApi { +export interface ProtectableContainersListNextOptionalParams extends msRest.RequestOptionsBase { /** - * Name of the Operation. + * OData filter options. */ - name?: string; + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface ProtectionContainersInquireOptionalParams extends msRest.RequestOptionsBase { /** - * Contains the localized display information for this particular operation + * OData filter options. */ - display?: ClientDiscoveryDisplay; + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface ProtectionContainersRefreshOptionalParams extends msRest.RequestOptionsBase { /** - * The intended executor of the operation;governs the display of the operation in the RBAC UX and - * the audit logs UX + * OData filter options. */ - origin?: string; + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface BackupWorkloadItemsListOptionalParams extends msRest.RequestOptionsBase { /** - * ShoeBox properties for the given operation. + * OData filter options. */ - properties?: ClientDiscoveryForProperties; + filter?: string; + /** + * skipToken Filter. + */ + skipToken?: string; } /** * Optional Parameters. */ -export interface ProtectedItemsGetOptionalParams extends msRest.RequestOptionsBase { +export interface BackupWorkloadItemsListNextOptionalParams extends msRest.RequestOptionsBase { /** * OData filter options. */ - filter?: string; + filter?: string; + /** + * skipToken Filter. + */ + skipToken?: string; } /** * Optional Parameters. */ -export interface RecoveryPointsListOptionalParams extends msRest.RequestOptionsBase { +export interface BackupProtectableItemsListOptionalParams extends msRest.RequestOptionsBase { /** * OData filter options. */ filter?: string; + /** + * skipToken Filter. + */ + skipToken?: string; } /** * Optional Parameters. */ -export interface BackupPoliciesListOptionalParams extends msRest.RequestOptionsBase { +export interface BackupProtectableItemsListNextOptionalParams extends msRest.RequestOptionsBase { /** * OData filter options. */ filter?: string; + /** + * skipToken Filter. + */ + skipToken?: string; } /** * Optional Parameters. */ -export interface BackupJobsListOptionalParams extends msRest.RequestOptionsBase { +export interface BackupProtectionContainersListOptionalParams extends msRest.RequestOptionsBase { /** * OData filter options. */ filter?: string; - /** - * skipToken Filter. - */ - skipToken?: string; } /** * Optional Parameters. */ -export interface JobsExportMethodOptionalParams extends msRest.RequestOptionsBase { +export interface BackupProtectionContainersListNextOptionalParams + extends msRest.RequestOptionsBase { /** * OData filter options. */ @@ -7522,7 +8953,7 @@ export interface JobsExportMethodOptionalParams extends msRest.RequestOptionsBas /** * Optional Parameters. */ -export interface BackupProtectedItemsListOptionalParams extends msRest.RequestOptionsBase { +export interface BackupUsageSummariesCRRListOptionalParams extends msRest.RequestOptionsBase { /** * OData filter options. */ @@ -7536,21 +8967,17 @@ export interface BackupProtectedItemsListOptionalParams extends msRest.RequestOp /** * Optional Parameters. */ -export interface BackupProtectionIntentListOptionalParams extends msRest.RequestOptionsBase { +export interface AadPropertiesGetOptionalParams extends msRest.RequestOptionsBase { /** * OData filter options. */ filter?: string; - /** - * skipToken Filter. - */ - skipToken?: string; } /** * Optional Parameters. */ -export interface BackupUsageSummariesListOptionalParams extends msRest.RequestOptionsBase { +export interface BackupCrrJobsListOptionalParams extends msRest.RequestOptionsBase { /** * OData filter options. */ @@ -7564,7 +8991,7 @@ export interface BackupUsageSummariesListOptionalParams extends msRest.RequestOp /** * Optional Parameters. */ -export interface BackupEnginesListOptionalParams extends msRest.RequestOptionsBase { +export interface BackupCrrJobsListNextOptionalParams extends msRest.RequestOptionsBase { /** * OData filter options. */ @@ -7578,21 +9005,17 @@ export interface BackupEnginesListOptionalParams extends msRest.RequestOptionsBa /** * Optional Parameters. */ -export interface BackupEnginesGetOptionalParams extends msRest.RequestOptionsBase { +export interface RecoveryPointsCrrListOptionalParams extends msRest.RequestOptionsBase { /** * OData filter options. */ filter?: string; - /** - * skipToken Filter. - */ - skipToken?: string; } /** * Optional Parameters. */ -export interface ProtectableContainersListOptionalParams extends msRest.RequestOptionsBase { +export interface RecoveryPointsCrrListNextOptionalParams extends msRest.RequestOptionsBase { /** * OData filter options. */ @@ -7602,27 +9025,35 @@ export interface ProtectableContainersListOptionalParams extends msRest.RequestO /** * Optional Parameters. */ -export interface ProtectionContainersInquireOptionalParams extends msRest.RequestOptionsBase { +export interface BackupProtectedItemsCrrListOptionalParams extends msRest.RequestOptionsBase { /** * OData filter options. */ filter?: string; + /** + * skipToken Filter. + */ + skipToken?: string; } /** * Optional Parameters. */ -export interface ProtectionContainersRefreshOptionalParams extends msRest.RequestOptionsBase { +export interface BackupProtectedItemsCrrListNextOptionalParams extends msRest.RequestOptionsBase { /** * OData filter options. */ filter?: string; + /** + * skipToken Filter. + */ + skipToken?: string; } /** * Optional Parameters. */ -export interface BackupWorkloadItemsListOptionalParams extends msRest.RequestOptionsBase { +export interface BackupProtectionIntentListOptionalParams extends msRest.RequestOptionsBase { /** * OData filter options. */ @@ -7636,7 +9067,7 @@ export interface BackupWorkloadItemsListOptionalParams extends msRest.RequestOpt /** * Optional Parameters. */ -export interface BackupProtectableItemsListOptionalParams extends msRest.RequestOptionsBase { +export interface BackupProtectionIntentListNextOptionalParams extends msRest.RequestOptionsBase { /** * OData filter options. */ @@ -7650,11 +9081,15 @@ export interface BackupProtectableItemsListOptionalParams extends msRest.Request /** * Optional Parameters. */ -export interface BackupProtectionContainersListOptionalParams extends msRest.RequestOptionsBase { +export interface BackupUsageSummariesListOptionalParams extends msRest.RequestOptionsBase { /** * OData filter options. */ filter?: string; + /** + * skipToken Filter. + */ + skipToken?: string; } /** @@ -7669,88 +9104,89 @@ export interface RecoveryServicesBackupClientOptions extends AzureServiceClientO * List of RecoveryPoint resources * @extends Array, ResourceList */ -export interface RecoveryPointResourceList extends Array, ResourceList { -} +export interface RecoveryPointResourceList extends Array, ResourceList {} /** * @interface * List of ProtectionPolicy resources * @extends Array, ResourceList */ -export interface ProtectionPolicyResourceList extends Array, ResourceList { -} +export interface ProtectionPolicyResourceList + extends Array, + ResourceList {} /** * @interface * List of Job resources * @extends Array, ResourceList */ -export interface JobResourceList extends Array, ResourceList { -} +export interface JobResourceList extends Array, ResourceList {} /** * @interface * List of ProtectedItem resources * @extends Array, ResourceList */ -export interface ProtectedItemResourceList extends Array, ResourceList { -} - -/** - * @interface - * List of ProtectionIntent resources - * @extends Array, ResourceList - */ -export interface ProtectionIntentResourceList extends Array, ResourceList { -} - -/** - * @interface - * Backup management usage for vault. - * @extends Array - */ -export interface BackupManagementUsageList extends Array { -} +export interface ProtectedItemResourceList extends Array, ResourceList {} /** * @interface * List of BackupEngineBase resources * @extends Array, ResourceList */ -export interface BackupEngineBaseResourceList extends Array, ResourceList { -} +export interface BackupEngineBaseResourceList + extends Array, + ResourceList {} /** * @interface * List of ProtectableContainer resources * @extends Array, ResourceList */ -export interface ProtectableContainerResourceList extends Array, ResourceList { -} +export interface ProtectableContainerResourceList + extends Array, + ResourceList {} /** * @interface * List of WorkloadItem resources * @extends Array, ResourceList */ -export interface WorkloadItemResourceList extends Array, ResourceList { -} +export interface WorkloadItemResourceList extends Array, ResourceList {} /** * @interface * List of WorkloadProtectableItem resources * @extends Array, ResourceList */ -export interface WorkloadProtectableItemResourceList extends Array, ResourceList { -} +export interface WorkloadProtectableItemResourceList + extends Array, + ResourceList {} /** * @interface * List of ProtectionContainer resources * @extends Array, ResourceList */ -export interface ProtectionContainerResourceList extends Array, ResourceList { -} +export interface ProtectionContainerResourceList + extends Array, + ResourceList {} + +/** + * @interface + * Backup management usage for vault. + * @extends Array + */ +export interface BackupManagementUsageList extends Array {} + +/** + * @interface + * List of ProtectionIntent resources + * @extends Array, ResourceList + */ +export interface ProtectionIntentResourceList + extends Array, + ResourceList {} /** * @interface @@ -7765,12 +9201,35 @@ export interface ClientDiscoveryResponse extends Array + */ + get( + azureRegion: string, + options?: Models.AadPropertiesGetOptionalParams + ): Promise; + /** + * @param azureRegion Azure region to hit Api + * @param callback The callback + */ + get(azureRegion: string, callback: msRest.ServiceCallback): void; + /** + * @param azureRegion Azure region to hit Api + * @param options The optional parameters + * @param callback The callback + */ + get( + azureRegion: string, + options: Models.AadPropertiesGetOptionalParams, + callback: msRest.ServiceCallback + ): void; + get( + azureRegion: string, + options?: + | Models.AadPropertiesGetOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + azureRegion, + options + }, + getOperationSpec, + callback + ) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: + "subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupAadProperties", + urlParameters: [Parameters.azureRegion, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion1, Parameters.filter], + headerParameters: [Parameters.acceptLanguage], + responses: { + 200: { + bodyMapper: Mappers.AADPropertiesResource + }, + default: { + bodyMapper: Mappers.NewErrorResponse + } + }, + serializer +}; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/bMSPrepareDataMoveOperationResult.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/bMSPrepareDataMoveOperationResult.ts new file mode 100644 index 000000000000..f85b8be8d222 --- /dev/null +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/bMSPrepareDataMoveOperationResult.ts @@ -0,0 +1,117 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/bMSPrepareDataMoveOperationResultMappers"; +import * as Parameters from "../models/parameters"; +import { RecoveryServicesBackupClientContext } from "../recoveryServicesBackupClientContext"; + +/** Class representing a BMSPrepareDataMoveOperationResult. */ +export class BMSPrepareDataMoveOperationResult { + private readonly client: RecoveryServicesBackupClientContext; + + /** + * Create a BMSPrepareDataMoveOperationResult. + * @param {RecoveryServicesBackupClientContext} client Reference to the service client. + */ + constructor(client: RecoveryServicesBackupClientContext) { + this.client = client; + } + + /** + * Fetches Operation Result for Prepare Data Move + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param operationId + * @param [options] The optional parameters + * @returns Promise + */ + get( + vaultName: string, + resourceGroupName: string, + operationId: string, + options?: msRest.RequestOptionsBase + ): Promise; + /** + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param operationId + * @param callback The callback + */ + get( + vaultName: string, + resourceGroupName: string, + operationId: string, + callback: msRest.ServiceCallback + ): void; + /** + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param operationId + * @param options The optional parameters + * @param callback The callback + */ + get( + vaultName: string, + resourceGroupName: string, + operationId: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + get( + vaultName: string, + resourceGroupName: string, + operationId: string, + options?: + | msRest.RequestOptionsBase + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + vaultName, + resourceGroupName, + operationId, + options + }, + getOperationSpec, + callback + ) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/operationResults/{operationId}", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.operationId + ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], + responses: { + 200: { + bodyMapper: Mappers.VaultStorageConfigOperationResultResponse + }, + 202: {}, + default: { + bodyMapper: Mappers.NewErrorResponse + } + }, + serializer +}; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupCrrJobDetails.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupCrrJobDetails.ts new file mode 100644 index 000000000000..60fd4d0ccd8a --- /dev/null +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupCrrJobDetails.ts @@ -0,0 +1,105 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/backupCrrJobDetailsMappers"; +import * as Parameters from "../models/parameters"; +import { RecoveryServicesBackupClientContext } from "../recoveryServicesBackupClientContext"; + +/** Class representing a BackupCrrJobDetails. */ +export class BackupCrrJobDetails { + private readonly client: RecoveryServicesBackupClientContext; + + /** + * Create a BackupCrrJobDetails. + * @param {RecoveryServicesBackupClientContext} client Reference to the service client. + */ + constructor(client: RecoveryServicesBackupClientContext) { + this.client = client; + } + + /** + * @summary Get CRR job details from target region. + * @param azureRegion Azure region to hit Api + * @param parameters CRR Job request + * @param [options] The optional parameters + * @returns Promise + */ + get( + azureRegion: string, + parameters: Models.CrrJobRequest, + options?: msRest.RequestOptionsBase + ): Promise; + /** + * @param azureRegion Azure region to hit Api + * @param parameters CRR Job request + * @param callback The callback + */ + get( + azureRegion: string, + parameters: Models.CrrJobRequest, + callback: msRest.ServiceCallback + ): void; + /** + * @param azureRegion Azure region to hit Api + * @param parameters CRR Job request + * @param options The optional parameters + * @param callback The callback + */ + get( + azureRegion: string, + parameters: Models.CrrJobRequest, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + get( + azureRegion: string, + parameters: Models.CrrJobRequest, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + azureRegion, + parameters, + options + }, + getOperationSpec, + callback + ) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: + "subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJob", + urlParameters: [Parameters.azureRegion, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion1], + headerParameters: [Parameters.acceptLanguage], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.CrrJobRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.JobResource + }, + default: { + bodyMapper: Mappers.NewErrorResponse + } + }, + serializer +}; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupCrrJobs.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupCrrJobs.ts new file mode 100644 index 000000000000..80b8046c906e --- /dev/null +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupCrrJobs.ts @@ -0,0 +1,167 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/backupCrrJobsMappers"; +import * as Parameters from "../models/parameters"; +import { RecoveryServicesBackupClientContext } from "../recoveryServicesBackupClientContext"; + +/** Class representing a BackupCrrJobs. */ +export class BackupCrrJobs { + private readonly client: RecoveryServicesBackupClientContext; + + /** + * Create a BackupCrrJobs. + * @param {RecoveryServicesBackupClientContext} client Reference to the service client. + */ + constructor(client: RecoveryServicesBackupClientContext) { + this.client = client; + } + + /** + * @summary Gets the list of CRR jobs from the target region. + * @param azureRegion Azure region to hit Api + * @param parameters Backup CRR Job request + * @param [options] The optional parameters + * @returns Promise + */ + list( + azureRegion: string, + parameters: Models.CrrJobRequest, + options?: Models.BackupCrrJobsListOptionalParams + ): Promise; + /** + * @param azureRegion Azure region to hit Api + * @param parameters Backup CRR Job request + * @param callback The callback + */ + list( + azureRegion: string, + parameters: Models.CrrJobRequest, + callback: msRest.ServiceCallback + ): void; + /** + * @param azureRegion Azure region to hit Api + * @param parameters Backup CRR Job request + * @param options The optional parameters + * @param callback The callback + */ + list( + azureRegion: string, + parameters: Models.CrrJobRequest, + options: Models.BackupCrrJobsListOptionalParams, + callback: msRest.ServiceCallback + ): void; + list( + azureRegion: string, + parameters: Models.CrrJobRequest, + options?: + | Models.BackupCrrJobsListOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + azureRegion, + parameters, + options + }, + listOperationSpec, + callback + ) as Promise; + } + + /** + * @summary Gets the list of CRR jobs from the target region. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext( + nextPageLink: string, + options?: Models.BackupCrrJobsListNextOptionalParams + ): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext( + nextPageLink: string, + options: Models.BackupCrrJobsListNextOptionalParams, + callback: msRest.ServiceCallback + ): void; + listNext( + nextPageLink: string, + options?: + | Models.BackupCrrJobsListNextOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback + ) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: + "subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJobs", + urlParameters: [Parameters.azureRegion, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion1, Parameters.filter, Parameters.skipToken], + headerParameters: [Parameters.acceptLanguage], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.CrrJobRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.JobResourceList + }, + default: { + bodyMapper: Mappers.NewErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [Parameters.nextPageLink], + queryParameters: [Parameters.apiVersion1, Parameters.filter, Parameters.skipToken], + headerParameters: [Parameters.acceptLanguage], + responses: { + 200: { + bodyMapper: Mappers.JobResourceList + }, + default: { + bodyMapper: Mappers.NewErrorResponse + } + }, + serializer +}; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupEngines.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupEngines.ts index aecd208b72a9..2bf63551c984 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupEngines.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupEngines.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -35,14 +34,22 @@ export class BackupEngines { * @param [options] The optional parameters * @returns Promise */ - list(vaultName: string, resourceGroupName: string, options?: Models.BackupEnginesListOptionalParams): Promise; + list( + vaultName: string, + resourceGroupName: string, + options?: Models.BackupEnginesListOptionalParams + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is * present. * @param callback The callback */ - list(vaultName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + list( + vaultName: string, + resourceGroupName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -50,8 +57,20 @@ export class BackupEngines { * @param options The optional parameters * @param callback The callback */ - list(vaultName: string, resourceGroupName: string, options: Models.BackupEnginesListOptionalParams, callback: msRest.ServiceCallback): void; - list(vaultName: string, resourceGroupName: string, options?: Models.BackupEnginesListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list( + vaultName: string, + resourceGroupName: string, + options: Models.BackupEnginesListOptionalParams, + callback: msRest.ServiceCallback + ): void; + list( + vaultName: string, + resourceGroupName: string, + options?: + | Models.BackupEnginesListOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -59,7 +78,8 @@ export class BackupEngines { options }, listOperationSpec, - callback) as Promise; + callback + ) as Promise; } /** @@ -71,7 +91,12 @@ export class BackupEngines { * @param [options] The optional parameters * @returns Promise */ - get(vaultName: string, resourceGroupName: string, backupEngineName: string, options?: Models.BackupEnginesGetOptionalParams): Promise; + get( + vaultName: string, + resourceGroupName: string, + backupEngineName: string, + options?: Models.BackupEnginesGetOptionalParams + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -79,7 +104,12 @@ export class BackupEngines { * @param backupEngineName Name of the backup management server. * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, backupEngineName: string, callback: msRest.ServiceCallback): void; + get( + vaultName: string, + resourceGroupName: string, + backupEngineName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -88,8 +118,22 @@ export class BackupEngines { * @param options The optional parameters * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, backupEngineName: string, options: Models.BackupEnginesGetOptionalParams, callback: msRest.ServiceCallback): void; - get(vaultName: string, resourceGroupName: string, backupEngineName: string, options?: Models.BackupEnginesGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + vaultName: string, + resourceGroupName: string, + backupEngineName: string, + options: Models.BackupEnginesGetOptionalParams, + callback: msRest.ServiceCallback + ): void; + get( + vaultName: string, + resourceGroupName: string, + backupEngineName: string, + options?: + | Models.BackupEnginesGetOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -98,7 +142,8 @@ export class BackupEngines { options }, getOperationSpec, - callback) as Promise; + callback + ) as Promise; } /** @@ -108,26 +153,43 @@ export class BackupEngines { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext( + nextPageLink: string, + options?: Models.BackupEnginesListNextOptionalParams + ): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listNext( + nextPageLink: string, + callback: msRest.ServiceCallback + ): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext( + nextPageLink: string, + options: Models.BackupEnginesListNextOptionalParams, + callback: msRest.ServiceCallback + ): void; + listNext( + nextPageLink: string, + options?: + | Models.BackupEnginesListNextOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback) as Promise; + callback + ) as Promise; } } @@ -135,20 +197,11 @@ export class BackupEngines { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines", - urlParameters: [ - Parameters.vaultName, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion2, - Parameters.filter, - Parameters.skipToken - ], - headerParameters: [ - Parameters.acceptLanguage - ], + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines", + urlParameters: [Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion0, Parameters.filter, Parameters.skipToken], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.BackupEngineBaseResourceList @@ -162,21 +215,16 @@ const listOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines/{backupEngineName}", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines/{backupEngineName}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.backupEngineName ], - queryParameters: [ - Parameters.apiVersion2, - Parameters.filter, - Parameters.skipToken - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0, Parameters.filter, Parameters.skipToken], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.BackupEngineBaseResource @@ -192,12 +240,9 @@ const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + urlParameters: [Parameters.nextPageLink], + queryParameters: [Parameters.apiVersion0, Parameters.filter, Parameters.skipToken], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.BackupEngineBaseResourceList diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupJobs.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupJobs.ts index c36ed2684408..0d24d427ed6f 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupJobs.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupJobs.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -34,14 +33,22 @@ export class BackupJobs { * @param [options] The optional parameters * @returns Promise */ - list(vaultName: string, resourceGroupName: string, options?: Models.BackupJobsListOptionalParams): Promise; + list( + vaultName: string, + resourceGroupName: string, + options?: Models.BackupJobsListOptionalParams + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is * present. * @param callback The callback */ - list(vaultName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + list( + vaultName: string, + resourceGroupName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -49,8 +56,18 @@ export class BackupJobs { * @param options The optional parameters * @param callback The callback */ - list(vaultName: string, resourceGroupName: string, options: Models.BackupJobsListOptionalParams, callback: msRest.ServiceCallback): void; - list(vaultName: string, resourceGroupName: string, options?: Models.BackupJobsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list( + vaultName: string, + resourceGroupName: string, + options: Models.BackupJobsListOptionalParams, + callback: msRest.ServiceCallback + ): void; + list( + vaultName: string, + resourceGroupName: string, + options?: Models.BackupJobsListOptionalParams | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -58,7 +75,8 @@ export class BackupJobs { options }, listOperationSpec, - callback) as Promise; + callback + ) as Promise; } /** @@ -67,7 +85,10 @@ export class BackupJobs { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext( + nextPageLink: string, + options?: Models.BackupJobsListNextOptionalParams + ): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -78,15 +99,26 @@ export class BackupJobs { * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext( + nextPageLink: string, + options: Models.BackupJobsListNextOptionalParams, + callback: msRest.ServiceCallback + ): void; + listNext( + nextPageLink: string, + options?: + | Models.BackupJobsListNextOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback) as Promise; + callback + ) as Promise; } } @@ -94,20 +126,11 @@ export class BackupJobs { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs", - urlParameters: [ - Parameters.vaultName, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion1, - Parameters.filter, - Parameters.skipToken - ], - headerParameters: [ - Parameters.acceptLanguage - ], + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs", + urlParameters: [Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion0, Parameters.filter, Parameters.skipToken], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.JobResourceList @@ -123,12 +146,9 @@ const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + urlParameters: [Parameters.nextPageLink], + queryParameters: [Parameters.apiVersion0, Parameters.filter, Parameters.skipToken], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.JobResourceList diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupOperationResults.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupOperationResults.ts index 7959e5f3dab7..886b27e600fa 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupOperationResults.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupOperationResults.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -40,7 +39,12 @@ export class BackupOperationResults { * @param [options] The optional parameters * @returns Promise */ - get(vaultName: string, resourceGroupName: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + get( + vaultName: string, + resourceGroupName: string, + operationId: string, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -48,7 +52,12 @@ export class BackupOperationResults { * @param operationId OperationID which represents the operation. * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, operationId: string, callback: msRest.ServiceCallback): void; + get( + vaultName: string, + resourceGroupName: string, + operationId: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -57,8 +66,20 @@ export class BackupOperationResults { * @param options The optional parameters * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(vaultName: string, resourceGroupName: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + vaultName: string, + resourceGroupName: string, + operationId: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + get( + vaultName: string, + resourceGroupName: string, + operationId: string, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -67,7 +88,8 @@ export class BackupOperationResults { options }, getOperationSpec, - callback); + callback + ); } } @@ -75,19 +97,16 @@ export class BackupOperationResults { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperationResults/{operationId}", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperationResults/{operationId}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.operationId ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], responses: { 200: {}, 202: {}, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupOperationStatuses.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupOperationStatuses.ts index fdbf978c1107..025fa7015648 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupOperationStatuses.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupOperationStatuses.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -39,7 +38,12 @@ export class BackupOperationStatuses { * @param [options] The optional parameters * @returns Promise */ - get(vaultName: string, resourceGroupName: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + get( + vaultName: string, + resourceGroupName: string, + operationId: string, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -47,7 +51,12 @@ export class BackupOperationStatuses { * @param operationId OperationID which represents the operation. * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, operationId: string, callback: msRest.ServiceCallback): void; + get( + vaultName: string, + resourceGroupName: string, + operationId: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -56,8 +65,20 @@ export class BackupOperationStatuses { * @param options The optional parameters * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(vaultName: string, resourceGroupName: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + vaultName: string, + resourceGroupName: string, + operationId: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + get( + vaultName: string, + resourceGroupName: string, + operationId: string, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -66,7 +87,8 @@ export class BackupOperationStatuses { options }, getOperationSpec, - callback) as Promise; + callback + ) as Promise; } } @@ -74,19 +96,16 @@ export class BackupOperationStatuses { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperations/{operationId}", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperations/{operationId}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.operationId ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.OperationStatus diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupPolicies.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupPolicies.ts index e7d4484b62fc..75788a204848 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupPolicies.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupPolicies.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -36,14 +35,22 @@ export class BackupPolicies { * @param [options] The optional parameters * @returns Promise */ - list(vaultName: string, resourceGroupName: string, options?: Models.BackupPoliciesListOptionalParams): Promise; + list( + vaultName: string, + resourceGroupName: string, + options?: Models.BackupPoliciesListOptionalParams + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is * present. * @param callback The callback */ - list(vaultName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + list( + vaultName: string, + resourceGroupName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -51,8 +58,20 @@ export class BackupPolicies { * @param options The optional parameters * @param callback The callback */ - list(vaultName: string, resourceGroupName: string, options: Models.BackupPoliciesListOptionalParams, callback: msRest.ServiceCallback): void; - list(vaultName: string, resourceGroupName: string, options?: Models.BackupPoliciesListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list( + vaultName: string, + resourceGroupName: string, + options: Models.BackupPoliciesListOptionalParams, + callback: msRest.ServiceCallback + ): void; + list( + vaultName: string, + resourceGroupName: string, + options?: + | Models.BackupPoliciesListOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -60,7 +79,8 @@ export class BackupPolicies { options }, listOperationSpec, - callback) as Promise; + callback + ) as Promise; } /** @@ -71,26 +91,43 @@ export class BackupPolicies { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext( + nextPageLink: string, + options?: Models.BackupPoliciesListNextOptionalParams + ): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listNext( + nextPageLink: string, + callback: msRest.ServiceCallback + ): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext( + nextPageLink: string, + options: Models.BackupPoliciesListNextOptionalParams, + callback: msRest.ServiceCallback + ): void; + listNext( + nextPageLink: string, + options?: + | Models.BackupPoliciesListNextOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback) as Promise; + callback + ) as Promise; } } @@ -98,19 +135,11 @@ export class BackupPolicies { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies", - urlParameters: [ - Parameters.vaultName, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion1, - Parameters.filter - ], - headerParameters: [ - Parameters.acceptLanguage - ], + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies", + urlParameters: [Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion0, Parameters.filter], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.ProtectionPolicyResourceList @@ -126,12 +155,9 @@ const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + urlParameters: [Parameters.nextPageLink], + queryParameters: [Parameters.apiVersion0, Parameters.filter], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.ProtectionPolicyResourceList diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupProtectableItems.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupProtectableItems.ts index 2b45cb7cefea..b293c1224b78 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupProtectableItems.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupProtectableItems.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -36,14 +35,22 @@ export class BackupProtectableItems { * @param [options] The optional parameters * @returns Promise */ - list(vaultName: string, resourceGroupName: string, options?: Models.BackupProtectableItemsListOptionalParams): Promise; + list( + vaultName: string, + resourceGroupName: string, + options?: Models.BackupProtectableItemsListOptionalParams + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is * present. * @param callback The callback */ - list(vaultName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + list( + vaultName: string, + resourceGroupName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -51,8 +58,20 @@ export class BackupProtectableItems { * @param options The optional parameters * @param callback The callback */ - list(vaultName: string, resourceGroupName: string, options: Models.BackupProtectableItemsListOptionalParams, callback: msRest.ServiceCallback): void; - list(vaultName: string, resourceGroupName: string, options?: Models.BackupProtectableItemsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list( + vaultName: string, + resourceGroupName: string, + options: Models.BackupProtectableItemsListOptionalParams, + callback: msRest.ServiceCallback + ): void; + list( + vaultName: string, + resourceGroupName: string, + options?: + | Models.BackupProtectableItemsListOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -60,7 +79,8 @@ export class BackupProtectableItems { options }, listOperationSpec, - callback) as Promise; + callback + ) as Promise; } /** @@ -71,26 +91,43 @@ export class BackupProtectableItems { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext( + nextPageLink: string, + options?: Models.BackupProtectableItemsListNextOptionalParams + ): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listNext( + nextPageLink: string, + callback: msRest.ServiceCallback + ): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext( + nextPageLink: string, + options: Models.BackupProtectableItemsListNextOptionalParams, + callback: msRest.ServiceCallback + ): void; + listNext( + nextPageLink: string, + options?: + | Models.BackupProtectableItemsListNextOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback) as Promise; + callback + ) as Promise; } } @@ -98,20 +135,11 @@ export class BackupProtectableItems { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectableItems", - urlParameters: [ - Parameters.vaultName, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion2, - Parameters.filter, - Parameters.skipToken - ], - headerParameters: [ - Parameters.acceptLanguage - ], + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectableItems", + urlParameters: [Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion0, Parameters.filter, Parameters.skipToken], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.WorkloadProtectableItemResourceList @@ -127,12 +155,9 @@ const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + urlParameters: [Parameters.nextPageLink], + queryParameters: [Parameters.apiVersion0, Parameters.filter, Parameters.skipToken], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.WorkloadProtectableItemResourceList diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupProtectedItems.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupProtectedItems.ts index 38761446d87f..a6f15c15fda2 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupProtectedItems.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupProtectedItems.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -34,14 +33,22 @@ export class BackupProtectedItems { * @param [options] The optional parameters * @returns Promise */ - list(vaultName: string, resourceGroupName: string, options?: Models.BackupProtectedItemsListOptionalParams): Promise; + list( + vaultName: string, + resourceGroupName: string, + options?: Models.BackupProtectedItemsListOptionalParams + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is * present. * @param callback The callback */ - list(vaultName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + list( + vaultName: string, + resourceGroupName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -49,8 +56,20 @@ export class BackupProtectedItems { * @param options The optional parameters * @param callback The callback */ - list(vaultName: string, resourceGroupName: string, options: Models.BackupProtectedItemsListOptionalParams, callback: msRest.ServiceCallback): void; - list(vaultName: string, resourceGroupName: string, options?: Models.BackupProtectedItemsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list( + vaultName: string, + resourceGroupName: string, + options: Models.BackupProtectedItemsListOptionalParams, + callback: msRest.ServiceCallback + ): void; + list( + vaultName: string, + resourceGroupName: string, + options?: + | Models.BackupProtectedItemsListOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -58,7 +77,8 @@ export class BackupProtectedItems { options }, listOperationSpec, - callback) as Promise; + callback + ) as Promise; } /** @@ -67,26 +87,43 @@ export class BackupProtectedItems { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext( + nextPageLink: string, + options?: Models.BackupProtectedItemsListNextOptionalParams + ): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listNext( + nextPageLink: string, + callback: msRest.ServiceCallback + ): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext( + nextPageLink: string, + options: Models.BackupProtectedItemsListNextOptionalParams, + callback: msRest.ServiceCallback + ): void; + listNext( + nextPageLink: string, + options?: + | Models.BackupProtectedItemsListNextOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback) as Promise; + callback + ) as Promise; } } @@ -94,20 +131,11 @@ export class BackupProtectedItems { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems", - urlParameters: [ - Parameters.vaultName, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion1, - Parameters.filter, - Parameters.skipToken - ], - headerParameters: [ - Parameters.acceptLanguage - ], + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems", + urlParameters: [Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion0, Parameters.filter, Parameters.skipToken], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.ProtectedItemResourceList @@ -123,12 +151,9 @@ const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + urlParameters: [Parameters.nextPageLink], + queryParameters: [Parameters.apiVersion0, Parameters.filter, Parameters.skipToken], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.ProtectedItemResourceList diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupProtectedItemsCrr.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupProtectedItemsCrr.ts new file mode 100644 index 000000000000..b99d87e81046 --- /dev/null +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupProtectedItemsCrr.ts @@ -0,0 +1,166 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/backupProtectedItemsCrrMappers"; +import * as Parameters from "../models/parameters"; +import { RecoveryServicesBackupClientContext } from "../recoveryServicesBackupClientContext"; + +/** Class representing a BackupProtectedItemsCrr. */ +export class BackupProtectedItemsCrr { + private readonly client: RecoveryServicesBackupClientContext; + + /** + * Create a BackupProtectedItemsCrr. + * @param {RecoveryServicesBackupClientContext} client Reference to the service client. + */ + constructor(client: RecoveryServicesBackupClientContext) { + this.client = client; + } + + /** + * Provides a pageable list of all items that are backed up within a vault. + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param [options] The optional parameters + * @returns Promise + */ + list( + vaultName: string, + resourceGroupName: string, + options?: Models.BackupProtectedItemsCrrListOptionalParams + ): Promise; + /** + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param callback The callback + */ + list( + vaultName: string, + resourceGroupName: string, + callback: msRest.ServiceCallback + ): void; + /** + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param options The optional parameters + * @param callback The callback + */ + list( + vaultName: string, + resourceGroupName: string, + options: Models.BackupProtectedItemsCrrListOptionalParams, + callback: msRest.ServiceCallback + ): void; + list( + vaultName: string, + resourceGroupName: string, + options?: + | Models.BackupProtectedItemsCrrListOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + vaultName, + resourceGroupName, + options + }, + listOperationSpec, + callback + ) as Promise; + } + + /** + * Provides a pageable list of all items that are backed up within a vault. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext( + nextPageLink: string, + options?: Models.BackupProtectedItemsCrrListNextOptionalParams + ): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext( + nextPageLink: string, + callback: msRest.ServiceCallback + ): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext( + nextPageLink: string, + options: Models.BackupProtectedItemsCrrListNextOptionalParams, + callback: msRest.ServiceCallback + ): void; + listNext( + nextPageLink: string, + options?: + | Models.BackupProtectedItemsCrrListNextOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback + ) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems/", + urlParameters: [Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion1, Parameters.filter, Parameters.skipToken], + headerParameters: [Parameters.acceptLanguage], + responses: { + 200: { + bodyMapper: Mappers.ProtectedItemResourceList + }, + default: { + bodyMapper: Mappers.NewErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [Parameters.nextPageLink], + queryParameters: [Parameters.apiVersion1, Parameters.filter, Parameters.skipToken], + headerParameters: [Parameters.acceptLanguage], + responses: { + 200: { + bodyMapper: Mappers.ProtectedItemResourceList + }, + default: { + bodyMapper: Mappers.NewErrorResponse + } + }, + serializer +}; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupProtectionContainers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupProtectionContainers.ts index 40cd9b6da050..5ba9ca489818 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupProtectionContainers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupProtectionContainers.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -34,14 +33,22 @@ export class BackupProtectionContainers { * @param [options] The optional parameters * @returns Promise */ - list(vaultName: string, resourceGroupName: string, options?: Models.BackupProtectionContainersListOptionalParams): Promise; + list( + vaultName: string, + resourceGroupName: string, + options?: Models.BackupProtectionContainersListOptionalParams + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is * present. * @param callback The callback */ - list(vaultName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + list( + vaultName: string, + resourceGroupName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -49,8 +56,20 @@ export class BackupProtectionContainers { * @param options The optional parameters * @param callback The callback */ - list(vaultName: string, resourceGroupName: string, options: Models.BackupProtectionContainersListOptionalParams, callback: msRest.ServiceCallback): void; - list(vaultName: string, resourceGroupName: string, options?: Models.BackupProtectionContainersListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list( + vaultName: string, + resourceGroupName: string, + options: Models.BackupProtectionContainersListOptionalParams, + callback: msRest.ServiceCallback + ): void; + list( + vaultName: string, + resourceGroupName: string, + options?: + | Models.BackupProtectionContainersListOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -58,7 +77,8 @@ export class BackupProtectionContainers { options }, listOperationSpec, - callback) as Promise; + callback + ) as Promise; } /** @@ -67,26 +87,43 @@ export class BackupProtectionContainers { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext( + nextPageLink: string, + options?: Models.BackupProtectionContainersListNextOptionalParams + ): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listNext( + nextPageLink: string, + callback: msRest.ServiceCallback + ): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext( + nextPageLink: string, + options: Models.BackupProtectionContainersListNextOptionalParams, + callback: msRest.ServiceCallback + ): void; + listNext( + nextPageLink: string, + options?: + | Models.BackupProtectionContainersListNextOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback) as Promise; + callback + ) as Promise; } } @@ -94,19 +131,11 @@ export class BackupProtectionContainers { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionContainers", - urlParameters: [ - Parameters.vaultName, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion2, - Parameters.filter - ], - headerParameters: [ - Parameters.acceptLanguage - ], + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionContainers", + urlParameters: [Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion0, Parameters.filter], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.ProtectionContainerResourceList @@ -122,12 +151,9 @@ const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + urlParameters: [Parameters.nextPageLink], + queryParameters: [Parameters.apiVersion0, Parameters.filter], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.ProtectionContainerResourceList diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupProtectionIntent.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupProtectionIntent.ts index d0aa34265091..b9267af25c08 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupProtectionIntent.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupProtectionIntent.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -34,14 +33,22 @@ export class BackupProtectionIntent { * @param [options] The optional parameters * @returns Promise */ - list(vaultName: string, resourceGroupName: string, options?: Models.BackupProtectionIntentListOptionalParams): Promise; + list( + vaultName: string, + resourceGroupName: string, + options?: Models.BackupProtectionIntentListOptionalParams + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is * present. * @param callback The callback */ - list(vaultName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + list( + vaultName: string, + resourceGroupName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -49,8 +56,20 @@ export class BackupProtectionIntent { * @param options The optional parameters * @param callback The callback */ - list(vaultName: string, resourceGroupName: string, options: Models.BackupProtectionIntentListOptionalParams, callback: msRest.ServiceCallback): void; - list(vaultName: string, resourceGroupName: string, options?: Models.BackupProtectionIntentListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list( + vaultName: string, + resourceGroupName: string, + options: Models.BackupProtectionIntentListOptionalParams, + callback: msRest.ServiceCallback + ): void; + list( + vaultName: string, + resourceGroupName: string, + options?: + | Models.BackupProtectionIntentListOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -58,7 +77,8 @@ export class BackupProtectionIntent { options }, listOperationSpec, - callback) as Promise; + callback + ) as Promise; } /** @@ -67,26 +87,43 @@ export class BackupProtectionIntent { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext( + nextPageLink: string, + options?: Models.BackupProtectionIntentListNextOptionalParams + ): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listNext( + nextPageLink: string, + callback: msRest.ServiceCallback + ): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext( + nextPageLink: string, + options: Models.BackupProtectionIntentListNextOptionalParams, + callback: msRest.ServiceCallback + ): void; + listNext( + nextPageLink: string, + options?: + | Models.BackupProtectionIntentListNextOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback) as Promise; + callback + ) as Promise; } } @@ -94,20 +131,11 @@ export class BackupProtectionIntent { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionIntents", - urlParameters: [ - Parameters.vaultName, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion3, - Parameters.filter, - Parameters.skipToken - ], - headerParameters: [ - Parameters.acceptLanguage - ], + path: + "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionIntents", + urlParameters: [Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion2, Parameters.filter, Parameters.skipToken], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.ProtectionIntentResourceList @@ -123,12 +151,9 @@ const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + urlParameters: [Parameters.nextPageLink], + queryParameters: [Parameters.apiVersion2, Parameters.filter, Parameters.skipToken], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.ProtectionIntentResourceList diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupResourceEncryptionConfigs.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupResourceEncryptionConfigs.ts new file mode 100644 index 000000000000..5202dce83827 --- /dev/null +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupResourceEncryptionConfigs.ts @@ -0,0 +1,188 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/backupResourceEncryptionConfigsMappers"; +import * as Parameters from "../models/parameters"; +import { RecoveryServicesBackupClientContext } from "../recoveryServicesBackupClientContext"; + +/** Class representing a BackupResourceEncryptionConfigs. */ +export class BackupResourceEncryptionConfigs { + private readonly client: RecoveryServicesBackupClientContext; + + /** + * Create a BackupResourceEncryptionConfigs. + * @param {RecoveryServicesBackupClientContext} client Reference to the service client. + */ + constructor(client: RecoveryServicesBackupClientContext) { + this.client = client; + } + + /** + * Fetches Vault Encryption config. + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param [options] The optional parameters + * @returns Promise + */ + get( + vaultName: string, + resourceGroupName: string, + options?: msRest.RequestOptionsBase + ): Promise; + /** + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param callback The callback + */ + get( + vaultName: string, + resourceGroupName: string, + callback: msRest.ServiceCallback + ): void; + /** + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param options The optional parameters + * @param callback The callback + */ + get( + vaultName: string, + resourceGroupName: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + get( + vaultName: string, + resourceGroupName: string, + options?: + | msRest.RequestOptionsBase + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + vaultName, + resourceGroupName, + options + }, + getOperationSpec, + callback + ) as Promise; + } + + /** + * Updates Vault encryption config. + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param parameters Vault encryption input config request + * @param [options] The optional parameters + * @returns Promise + */ + update( + vaultName: string, + resourceGroupName: string, + parameters: Models.BackupResourceEncryptionConfigResource, + options?: msRest.RequestOptionsBase + ): Promise; + /** + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param parameters Vault encryption input config request + * @param callback The callback + */ + update( + vaultName: string, + resourceGroupName: string, + parameters: Models.BackupResourceEncryptionConfigResource, + callback: msRest.ServiceCallback + ): void; + /** + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param parameters Vault encryption input config request + * @param options The optional parameters + * @param callback The callback + */ + update( + vaultName: string, + resourceGroupName: string, + parameters: Models.BackupResourceEncryptionConfigResource, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + update( + vaultName: string, + resourceGroupName: string, + parameters: Models.BackupResourceEncryptionConfigResource, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + vaultName, + resourceGroupName, + parameters, + options + }, + updateOperationSpec, + callback + ); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEncryptionConfigs/backupResourceEncryptionConfig", + urlParameters: [Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], + responses: { + 200: { + bodyMapper: Mappers.BackupResourceEncryptionConfigResource + }, + default: { + bodyMapper: Mappers.NewErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEncryptionConfigs/backupResourceEncryptionConfig", + urlParameters: [Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.BackupResourceEncryptionConfigResource, + required: true + } + }, + responses: { + 200: {}, + default: { + bodyMapper: Mappers.NewErrorResponse + } + }, + serializer +}; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupResourceStorageConfigs.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupResourceStorageConfigs.ts index bc7bed81ac0b..e74dbc0f4749 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupResourceStorageConfigs.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupResourceStorageConfigs.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -34,14 +33,22 @@ export class BackupResourceStorageConfigs { * @param [options] The optional parameters * @returns Promise */ - get(vaultName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + get( + vaultName: string, + resourceGroupName: string, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is * present. * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + get( + vaultName: string, + resourceGroupName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -49,8 +56,20 @@ export class BackupResourceStorageConfigs { * @param options The optional parameters * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(vaultName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + vaultName: string, + resourceGroupName: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + get( + vaultName: string, + resourceGroupName: string, + options?: + | msRest.RequestOptionsBase + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -58,7 +77,8 @@ export class BackupResourceStorageConfigs { options }, getOperationSpec, - callback) as Promise; + callback + ) as Promise; } /** @@ -70,7 +90,12 @@ export class BackupResourceStorageConfigs { * @param [options] The optional parameters * @returns Promise */ - update(vaultName: string, resourceGroupName: string, parameters: Models.BackupResourceConfigResource, options?: msRest.RequestOptionsBase): Promise; + update( + vaultName: string, + resourceGroupName: string, + parameters: Models.BackupResourceConfigResource, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -78,7 +103,12 @@ export class BackupResourceStorageConfigs { * @param parameters Vault storage config request * @param callback The callback */ - update(vaultName: string, resourceGroupName: string, parameters: Models.BackupResourceConfigResource, callback: msRest.ServiceCallback): void; + update( + vaultName: string, + resourceGroupName: string, + parameters: Models.BackupResourceConfigResource, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -87,8 +117,22 @@ export class BackupResourceStorageConfigs { * @param options The optional parameters * @param callback The callback */ - update(vaultName: string, resourceGroupName: string, parameters: Models.BackupResourceConfigResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(vaultName: string, resourceGroupName: string, parameters: Models.BackupResourceConfigResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + update( + vaultName: string, + resourceGroupName: string, + parameters: Models.BackupResourceConfigResource, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + update( + vaultName: string, + resourceGroupName: string, + parameters: Models.BackupResourceConfigResource, + options?: + | msRest.RequestOptionsBase + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -97,7 +141,8 @@ export class BackupResourceStorageConfigs { options }, updateOperationSpec, - callback) as Promise; + callback + ) as Promise; } /** @@ -109,7 +154,12 @@ export class BackupResourceStorageConfigs { * @param [options] The optional parameters * @returns Promise */ - patch(vaultName: string, resourceGroupName: string, parameters: Models.BackupResourceConfigResource, options?: msRest.RequestOptionsBase): Promise; + patch( + vaultName: string, + resourceGroupName: string, + parameters: Models.BackupResourceConfigResource, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -117,7 +167,12 @@ export class BackupResourceStorageConfigs { * @param parameters Vault storage config request * @param callback The callback */ - patch(vaultName: string, resourceGroupName: string, parameters: Models.BackupResourceConfigResource, callback: msRest.ServiceCallback): void; + patch( + vaultName: string, + resourceGroupName: string, + parameters: Models.BackupResourceConfigResource, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -126,8 +181,20 @@ export class BackupResourceStorageConfigs { * @param options The optional parameters * @param callback The callback */ - patch(vaultName: string, resourceGroupName: string, parameters: Models.BackupResourceConfigResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - patch(vaultName: string, resourceGroupName: string, parameters: Models.BackupResourceConfigResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + patch( + vaultName: string, + resourceGroupName: string, + parameters: Models.BackupResourceConfigResource, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + patch( + vaultName: string, + resourceGroupName: string, + parameters: Models.BackupResourceConfigResource, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -136,7 +203,8 @@ export class BackupResourceStorageConfigs { options }, patchOperationSpec, - callback); + callback + ); } } @@ -144,24 +212,17 @@ export class BackupResourceStorageConfigs { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig", - urlParameters: [ - Parameters.vaultName, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig", + urlParameters: [Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion1], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.BackupResourceConfigResource }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.NewErrorResponse } }, serializer @@ -169,18 +230,11 @@ const getOperationSpec: msRest.OperationSpec = { const updateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig", - urlParameters: [ - Parameters.vaultName, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig", + urlParameters: [Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion1], + headerParameters: [Parameters.acceptLanguage], requestBody: { parameterPath: "parameters", mapper: { @@ -193,7 +247,7 @@ const updateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.BackupResourceConfigResource }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.NewErrorResponse } }, serializer @@ -201,18 +255,11 @@ const updateOperationSpec: msRest.OperationSpec = { const patchOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig", - urlParameters: [ - Parameters.vaultName, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig", + urlParameters: [Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion1], + headerParameters: [Parameters.acceptLanguage], requestBody: { parameterPath: "parameters", mapper: { @@ -223,7 +270,7 @@ const patchOperationSpec: msRest.OperationSpec = { responses: { 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.NewErrorResponse } }, serializer diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupResourceVaultConfigs.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupResourceVaultConfigs.ts index c8bedd45887b..6845c7e2b273 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupResourceVaultConfigs.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupResourceVaultConfigs.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -34,14 +33,22 @@ export class BackupResourceVaultConfigs { * @param [options] The optional parameters * @returns Promise */ - get(vaultName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + get( + vaultName: string, + resourceGroupName: string, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is * present. * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + get( + vaultName: string, + resourceGroupName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -49,8 +56,20 @@ export class BackupResourceVaultConfigs { * @param options The optional parameters * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(vaultName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + vaultName: string, + resourceGroupName: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + get( + vaultName: string, + resourceGroupName: string, + options?: + | msRest.RequestOptionsBase + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -58,7 +77,8 @@ export class BackupResourceVaultConfigs { options }, getOperationSpec, - callback) as Promise; + callback + ) as Promise; } /** @@ -70,7 +90,12 @@ export class BackupResourceVaultConfigs { * @param [options] The optional parameters * @returns Promise */ - update(vaultName: string, resourceGroupName: string, parameters: Models.BackupResourceVaultConfigResource, options?: msRest.RequestOptionsBase): Promise; + update( + vaultName: string, + resourceGroupName: string, + parameters: Models.BackupResourceVaultConfigResource, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -78,7 +103,12 @@ export class BackupResourceVaultConfigs { * @param parameters resource config request * @param callback The callback */ - update(vaultName: string, resourceGroupName: string, parameters: Models.BackupResourceVaultConfigResource, callback: msRest.ServiceCallback): void; + update( + vaultName: string, + resourceGroupName: string, + parameters: Models.BackupResourceVaultConfigResource, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -87,8 +117,22 @@ export class BackupResourceVaultConfigs { * @param options The optional parameters * @param callback The callback */ - update(vaultName: string, resourceGroupName: string, parameters: Models.BackupResourceVaultConfigResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(vaultName: string, resourceGroupName: string, parameters: Models.BackupResourceVaultConfigResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + update( + vaultName: string, + resourceGroupName: string, + parameters: Models.BackupResourceVaultConfigResource, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + update( + vaultName: string, + resourceGroupName: string, + parameters: Models.BackupResourceVaultConfigResource, + options?: + | msRest.RequestOptionsBase + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -97,7 +141,8 @@ export class BackupResourceVaultConfigs { options }, updateOperationSpec, - callback) as Promise; + callback + ) as Promise; } /** @@ -109,7 +154,12 @@ export class BackupResourceVaultConfigs { * @param [options] The optional parameters * @returns Promise */ - put(vaultName: string, resourceGroupName: string, parameters: Models.BackupResourceVaultConfigResource, options?: msRest.RequestOptionsBase): Promise; + put( + vaultName: string, + resourceGroupName: string, + parameters: Models.BackupResourceVaultConfigResource, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -117,7 +167,12 @@ export class BackupResourceVaultConfigs { * @param parameters resource config request * @param callback The callback */ - put(vaultName: string, resourceGroupName: string, parameters: Models.BackupResourceVaultConfigResource, callback: msRest.ServiceCallback): void; + put( + vaultName: string, + resourceGroupName: string, + parameters: Models.BackupResourceVaultConfigResource, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -126,8 +181,22 @@ export class BackupResourceVaultConfigs { * @param options The optional parameters * @param callback The callback */ - put(vaultName: string, resourceGroupName: string, parameters: Models.BackupResourceVaultConfigResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - put(vaultName: string, resourceGroupName: string, parameters: Models.BackupResourceVaultConfigResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + put( + vaultName: string, + resourceGroupName: string, + parameters: Models.BackupResourceVaultConfigResource, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + put( + vaultName: string, + resourceGroupName: string, + parameters: Models.BackupResourceVaultConfigResource, + options?: + | msRest.RequestOptionsBase + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -136,7 +205,8 @@ export class BackupResourceVaultConfigs { options }, putOperationSpec, - callback) as Promise; + callback + ) as Promise; } } @@ -144,24 +214,17 @@ export class BackupResourceVaultConfigs { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig", - urlParameters: [ - Parameters.vaultName, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig", + urlParameters: [Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.BackupResourceVaultConfigResource }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.NewErrorResponse } }, serializer @@ -169,18 +232,11 @@ const getOperationSpec: msRest.OperationSpec = { const updateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig", - urlParameters: [ - Parameters.vaultName, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig", + urlParameters: [Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], requestBody: { parameterPath: "parameters", mapper: { @@ -193,7 +249,7 @@ const updateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.BackupResourceVaultConfigResource }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.NewErrorResponse } }, serializer @@ -201,18 +257,11 @@ const updateOperationSpec: msRest.OperationSpec = { const putOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig", - urlParameters: [ - Parameters.vaultName, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig", + urlParameters: [Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], requestBody: { parameterPath: "parameters", mapper: { @@ -225,7 +274,7 @@ const putOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.BackupResourceVaultConfigResource }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.NewErrorResponse } }, serializer diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupStatus.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupStatus.ts index e02fed8f3ff8..bcc5944088fb 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupStatus.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupStatus.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -33,21 +32,39 @@ export class BackupStatus { * @param [options] The optional parameters * @returns Promise */ - get(azureRegion: string, parameters: Models.BackupStatusRequest, options?: msRest.RequestOptionsBase): Promise; + get( + azureRegion: string, + parameters: Models.BackupStatusRequest, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param azureRegion Azure region to hit Api * @param parameters Container Backup Status Request * @param callback The callback */ - get(azureRegion: string, parameters: Models.BackupStatusRequest, callback: msRest.ServiceCallback): void; + get( + azureRegion: string, + parameters: Models.BackupStatusRequest, + callback: msRest.ServiceCallback + ): void; /** * @param azureRegion Azure region to hit Api * @param parameters Container Backup Status Request * @param options The optional parameters * @param callback The callback */ - get(azureRegion: string, parameters: Models.BackupStatusRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(azureRegion: string, parameters: Models.BackupStatusRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + azureRegion: string, + parameters: Models.BackupStatusRequest, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + get( + azureRegion: string, + parameters: Models.BackupStatusRequest, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { azureRegion, @@ -55,7 +72,8 @@ export class BackupStatus { options }, getOperationSpec, - callback) as Promise; + callback + ) as Promise; } } @@ -63,17 +81,11 @@ export class BackupStatus { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupStatus", - urlParameters: [ - Parameters.azureRegion, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion3 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + path: + "Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupStatus", + urlParameters: [Parameters.azureRegion, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion2], + headerParameters: [Parameters.acceptLanguage], requestBody: { parameterPath: "parameters", mapper: { diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupUsageSummaries.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupUsageSummaries.ts index 861abc19f3bd..0255409011fd 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupUsageSummaries.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupUsageSummaries.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -34,14 +33,22 @@ export class BackupUsageSummaries { * @param [options] The optional parameters * @returns Promise */ - list(vaultName: string, resourceGroupName: string, options?: Models.BackupUsageSummariesListOptionalParams): Promise; + list( + vaultName: string, + resourceGroupName: string, + options?: Models.BackupUsageSummariesListOptionalParams + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is * present. * @param callback The callback */ - list(vaultName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + list( + vaultName: string, + resourceGroupName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -49,8 +56,20 @@ export class BackupUsageSummaries { * @param options The optional parameters * @param callback The callback */ - list(vaultName: string, resourceGroupName: string, options: Models.BackupUsageSummariesListOptionalParams, callback: msRest.ServiceCallback): void; - list(vaultName: string, resourceGroupName: string, options?: Models.BackupUsageSummariesListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list( + vaultName: string, + resourceGroupName: string, + options: Models.BackupUsageSummariesListOptionalParams, + callback: msRest.ServiceCallback + ): void; + list( + vaultName: string, + resourceGroupName: string, + options?: + | Models.BackupUsageSummariesListOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -58,7 +77,8 @@ export class BackupUsageSummaries { options }, listOperationSpec, - callback) as Promise; + callback + ) as Promise; } } @@ -66,20 +86,11 @@ export class BackupUsageSummaries { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries", - urlParameters: [ - Parameters.vaultName, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion3, - Parameters.filter, - Parameters.skipToken - ], - headerParameters: [ - Parameters.acceptLanguage - ], + path: + "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries", + urlParameters: [Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion2, Parameters.filter, Parameters.skipToken], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.BackupManagementUsageList diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupUsageSummariesCRR.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupUsageSummariesCRR.ts new file mode 100644 index 000000000000..1143f90c5a14 --- /dev/null +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupUsageSummariesCRR.ts @@ -0,0 +1,103 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/backupUsageSummariesCRRMappers"; +import * as Parameters from "../models/parameters"; +import { RecoveryServicesBackupClientContext } from "../recoveryServicesBackupClientContext"; + +/** Class representing a BackupUsageSummariesCRR. */ +export class BackupUsageSummariesCRR { + private readonly client: RecoveryServicesBackupClientContext; + + /** + * Create a BackupUsageSummariesCRR. + * @param {RecoveryServicesBackupClientContext} client Reference to the service client. + */ + constructor(client: RecoveryServicesBackupClientContext) { + this.client = client; + } + + /** + * Fetches the backup management usage summaries of the vault. + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param [options] The optional parameters + * @returns Promise + */ + list( + vaultName: string, + resourceGroupName: string, + options?: Models.BackupUsageSummariesCRRListOptionalParams + ): Promise; + /** + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param callback The callback + */ + list( + vaultName: string, + resourceGroupName: string, + callback: msRest.ServiceCallback + ): void; + /** + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param options The optional parameters + * @param callback The callback + */ + list( + vaultName: string, + resourceGroupName: string, + options: Models.BackupUsageSummariesCRRListOptionalParams, + callback: msRest.ServiceCallback + ): void; + list( + vaultName: string, + resourceGroupName: string, + options?: + | Models.BackupUsageSummariesCRRListOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + vaultName, + resourceGroupName, + options + }, + listOperationSpec, + callback + ) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries", + urlParameters: [Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion1, Parameters.filter, Parameters.skipToken], + headerParameters: [Parameters.acceptLanguage], + responses: { + 200: { + bodyMapper: Mappers.BackupManagementUsageList + }, + default: { + bodyMapper: Mappers.NewErrorResponse + } + }, + serializer +}; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupWorkloadItems.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupWorkloadItems.ts index 1bb4115b4164..702117027c8b 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupWorkloadItems.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupWorkloadItems.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -38,7 +37,13 @@ export class BackupWorkloadItems { * @param [options] The optional parameters * @returns Promise */ - list(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, options?: Models.BackupWorkloadItemsListOptionalParams): Promise; + list( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + options?: Models.BackupWorkloadItemsListOptionalParams + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -47,7 +52,13 @@ export class BackupWorkloadItems { * @param containerName Name of the container. * @param callback The callback */ - list(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, callback: msRest.ServiceCallback): void; + list( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -57,8 +68,24 @@ export class BackupWorkloadItems { * @param options The optional parameters * @param callback The callback */ - list(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, options: Models.BackupWorkloadItemsListOptionalParams, callback: msRest.ServiceCallback): void; - list(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, options?: Models.BackupWorkloadItemsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + options: Models.BackupWorkloadItemsListOptionalParams, + callback: msRest.ServiceCallback + ): void; + list( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + options?: + | Models.BackupWorkloadItemsListOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -68,7 +95,8 @@ export class BackupWorkloadItems { options }, listOperationSpec, - callback) as Promise; + callback + ) as Promise; } /** @@ -79,26 +107,43 @@ export class BackupWorkloadItems { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext( + nextPageLink: string, + options?: Models.BackupWorkloadItemsListNextOptionalParams + ): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listNext( + nextPageLink: string, + callback: msRest.ServiceCallback + ): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext( + nextPageLink: string, + options: Models.BackupWorkloadItemsListNextOptionalParams, + callback: msRest.ServiceCallback + ): void; + listNext( + nextPageLink: string, + options?: + | Models.BackupWorkloadItemsListNextOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback) as Promise; + callback + ) as Promise; } } @@ -106,7 +151,8 @@ export class BackupWorkloadItems { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/items", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/items", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, @@ -114,14 +160,8 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.fabricName, Parameters.containerName ], - queryParameters: [ - Parameters.apiVersion2, - Parameters.filter, - Parameters.skipToken - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0, Parameters.filter, Parameters.skipToken], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.WorkloadItemResourceList @@ -137,12 +177,9 @@ const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + urlParameters: [Parameters.nextPageLink], + queryParameters: [Parameters.apiVersion0, Parameters.filter, Parameters.skipToken], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.WorkloadItemResourceList diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backups.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backups.ts index 57896dba992a..e17b17f12ed7 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backups.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backups.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -40,7 +39,15 @@ export class Backups { * @param [options] The optional parameters * @returns Promise */ - trigger(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, parameters: Models.BackupRequestResource, options?: msRest.RequestOptionsBase): Promise; + trigger( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + parameters: Models.BackupRequestResource, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -51,7 +58,15 @@ export class Backups { * @param parameters resource backup request * @param callback The callback */ - trigger(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, parameters: Models.BackupRequestResource, callback: msRest.ServiceCallback): void; + trigger( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + parameters: Models.BackupRequestResource, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -63,8 +78,26 @@ export class Backups { * @param options The optional parameters * @param callback The callback */ - trigger(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, parameters: Models.BackupRequestResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - trigger(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, parameters: Models.BackupRequestResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + trigger( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + parameters: Models.BackupRequestResource, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + trigger( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + parameters: Models.BackupRequestResource, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -76,7 +109,8 @@ export class Backups { options }, triggerOperationSpec, - callback); + callback + ); } } @@ -84,7 +118,8 @@ export class Backups { const serializer = new msRest.Serializer(Mappers); const triggerOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/backup", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/backup", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, @@ -93,12 +128,8 @@ const triggerOperationSpec: msRest.OperationSpec = { Parameters.containerName, Parameters.protectedItemName ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], requestBody: { parameterPath: "parameters", mapper: { diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/crossRegionRestore.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/crossRegionRestore.ts new file mode 100644 index 000000000000..293a7830584e --- /dev/null +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/crossRegionRestore.ts @@ -0,0 +1,96 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/crossRegionRestoreMappers"; +import * as Parameters from "../models/parameters"; +import { RecoveryServicesBackupClientContext } from "../recoveryServicesBackupClientContext"; + +/** Class representing a CrossRegionRestore. */ +export class CrossRegionRestore { + private readonly client: RecoveryServicesBackupClientContext; + + /** + * Create a CrossRegionRestore. + * @param {RecoveryServicesBackupClientContext} client Reference to the service client. + */ + constructor(client: RecoveryServicesBackupClientContext) { + this.client = client; + } + + /** + * @summary Restores the specified backed up data in a different region as compared to where the + * data is backed up. + * @param azureRegion Azure region to hit Api + * @param parameters resource cross region restore request + * @param [options] The optional parameters + * @returns Promise + */ + trigger( + azureRegion: string, + parameters: Models.CrossRegionRestoreRequest, + options?: msRest.RequestOptionsBase + ): Promise { + return this.beginTrigger(azureRegion, parameters, options).then((lroPoller) => + lroPoller.pollUntilFinished() + ); + } + + /** + * @summary Restores the specified backed up data in a different region as compared to where the + * data is backed up. + * @param azureRegion Azure region to hit Api + * @param parameters resource cross region restore request + * @param [options] The optional parameters + * @returns Promise + */ + beginTrigger( + azureRegion: string, + parameters: Models.CrossRegionRestoreRequest, + options?: msRest.RequestOptionsBase + ): Promise { + return this.client.sendLRORequest( + { + azureRegion, + parameters, + options + }, + beginTriggerOperationSpec, + options + ); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const beginTriggerOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: + "subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrossRegionRestore", + urlParameters: [Parameters.azureRegion, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion1], + headerParameters: [Parameters.acceptLanguage], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.CrossRegionRestoreRequest, + required: true + } + }, + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.NewErrorResponse + } + }, + serializer +}; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/crrOperationResults.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/crrOperationResults.ts new file mode 100644 index 000000000000..058380fe3565 --- /dev/null +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/crrOperationResults.ts @@ -0,0 +1,91 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Mappers from "../models/crrOperationResultsMappers"; +import * as Parameters from "../models/parameters"; +import { RecoveryServicesBackupClientContext } from "../recoveryServicesBackupClientContext"; + +/** Class representing a CrrOperationResults. */ +export class CrrOperationResults { + private readonly client: RecoveryServicesBackupClientContext; + + /** + * Create a CrrOperationResults. + * @param {RecoveryServicesBackupClientContext} client Reference to the service client. + */ + constructor(client: RecoveryServicesBackupClientContext) { + this.client = client; + } + + /** + * @param azureRegion Azure region to hit Api + * @param operationId + * @param [options] The optional parameters + * @returns Promise + */ + get( + azureRegion: string, + operationId: string, + options?: msRest.RequestOptionsBase + ): Promise; + /** + * @param azureRegion Azure region to hit Api + * @param operationId + * @param callback The callback + */ + get(azureRegion: string, operationId: string, callback: msRest.ServiceCallback): void; + /** + * @param azureRegion Azure region to hit Api + * @param operationId + * @param options The optional parameters + * @param callback The callback + */ + get( + azureRegion: string, + operationId: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + get( + azureRegion: string, + operationId: string, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + azureRegion, + operationId, + options + }, + getOperationSpec, + callback + ); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: + "subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationResults/{operationId}", + urlParameters: [Parameters.azureRegion, Parameters.subscriptionId, Parameters.operationId], + queryParameters: [Parameters.apiVersion1], + headerParameters: [Parameters.acceptLanguage], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.NewErrorResponse + } + }, + serializer +}; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/crrOperationStatus.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/crrOperationStatus.ts new file mode 100644 index 000000000000..585470e30c6c --- /dev/null +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/crrOperationStatus.ts @@ -0,0 +1,97 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/crrOperationStatusMappers"; +import * as Parameters from "../models/parameters"; +import { RecoveryServicesBackupClientContext } from "../recoveryServicesBackupClientContext"; + +/** Class representing a CrrOperationStatus. */ +export class CrrOperationStatus { + private readonly client: RecoveryServicesBackupClientContext; + + /** + * Create a CrrOperationStatus. + * @param {RecoveryServicesBackupClientContext} client Reference to the service client. + */ + constructor(client: RecoveryServicesBackupClientContext) { + this.client = client; + } + + /** + * @param azureRegion Azure region to hit Api + * @param operationId + * @param [options] The optional parameters + * @returns Promise + */ + get( + azureRegion: string, + operationId: string, + options?: msRest.RequestOptionsBase + ): Promise; + /** + * @param azureRegion Azure region to hit Api + * @param operationId + * @param callback The callback + */ + get( + azureRegion: string, + operationId: string, + callback: msRest.ServiceCallback + ): void; + /** + * @param azureRegion Azure region to hit Api + * @param operationId + * @param options The optional parameters + * @param callback The callback + */ + get( + azureRegion: string, + operationId: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + get( + azureRegion: string, + operationId: string, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + azureRegion, + operationId, + options + }, + getOperationSpec, + callback + ) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: + "subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationsStatus/{operationId}", + urlParameters: [Parameters.azureRegion, Parameters.subscriptionId, Parameters.operationId], + queryParameters: [Parameters.apiVersion1], + headerParameters: [Parameters.acceptLanguage], + responses: { + 200: { + bodyMapper: Mappers.OperationStatus + }, + default: { + bodyMapper: Mappers.NewErrorResponse + } + }, + serializer +}; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/exportJobsOperationResults.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/exportJobsOperationResults.ts index 0e74cf5b1efe..42aa67578d76 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/exportJobsOperationResults.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/exportJobsOperationResults.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -38,7 +37,12 @@ export class ExportJobsOperationResults { * @param [options] The optional parameters * @returns Promise */ - get(vaultName: string, resourceGroupName: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + get( + vaultName: string, + resourceGroupName: string, + operationId: string, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -46,7 +50,12 @@ export class ExportJobsOperationResults { * @param operationId OperationID which represents the export job. * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, operationId: string, callback: msRest.ServiceCallback): void; + get( + vaultName: string, + resourceGroupName: string, + operationId: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -55,8 +64,22 @@ export class ExportJobsOperationResults { * @param options The optional parameters * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(vaultName: string, resourceGroupName: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + vaultName: string, + resourceGroupName: string, + operationId: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + get( + vaultName: string, + resourceGroupName: string, + operationId: string, + options?: + | msRest.RequestOptionsBase + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -65,7 +88,8 @@ export class ExportJobsOperationResults { options }, getOperationSpec, - callback) as Promise; + callback + ) as Promise; } } @@ -73,19 +97,16 @@ export class ExportJobsOperationResults { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/operationResults/{operationId}", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/operationResults/{operationId}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.operationId ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.OperationResultInfoBaseResource diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/featureSupport.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/featureSupport.ts index ef4c19f8ed09..21c98f364989 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/featureSupport.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/featureSupport.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -33,21 +32,41 @@ export class FeatureSupport { * @param [options] The optional parameters * @returns Promise */ - validate(azureRegion: string, parameters: Models.FeatureSupportRequestUnion, options?: msRest.RequestOptionsBase): Promise; + validate( + azureRegion: string, + parameters: Models.FeatureSupportRequestUnion, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param azureRegion Azure region to hit Api * @param parameters Feature support request object * @param callback The callback */ - validate(azureRegion: string, parameters: Models.FeatureSupportRequestUnion, callback: msRest.ServiceCallback): void; + validate( + azureRegion: string, + parameters: Models.FeatureSupportRequestUnion, + callback: msRest.ServiceCallback + ): void; /** * @param azureRegion Azure region to hit Api * @param parameters Feature support request object * @param options The optional parameters * @param callback The callback */ - validate(azureRegion: string, parameters: Models.FeatureSupportRequestUnion, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - validate(azureRegion: string, parameters: Models.FeatureSupportRequestUnion, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + validate( + azureRegion: string, + parameters: Models.FeatureSupportRequestUnion, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + validate( + azureRegion: string, + parameters: Models.FeatureSupportRequestUnion, + options?: + | msRest.RequestOptionsBase + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { azureRegion, @@ -55,7 +74,8 @@ export class FeatureSupport { options }, validateOperationSpec, - callback) as Promise; + callback + ) as Promise; } } @@ -63,17 +83,11 @@ export class FeatureSupport { const serializer = new msRest.Serializer(Mappers); const validateOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupValidateFeatures", - urlParameters: [ - Parameters.azureRegion, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion3 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + path: + "Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupValidateFeatures", + urlParameters: [Parameters.azureRegion, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion2], + headerParameters: [Parameters.acceptLanguage], requestBody: { parameterPath: "parameters", mapper: { diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/index.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/index.ts index cff469100f5c..17ae7a676ac6 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/index.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/index.ts @@ -1,15 +1,17 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is * regenerated. */ -export * from "./privateEndpointConnectionOperations"; export * from "./backupResourceVaultConfigs"; +export * from "./backupResourceEncryptionConfigs"; +export * from "./privateEndpointConnectionOperations"; +export * from "./privateEndpointOperations"; +export * from "./bMSPrepareDataMoveOperationResult"; export * from "./protectedItems"; export * from "./protectedItemOperationResults"; export * from "./recoveryPoints"; @@ -25,11 +27,6 @@ export * from "./exportJobsOperationResults"; export * from "./jobs"; export * from "./backupProtectedItems"; export * from "./operation"; -export * from "./protectionIntentOperations"; -export * from "./backupStatus"; -export * from "./featureSupport"; -export * from "./backupProtectionIntent"; -export * from "./backupUsageSummaries"; export * from "./backupEngines"; export * from "./protectionContainerRefreshOperationResults"; export * from "./protectableContainers"; @@ -45,5 +42,20 @@ export * from "./protectionPolicyOperationStatuses"; export * from "./backupProtectableItems"; export * from "./backupProtectionContainers"; export * from "./securityPINs"; +export * from "./recoveryPointsRecommendedForMove"; +export * from "./backupUsageSummariesCRR"; +export * from "./aadProperties"; +export * from "./crossRegionRestore"; +export * from "./backupCrrJobDetails"; +export * from "./backupCrrJobs"; +export * from "./crrOperationResults"; +export * from "./crrOperationStatus"; export * from "./backupResourceStorageConfigs"; +export * from "./recoveryPointsCrr"; +export * from "./backupProtectedItemsCrr"; +export * from "./protectionIntentOperations"; +export * from "./backupStatus"; +export * from "./featureSupport"; +export * from "./backupProtectionIntent"; +export * from "./backupUsageSummaries"; export * from "./operations"; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/itemLevelRecoveryConnections.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/itemLevelRecoveryConnections.ts index 63983e7812a3..82b8dc23495e 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/itemLevelRecoveryConnections.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/itemLevelRecoveryConnections.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -45,7 +44,16 @@ export class ItemLevelRecoveryConnections { * @param [options] The optional parameters * @returns Promise */ - provision(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, recoveryPointId: string, parameters: Models.ILRRequestResource, options?: msRest.RequestOptionsBase): Promise; + provision( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + recoveryPointId: string, + parameters: Models.ILRRequestResource, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -59,7 +67,16 @@ export class ItemLevelRecoveryConnections { * @param parameters resource ILR request * @param callback The callback */ - provision(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, recoveryPointId: string, parameters: Models.ILRRequestResource, callback: msRest.ServiceCallback): void; + provision( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + recoveryPointId: string, + parameters: Models.ILRRequestResource, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -74,8 +91,28 @@ export class ItemLevelRecoveryConnections { * @param options The optional parameters * @param callback The callback */ - provision(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, recoveryPointId: string, parameters: Models.ILRRequestResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - provision(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, recoveryPointId: string, parameters: Models.ILRRequestResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + provision( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + recoveryPointId: string, + parameters: Models.ILRRequestResource, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + provision( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + recoveryPointId: string, + parameters: Models.ILRRequestResource, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -88,7 +125,8 @@ export class ItemLevelRecoveryConnections { options }, provisionOperationSpec, - callback); + callback + ); } /** @@ -107,7 +145,15 @@ export class ItemLevelRecoveryConnections { * @param [options] The optional parameters * @returns Promise */ - revoke(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, recoveryPointId: string, options?: msRest.RequestOptionsBase): Promise; + revoke( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + recoveryPointId: string, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -120,7 +166,15 @@ export class ItemLevelRecoveryConnections { * this backed up data. * @param callback The callback */ - revoke(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, recoveryPointId: string, callback: msRest.ServiceCallback): void; + revoke( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + recoveryPointId: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -134,8 +188,26 @@ export class ItemLevelRecoveryConnections { * @param options The optional parameters * @param callback The callback */ - revoke(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, recoveryPointId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - revoke(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, recoveryPointId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + revoke( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + recoveryPointId: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + revoke( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + recoveryPointId: string, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -147,7 +219,8 @@ export class ItemLevelRecoveryConnections { options }, revokeOperationSpec, - callback); + callback + ); } } @@ -155,7 +228,8 @@ export class ItemLevelRecoveryConnections { const serializer = new msRest.Serializer(Mappers); const provisionOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/provisionInstantItemRecovery", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/provisionInstantItemRecovery", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, @@ -165,12 +239,8 @@ const provisionOperationSpec: msRest.OperationSpec = { Parameters.protectedItemName, Parameters.recoveryPointId ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], requestBody: { parameterPath: "parameters", mapper: { @@ -189,7 +259,8 @@ const provisionOperationSpec: msRest.OperationSpec = { const revokeOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/revokeInstantItemRecovery", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/revokeInstantItemRecovery", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, @@ -199,12 +270,8 @@ const revokeOperationSpec: msRest.OperationSpec = { Parameters.protectedItemName, Parameters.recoveryPointId ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], responses: { 202: {}, default: { diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobCancellations.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobCancellations.ts index 442f5f77e51f..b10a37d81a88 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobCancellations.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobCancellations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -35,7 +34,12 @@ export class JobCancellations { * @param [options] The optional parameters * @returns Promise */ - trigger(vaultName: string, resourceGroupName: string, jobName: string, options?: msRest.RequestOptionsBase): Promise; + trigger( + vaultName: string, + resourceGroupName: string, + jobName: string, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -43,7 +47,12 @@ export class JobCancellations { * @param jobName Name of the job to cancel. * @param callback The callback */ - trigger(vaultName: string, resourceGroupName: string, jobName: string, callback: msRest.ServiceCallback): void; + trigger( + vaultName: string, + resourceGroupName: string, + jobName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -52,8 +61,20 @@ export class JobCancellations { * @param options The optional parameters * @param callback The callback */ - trigger(vaultName: string, resourceGroupName: string, jobName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - trigger(vaultName: string, resourceGroupName: string, jobName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + trigger( + vaultName: string, + resourceGroupName: string, + jobName: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + trigger( + vaultName: string, + resourceGroupName: string, + jobName: string, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -62,7 +83,8 @@ export class JobCancellations { options }, triggerOperationSpec, - callback); + callback + ); } } @@ -70,19 +92,16 @@ export class JobCancellations { const serializer = new msRest.Serializer(Mappers); const triggerOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/cancel", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/cancel", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.jobName ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], responses: { 202: {}, default: { diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobDetails.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobDetails.ts index bf7a50af9b7f..d5ca623db423 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobDetails.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobDetails.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -35,7 +34,12 @@ export class JobDetails { * @param [options] The optional parameters * @returns Promise */ - get(vaultName: string, resourceGroupName: string, jobName: string, options?: msRest.RequestOptionsBase): Promise; + get( + vaultName: string, + resourceGroupName: string, + jobName: string, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -43,7 +47,12 @@ export class JobDetails { * @param jobName Name of the job whose details are to be fetched. * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, jobName: string, callback: msRest.ServiceCallback): void; + get( + vaultName: string, + resourceGroupName: string, + jobName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -52,8 +61,20 @@ export class JobDetails { * @param options The optional parameters * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, jobName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(vaultName: string, resourceGroupName: string, jobName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + vaultName: string, + resourceGroupName: string, + jobName: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + get( + vaultName: string, + resourceGroupName: string, + jobName: string, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -62,7 +83,8 @@ export class JobDetails { options }, getOperationSpec, - callback) as Promise; + callback + ) as Promise; } } @@ -70,19 +92,16 @@ export class JobDetails { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.jobName ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.JobResource diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobOperationResults.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobOperationResults.ts index e09087842b60..18ab36e75100 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobOperationResults.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobOperationResults.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -35,7 +34,13 @@ export class JobOperationResults { * @param [options] The optional parameters * @returns Promise */ - get(vaultName: string, resourceGroupName: string, jobName: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + get( + vaultName: string, + resourceGroupName: string, + jobName: string, + operationId: string, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -44,7 +49,13 @@ export class JobOperationResults { * @param operationId OperationID which represents the operation whose result has to be fetched. * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, jobName: string, operationId: string, callback: msRest.ServiceCallback): void; + get( + vaultName: string, + resourceGroupName: string, + jobName: string, + operationId: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -54,8 +65,22 @@ export class JobOperationResults { * @param options The optional parameters * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, jobName: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(vaultName: string, resourceGroupName: string, jobName: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + vaultName: string, + resourceGroupName: string, + jobName: string, + operationId: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + get( + vaultName: string, + resourceGroupName: string, + jobName: string, + operationId: string, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -65,7 +90,8 @@ export class JobOperationResults { options }, getOperationSpec, - callback); + callback + ); } } @@ -73,7 +99,8 @@ export class JobOperationResults { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/operationResults/{operationId}", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/operationResults/{operationId}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, @@ -81,12 +108,8 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.jobName, Parameters.operationId ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], responses: { 200: {}, 202: {}, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobs.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobs.ts index ccb2e58ba542..9c159e961400 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobs.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobs.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -34,14 +33,22 @@ export class Jobs { * @param [options] The optional parameters * @returns Promise */ - exportMethod(vaultName: string, resourceGroupName: string, options?: Models.JobsExportMethodOptionalParams): Promise; + exportMethod( + vaultName: string, + resourceGroupName: string, + options?: Models.JobsExportMethodOptionalParams + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is * present. * @param callback The callback */ - exportMethod(vaultName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + exportMethod( + vaultName: string, + resourceGroupName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -49,8 +56,18 @@ export class Jobs { * @param options The optional parameters * @param callback The callback */ - exportMethod(vaultName: string, resourceGroupName: string, options: Models.JobsExportMethodOptionalParams, callback: msRest.ServiceCallback): void; - exportMethod(vaultName: string, resourceGroupName: string, options?: Models.JobsExportMethodOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + exportMethod( + vaultName: string, + resourceGroupName: string, + options: Models.JobsExportMethodOptionalParams, + callback: msRest.ServiceCallback + ): void; + exportMethod( + vaultName: string, + resourceGroupName: string, + options?: Models.JobsExportMethodOptionalParams | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -58,7 +75,8 @@ export class Jobs { options }, exportMethodOperationSpec, - callback); + callback + ); } } @@ -66,19 +84,11 @@ export class Jobs { const serializer = new msRest.Serializer(Mappers); const exportMethodOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobsExport", - urlParameters: [ - Parameters.vaultName, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion1, - Parameters.filter - ], - headerParameters: [ - Parameters.acceptLanguage - ], + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobsExport", + urlParameters: [Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion0, Parameters.filter], + headerParameters: [Parameters.acceptLanguage], responses: { 202: {}, default: { diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/operation.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/operation.ts index 80ce96334588..01f67d0b6b89 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/operation.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/operation.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -35,7 +34,12 @@ export class Operation { * @param [options] The optional parameters * @returns Promise */ - validate(vaultName: string, resourceGroupName: string, parameters: Models.ValidateOperationRequestUnion, options?: msRest.RequestOptionsBase): Promise; + validate( + vaultName: string, + resourceGroupName: string, + parameters: Models.ValidateOperationRequestUnion, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -43,7 +47,12 @@ export class Operation { * @param parameters resource validate operation request * @param callback The callback */ - validate(vaultName: string, resourceGroupName: string, parameters: Models.ValidateOperationRequestUnion, callback: msRest.ServiceCallback): void; + validate( + vaultName: string, + resourceGroupName: string, + parameters: Models.ValidateOperationRequestUnion, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -52,8 +61,20 @@ export class Operation { * @param options The optional parameters * @param callback The callback */ - validate(vaultName: string, resourceGroupName: string, parameters: Models.ValidateOperationRequestUnion, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - validate(vaultName: string, resourceGroupName: string, parameters: Models.ValidateOperationRequestUnion, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + validate( + vaultName: string, + resourceGroupName: string, + parameters: Models.ValidateOperationRequestUnion, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + validate( + vaultName: string, + resourceGroupName: string, + parameters: Models.ValidateOperationRequestUnion, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -62,7 +83,8 @@ export class Operation { options }, validateOperationSpec, - callback) as Promise; + callback + ) as Promise; } } @@ -70,18 +92,11 @@ export class Operation { const serializer = new msRest.Serializer(Mappers); const validateOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperation", - urlParameters: [ - Parameters.vaultName, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperation", + urlParameters: [Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], requestBody: { parameterPath: "parameters", mapper: { diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/operations.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/operations.ts index 6fd0022c8fc0..bdcdb85b3a31 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/operations.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/operations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -40,14 +39,21 @@ export class Operations { * @param options The optional parameters * @param callback The callback */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list( + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + list( + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { options }, listOperationSpec, - callback) as Promise; + callback + ) as Promise; } /** @@ -56,26 +62,41 @@ export class Operations { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext( + nextPageLink: string, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listNext( + nextPageLink: string, + callback: msRest.ServiceCallback + ): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext( + nextPageLink: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + listNext( + nextPageLink: string, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback) as Promise; + callback + ) as Promise; } } @@ -84,12 +105,8 @@ const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.RecoveryServices/operations", - queryParameters: [ - Parameters.apiVersion4 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion3], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.ClientDiscoveryResponse @@ -105,12 +122,9 @@ const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + urlParameters: [Parameters.nextPageLink], + queryParameters: [Parameters.apiVersion3], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.ClientDiscoveryResponse diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/privateEndpointConnectionOperations.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/privateEndpointConnectionOperations.ts index fdb4a5c9916a..06cc4a74e61b 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/privateEndpointConnectionOperations.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/privateEndpointConnectionOperations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -36,7 +35,12 @@ export class PrivateEndpointConnectionOperations { * @param [options] The optional parameters * @returns Promise */ - get(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + get( + vaultName: string, + resourceGroupName: string, + privateEndpointConnectionName: string, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -44,7 +48,12 @@ export class PrivateEndpointConnectionOperations { * @param privateEndpointConnectionName The name of the private endpoint connection. * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + get( + vaultName: string, + resourceGroupName: string, + privateEndpointConnectionName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -53,8 +62,22 @@ export class PrivateEndpointConnectionOperations { * @param options The optional parameters * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + vaultName: string, + resourceGroupName: string, + privateEndpointConnectionName: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + get( + vaultName: string, + resourceGroupName: string, + privateEndpointConnectionName: string, + options?: + | msRest.RequestOptionsBase + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -63,7 +86,8 @@ export class PrivateEndpointConnectionOperations { options }, getOperationSpec, - callback) as Promise; + callback + ) as Promise; } /** @@ -76,9 +100,22 @@ export class PrivateEndpointConnectionOperations { * @param [options] The optional parameters * @returns Promise */ - put(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnectionResource, options?: msRest.RequestOptionsBase): Promise { - return this.beginPut(vaultName,resourceGroupName,privateEndpointConnectionName,parameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + put( + vaultName: string, + resourceGroupName: string, + privateEndpointConnectionName: string, + parameters: Models.PrivateEndpointConnectionResource, + options?: msRest.RequestOptionsBase + ): Promise { + return this.beginPut( + vaultName, + resourceGroupName, + privateEndpointConnectionName, + parameters, + options + ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< + Models.PrivateEndpointConnectionPutResponse + >; } /** @@ -90,9 +127,18 @@ export class PrivateEndpointConnectionOperations { * @param [options] The optional parameters * @returns Promise */ - deleteMethod(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(vaultName,resourceGroupName,privateEndpointConnectionName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + deleteMethod( + vaultName: string, + resourceGroupName: string, + privateEndpointConnectionName: string, + options?: msRest.RequestOptionsBase + ): Promise { + return this.beginDeleteMethod( + vaultName, + resourceGroupName, + privateEndpointConnectionName, + options + ).then((lroPoller) => lroPoller.pollUntilFinished()); } /** @@ -105,7 +151,13 @@ export class PrivateEndpointConnectionOperations { * @param [options] The optional parameters * @returns Promise */ - beginPut(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnectionResource, options?: msRest.RequestOptionsBase): Promise { + beginPut( + vaultName: string, + resourceGroupName: string, + privateEndpointConnectionName: string, + parameters: Models.PrivateEndpointConnectionResource, + options?: msRest.RequestOptionsBase + ): Promise { return this.client.sendLRORequest( { vaultName, @@ -115,7 +167,8 @@ export class PrivateEndpointConnectionOperations { options }, beginPutOperationSpec, - options); + options + ); } /** @@ -127,7 +180,12 @@ export class PrivateEndpointConnectionOperations { * @param [options] The optional parameters * @returns Promise */ - beginDeleteMethod(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + beginDeleteMethod( + vaultName: string, + resourceGroupName: string, + privateEndpointConnectionName: string, + options?: msRest.RequestOptionsBase + ): Promise { return this.client.sendLRORequest( { vaultName, @@ -136,7 +194,8 @@ export class PrivateEndpointConnectionOperations { options }, beginDeleteMethodOperationSpec, - options); + options + ); } } @@ -144,25 +203,22 @@ export class PrivateEndpointConnectionOperations { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.privateEndpointConnectionName ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.PrivateEndpointConnectionResource }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.NewErrorResponse } }, serializer @@ -170,19 +226,16 @@ const getOperationSpec: msRest.OperationSpec = { const beginPutOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.privateEndpointConnectionName ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], requestBody: { parameterPath: "parameters", mapper: { @@ -206,25 +259,22 @@ const beginPutOperationSpec: msRest.OperationSpec = { const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.privateEndpointConnectionName ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], responses: { 200: {}, 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.CloudError } }, serializer diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/privateEndpointOperations.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/privateEndpointOperations.ts new file mode 100644 index 000000000000..e2c39915da65 --- /dev/null +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/privateEndpointOperations.ts @@ -0,0 +1,123 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateEndpointOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { RecoveryServicesBackupClientContext } from "../recoveryServicesBackupClientContext"; + +/** Class representing a PrivateEndpointOperations. */ +export class PrivateEndpointOperations { + private readonly client: RecoveryServicesBackupClientContext; + + /** + * Create a PrivateEndpointOperations. + * @param {RecoveryServicesBackupClientContext} client Reference to the service client. + */ + constructor(client: RecoveryServicesBackupClientContext) { + this.client = client; + } + + /** + * @summary Gets the operation status for a private endpoint connection. + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param operationId Operation id + * @param [options] The optional parameters + * @returns Promise + */ + getOperationStatus( + vaultName: string, + resourceGroupName: string, + privateEndpointConnectionName: string, + operationId: string, + options?: msRest.RequestOptionsBase + ): Promise; + /** + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param operationId Operation id + * @param callback The callback + */ + getOperationStatus( + vaultName: string, + resourceGroupName: string, + privateEndpointConnectionName: string, + operationId: string, + callback: msRest.ServiceCallback + ): void; + /** + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param operationId Operation id + * @param options The optional parameters + * @param callback The callback + */ + getOperationStatus( + vaultName: string, + resourceGroupName: string, + privateEndpointConnectionName: string, + operationId: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + getOperationStatus( + vaultName: string, + resourceGroupName: string, + privateEndpointConnectionName: string, + operationId: string, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + vaultName, + resourceGroupName, + privateEndpointConnectionName, + operationId, + options + }, + getOperationStatusOperationSpec, + callback + ) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationStatusOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}/operationsStatus/{operationId}", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName, + Parameters.operationId + ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], + responses: { + 200: { + bodyMapper: Mappers.OperationStatus + }, + default: { + bodyMapper: Mappers.NewErrorResponse + } + }, + serializer +}; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectableContainers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectableContainers.ts index 92999e8d95de..8f20b9206463 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectableContainers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectableContainers.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -35,7 +34,12 @@ export class ProtectableContainers { * @param [options] The optional parameters * @returns Promise */ - list(vaultName: string, resourceGroupName: string, fabricName: string, options?: Models.ProtectableContainersListOptionalParams): Promise; + list( + vaultName: string, + resourceGroupName: string, + fabricName: string, + options?: Models.ProtectableContainersListOptionalParams + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -43,7 +47,12 @@ export class ProtectableContainers { * @param fabricName * @param callback The callback */ - list(vaultName: string, resourceGroupName: string, fabricName: string, callback: msRest.ServiceCallback): void; + list( + vaultName: string, + resourceGroupName: string, + fabricName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -52,8 +61,22 @@ export class ProtectableContainers { * @param options The optional parameters * @param callback The callback */ - list(vaultName: string, resourceGroupName: string, fabricName: string, options: Models.ProtectableContainersListOptionalParams, callback: msRest.ServiceCallback): void; - list(vaultName: string, resourceGroupName: string, fabricName: string, options?: Models.ProtectableContainersListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list( + vaultName: string, + resourceGroupName: string, + fabricName: string, + options: Models.ProtectableContainersListOptionalParams, + callback: msRest.ServiceCallback + ): void; + list( + vaultName: string, + resourceGroupName: string, + fabricName: string, + options?: + | Models.ProtectableContainersListOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -62,7 +85,8 @@ export class ProtectableContainers { options }, listOperationSpec, - callback) as Promise; + callback + ) as Promise; } /** @@ -71,26 +95,43 @@ export class ProtectableContainers { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext( + nextPageLink: string, + options?: Models.ProtectableContainersListNextOptionalParams + ): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listNext( + nextPageLink: string, + callback: msRest.ServiceCallback + ): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext( + nextPageLink: string, + options: Models.ProtectableContainersListNextOptionalParams, + callback: msRest.ServiceCallback + ): void; + listNext( + nextPageLink: string, + options?: + | Models.ProtectableContainersListNextOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback) as Promise; + callback + ) as Promise; } } @@ -98,20 +139,16 @@ export class ProtectableContainers { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectableContainers", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectableContainers", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.fabricName ], - queryParameters: [ - Parameters.apiVersion2, - Parameters.filter - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0, Parameters.filter], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.ProtectableContainerResourceList @@ -127,12 +164,9 @@ const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + urlParameters: [Parameters.nextPageLink], + queryParameters: [Parameters.apiVersion0, Parameters.filter], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.ProtectableContainerResourceList diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectedItemOperationResults.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectedItemOperationResults.ts index 480fd2b20e17..4cb7ea3a0604 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectedItemOperationResults.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectedItemOperationResults.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -38,7 +37,15 @@ export class ProtectedItemOperationResults { * @param [options] The optional parameters * @returns Promise */ - get(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + operationId: string, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -49,7 +56,15 @@ export class ProtectedItemOperationResults { * @param operationId OperationID which represents the operation whose result needs to be fetched. * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, operationId: string, callback: msRest.ServiceCallback): void; + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + operationId: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -61,8 +76,26 @@ export class ProtectedItemOperationResults { * @param options The optional parameters * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + operationId: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + operationId: string, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -74,7 +107,8 @@ export class ProtectedItemOperationResults { options }, getOperationSpec, - callback) as Promise; + callback + ) as Promise; } } @@ -82,7 +116,8 @@ export class ProtectedItemOperationResults { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationResults/{operationId}", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationResults/{operationId}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, @@ -92,12 +127,8 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.protectedItemName, Parameters.operationId ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.ProtectedItemResource diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectedItemOperationStatuses.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectedItemOperationStatuses.ts index 62e38f8252fd..1c59cf116ce5 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectedItemOperationStatuses.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectedItemOperationStatuses.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -42,7 +41,15 @@ export class ProtectedItemOperationStatuses { * @param [options] The optional parameters * @returns Promise */ - get(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + operationId: string, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -53,7 +60,15 @@ export class ProtectedItemOperationStatuses { * @param operationId OperationID represents the operation whose status needs to be fetched. * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, operationId: string, callback: msRest.ServiceCallback): void; + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + operationId: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -65,8 +80,26 @@ export class ProtectedItemOperationStatuses { * @param options The optional parameters * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + operationId: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + operationId: string, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -78,7 +111,8 @@ export class ProtectedItemOperationStatuses { options }, getOperationSpec, - callback) as Promise; + callback + ) as Promise; } } @@ -86,7 +120,8 @@ export class ProtectedItemOperationStatuses { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationsStatus/{operationId}", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationsStatus/{operationId}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, @@ -96,12 +131,8 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.protectedItemName, Parameters.operationId ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.OperationStatus diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectedItems.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectedItems.ts index 7b0982b4c2e7..057f58807854 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectedItems.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectedItems.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -39,7 +38,14 @@ export class ProtectedItems { * @param [options] The optional parameters * @returns Promise */ - get(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, options?: Models.ProtectedItemsGetOptionalParams): Promise; + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + options?: Models.ProtectedItemsGetOptionalParams + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -49,7 +55,14 @@ export class ProtectedItems { * @param protectedItemName Backed up item name whose details are to be fetched. * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, callback: msRest.ServiceCallback): void; + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -60,8 +73,26 @@ export class ProtectedItems { * @param options The optional parameters * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, options: Models.ProtectedItemsGetOptionalParams, callback: msRest.ServiceCallback): void; - get(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, options?: Models.ProtectedItemsGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + options: Models.ProtectedItemsGetOptionalParams, + callback: msRest.ServiceCallback + ): void; + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + options?: + | Models.ProtectedItemsGetOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -72,7 +103,8 @@ export class ProtectedItems { options }, getOperationSpec, - callback) as Promise; + callback + ) as Promise; } /** @@ -90,7 +122,15 @@ export class ProtectedItems { * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, parameters: Models.ProtectedItemResource, options?: msRest.RequestOptionsBase): Promise; + createOrUpdate( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + parameters: Models.ProtectedItemResource, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -101,7 +141,15 @@ export class ProtectedItems { * @param parameters resource backed up item * @param callback The callback */ - createOrUpdate(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, parameters: Models.ProtectedItemResource, callback: msRest.ServiceCallback): void; + createOrUpdate( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + parameters: Models.ProtectedItemResource, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -113,8 +161,26 @@ export class ProtectedItems { * @param options The optional parameters * @param callback The callback */ - createOrUpdate(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, parameters: Models.ProtectedItemResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, parameters: Models.ProtectedItemResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createOrUpdate( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + parameters: Models.ProtectedItemResource, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + createOrUpdate( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + parameters: Models.ProtectedItemResource, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -126,7 +192,8 @@ export class ProtectedItems { options }, createOrUpdateOperationSpec, - callback) as Promise; + callback + ) as Promise; } /** @@ -142,7 +209,14 @@ export class ProtectedItems { * @param [options] The optional parameters * @returns Promise */ - deleteMethod(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, options?: msRest.RequestOptionsBase): Promise; + deleteMethod( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -152,7 +226,14 @@ export class ProtectedItems { * @param protectedItemName Backed up item to be deleted. * @param callback The callback */ - deleteMethod(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, callback: msRest.ServiceCallback): void; + deleteMethod( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -163,8 +244,24 @@ export class ProtectedItems { * @param options The optional parameters * @param callback The callback */ - deleteMethod(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + deleteMethod( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + deleteMethod( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -175,7 +272,8 @@ export class ProtectedItems { options }, deleteMethodOperationSpec, - callback); + callback + ); } } @@ -183,7 +281,8 @@ export class ProtectedItems { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, @@ -192,13 +291,8 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.containerName, Parameters.protectedItemName ], - queryParameters: [ - Parameters.apiVersion1, - Parameters.filter - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0, Parameters.filter], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.ProtectedItemResource @@ -212,7 +306,8 @@ const getOperationSpec: msRest.OperationSpec = { const createOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, @@ -221,12 +316,8 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.containerName, Parameters.protectedItemName ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], requestBody: { parameterPath: "parameters", mapper: { @@ -248,7 +339,8 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, @@ -257,13 +349,10 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.containerName, Parameters.protectedItemName ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], responses: { + 200: {}, 202: {}, 204: {}, default: { diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionContainerOperationResults.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionContainerOperationResults.ts index fbfa32adf288..0a4b0a58d73f 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionContainerOperationResults.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionContainerOperationResults.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -37,7 +36,14 @@ export class ProtectionContainerOperationResults { * @param [options] The optional parameters * @returns Promise */ - get(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + operationId: string, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -47,7 +53,14 @@ export class ProtectionContainerOperationResults { * @param operationId Operation ID which represents the operation whose result needs to be fetched. * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, operationId: string, callback: msRest.ServiceCallback): void; + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + operationId: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -58,8 +71,26 @@ export class ProtectionContainerOperationResults { * @param options The optional parameters * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + operationId: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + operationId: string, + options?: + | msRest.RequestOptionsBase + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -70,7 +101,8 @@ export class ProtectionContainerOperationResults { options }, getOperationSpec, - callback) as Promise; + callback + ) as Promise; } } @@ -78,7 +110,8 @@ export class ProtectionContainerOperationResults { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/operationResults/{operationId}", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/operationResults/{operationId}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, @@ -87,12 +120,8 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.containerName, Parameters.operationId ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.ProtectionContainerResource diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionContainerRefreshOperationResults.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionContainerRefreshOperationResults.ts index e0d2487aeafb..ff8643406e14 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionContainerRefreshOperationResults.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionContainerRefreshOperationResults.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -35,7 +34,13 @@ export class ProtectionContainerRefreshOperationResults { * @param [options] The optional parameters * @returns Promise */ - get(vaultName: string, resourceGroupName: string, fabricName: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + operationId: string, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -44,7 +49,13 @@ export class ProtectionContainerRefreshOperationResults { * @param operationId Operation ID associated with the operation whose result needs to be fetched. * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, fabricName: string, operationId: string, callback: msRest.ServiceCallback): void; + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + operationId: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -54,8 +65,22 @@ export class ProtectionContainerRefreshOperationResults { * @param options The optional parameters * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, fabricName: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(vaultName: string, resourceGroupName: string, fabricName: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + operationId: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + operationId: string, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -65,7 +90,8 @@ export class ProtectionContainerRefreshOperationResults { options }, getOperationSpec, - callback); + callback + ); } } @@ -73,7 +99,8 @@ export class ProtectionContainerRefreshOperationResults { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/operationResults/{operationId}", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/operationResults/{operationId}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, @@ -81,12 +108,8 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.fabricName, Parameters.operationId ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], responses: { 202: {}, 204: {}, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionContainers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionContainers.ts index bb1d21630ce3..a9328ba5f22e 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionContainers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionContainers.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -36,7 +35,13 @@ export class ProtectionContainers { * @param [options] The optional parameters * @returns Promise */ - get(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, options?: msRest.RequestOptionsBase): Promise; + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -45,7 +50,13 @@ export class ProtectionContainers { * @param containerName Name of the container whose details need to be fetched. * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, callback: msRest.ServiceCallback): void; + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -55,8 +66,24 @@ export class ProtectionContainers { * @param options The optional parameters * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + options?: + | msRest.RequestOptionsBase + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -66,7 +93,8 @@ export class ProtectionContainers { options }, getOperationSpec, - callback) as Promise; + callback + ) as Promise; } /** @@ -83,7 +111,14 @@ export class ProtectionContainers { * @param [options] The optional parameters * @returns Promise */ - register(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, parameters: Models.ProtectionContainerResource, options?: msRest.RequestOptionsBase): Promise; + register( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + parameters: Models.ProtectionContainerResource, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -93,7 +128,14 @@ export class ProtectionContainers { * @param parameters Request body for operation * @param callback The callback */ - register(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, parameters: Models.ProtectionContainerResource, callback: msRest.ServiceCallback): void; + register( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + parameters: Models.ProtectionContainerResource, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -104,8 +146,26 @@ export class ProtectionContainers { * @param options The optional parameters * @param callback The callback */ - register(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, parameters: Models.ProtectionContainerResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - register(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, parameters: Models.ProtectionContainerResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + register( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + parameters: Models.ProtectionContainerResource, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + register( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + parameters: Models.ProtectionContainerResource, + options?: + | msRest.RequestOptionsBase + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -116,7 +176,8 @@ export class ProtectionContainers { options }, registerOperationSpec, - callback) as Promise; + callback + ) as Promise; } /** @@ -133,7 +194,13 @@ export class ProtectionContainers { * @param [options] The optional parameters * @returns Promise */ - unregister(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, options?: msRest.RequestOptionsBase): Promise; + unregister( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -143,7 +210,13 @@ export class ProtectionContainers { * Services Vault. * @param callback The callback */ - unregister(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, callback: msRest.ServiceCallback): void; + unregister( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -154,8 +227,22 @@ export class ProtectionContainers { * @param options The optional parameters * @param callback The callback */ - unregister(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - unregister(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + unregister( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + unregister( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -165,7 +252,8 @@ export class ProtectionContainers { options }, unregisterOperationSpec, - callback); + callback + ); } /** @@ -180,7 +268,13 @@ export class ProtectionContainers { * @param [options] The optional parameters * @returns Promise */ - inquire(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, options?: Models.ProtectionContainersInquireOptionalParams): Promise; + inquire( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + options?: Models.ProtectionContainersInquireOptionalParams + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -189,7 +283,13 @@ export class ProtectionContainers { * @param containerName Name of the container in which inquiry needs to be triggered. * @param callback The callback */ - inquire(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, callback: msRest.ServiceCallback): void; + inquire( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -199,8 +299,22 @@ export class ProtectionContainers { * @param options The optional parameters * @param callback The callback */ - inquire(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, options: Models.ProtectionContainersInquireOptionalParams, callback: msRest.ServiceCallback): void; - inquire(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, options?: Models.ProtectionContainersInquireOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + inquire( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + options: Models.ProtectionContainersInquireOptionalParams, + callback: msRest.ServiceCallback + ): void; + inquire( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + options?: Models.ProtectionContainersInquireOptionalParams | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -210,7 +324,8 @@ export class ProtectionContainers { options }, inquireOperationSpec, - callback); + callback + ); } /** @@ -224,7 +339,12 @@ export class ProtectionContainers { * @param [options] The optional parameters * @returns Promise */ - refresh(vaultName: string, resourceGroupName: string, fabricName: string, options?: Models.ProtectionContainersRefreshOptionalParams): Promise; + refresh( + vaultName: string, + resourceGroupName: string, + fabricName: string, + options?: Models.ProtectionContainersRefreshOptionalParams + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -232,7 +352,12 @@ export class ProtectionContainers { * @param fabricName Fabric name associated the container. * @param callback The callback */ - refresh(vaultName: string, resourceGroupName: string, fabricName: string, callback: msRest.ServiceCallback): void; + refresh( + vaultName: string, + resourceGroupName: string, + fabricName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -241,8 +366,20 @@ export class ProtectionContainers { * @param options The optional parameters * @param callback The callback */ - refresh(vaultName: string, resourceGroupName: string, fabricName: string, options: Models.ProtectionContainersRefreshOptionalParams, callback: msRest.ServiceCallback): void; - refresh(vaultName: string, resourceGroupName: string, fabricName: string, options?: Models.ProtectionContainersRefreshOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + refresh( + vaultName: string, + resourceGroupName: string, + fabricName: string, + options: Models.ProtectionContainersRefreshOptionalParams, + callback: msRest.ServiceCallback + ): void; + refresh( + vaultName: string, + resourceGroupName: string, + fabricName: string, + options?: Models.ProtectionContainersRefreshOptionalParams | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -251,7 +388,8 @@ export class ProtectionContainers { options }, refreshOperationSpec, - callback); + callback + ); } } @@ -259,7 +397,8 @@ export class ProtectionContainers { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, @@ -267,12 +406,8 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.fabricName, Parameters.containerName ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.ProtectionContainerResource @@ -286,7 +421,8 @@ const getOperationSpec: msRest.OperationSpec = { const registerOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, @@ -294,12 +430,8 @@ const registerOperationSpec: msRest.OperationSpec = { Parameters.fabricName, Parameters.containerName ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], requestBody: { parameterPath: "parameters", mapper: { @@ -321,7 +453,8 @@ const registerOperationSpec: msRest.OperationSpec = { const unregisterOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, @@ -329,13 +462,10 @@ const unregisterOperationSpec: msRest.OperationSpec = { Parameters.fabricName, Parameters.containerName ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], responses: { + 200: {}, 202: {}, 204: {}, default: { @@ -347,7 +477,8 @@ const unregisterOperationSpec: msRest.OperationSpec = { const inquireOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/inquire", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/inquire", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, @@ -355,13 +486,8 @@ const inquireOperationSpec: msRest.OperationSpec = { Parameters.fabricName, Parameters.containerName ], - queryParameters: [ - Parameters.apiVersion2, - Parameters.filter - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0, Parameters.filter], + headerParameters: [Parameters.acceptLanguage], responses: { 202: {}, default: { @@ -373,20 +499,16 @@ const inquireOperationSpec: msRest.OperationSpec = { const refreshOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/refreshContainers", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/refreshContainers", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.fabricName ], - queryParameters: [ - Parameters.apiVersion2, - Parameters.filter - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0, Parameters.filter], + headerParameters: [Parameters.acceptLanguage], responses: { 202: {}, default: { diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionIntentOperations.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionIntentOperations.ts index be8a96066335..f047cf460784 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionIntentOperations.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionIntentOperations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -36,21 +35,41 @@ export class ProtectionIntentOperations { * @param [options] The optional parameters * @returns Promise */ - validate(azureRegion: string, parameters: Models.PreValidateEnableBackupRequest, options?: msRest.RequestOptionsBase): Promise; + validate( + azureRegion: string, + parameters: Models.PreValidateEnableBackupRequest, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param azureRegion Azure region to hit Api * @param parameters Enable backup validation request on Virtual Machine * @param callback The callback */ - validate(azureRegion: string, parameters: Models.PreValidateEnableBackupRequest, callback: msRest.ServiceCallback): void; + validate( + azureRegion: string, + parameters: Models.PreValidateEnableBackupRequest, + callback: msRest.ServiceCallback + ): void; /** * @param azureRegion Azure region to hit Api * @param parameters Enable backup validation request on Virtual Machine * @param options The optional parameters * @param callback The callback */ - validate(azureRegion: string, parameters: Models.PreValidateEnableBackupRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - validate(azureRegion: string, parameters: Models.PreValidateEnableBackupRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + validate( + azureRegion: string, + parameters: Models.PreValidateEnableBackupRequest, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + validate( + azureRegion: string, + parameters: Models.PreValidateEnableBackupRequest, + options?: + | msRest.RequestOptionsBase + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { azureRegion, @@ -58,7 +77,8 @@ export class ProtectionIntentOperations { options }, validateOperationSpec, - callback) as Promise; + callback + ) as Promise; } /** @@ -73,7 +93,13 @@ export class ProtectionIntentOperations { * @param [options] The optional parameters * @returns Promise */ - get(vaultName: string, resourceGroupName: string, fabricName: string, intentObjectName: string, options?: msRest.RequestOptionsBase): Promise; + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + intentObjectName: string, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -82,7 +108,13 @@ export class ProtectionIntentOperations { * @param intentObjectName Backed up item name whose details are to be fetched. * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, fabricName: string, intentObjectName: string, callback: msRest.ServiceCallback): void; + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + intentObjectName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -92,8 +124,22 @@ export class ProtectionIntentOperations { * @param options The optional parameters * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, fabricName: string, intentObjectName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(vaultName: string, resourceGroupName: string, fabricName: string, intentObjectName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + intentObjectName: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + intentObjectName: string, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -103,7 +149,8 @@ export class ProtectionIntentOperations { options }, getOperationSpec, - callback) as Promise; + callback + ) as Promise; } /** @@ -117,7 +164,14 @@ export class ProtectionIntentOperations { * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(vaultName: string, resourceGroupName: string, fabricName: string, intentObjectName: string, parameters: Models.ProtectionIntentResource, options?: msRest.RequestOptionsBase): Promise; + createOrUpdate( + vaultName: string, + resourceGroupName: string, + fabricName: string, + intentObjectName: string, + parameters: Models.ProtectionIntentResource, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -127,7 +181,14 @@ export class ProtectionIntentOperations { * @param parameters resource backed up item * @param callback The callback */ - createOrUpdate(vaultName: string, resourceGroupName: string, fabricName: string, intentObjectName: string, parameters: Models.ProtectionIntentResource, callback: msRest.ServiceCallback): void; + createOrUpdate( + vaultName: string, + resourceGroupName: string, + fabricName: string, + intentObjectName: string, + parameters: Models.ProtectionIntentResource, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -138,8 +199,24 @@ export class ProtectionIntentOperations { * @param options The optional parameters * @param callback The callback */ - createOrUpdate(vaultName: string, resourceGroupName: string, fabricName: string, intentObjectName: string, parameters: Models.ProtectionIntentResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(vaultName: string, resourceGroupName: string, fabricName: string, intentObjectName: string, parameters: Models.ProtectionIntentResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createOrUpdate( + vaultName: string, + resourceGroupName: string, + fabricName: string, + intentObjectName: string, + parameters: Models.ProtectionIntentResource, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + createOrUpdate( + vaultName: string, + resourceGroupName: string, + fabricName: string, + intentObjectName: string, + parameters: Models.ProtectionIntentResource, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -150,7 +227,8 @@ export class ProtectionIntentOperations { options }, createOrUpdateOperationSpec, - callback) as Promise; + callback + ) as Promise; } /** @@ -163,7 +241,13 @@ export class ProtectionIntentOperations { * @param [options] The optional parameters * @returns Promise */ - deleteMethod(vaultName: string, resourceGroupName: string, fabricName: string, intentObjectName: string, options?: msRest.RequestOptionsBase): Promise; + deleteMethod( + vaultName: string, + resourceGroupName: string, + fabricName: string, + intentObjectName: string, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -172,7 +256,13 @@ export class ProtectionIntentOperations { * @param intentObjectName Intent to be deleted. * @param callback The callback */ - deleteMethod(vaultName: string, resourceGroupName: string, fabricName: string, intentObjectName: string, callback: msRest.ServiceCallback): void; + deleteMethod( + vaultName: string, + resourceGroupName: string, + fabricName: string, + intentObjectName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -182,8 +272,22 @@ export class ProtectionIntentOperations { * @param options The optional parameters * @param callback The callback */ - deleteMethod(vaultName: string, resourceGroupName: string, fabricName: string, intentObjectName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(vaultName: string, resourceGroupName: string, fabricName: string, intentObjectName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + deleteMethod( + vaultName: string, + resourceGroupName: string, + fabricName: string, + intentObjectName: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + deleteMethod( + vaultName: string, + resourceGroupName: string, + fabricName: string, + intentObjectName: string, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -193,7 +297,8 @@ export class ProtectionIntentOperations { options }, deleteMethodOperationSpec, - callback); + callback + ); } } @@ -201,17 +306,11 @@ export class ProtectionIntentOperations { const serializer = new msRest.Serializer(Mappers); const validateOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupPreValidateProtection", - urlParameters: [ - Parameters.azureRegion, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion3 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + path: + "Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupPreValidateProtection", + urlParameters: [Parameters.azureRegion, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion2], + headerParameters: [Parameters.acceptLanguage], requestBody: { parameterPath: "parameters", mapper: { @@ -232,7 +331,8 @@ const validateOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}", + path: + "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, @@ -240,12 +340,8 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.fabricName, Parameters.intentObjectName ], - queryParameters: [ - Parameters.apiVersion3 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion2], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.ProtectionIntentResource @@ -259,7 +355,8 @@ const getOperationSpec: msRest.OperationSpec = { const createOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}", + path: + "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, @@ -267,12 +364,8 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.fabricName, Parameters.intentObjectName ], - queryParameters: [ - Parameters.apiVersion3 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion2], + headerParameters: [Parameters.acceptLanguage], requestBody: { parameterPath: "parameters", mapper: { @@ -293,7 +386,8 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}", + path: + "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, @@ -301,12 +395,8 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.fabricName, Parameters.intentObjectName ], - queryParameters: [ - Parameters.apiVersion3 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion2], + headerParameters: [Parameters.acceptLanguage], responses: { 204: {}, default: { diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicies.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicies.ts index a43a693d283a..519dbbe972b0 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicies.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicies.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -9,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/protectionPoliciesMappers"; import * as Parameters from "../models/parameters"; @@ -37,7 +37,12 @@ export class ProtectionPolicies { * @param [options] The optional parameters * @returns Promise */ - get(vaultName: string, resourceGroupName: string, policyName: string, options?: msRest.RequestOptionsBase): Promise; + get( + vaultName: string, + resourceGroupName: string, + policyName: string, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -45,7 +50,12 @@ export class ProtectionPolicies { * @param policyName Backup policy information to be fetched. * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, policyName: string, callback: msRest.ServiceCallback): void; + get( + vaultName: string, + resourceGroupName: string, + policyName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -54,8 +64,20 @@ export class ProtectionPolicies { * @param options The optional parameters * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, policyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(vaultName: string, resourceGroupName: string, policyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + vaultName: string, + resourceGroupName: string, + policyName: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + get( + vaultName: string, + resourceGroupName: string, + policyName: string, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -64,7 +86,8 @@ export class ProtectionPolicies { options }, getOperationSpec, - callback) as Promise; + callback + ) as Promise; } /** @@ -79,7 +102,13 @@ export class ProtectionPolicies { * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(vaultName: string, resourceGroupName: string, policyName: string, parameters: Models.ProtectionPolicyResource, options?: msRest.RequestOptionsBase): Promise; + createOrUpdate( + vaultName: string, + resourceGroupName: string, + policyName: string, + parameters: Models.ProtectionPolicyResource, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -88,7 +117,13 @@ export class ProtectionPolicies { * @param parameters resource backup policy * @param callback The callback */ - createOrUpdate(vaultName: string, resourceGroupName: string, policyName: string, parameters: Models.ProtectionPolicyResource, callback: msRest.ServiceCallback): void; + createOrUpdate( + vaultName: string, + resourceGroupName: string, + policyName: string, + parameters: Models.ProtectionPolicyResource, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -98,8 +133,22 @@ export class ProtectionPolicies { * @param options The optional parameters * @param callback The callback */ - createOrUpdate(vaultName: string, resourceGroupName: string, policyName: string, parameters: Models.ProtectionPolicyResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(vaultName: string, resourceGroupName: string, policyName: string, parameters: Models.ProtectionPolicyResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createOrUpdate( + vaultName: string, + resourceGroupName: string, + policyName: string, + parameters: Models.ProtectionPolicyResource, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + createOrUpdate( + vaultName: string, + resourceGroupName: string, + policyName: string, + parameters: Models.ProtectionPolicyResource, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -109,13 +158,14 @@ export class ProtectionPolicies { options }, createOrUpdateOperationSpec, - callback) as Promise; + callback + ) as Promise; } /** * Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous * operation. Status of the - * operation can be fetched using GetPolicyOperationResult API. + * operation can be fetched using GetProtectionPolicyOperationResult API. * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is * present. @@ -123,34 +173,47 @@ export class ProtectionPolicies { * @param [options] The optional parameters * @returns Promise */ - deleteMethod(vaultName: string, resourceGroupName: string, policyName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. - * @param policyName Backup policy to be deleted. - * @param callback The callback - */ - deleteMethod(vaultName: string, resourceGroupName: string, policyName: string, callback: msRest.ServiceCallback): void; + deleteMethod( + vaultName: string, + resourceGroupName: string, + policyName: string, + options?: msRest.RequestOptionsBase + ): Promise { + return this.beginDeleteMethod( + vaultName, + resourceGroupName, + policyName, + options + ).then((lroPoller) => lroPoller.pollUntilFinished()); + } + /** + * Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous + * operation. Status of the + * operation can be fetched using GetProtectionPolicyOperationResult API. * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is * present. * @param policyName Backup policy to be deleted. - * @param options The optional parameters - * @param callback The callback + * @param [options] The optional parameters + * @returns Promise */ - deleteMethod(vaultName: string, resourceGroupName: string, policyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(vaultName: string, resourceGroupName: string, policyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + beginDeleteMethod( + vaultName: string, + resourceGroupName: string, + policyName: string, + options?: msRest.RequestOptionsBase + ): Promise { + return this.client.sendLRORequest( { vaultName, resourceGroupName, policyName, options }, - deleteMethodOperationSpec, - callback); + beginDeleteMethodOperationSpec, + options + ); } } @@ -158,19 +221,16 @@ export class ProtectionPolicies { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.policyName ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.ProtectionPolicyResource @@ -184,19 +244,16 @@ const getOperationSpec: msRest.OperationSpec = { const createOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.policyName ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], requestBody: { parameterPath: "parameters", mapper: { @@ -216,21 +273,18 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { serializer }; -const deleteMethodOperationSpec: msRest.OperationSpec = { +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.policyName ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], responses: { 200: {}, 204: {}, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicyOperationResults.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicyOperationResults.ts index 85339f8da461..1b22688c49a7 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicyOperationResults.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicyOperationResults.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -36,7 +35,13 @@ export class ProtectionPolicyOperationResults { * @param [options] The optional parameters * @returns Promise */ - get(vaultName: string, resourceGroupName: string, policyName: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + get( + vaultName: string, + resourceGroupName: string, + policyName: string, + operationId: string, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -45,7 +50,13 @@ export class ProtectionPolicyOperationResults { * @param operationId Operation ID which represents the operation whose result needs to be fetched. * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, policyName: string, operationId: string, callback: msRest.ServiceCallback): void; + get( + vaultName: string, + resourceGroupName: string, + policyName: string, + operationId: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -55,8 +66,22 @@ export class ProtectionPolicyOperationResults { * @param options The optional parameters * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, policyName: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(vaultName: string, resourceGroupName: string, policyName: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + vaultName: string, + resourceGroupName: string, + policyName: string, + operationId: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + get( + vaultName: string, + resourceGroupName: string, + policyName: string, + operationId: string, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -66,7 +91,8 @@ export class ProtectionPolicyOperationResults { options }, getOperationSpec, - callback) as Promise; + callback + ) as Promise; } } @@ -74,7 +100,8 @@ export class ProtectionPolicyOperationResults { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operationResults/{operationId}", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operationResults/{operationId}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, @@ -82,12 +109,8 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.policyName, Parameters.operationId ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.ProtectionPolicyResource diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicyOperationStatuses.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicyOperationStatuses.ts index 8b487a76d326..940441f8973e 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicyOperationStatuses.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicyOperationStatuses.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -40,7 +39,13 @@ export class ProtectionPolicyOperationStatuses { * @param [options] The optional parameters * @returns Promise */ - get(vaultName: string, resourceGroupName: string, policyName: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + get( + vaultName: string, + resourceGroupName: string, + policyName: string, + operationId: string, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -49,7 +54,13 @@ export class ProtectionPolicyOperationStatuses { * @param operationId Operation ID which represents an operation whose status needs to be fetched. * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, policyName: string, operationId: string, callback: msRest.ServiceCallback): void; + get( + vaultName: string, + resourceGroupName: string, + policyName: string, + operationId: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -59,8 +70,22 @@ export class ProtectionPolicyOperationStatuses { * @param options The optional parameters * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, policyName: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(vaultName: string, resourceGroupName: string, policyName: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + vaultName: string, + resourceGroupName: string, + policyName: string, + operationId: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + get( + vaultName: string, + resourceGroupName: string, + policyName: string, + operationId: string, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -70,7 +95,8 @@ export class ProtectionPolicyOperationStatuses { options }, getOperationSpec, - callback) as Promise; + callback + ) as Promise; } } @@ -78,7 +104,8 @@ export class ProtectionPolicyOperationStatuses { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operations/{operationId}", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operations/{operationId}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, @@ -86,12 +113,8 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.policyName, Parameters.operationId ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.OperationStatus diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/recoveryPoints.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/recoveryPoints.ts index afd2493318d6..97030f472517 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/recoveryPoints.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/recoveryPoints.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -37,7 +36,14 @@ export class RecoveryPoints { * @param [options] The optional parameters * @returns Promise */ - list(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, options?: Models.RecoveryPointsListOptionalParams): Promise; + list( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + options?: Models.RecoveryPointsListOptionalParams + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -47,7 +53,14 @@ export class RecoveryPoints { * @param protectedItemName Backed up item whose backup copies are to be fetched. * @param callback The callback */ - list(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, callback: msRest.ServiceCallback): void; + list( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -58,8 +71,26 @@ export class RecoveryPoints { * @param options The optional parameters * @param callback The callback */ - list(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, options: Models.RecoveryPointsListOptionalParams, callback: msRest.ServiceCallback): void; - list(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, options?: Models.RecoveryPointsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + options: Models.RecoveryPointsListOptionalParams, + callback: msRest.ServiceCallback + ): void; + list( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + options?: + | Models.RecoveryPointsListOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -70,7 +101,8 @@ export class RecoveryPoints { options }, listOperationSpec, - callback) as Promise; + callback + ) as Promise; } /** @@ -87,7 +119,15 @@ export class RecoveryPoints { * @param [options] The optional parameters * @returns Promise */ - get(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, recoveryPointId: string, options?: msRest.RequestOptionsBase): Promise; + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + recoveryPointId: string, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -98,7 +138,15 @@ export class RecoveryPoints { * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, recoveryPointId: string, callback: msRest.ServiceCallback): void; + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + recoveryPointId: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -110,8 +158,26 @@ export class RecoveryPoints { * @param options The optional parameters * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, recoveryPointId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, recoveryPointId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + recoveryPointId: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + get( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + recoveryPointId: string, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -123,7 +189,102 @@ export class RecoveryPoints { options }, getOperationSpec, - callback) as Promise; + callback + ) as Promise; + } + + /** + * @summary Returns the Access token for communication between BMS and Protection service + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param fabricName Fabric name associated with the container. + * @param containerName Name of the container. + * @param protectedItemName Name of the Protected Item. + * @param recoveryPointId Recovery Point Id + * @param parameters Get Access Token request + * @param [options] The optional parameters + * @returns Promise + */ + getAccessToken( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + recoveryPointId: string, + parameters: Models.AADPropertiesResource, + options?: msRest.RequestOptionsBase + ): Promise; + /** + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param fabricName Fabric name associated with the container. + * @param containerName Name of the container. + * @param protectedItemName Name of the Protected Item. + * @param recoveryPointId Recovery Point Id + * @param parameters Get Access Token request + * @param callback The callback + */ + getAccessToken( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + recoveryPointId: string, + parameters: Models.AADPropertiesResource, + callback: msRest.ServiceCallback + ): void; + /** + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param fabricName Fabric name associated with the container. + * @param containerName Name of the container. + * @param protectedItemName Name of the Protected Item. + * @param recoveryPointId Recovery Point Id + * @param parameters Get Access Token request + * @param options The optional parameters + * @param callback The callback + */ + getAccessToken( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + recoveryPointId: string, + parameters: Models.AADPropertiesResource, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + getAccessToken( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + recoveryPointId: string, + parameters: Models.AADPropertiesResource, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + vaultName, + resourceGroupName, + fabricName, + containerName, + protectedItemName, + recoveryPointId, + parameters, + options + }, + getAccessTokenOperationSpec, + callback + ) as Promise; } /** @@ -132,26 +293,43 @@ export class RecoveryPoints { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext( + nextPageLink: string, + options?: Models.RecoveryPointsListNextOptionalParams + ): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listNext( + nextPageLink: string, + callback: msRest.ServiceCallback + ): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext( + nextPageLink: string, + options: Models.RecoveryPointsListNextOptionalParams, + callback: msRest.ServiceCallback + ): void; + listNext( + nextPageLink: string, + options?: + | Models.RecoveryPointsListNextOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback) as Promise; + callback + ) as Promise; } } @@ -159,7 +337,8 @@ export class RecoveryPoints { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, @@ -168,13 +347,8 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.containerName, Parameters.protectedItemName ], - queryParameters: [ - Parameters.apiVersion1, - Parameters.filter - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0, Parameters.filter], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.RecoveryPointResourceList @@ -188,7 +362,8 @@ const listOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, @@ -198,12 +373,8 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.protectedItemName, Parameters.recoveryPointId ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.RecoveryPointResource @@ -215,16 +386,47 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; +const getAccessTokenOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/accessToken", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.fabricName, + Parameters.containerName, + Parameters.protectedItemName, + Parameters.recoveryPointId + ], + queryParameters: [Parameters.apiVersion1], + headerParameters: [Parameters.acceptLanguage], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.AADPropertiesResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.CrrAccessTokenResource + }, + 400: {}, + default: { + bodyMapper: Mappers.NewErrorResponse + } + }, + serializer +}; + const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + urlParameters: [Parameters.nextPageLink], + queryParameters: [Parameters.apiVersion0, Parameters.filter], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.RecoveryPointResourceList diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/recoveryPointsCrr.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/recoveryPointsCrr.ts new file mode 100644 index 000000000000..bb3498734070 --- /dev/null +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/recoveryPointsCrr.ts @@ -0,0 +1,197 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/recoveryPointsCrrMappers"; +import * as Parameters from "../models/parameters"; +import { RecoveryServicesBackupClientContext } from "../recoveryServicesBackupClientContext"; + +/** Class representing a RecoveryPointsCrr. */ +export class RecoveryPointsCrr { + private readonly client: RecoveryServicesBackupClientContext; + + /** + * Create a RecoveryPointsCrr. + * @param {RecoveryServicesBackupClientContext} client Reference to the service client. + */ + constructor(client: RecoveryServicesBackupClientContext) { + this.client = client; + } + + /** + * Lists the backup copies for the backed up item. + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param fabricName Fabric name associated with the backed up item. + * @param containerName Container name associated with the backed up item. + * @param protectedItemName Backed up item whose backup copies are to be fetched. + * @param [options] The optional parameters + * @returns Promise + */ + list( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + options?: Models.RecoveryPointsCrrListOptionalParams + ): Promise; + /** + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param fabricName Fabric name associated with the backed up item. + * @param containerName Container name associated with the backed up item. + * @param protectedItemName Backed up item whose backup copies are to be fetched. + * @param callback The callback + */ + list( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + callback: msRest.ServiceCallback + ): void; + /** + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param fabricName Fabric name associated with the backed up item. + * @param containerName Container name associated with the backed up item. + * @param protectedItemName Backed up item whose backup copies are to be fetched. + * @param options The optional parameters + * @param callback The callback + */ + list( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + options: Models.RecoveryPointsCrrListOptionalParams, + callback: msRest.ServiceCallback + ): void; + list( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + options?: + | Models.RecoveryPointsCrrListOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + vaultName, + resourceGroupName, + fabricName, + containerName, + protectedItemName, + options + }, + listOperationSpec, + callback + ) as Promise; + } + + /** + * Lists the backup copies for the backed up item. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext( + nextPageLink: string, + options?: Models.RecoveryPointsCrrListNextOptionalParams + ): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext( + nextPageLink: string, + callback: msRest.ServiceCallback + ): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext( + nextPageLink: string, + options: Models.RecoveryPointsCrrListNextOptionalParams, + callback: msRest.ServiceCallback + ): void; + listNext( + nextPageLink: string, + options?: + | Models.RecoveryPointsCrrListNextOptionalParams + | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback + ) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.fabricName, + Parameters.containerName, + Parameters.protectedItemName + ], + queryParameters: [Parameters.apiVersion1, Parameters.filter], + headerParameters: [Parameters.acceptLanguage], + responses: { + 200: { + bodyMapper: Mappers.RecoveryPointResourceList + }, + default: { + bodyMapper: Mappers.NewErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [Parameters.nextPageLink], + queryParameters: [Parameters.apiVersion1, Parameters.filter], + headerParameters: [Parameters.acceptLanguage], + responses: { + 200: { + bodyMapper: Mappers.RecoveryPointResourceList + }, + default: { + bodyMapper: Mappers.NewErrorResponse + } + }, + serializer +}; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/recoveryPointsRecommendedForMove.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/recoveryPointsRecommendedForMove.ts new file mode 100644 index 000000000000..bee19d085a56 --- /dev/null +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/recoveryPointsRecommendedForMove.ts @@ -0,0 +1,208 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/recoveryPointsRecommendedForMoveMappers"; +import * as Parameters from "../models/parameters"; +import { RecoveryServicesBackupClientContext } from "../recoveryServicesBackupClientContext"; + +/** Class representing a RecoveryPointsRecommendedForMove. */ +export class RecoveryPointsRecommendedForMove { + private readonly client: RecoveryServicesBackupClientContext; + + /** + * Create a RecoveryPointsRecommendedForMove. + * @param {RecoveryServicesBackupClientContext} client Reference to the service client. + */ + constructor(client: RecoveryServicesBackupClientContext) { + this.client = client; + } + + /** + * Lists the recovery points recommended for move to another tier + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param fabricName + * @param containerName + * @param protectedItemName + * @param parameters List Recovery points Recommended for Move Request + * @param [options] The optional parameters + * @returns Promise + */ + list( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + parameters: Models.ListRecoveryPointsRecommendedForMoveRequest, + options?: msRest.RequestOptionsBase + ): Promise; + /** + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param fabricName + * @param containerName + * @param protectedItemName + * @param parameters List Recovery points Recommended for Move Request + * @param callback The callback + */ + list( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + parameters: Models.ListRecoveryPointsRecommendedForMoveRequest, + callback: msRest.ServiceCallback + ): void; + /** + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param fabricName + * @param containerName + * @param protectedItemName + * @param parameters List Recovery points Recommended for Move Request + * @param options The optional parameters + * @param callback The callback + */ + list( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + parameters: Models.ListRecoveryPointsRecommendedForMoveRequest, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + list( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + parameters: Models.ListRecoveryPointsRecommendedForMoveRequest, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + vaultName, + resourceGroupName, + fabricName, + containerName, + protectedItemName, + parameters, + options + }, + listOperationSpec, + callback + ) as Promise; + } + + /** + * Lists the recovery points recommended for move to another tier + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext( + nextPageLink: string, + options?: msRest.RequestOptionsBase + ): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext( + nextPageLink: string, + callback: msRest.ServiceCallback + ): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext( + nextPageLink: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + listNext( + nextPageLink: string, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback + ) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPointsRecommendedForMove", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.fabricName, + Parameters.containerName, + Parameters.protectedItemName + ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ListRecoveryPointsRecommendedForMoveRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.RecoveryPointResourceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [Parameters.nextPageLink], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], + responses: { + 200: { + bodyMapper: Mappers.RecoveryPointResourceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/restores.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/restores.ts index 4803b35f92f5..4a6ece622308 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/restores.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/restores.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -9,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/restoresMappers"; import * as Parameters from "../models/parameters"; @@ -41,20 +41,32 @@ export class Restores { * @param [options] The optional parameters * @returns Promise */ - trigger(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, recoveryPointId: string, parameters: Models.RestoreRequestResource, options?: msRest.RequestOptionsBase): Promise; - /** - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item to be restored. - * @param recoveryPointId Recovery point ID which represents the backed up data to be restored. - * @param parameters resource restore request - * @param callback The callback - */ - trigger(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, recoveryPointId: string, parameters: Models.RestoreRequestResource, callback: msRest.ServiceCallback): void; + trigger( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + recoveryPointId: string, + parameters: Models.RestoreRequestResource, + options?: msRest.RequestOptionsBase + ): Promise { + return this.beginTrigger( + vaultName, + resourceGroupName, + fabricName, + containerName, + protectedItemName, + recoveryPointId, + parameters, + options + ).then((lroPoller) => lroPoller.pollUntilFinished()); + } + /** + * Restores the specified backed up data. This is an asynchronous operation. To know the status of + * this API call, use + * GetProtectedItemOperationResult API. * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is * present. @@ -63,12 +75,20 @@ export class Restores { * @param protectedItemName Backed up item to be restored. * @param recoveryPointId Recovery point ID which represents the backed up data to be restored. * @param parameters resource restore request - * @param options The optional parameters - * @param callback The callback + * @param [options] The optional parameters + * @returns Promise */ - trigger(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, recoveryPointId: string, parameters: Models.RestoreRequestResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - trigger(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, recoveryPointId: string, parameters: Models.RestoreRequestResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + beginTrigger( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + recoveryPointId: string, + parameters: Models.RestoreRequestResource, + options?: msRest.RequestOptionsBase + ): Promise { + return this.client.sendLRORequest( { vaultName, resourceGroupName, @@ -79,16 +99,18 @@ export class Restores { parameters, options }, - triggerOperationSpec, - callback); + beginTriggerOperationSpec, + options + ); } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const triggerOperationSpec: msRest.OperationSpec = { +const beginTriggerOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/restore", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/restore", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, @@ -98,12 +120,8 @@ const triggerOperationSpec: msRest.OperationSpec = { Parameters.protectedItemName, Parameters.recoveryPointId ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], requestBody: { parameterPath: "parameters", mapper: { diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/securityPINs.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/securityPINs.ts index 3a4768974be5..59ad1230e3ae 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/securityPINs.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/securityPINs.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -34,14 +33,22 @@ export class SecurityPINs { * @param [options] The optional parameters * @returns Promise */ - get(vaultName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + get( + vaultName: string, + resourceGroupName: string, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is * present. * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + get( + vaultName: string, + resourceGroupName: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is @@ -49,8 +56,18 @@ export class SecurityPINs { * @param options The optional parameters * @param callback The callback */ - get(vaultName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(vaultName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + vaultName: string, + resourceGroupName: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + get( + vaultName: string, + resourceGroupName: string, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { vaultName, @@ -58,7 +75,8 @@ export class SecurityPINs { options }, getOperationSpec, - callback) as Promise; + callback + ) as Promise; } } @@ -66,18 +84,11 @@ export class SecurityPINs { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupSecurityPIN", - urlParameters: [ - Parameters.vaultName, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupSecurityPIN", + urlParameters: [Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.TokenInformation diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts index af400f29edcc..10f64ffff184 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -9,17 +8,21 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as Parameters from "./models/parameters"; import * as operations from "./operations"; import { RecoveryServicesBackupClientContext } from "./recoveryServicesBackupClientContext"; - class RecoveryServicesBackupClient extends RecoveryServicesBackupClientContext { // Operation groups - privateEndpointConnection: operations.PrivateEndpointConnectionOperations; backupResourceVaultConfigs: operations.BackupResourceVaultConfigs; + backupResourceEncryptionConfigs: operations.BackupResourceEncryptionConfigs; + privateEndpointConnection: operations.PrivateEndpointConnectionOperations; + privateEndpoint: operations.PrivateEndpointOperations; + bMSPrepareDataMoveOperationResult: operations.BMSPrepareDataMoveOperationResult; protectedItems: operations.ProtectedItems; protectedItemOperationResults: operations.ProtectedItemOperationResults; recoveryPoints: operations.RecoveryPoints; @@ -35,11 +38,6 @@ class RecoveryServicesBackupClient extends RecoveryServicesBackupClientContext { jobs: operations.Jobs; backupProtectedItems: operations.BackupProtectedItems; operation: operations.Operation; - protectionIntent: operations.ProtectionIntentOperations; - backupStatus: operations.BackupStatus; - featureSupport: operations.FeatureSupport; - backupProtectionIntent: operations.BackupProtectionIntent; - backupUsageSummaries: operations.BackupUsageSummaries; backupEngines: operations.BackupEngines; protectionContainerRefreshOperationResults: operations.ProtectionContainerRefreshOperationResults; protectableContainers: operations.ProtectableContainers; @@ -55,19 +53,46 @@ class RecoveryServicesBackupClient extends RecoveryServicesBackupClientContext { backupProtectableItems: operations.BackupProtectableItems; backupProtectionContainers: operations.BackupProtectionContainers; securityPINs: operations.SecurityPINs; + recoveryPointsRecommendedForMove: operations.RecoveryPointsRecommendedForMove; + backupUsageSummariesCRR: operations.BackupUsageSummariesCRR; + aadProperties: operations.AadProperties; + crossRegionRestore: operations.CrossRegionRestore; + backupCrrJobDetails: operations.BackupCrrJobDetails; + backupCrrJobs: operations.BackupCrrJobs; + crrOperationResults: operations.CrrOperationResults; + crrOperationStatus: operations.CrrOperationStatus; backupResourceStorageConfigs: operations.BackupResourceStorageConfigs; + recoveryPointsCrr: operations.RecoveryPointsCrr; + backupProtectedItemsCrr: operations.BackupProtectedItemsCrr; + protectionIntent: operations.ProtectionIntentOperations; + backupStatus: operations.BackupStatus; + featureSupport: operations.FeatureSupport; + backupProtectionIntent: operations.BackupProtectionIntent; + backupUsageSummaries: operations.BackupUsageSummaries; operations: operations.Operations; /** * Initializes a new instance of the RecoveryServicesBackupClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription Id. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.RecoveryServicesBackupClientOptions) { + constructor( + credentials: msRest.ServiceClientCredentials | TokenCredential, + subscriptionId: string, + options?: Models.RecoveryServicesBackupClientOptions + ) { super(credentials, subscriptionId, options); - this.privateEndpointConnection = new operations.PrivateEndpointConnectionOperations(this); this.backupResourceVaultConfigs = new operations.BackupResourceVaultConfigs(this); + this.backupResourceEncryptionConfigs = new operations.BackupResourceEncryptionConfigs(this); + this.privateEndpointConnection = new operations.PrivateEndpointConnectionOperations(this); + this.privateEndpoint = new operations.PrivateEndpointOperations(this); + this.bMSPrepareDataMoveOperationResult = new operations.BMSPrepareDataMoveOperationResult(this); this.protectedItems = new operations.ProtectedItems(this); this.protectedItemOperationResults = new operations.ProtectedItemOperationResults(this); this.recoveryPoints = new operations.RecoveryPoints(this); @@ -83,17 +108,16 @@ class RecoveryServicesBackupClient extends RecoveryServicesBackupClientContext { this.jobs = new operations.Jobs(this); this.backupProtectedItems = new operations.BackupProtectedItems(this); this.operation = new operations.Operation(this); - this.protectionIntent = new operations.ProtectionIntentOperations(this); - this.backupStatus = new operations.BackupStatus(this); - this.featureSupport = new operations.FeatureSupport(this); - this.backupProtectionIntent = new operations.BackupProtectionIntent(this); - this.backupUsageSummaries = new operations.BackupUsageSummaries(this); this.backupEngines = new operations.BackupEngines(this); - this.protectionContainerRefreshOperationResults = new operations.ProtectionContainerRefreshOperationResults(this); + this.protectionContainerRefreshOperationResults = new operations.ProtectionContainerRefreshOperationResults( + this + ); this.protectableContainers = new operations.ProtectableContainers(this); this.protectionContainers = new operations.ProtectionContainers(this); this.backupWorkloadItems = new operations.BackupWorkloadItems(this); - this.protectionContainerOperationResults = new operations.ProtectionContainerOperationResults(this); + this.protectionContainerOperationResults = new operations.ProtectionContainerOperationResults( + this + ); this.backups = new operations.Backups(this); this.protectedItemOperationStatuses = new operations.ProtectedItemOperationStatuses(this); this.itemLevelRecoveryConnections = new operations.ItemLevelRecoveryConnections(this); @@ -103,51 +127,259 @@ class RecoveryServicesBackupClient extends RecoveryServicesBackupClientContext { this.backupProtectableItems = new operations.BackupProtectableItems(this); this.backupProtectionContainers = new operations.BackupProtectionContainers(this); this.securityPINs = new operations.SecurityPINs(this); + this.recoveryPointsRecommendedForMove = new operations.RecoveryPointsRecommendedForMove(this); + this.backupUsageSummariesCRR = new operations.BackupUsageSummariesCRR(this); + this.aadProperties = new operations.AadProperties(this); + this.crossRegionRestore = new operations.CrossRegionRestore(this); + this.backupCrrJobDetails = new operations.BackupCrrJobDetails(this); + this.backupCrrJobs = new operations.BackupCrrJobs(this); + this.crrOperationResults = new operations.CrrOperationResults(this); + this.crrOperationStatus = new operations.CrrOperationStatus(this); this.backupResourceStorageConfigs = new operations.BackupResourceStorageConfigs(this); + this.recoveryPointsCrr = new operations.RecoveryPointsCrr(this); + this.backupProtectedItemsCrr = new operations.BackupProtectedItemsCrr(this); + this.protectionIntent = new operations.ProtectionIntentOperations(this); + this.backupStatus = new operations.BackupStatus(this); + this.featureSupport = new operations.FeatureSupport(this); + this.backupProtectionIntent = new operations.BackupProtectionIntent(this); + this.backupUsageSummaries = new operations.BackupUsageSummaries(this); this.operations = new operations.Operations(this); } /** - * @summary Gets the operation status for a private endpoint connection. + * Fetches operation status for data move operation on vault * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is * present. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param operationId Operation id + * @param operationId * @param [options] The optional parameters * @returns Promise */ - getOperationStatus(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + getOperationStatus( + vaultName: string, + resourceGroupName: string, + operationId: string, + options?: msRest.RequestOptionsBase + ): Promise; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is * present. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param operationId Operation id + * @param operationId * @param callback The callback */ - getOperationStatus(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, operationId: string, callback: msRest.ServiceCallback): void; + getOperationStatus( + vaultName: string, + resourceGroupName: string, + operationId: string, + callback: msRest.ServiceCallback + ): void; /** * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is * present. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param operationId Operation id + * @param operationId * @param options The optional parameters * @param callback The callback */ - getOperationStatus(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getOperationStatus(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getOperationStatus( + vaultName: string, + resourceGroupName: string, + operationId: string, + options: msRest.RequestOptionsBase, + callback: msRest.ServiceCallback + ): void; + getOperationStatus( + vaultName: string, + resourceGroupName: string, + operationId: string, + options?: msRest.RequestOptionsBase | msRest.ServiceCallback, + callback?: msRest.ServiceCallback + ): Promise { return this.sendOperationRequest( { vaultName, resourceGroupName, - privateEndpointConnectionName, operationId, options }, getOperationStatusOperationSpec, - callback) as Promise; + callback + ) as Promise; + } + + /** + * Prepares source vault for Data Move operation + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param parameters Prepare data move request + * @param [options] The optional parameters + * @returns Promise + */ + bMSPrepareDataMove( + vaultName: string, + resourceGroupName: string, + parameters: Models.PrepareDataMoveRequest, + options?: msRest.RequestOptionsBase + ): Promise { + return this.beginBMSPrepareDataMove( + vaultName, + resourceGroupName, + parameters, + options + ).then((lroPoller) => lroPoller.pollUntilFinished()); + } + + /** + * Triggers Data Move Operation on target vault + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param parameters Trigger data move request + * @param [options] The optional parameters + * @returns Promise + */ + bMSTriggerDataMove( + vaultName: string, + resourceGroupName: string, + parameters: Models.TriggerDataMoveRequest, + options?: msRest.RequestOptionsBase + ): Promise { + return this.beginBMSTriggerDataMove( + vaultName, + resourceGroupName, + parameters, + options + ).then((lroPoller) => lroPoller.pollUntilFinished()); + } + + /** + * @summary Move recovery point from one datastore to another store. + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param fabricName + * @param containerName + * @param protectedItemName + * @param recoveryPointId + * @param parameters Move Resource Across Tiers Request + * @param [options] The optional parameters + * @returns Promise + */ + moveRecoveryPoint( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + recoveryPointId: string, + parameters: Models.MoveRPAcrossTiersRequest, + options?: msRest.RequestOptionsBase + ): Promise { + return this.beginMoveRecoveryPoint( + vaultName, + resourceGroupName, + fabricName, + containerName, + protectedItemName, + recoveryPointId, + parameters, + options + ).then((lroPoller) => lroPoller.pollUntilFinished()); + } + + /** + * Prepares source vault for Data Move operation + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param parameters Prepare data move request + * @param [options] The optional parameters + * @returns Promise + */ + beginBMSPrepareDataMove( + vaultName: string, + resourceGroupName: string, + parameters: Models.PrepareDataMoveRequest, + options?: msRest.RequestOptionsBase + ): Promise { + return this.sendLRORequest( + { + vaultName, + resourceGroupName, + parameters, + options + }, + beginBMSPrepareDataMoveOperationSpec, + options + ); + } + + /** + * Triggers Data Move Operation on target vault + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param parameters Trigger data move request + * @param [options] The optional parameters + * @returns Promise + */ + beginBMSTriggerDataMove( + vaultName: string, + resourceGroupName: string, + parameters: Models.TriggerDataMoveRequest, + options?: msRest.RequestOptionsBase + ): Promise { + return this.sendLRORequest( + { + vaultName, + resourceGroupName, + parameters, + options + }, + beginBMSTriggerDataMoveOperationSpec, + options + ); + } + + /** + * @summary Move recovery point from one datastore to another store. + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param fabricName + * @param containerName + * @param protectedItemName + * @param recoveryPointId + * @param parameters Move Resource Across Tiers Request + * @param [options] The optional parameters + * @returns Promise + */ + beginMoveRecoveryPoint( + vaultName: string, + resourceGroupName: string, + fabricName: string, + containerName: string, + protectedItemName: string, + recoveryPointId: string, + parameters: Models.MoveRPAcrossTiersRequest, + options?: msRest.RequestOptionsBase + ): Promise { + return this.sendLRORequest( + { + vaultName, + resourceGroupName, + fabricName, + containerName, + protectedItemName, + recoveryPointId, + parameters, + options + }, + beginMoveRecoveryPointOperationSpec, + options + ); } } @@ -155,26 +387,101 @@ class RecoveryServicesBackupClient extends RecoveryServicesBackupClientContext { const serializer = new msRest.Serializer(Mappers); const getOperationStatusOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}/operationsStatus/{operationId}", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/operationStatus/{operationId}", urlParameters: [ Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.privateEndpointConnectionName, Parameters.operationId ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.OperationStatus }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.NewErrorResponse + } + }, + serializer +}; + +const beginBMSPrepareDataMoveOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/prepareDataMove", + urlParameters: [Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.PrepareDataMoveRequest, + required: true + } + }, + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.NewErrorResponse + } + }, + serializer +}; + +const beginBMSTriggerDataMoveOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/triggerDataMove", + urlParameters: [Parameters.vaultName, Parameters.resourceGroupName, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.TriggerDataMoveRequest, + required: true + } + }, + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.NewErrorResponse + } + }, + serializer +}; + +const beginMoveRecoveryPointOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: + "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/move", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.fabricName, + Parameters.containerName, + Parameters.protectedItemName, + Parameters.recoveryPointId + ], + queryParameters: [Parameters.apiVersion0], + headerParameters: [Parameters.acceptLanguage], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.MoveRPAcrossTiersRequest, + required: true + } + }, + responses: { + 202: {}, + default: { + bodyMapper: Mappers.CloudError } }, serializer diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClientContext.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClientContext.ts index b8a8f744f6cb..5accc9b9cae6 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClientContext.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClientContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -11,49 +10,62 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-recoveryservicesbackup"; -const packageVersion = "6.1.0"; +const packageVersion = "7.0.0"; export class RecoveryServicesBackupClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; /** * Initializes a new instance of the RecoveryServicesBackupClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The subscription Id. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.RecoveryServicesBackupClientOptions) { + constructor( + credentials: msRest.ServiceClientCredentials | TokenCredential, + subscriptionId: string, + options?: Models.RecoveryServicesBackupClientOptions + ) { if (credentials == undefined) { - throw new Error('\'credentials\' cannot be null.'); + throw new Error("'credentials' cannot be null."); } if (subscriptionId == undefined) { - throw new Error('\'subscriptionId\' cannot be null.'); + throw new Error("'subscriptionId' cannot be null."); } if (!options) { options = {}; } - if(!options.userAgent) { + if (!options.userAgent) { const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } super(credentials, options); - this.acceptLanguage = 'en-US'; + this.acceptLanguage = "en-US"; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; this.requestContentType = "application/json; charset=utf-8"; this.credentials = credentials; this.subscriptionId = subscriptionId; - if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + if ( + options.longRunningOperationRetryTimeout !== null && + options.longRunningOperationRetryTimeout !== undefined + ) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } }