diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/LICENSE.txt b/sdk/dataprotectionplatform/arm-dataprotectionplatform/LICENSE.txt new file mode 100644 index 000000000000..2d3163745319 --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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 +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/README.md b/sdk/dataprotectionplatform/arm-dataprotectionplatform/README.md new file mode 100644 index 000000000000..a338beba68e0 --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/README.md @@ -0,0 +1,106 @@ +## Azure DataProtectionClient SDK for JavaScript + +This package contains an isomorphic SDK (runs both in node.js and in browsers) for DataProtectionClient. + +### Currently supported environments + +- Node.js version 8.x.x or higher +- Browser JavaScript + +### 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-dataprotectionplatform` 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 --save @azure/arm-dataprotectionplatform @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 + +- 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. + +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. +#### nodejs - Authentication, client creation, and getInSubscription backupVaults as an example written in JavaScript. + +##### Sample code + +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { DataProtectionClient } = require("@azure/arm-dataprotectionplatform"); +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +// 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 DataProtectionClient(creds, subscriptionId); +client.backupVaults.getInSubscription().then((result) => { + console.log("The result is:"); + console.log(result); +}).catch((err) => { + console.log("An error occurred:"); + console.error(err); +}); +``` + +#### browser - Authentication, client creation, and getInSubscription backupVaults as an example written in JavaScript. + +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - 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 + +- index.html + +```html + + + + @azure/arm-dataprotectionplatform sample + + + + + + + +``` + +## Related projects + +- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/dataprotectionplatform/arm-dataprotectionplatform/README.png) diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/package.json b/sdk/dataprotectionplatform/arm-dataprotectionplatform/package.json new file mode 100644 index 000000000000..a245291a0c69 --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/package.json @@ -0,0 +1,59 @@ +{ + "name": "@azure/arm-dataprotectionplatform", + "author": "Microsoft Corporation", + "description": "DataProtectionClient Library with typescript type definitions for node.js and browser.", + "version": "1.0.0", + "dependencies": { + "@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": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "license": "MIT", + "main": "./dist/arm-dataprotectionplatform.js", + "module": "./esm/dataProtectionClient.js", + "types": "./esm/dataProtectionClient.d.ts", + "devDependencies": { + "typescript": "^3.6.0", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.6.0" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/dataprotectionplatform/arm-dataprotectionplatform", + "repository": { + "type": "git", + "url": "https://github.com/Azure/azure-sdk-for-js.git" + }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "files": [ + "dist/**/*.js", + "dist/**/*.js.map", + "dist/**/*.d.ts", + "dist/**/*.d.ts.map", + "esm/**/*.js", + "esm/**/*.js.map", + "esm/**/*.d.ts", + "esm/**/*.d.ts.map", + "src/**/*.ts", + "README.md", + "rollup.config.js", + "tsconfig.json" + ], + "scripts": { + "build": "tsc && rollup -c rollup.config.js && npm run minify", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-dataprotectionplatform.js.map'\" -o ./dist/arm-dataprotectionplatform.min.js ./dist/arm-dataprotectionplatform.js", + "prepack": "npm install && npm run build" + }, + "sideEffects": false, + "autoPublish": true +} diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/rollup.config.js b/sdk/dataprotectionplatform/arm-dataprotectionplatform/rollup.config.js new file mode 100644 index 000000000000..8e8754d11bec --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/rollup.config.js @@ -0,0 +1,37 @@ +import rollup from "rollup"; +import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + +/** + * @type {rollup.RollupFileOptions} + */ +const config = { + input: "./esm/dataProtectionClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], + output: { + file: "./dist/arm-dataprotectionplatform.js", + format: "umd", + name: "Azure.ArmDataprotectionplatform", + sourcemap: true, + globals: { + "@azure/ms-rest-js": "msRest", + "@azure/ms-rest-azure-js": "msRestAzure" + }, + banner: `/* + * 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() + ] +}; + +export default config; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/dataProtectionClient.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/dataProtectionClient.ts new file mode 100644 index 000000000000..42610a76dc5a --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/dataProtectionClient.ts @@ -0,0 +1,71 @@ +/* + * 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 { TokenCredential } from "@azure/core-auth"; +import * as Models from "./models"; +import * as Mappers from "./models/mappers"; +import * as operations from "./operations"; +import { DataProtectionClientContext } from "./dataProtectionClientContext"; + + +class DataProtectionClient extends DataProtectionClientContext { + // Operation groups + backupVaults: operations.BackupVaults; + operationResult: operations.OperationResult; + operationStatus: operations.OperationStatus; + backupVaultOperationResults: operations.BackupVaultOperationResults; + dataProtection: operations.DataProtection; + dataProtectionOperations: operations.DataProtectionOperations; + backupPolicies: operations.BackupPolicies; + backupInstances: operations.BackupInstances; + recoveryPoints: operations.RecoveryPoints; + jobs: operations.Jobs; + restorableTimeRanges: operations.RestorableTimeRanges; + exportJobs: operations.ExportJobs; + exportJobsOperationResult: operations.ExportJobsOperationResult; + + /** + * Initializes a new instance of the DataProtectionClient class. + * @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 | TokenCredential, subscriptionId: string, options?: Models.DataProtectionClientOptions) { + super(credentials, subscriptionId, options); + this.backupVaults = new operations.BackupVaults(this); + this.operationResult = new operations.OperationResult(this); + this.operationStatus = new operations.OperationStatus(this); + this.backupVaultOperationResults = new operations.BackupVaultOperationResults(this); + this.dataProtection = new operations.DataProtection(this); + this.dataProtectionOperations = new operations.DataProtectionOperations(this); + this.backupPolicies = new operations.BackupPolicies(this); + this.backupInstances = new operations.BackupInstances(this); + this.recoveryPoints = new operations.RecoveryPoints(this); + this.jobs = new operations.Jobs(this); + this.restorableTimeRanges = new operations.RestorableTimeRanges(this); + this.exportJobs = new operations.ExportJobs(this); + this.exportJobsOperationResult = new operations.ExportJobsOperationResult(this); + } +} + +// Operation Specifications + +export { + DataProtectionClient, + DataProtectionClientContext, + Models as DataProtectionModels, + Mappers as DataProtectionMappers +}; +export * from "./operations"; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/dataProtectionClientContext.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/dataProtectionClientContext.ts new file mode 100644 index 000000000000..c3306826f4af --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/dataProtectionClientContext.ts @@ -0,0 +1,67 @@ +/* + * 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 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-dataprotectionplatform"; +const packageVersion = "1.0.0"; + +export class DataProtectionClientContext extends msRestAzure.AzureServiceClient { + credentials: msRest.ServiceClientCredentials | TokenCredential; + subscriptionId: string; + apiVersion?: string; + + /** + * Initializes a new instance of the DataProtectionClient class. + * @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 | TokenCredential, subscriptionId: string, options?: Models.DataProtectionClientOptions) { + if (credentials == undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + if (subscriptionId == undefined) { + throw new Error('\'subscriptionId\' cannot be null.'); + } + + if (!options) { + options = {}; + } + if (!options.userAgent) { + const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); + options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; + } + + super(credentials, options); + + this.apiVersion = '2021-01-01'; + 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) { + this.acceptLanguage = options.acceptLanguage; + } + if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; + } + } +} diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/backupInstancesMappers.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/backupInstancesMappers.ts new file mode 100644 index 000000000000..5eddeb4e3b90 --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/backupInstancesMappers.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. + */ + +export { + discriminators, + AbsoluteDeleteOption, + AdHocBackupRuleOptions, + AdhocBackupTriggerOption, + AdhocBasedTaggingCriteria, + AdhocBasedTriggerContext, + AzureBackupDiscreteRecoveryPoint, + AzureBackupFindRestorableTimeRangesResponse, + AzureBackupFindRestorableTimeRangesResponseResource, + AzureBackupJob, + AzureBackupJobResource, + AzureBackupJobResourceList, + AzureBackupParams, + AzureBackupRecoveryPoint, + AzureBackupRecoveryPointBasedRestoreRequest, + AzureBackupRecoveryPointResource, + AzureBackupRecoveryPointResourceList, + AzureBackupRecoveryTimeBasedRestoreRequest, + AzureBackupRehydrationRequest, + AzureBackupRestoreRequest, + AzureBackupRestoreWithRehydrationRequest, + AzureBackupRule, + AzureOperationalStoreParameters, + AzureRetentionRule, + BackupCriteria, + BackupInstance, + BackupInstanceResource, + BackupInstanceResourceList, + BackupInstancesAdhocBackupHeaders, + BackupInstancesDeleteHeaders, + BackupInstancesTriggerRehydrateHeaders, + BackupInstancesTriggerRestoreHeaders, + BackupInstancesValidateForBackupHeaders, + BackupInstancesValidateForRestoreHeaders, + BackupParameters, + BackupPolicy, + BackupSchedule, + BackupVault, + BackupVaultResource, + BackupVaultResourceList, + BaseBackupPolicy, + BaseBackupPolicyResource, + BaseBackupPolicyResourceList, + BasePolicyRule, + BaseResource, + CloudError, + CopyOnExpiryOption, + CopyOption, + CustomCopyOption, + Datasource, + DatasourceSet, + DataStoreInfoBase, + DataStoreParameters, + Day, + DeleteOption, + DppIdentityDetails, + DppResource, + DppResourceList, + DppTrackedResource, + ErrorAdditionalInfo, + ErrorModel, + ImmediateCopyOption, + InnerError, + ItemLevelRestoreCriteria, + ItemLevelRestoreTargetInfo, + JobExtendedInfo, + JobSubTask, + OperationExtendedInfo, + OperationJobExtendedInfo, + PolicyInfo, + PolicyParameters, + ProtectionStatusDetails, + RangeBasedItemLevelRestoreCriteria, + RecoveryPointDataStoreDetails, + RestorableTimeRange, + RestoreFilesTargetInfo, + RestoreJobRecoveryPointDetails, + RestoreTargetInfo, + RestoreTargetInfoBase, + RetentionTag, + ScheduleBasedBackupCriteria, + ScheduleBasedTriggerContext, + SourceLifeCycle, + StorageSetting, + SystemData, + TaggingCriteria, + TargetCopySetting, + TargetDetails, + TriggerBackupRequest, + TriggerContext, + UserFacingError, + ValidateForBackupRequest, + ValidateRestoreRequestObject +} from "../models/mappers"; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/backupPoliciesMappers.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/backupPoliciesMappers.ts new file mode 100644 index 000000000000..7d52d607aa01 --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/backupPoliciesMappers.ts @@ -0,0 +1,78 @@ +/* + * 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, + AbsoluteDeleteOption, + AdhocBasedTaggingCriteria, + AdhocBasedTriggerContext, + AzureBackupDiscreteRecoveryPoint, + AzureBackupFindRestorableTimeRangesResponse, + AzureBackupFindRestorableTimeRangesResponseResource, + AzureBackupJob, + AzureBackupJobResource, + AzureBackupJobResourceList, + AzureBackupParams, + AzureBackupRecoveryPoint, + AzureBackupRecoveryPointResource, + AzureBackupRecoveryPointResourceList, + AzureBackupRule, + AzureOperationalStoreParameters, + AzureRetentionRule, + BackupCriteria, + BackupInstance, + BackupInstanceResource, + BackupInstanceResourceList, + BackupParameters, + BackupPolicy, + BackupSchedule, + BackupVault, + BackupVaultResource, + BackupVaultResourceList, + BaseBackupPolicy, + BaseBackupPolicyResource, + BaseBackupPolicyResourceList, + BasePolicyRule, + BaseResource, + CloudError, + CopyOnExpiryOption, + CopyOption, + CustomCopyOption, + Datasource, + DatasourceSet, + DataStoreInfoBase, + DataStoreParameters, + Day, + DeleteOption, + DppIdentityDetails, + DppResource, + DppResourceList, + DppTrackedResource, + ErrorAdditionalInfo, + ErrorModel, + ImmediateCopyOption, + InnerError, + JobExtendedInfo, + JobSubTask, + PolicyInfo, + PolicyParameters, + ProtectionStatusDetails, + RecoveryPointDataStoreDetails, + RestorableTimeRange, + RestoreJobRecoveryPointDetails, + RetentionTag, + ScheduleBasedBackupCriteria, + ScheduleBasedTriggerContext, + SourceLifeCycle, + StorageSetting, + SystemData, + TaggingCriteria, + TargetCopySetting, + TriggerContext, + UserFacingError +} from "../models/mappers"; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/backupVaultOperationResultsMappers.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/backupVaultOperationResultsMappers.ts new file mode 100644 index 000000000000..d07f6f5dc090 --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/backupVaultOperationResultsMappers.ts @@ -0,0 +1,72 @@ +/* + * 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, + AbsoluteDeleteOption, + AdhocBasedTaggingCriteria, + AdhocBasedTriggerContext, + AzureBackupDiscreteRecoveryPoint, + AzureBackupFindRestorableTimeRangesResponse, + AzureBackupFindRestorableTimeRangesResponseResource, + AzureBackupJob, + AzureBackupJobResource, + AzureBackupParams, + AzureBackupRecoveryPoint, + AzureBackupRecoveryPointResource, + AzureBackupRule, + AzureOperationalStoreParameters, + AzureRetentionRule, + BackupCriteria, + BackupInstance, + BackupInstanceResource, + BackupParameters, + BackupPolicy, + BackupSchedule, + BackupVault, + BackupVaultResource, + BaseBackupPolicy, + BaseBackupPolicyResource, + BasePolicyRule, + BaseResource, + CloudError, + CopyOnExpiryOption, + CopyOption, + CustomCopyOption, + Datasource, + DatasourceSet, + DataStoreInfoBase, + DataStoreParameters, + Day, + DeleteOption, + DppIdentityDetails, + DppResource, + DppTrackedResource, + ErrorAdditionalInfo, + ErrorModel, + ImmediateCopyOption, + InnerError, + JobExtendedInfo, + JobSubTask, + PolicyInfo, + PolicyParameters, + ProtectionStatusDetails, + RecoveryPointDataStoreDetails, + RestorableTimeRange, + RestoreJobRecoveryPointDetails, + RetentionTag, + ScheduleBasedBackupCriteria, + ScheduleBasedTriggerContext, + SourceLifeCycle, + StorageSetting, + SystemData, + TaggingCriteria, + TargetCopySetting, + TriggerContext, + UserFacingError +} from "../models/mappers"; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/backupVaultsMappers.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/backupVaultsMappers.ts new file mode 100644 index 000000000000..14ce8ae804d5 --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/backupVaultsMappers.ts @@ -0,0 +1,81 @@ +/* + * 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, + AbsoluteDeleteOption, + AdhocBasedTaggingCriteria, + AdhocBasedTriggerContext, + AzureBackupDiscreteRecoveryPoint, + AzureBackupFindRestorableTimeRangesResponse, + AzureBackupFindRestorableTimeRangesResponseResource, + AzureBackupJob, + AzureBackupJobResource, + AzureBackupJobResourceList, + AzureBackupParams, + AzureBackupRecoveryPoint, + AzureBackupRecoveryPointResource, + AzureBackupRecoveryPointResourceList, + AzureBackupRule, + AzureOperationalStoreParameters, + AzureRetentionRule, + BackupCriteria, + BackupInstance, + BackupInstanceResource, + BackupInstanceResourceList, + BackupParameters, + BackupPolicy, + BackupSchedule, + BackupVault, + BackupVaultResource, + BackupVaultResourceList, + BaseBackupPolicy, + BaseBackupPolicyResource, + BaseBackupPolicyResourceList, + BasePolicyRule, + BaseResource, + CheckNameAvailabilityRequest, + CheckNameAvailabilityResult, + CloudError, + CopyOnExpiryOption, + CopyOption, + CustomCopyOption, + Datasource, + DatasourceSet, + DataStoreInfoBase, + DataStoreParameters, + Day, + DeleteOption, + DppIdentityDetails, + DppResource, + DppResourceList, + DppTrackedResource, + ErrorAdditionalInfo, + ErrorModel, + ImmediateCopyOption, + InnerError, + JobExtendedInfo, + JobSubTask, + PatchResourceRequestInput, + PolicyInfo, + PolicyParameters, + ProtectionStatusDetails, + RecoveryPointDataStoreDetails, + RestorableTimeRange, + RestoreJobRecoveryPointDetails, + RetentionTag, + ScheduleBasedBackupCriteria, + ScheduleBasedTriggerContext, + SourceLifeCycle, + StorageSetting, + SystemData, + TaggingCriteria, + TargetCopySetting, + TriggerContext, + UserFacingError +} from "../models/mappers"; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/dataProtectionMappers.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/dataProtectionMappers.ts new file mode 100644 index 000000000000..3db2f50604e6 --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/dataProtectionMappers.ts @@ -0,0 +1,19 @@ +/* + * 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, + ErrorAdditionalInfo, + ErrorModel, + FeatureValidationRequest, + FeatureValidationRequestBase, + FeatureValidationResponse, + FeatureValidationResponseBase, + SupportedFeature +} from "../models/mappers"; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/dataProtectionOperationsMappers.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/dataProtectionOperationsMappers.ts new file mode 100644 index 000000000000..b503924f7fba --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/dataProtectionOperationsMappers.ts @@ -0,0 +1,20 @@ +/* + * 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, + ClientDiscoveryDisplay, + ClientDiscoveryForLogSpecification, + ClientDiscoveryForProperties, + ClientDiscoveryForServiceSpecification, + ClientDiscoveryResponse, + ClientDiscoveryValueForSingleApi, + CloudError, + ErrorAdditionalInfo, + ErrorModel +} from "../models/mappers"; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/exportJobsMappers.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/exportJobsMappers.ts new file mode 100644 index 000000000000..49dd935729c9 --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/exportJobsMappers.ts @@ -0,0 +1,15 @@ +/* + * 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, + ErrorAdditionalInfo, + ErrorModel, + ExportJobsTriggerHeaders +} from "../models/mappers"; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/exportJobsOperationResultMappers.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/exportJobsOperationResultMappers.ts new file mode 100644 index 000000000000..a347775004b2 --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/exportJobsOperationResultMappers.ts @@ -0,0 +1,15 @@ +/* + * 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, + ErrorAdditionalInfo, + ErrorModel, + ExportJobsResult +} from "../models/mappers"; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/index.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/index.ts new file mode 100644 index 000000000000..d7898d6ed85a --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/index.ts @@ -0,0 +1,3146 @@ +/* + * 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 { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export { BaseResource, CloudError }; + +/** + * Contains the possible cases for DeleteOption. + */ +export type DeleteOptionUnion = DeleteOption | AbsoluteDeleteOption; + +/** + * Delete Option + * @summary DeleteOption + */ +export interface DeleteOption { + /** + * Polymorphic Discriminator + */ + objectType: "DeleteOption"; + /** + * Duration of deletion after given timespan + */ + duration: string; +} + +/** + * Delete option with duration + * @summary AbsoluteDeleteOption + */ +export interface AbsoluteDeleteOption { + /** + * Polymorphic Discriminator + */ + objectType: "AbsoluteDeleteOption"; + /** + * Duration of deletion after given timespan + */ + duration: string; +} + +/** + * An interface representing RecoveryPointsFilters. + */ +export interface RecoveryPointsFilters { + restorePointDataStoreId?: string; + isVisible?: boolean; + startDate?: string; + endDate?: string; + extendedInfo?: boolean; + restorePointState?: string; +} + +/** + * Adhoc backup trigger option + * @summary AdhocBackupTriggerOption + */ +export interface AdhocBackupTriggerOption { + retentionTagOverride?: string; +} + +/** + * Adhoc backup rules + * @summary AdHocBackupRuleOptions + */ +export interface AdHocBackupRuleOptions { + ruleName: string; + triggerOption: AdhocBackupTriggerOption; +} + +/** + * Retention tag + * @summary RetentionTag + */ +export interface RetentionTag { + /** + * Retention Tag version. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly eTag?: string; + /** + * Retention Tag version. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Retention Tag Name to relate it to retention rule. + */ + tagName: string; +} + +/** + * Adhoc backup tagging criteria + * @summary AdhocBasedTaggingCriteria + */ +export interface AdhocBasedTaggingCriteria { + /** + * Retention tag information + */ + tagInfo?: RetentionTag; +} + +/** + * Contains the possible cases for TriggerContext. + */ +export type TriggerContextUnion = TriggerContext | AdhocBasedTriggerContext | ScheduleBasedTriggerContext; + +/** + * Trigger context + * @summary TriggerContext + */ +export interface TriggerContext { + /** + * Polymorphic Discriminator + */ + objectType: "TriggerContext"; +} + +/** + * Adhoc trigger context + * @summary AdhocBasedTriggerContext + */ +export interface AdhocBasedTriggerContext { + /** + * Polymorphic Discriminator + */ + objectType: "AdhocBasedTriggerContext"; + /** + * Tagging Criteria containing retention tag for adhoc backup. + */ + taggingCriteria: AdhocBasedTaggingCriteria; +} + +/** + * RecoveryPoint datastore details + * @summary RecoveryPointDataStoreDetails + */ +export interface RecoveryPointDataStoreDetails { + creationTime?: Date; + expiryTime?: Date; + id?: string; + metaData?: string; + state?: string; + type?: string; + visible?: boolean; + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly rehydrationExpiryTime?: Date; + /** + * Possible values include: 'CREATE_IN_PROGRESS', 'COMPLETED', 'DELETE_IN_PROGRESS', 'DELETED', + * 'FAILED' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly rehydrationStatus?: RehydrationStatus; +} + +/** + * Contains the possible cases for AzureBackupRecoveryPoint. + */ +export type AzureBackupRecoveryPointUnion = AzureBackupRecoveryPoint | AzureBackupDiscreteRecoveryPoint; + +/** + * Azure backup recoveryPoint + * @summary AzureBackupRecoveryPoint + */ +export interface AzureBackupRecoveryPoint { + /** + * Polymorphic Discriminator + */ + objectType: "AzureBackupRecoveryPoint"; +} + +/** + * Azure backup discrete RecoveryPoint + * @summary AzureBackupDiscreteRecoveryPoint + */ +export interface AzureBackupDiscreteRecoveryPoint { + /** + * Polymorphic Discriminator + */ + objectType: "AzureBackupDiscreteRecoveryPoint"; + friendlyName?: string; + recoveryPointDataStoresDetails?: RecoveryPointDataStoreDetails[]; + recoveryPointTime: Date; + policyName?: string; + policyVersion?: string; + recoveryPointId?: string; + recoveryPointType?: string; + retentionTagName?: string; + retentionTagVersion?: string; +} + +/** + * List Restore Ranges Request + */ +export interface AzureBackupFindRestorableTimeRangesRequest { + /** + * Gets or sets the type of the source data store. Possible values include: 'OperationalStore', + * 'VaultStore', 'ArchiveStore' + */ + sourceDataStoreType: RestoreSourceDataStoreType; + /** + * Start time for the List Restore Ranges request. ISO 8601 format. + */ + startTime?: string; + /** + * End time for the List Restore Ranges request. ISO 8601 format. + */ + endTime?: string; +} + +/** + * An interface representing DppWorkerRequest. + */ +export interface DppWorkerRequest { + subscriptionId?: string; + uri?: string; + headers?: { [propertyName: string]: string[] }; + supportedGroupVersions?: string[]; + cultureInfo?: string; + parameters?: { [propertyName: string]: string }; + httpMethod?: string; +} + +/** + * List Restore Ranges Request + */ +export interface AzureBackupFindRestorableTimeRangesRequestResource extends DppWorkerRequest { + /** + * AzureBackupFindRestorableTimeRangesRequestResource content + */ + content?: AzureBackupFindRestorableTimeRangesRequest; +} + +/** + * An interface representing RestorableTimeRange. + */ +export interface RestorableTimeRange { + /** + * Start time for the available restore range + */ + startTime: string; + /** + * End time for the available restore range + */ + endTime: string; + objectType?: string; +} + +/** + * List Restore Ranges Response + */ +export interface AzureBackupFindRestorableTimeRangesResponse { + /** + * Returns the Restore Ranges available on the Backup Instance. + */ + restorableTimeRanges?: RestorableTimeRange[]; + objectType?: string; +} + +/** + * Resource class + * @summary DppResource + */ +export interface DppResource 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; + systemData?: SystemData; +} + +/** + * List Restore Ranges Response + */ +export interface AzureBackupFindRestorableTimeRangesResponseResource extends DppResource { + /** + * AzureBackupFindRestorableTimeRangesResponseResource properties + */ + properties?: AzureBackupFindRestorableTimeRangesResponse; +} + +/** + * Inner Error + * @summary InnerError + */ +export interface InnerError { + /** + * Any Key value pairs that can be provided to the client for additional verbose information. + */ + additionalInfo?: { [propertyName: string]: string }; + /** + * Unique code for this error + */ + code?: string; + /** + * Child Inner Error, to allow Nesting. + */ + embeddedInnerError?: InnerError; +} + +/** + * Error object used by layers that have access to localized content, and propagate that to user + */ +export interface UserFacingError { + /** + * Unique code for this error + */ + code?: string; + /** + * Additional related Errors + */ + details?: UserFacingError[]; + /** + * Inner Error + */ + innerError?: InnerError; + /** + * Whether the operation will be retryable or not + */ + isRetryable?: boolean; + /** + * Whether the operation is due to a user error or service error + */ + isUserError?: boolean; + /** + * Any key value pairs that can be injected inside error object + */ + properties?: { [propertyName: string]: string }; + message?: string; + /** + * RecommendedAction � localized. + */ + recommendedAction?: string[]; + /** + * Target of the error. + */ + target?: string; +} + +/** + * An interface representing RestoreJobRecoveryPointDetails. + */ +export interface RestoreJobRecoveryPointDetails { + recoveryPointID?: string; + recoveryPointTime?: Date; +} + +/** + * Details of Job's Sub Task + */ +export interface JobSubTask { + /** + * Additional details of Sub Tasks + */ + additionalDetails?: { [propertyName: string]: string }; + /** + * Task Id of the Sub Task + */ + taskId: number; + /** + * Name of the Sub Task + */ + taskName: string; + /** + * Progress of the Sub Task + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly taskProgress?: string; + /** + * Status of the Sub Task + */ + taskStatus: string; +} + +/** + * Extended Information about the job + */ +export interface JobExtendedInfo { + /** + * Job's Additional Details + */ + additionalDetails?: { [propertyName: string]: string }; + /** + * State of the Backup Instance + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly backupInstanceState?: string; + /** + * Number of bytes transferred + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly dataTransferredInBytes?: number; + /** + * Destination where restore is done + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly recoveryDestination?: string; + /** + * Details of the Source Recovery Point + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly sourceRecoverPoint?: RestoreJobRecoveryPointDetails; + /** + * List of Sub Tasks of the job + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly subTasks?: JobSubTask[]; + /** + * Details of the Target Recovery Point + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly targetRecoverPoint?: RestoreJobRecoveryPointDetails; +} + +/** + * AzureBackup Job Class + */ +export interface AzureBackupJob { + /** + * Job Activity Id + */ + activityID: string; + /** + * Name of the Backup Instance + */ + backupInstanceFriendlyName: string; + /** + * ARM ID of the Backup Instance + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly backupInstanceId?: string; + /** + * ARM ID of the DataSource + */ + dataSourceId: string; + /** + * Location of the DataSource + */ + dataSourceLocation: string; + /** + * User Friendly Name of the DataSource + */ + dataSourceName: string; + /** + * Data Source Set Name of the DataSource + */ + dataSourceSetName: string; + /** + * Type of DataSource + */ + dataSourceType: string; + /** + * Total run time of the job. ISO 8601 format. + */ + duration?: string; + /** + * EndTime of the job(in UTC) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly endTime?: Date; + /** + * A List, detailing the errors related to the job + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly errorDetails?: UserFacingError[]; + /** + * Extended Information about the job + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly extendedInfo?: JobExtendedInfo; + /** + * Indicated that whether the job is adhoc(true) or scheduled(false) + */ + isUserTriggered: boolean; + /** + * It indicates the type of Job i.e. Backup:full/log/diff ;Restore:ALR/OLR; + * Tiering:Backup/Archive ; Management:ConfigureProtection/UnConfigure + */ + operation: string; + /** + * It indicates the type of Job i.e. Backup/Restore/Tiering/Management + */ + operationCategory: string; + /** + * ARM ID of the policy + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly policyId?: string; + /** + * Name of the policy + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly policyName?: string; + /** + * Indicated whether progress is enabled for the job + */ + progressEnabled: boolean; + /** + * Url which contains job's progress + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly progressUrl?: string; + /** + * It indicates the sub type of operation i.e. in case of Restore it can be ALR/OLR + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly restoreType?: string; + /** + * Resource Group Name of the Datasource + */ + sourceResourceGroup: string; + /** + * SubscriptionId corresponding to the DataSource + */ + sourceSubscriptionID: string; + /** + * StartTime of the job(in UTC) + */ + startTime: Date; + /** + * Status of the job like InProgress/Success/Failed/Cancelled/SuccessWithWarning + */ + status: string; + /** + * Subscription Id of the corresponding backup vault + */ + subscriptionId: string; + /** + * List of supported actions + */ + supportedActions: string[]; + /** + * Name of the vault + */ + vaultName: string; + etag?: string; + sourceDataStoreName?: string; + destinationDataStoreName?: string; +} + +/** + * AzureBackup Job Resource Class + */ +export interface AzureBackupJobResource extends DppResource { + /** + * AzureBackupJobResource properties + */ + properties?: AzureBackupJob; +} + +/** + * Contains the possible cases for BackupParameters. + */ +export type BackupParametersUnion = BackupParameters | AzureBackupParams; + +/** + * BackupParameters base + * @summary BackupParameters + */ +export interface BackupParameters { + /** + * Polymorphic Discriminator + */ + objectType: "BackupParameters"; +} + +/** + * Azure backup parameters + * @summary AzureBackupParams + */ +export interface AzureBackupParams { + /** + * Polymorphic Discriminator + */ + objectType: "AzureBackupParams"; + /** + * BackupType ; Full/Incremental etc + */ + backupType: string; +} + +/** + * Contains the possible cases for AzureBackupRestoreRequest. + */ +export type AzureBackupRestoreRequestUnion = AzureBackupRestoreRequest | AzureBackupRecoveryPointBasedRestoreRequestUnion | AzureBackupRecoveryTimeBasedRestoreRequest; + +/** + * Azure backup restore request + * @summary AzureBackupRestoreRequest + */ +export interface AzureBackupRestoreRequest { + /** + * Polymorphic Discriminator + */ + objectType: "AzureBackupRestoreRequest"; + /** + * Gets or sets the restore target information. + */ + restoreTargetInfo: RestoreTargetInfoBaseUnion; + /** + * Gets or sets the type of the source data store. Possible values include: 'ArchiveStore', + * 'SnapshotStore', 'VaultStore' + */ + sourceDataStoreType: SourceDataStoreType; +} + +/** + * Contains the possible cases for AzureBackupRecoveryPointBasedRestoreRequest. + */ +export type AzureBackupRecoveryPointBasedRestoreRequestUnion = AzureBackupRecoveryPointBasedRestoreRequest | AzureBackupRestoreWithRehydrationRequest; + +/** + * Azure backup recoveryPoint based restore request + * @summary AzureBackupRecoveryPointBasedRestoreRequest + */ +export interface AzureBackupRecoveryPointBasedRestoreRequest { + /** + * Polymorphic Discriminator + */ + objectType: "AzureBackupRecoveryPointBasedRestoreRequest"; + /** + * Gets or sets the restore target information. + */ + restoreTargetInfo: RestoreTargetInfoBaseUnion; + /** + * Gets or sets the type of the source data store. Possible values include: 'ArchiveStore', + * 'SnapshotStore', 'VaultStore' + */ + sourceDataStoreType: SourceDataStoreType; + recoveryPointId: string; +} + +/** + * Azure backup recoveryPoint resource + * @summary AzureBackupRecoveryPointResource + */ +export interface AzureBackupRecoveryPointResource extends DppResource { + /** + * AzureBackupRecoveryPointResource properties + */ + properties?: AzureBackupRecoveryPointUnion; +} + +/** + * Azure Backup Rehydrate Request + * @summary AzureBackupRehydrationRequest + */ +export interface AzureBackupRehydrationRequest { + /** + * Id of the recovery point to be recovered + */ + recoveryPointId: string; + /** + * Priority to be used for rehydration. Values High or Standard. Possible values include: + * 'Invalid', 'High', 'Standard' + */ + rehydrationPriority?: RehydrationPriority; + /** + * Retention duration in ISO 8601 format i.e P10D . + */ + rehydrationRetentionDuration: string; +} + +/** + * Contains the possible cases for RestoreTargetInfoBase. + */ +export type RestoreTargetInfoBaseUnion = RestoreTargetInfoBase | ItemLevelRestoreTargetInfo | RestoreFilesTargetInfo | RestoreTargetInfo; + +/** + * Base class common to RestoreTargetInfo and RestoreFilesTargetInfo + */ +export interface RestoreTargetInfoBase { + /** + * Polymorphic Discriminator + */ + objectType: "RestoreTargetInfoBase"; + /** + * Target Restore region + */ + restoreLocation?: string; +} + +/** + * AzureBackup Restore with Rehydration Request + * @summary AzureBackupRestoreWithRehydrationRequest + */ +export interface AzureBackupRestoreWithRehydrationRequest { + /** + * Polymorphic Discriminator + */ + objectType: "AzureBackupRestoreWithRehydrationRequest"; + /** + * Gets or sets the restore target information. + */ + restoreTargetInfo: RestoreTargetInfoBaseUnion; + /** + * Gets or sets the type of the source data store. Possible values include: 'ArchiveStore', + * 'SnapshotStore', 'VaultStore' + */ + sourceDataStoreType: SourceDataStoreType; + recoveryPointId: string; + /** + * Priority to be used for rehydration. Values High or Standard. Possible values include: + * 'Invalid', 'High', 'Standard' + */ + rehydrationPriority: RehydrationPriority; + /** + * Retention duration in ISO 8601 format i.e P10D . + */ + rehydrationRetentionDuration: string; +} + +/** + * AzureBackup RecoveryPointTime Based Restore Request + * @summary AzureBackupRecoveryTimeBasedRestoreRequest + */ +export interface AzureBackupRecoveryTimeBasedRestoreRequest { + /** + * Polymorphic Discriminator + */ + objectType: "AzureBackupRecoveryTimeBasedRestoreRequest"; + /** + * Gets or sets the restore target information. + */ + restoreTargetInfo: RestoreTargetInfoBaseUnion; + /** + * Gets or sets the type of the source data store. Possible values include: 'ArchiveStore', + * 'SnapshotStore', 'VaultStore' + */ + sourceDataStoreType: SourceDataStoreType; + /** + * The recovery time in ISO 8601 format example - 2020-08-14T17:30:00.0000000Z. + */ + recoveryPointTime: string; +} + +/** + * DataStoreInfo base + * @summary DataStoreInfoBase + */ +export interface DataStoreInfoBase { + /** + * type of datastore; Operational/Vault/Archive. Possible values include: 'OperationalStore', + * 'VaultStore', 'ArchiveStore' + */ + dataStoreType: DataStoreTypes; + /** + * Type of Datasource object, used to initialize the right inherited type + */ + objectType: string; +} + +/** + * Contains the possible cases for BasePolicyRule. + */ +export type BasePolicyRuleUnion = BasePolicyRule | AzureBackupRule | AzureRetentionRule; + +/** + * BasePolicy Rule + * @summary BasePolicyRule + */ +export interface BasePolicyRule { + /** + * Polymorphic Discriminator + */ + objectType: "BasePolicyRule"; + name: string; +} + +/** + * Azure backup rule + * @summary AzureBackupRule + */ +export interface AzureBackupRule { + /** + * Polymorphic Discriminator + */ + objectType: "AzureBackupRule"; + name: string; + backupParameters?: BackupParametersUnion; + dataStore: DataStoreInfoBase; + trigger: TriggerContextUnion; +} + +/** + * Contains the possible cases for DataStoreParameters. + */ +export type DataStoreParametersUnion = DataStoreParameters | AzureOperationalStoreParameters; + +/** + * Parameters for DataStore + */ +export interface DataStoreParameters { + /** + * Polymorphic Discriminator + */ + objectType: "DataStoreParameters"; + /** + * type of datastore; Operational/Vault/Archive. Possible values include: 'OperationalStore', + * 'VaultStore', 'ArchiveStore' + */ + dataStoreType: DataStoreTypes; +} + +/** + * Parameters for Operational-Tier DataStore + */ +export interface AzureOperationalStoreParameters { + /** + * Polymorphic Discriminator + */ + objectType: "AzureOperationalStoreParameters"; + /** + * type of datastore; Operational/Vault/Archive. Possible values include: 'OperationalStore', + * 'VaultStore', 'ArchiveStore' + */ + dataStoreType: DataStoreTypes; + /** + * Gets or sets the Snapshot Resource Group Uri. + */ + resourceGroupId?: string; +} + +/** + * Contains the possible cases for CopyOption. + */ +export type CopyOptionUnion = CopyOption | CopyOnExpiryOption | CustomCopyOption | ImmediateCopyOption; + +/** + * Options to copy + * @summary CopyOption + */ +export interface CopyOption { + /** + * Polymorphic Discriminator + */ + objectType: "CopyOption"; +} + +/** + * Target copy settings + * @summary TargetCopySetting + */ +export interface TargetCopySetting { + /** + * It can be CustomCopyOption or ImmediateCopyOption. + */ + copyAfter: CopyOptionUnion; + /** + * Info of target datastore + */ + dataStore: DataStoreInfoBase; +} + +/** + * Source LifeCycle + * @summary SourceLifeCycle + */ +export interface SourceLifeCycle { + deleteAfter: DeleteOptionUnion; + sourceDataStore: DataStoreInfoBase; + targetDataStoreCopySettings?: TargetCopySetting[]; +} + +/** + * Azure retention rule + * @summary AzureRetentionRule + */ +export interface AzureRetentionRule { + /** + * Polymorphic Discriminator + */ + objectType: "AzureRetentionRule"; + name: string; + isDefault?: boolean; + lifecycles: SourceLifeCycle[]; +} + +/** + * Contains the possible cases for BackupCriteria. + */ +export type BackupCriteriaUnion = BackupCriteria | ScheduleBasedBackupCriteria; + +/** + * BackupCriteria base class + * @summary BackupCriteria + */ +export interface BackupCriteria { + /** + * Polymorphic Discriminator + */ + objectType: "BackupCriteria"; +} + +/** + * Datasource to be backed up + * @summary Datasource + */ +export interface Datasource { + /** + * DatasourceType of the resource. + */ + datasourceType?: string; + /** + * Type of Datasource object, used to initialize the right inherited type + */ + objectType?: string; + /** + * Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure resources, + * this will be the ID created by backup service via Fabric/Vault. + */ + resourceID: string; + /** + * Location of datasource. + */ + resourceLocation?: string; + /** + * Unique identifier of the resource in the context of parent. + */ + resourceName?: string; + /** + * Resource Type of Datasource. + */ + resourceType?: string; + /** + * Uri of the resource. + */ + resourceUri?: string; +} + +/** + * DatasourceSet details of datasource to be backed up + * @summary DatasourceSet + */ +export interface DatasourceSet { + /** + * DatasourceType of the resource. + */ + datasourceType?: string; + /** + * Type of Datasource object, used to initialize the right inherited type + */ + objectType?: string; + /** + * Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure resources, + * this will be the ID created by backup service via Fabric/Vault. + */ + resourceID: string; + /** + * Location of datasource. + */ + resourceLocation?: string; + /** + * Unique identifier of the resource in the context of parent. + */ + resourceName?: string; + /** + * Resource Type of Datasource. + */ + resourceType?: string; + /** + * Uri of the resource. + */ + resourceUri?: string; +} + +/** + * Parameters in Policy + */ +export interface PolicyParameters { + /** + * Gets or sets the DataStore Parameters + */ + dataStoreParametersList?: DataStoreParametersUnion[]; +} + +/** + * Policy Info in backupInstance + * @summary PolicyInfo + */ +export interface PolicyInfo { + policyId: string; + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly policyVersion?: string; + /** + * Policy parameters for the backup instance + */ + policyParameters?: PolicyParameters; +} + +/** + * Protection status details + * @summary ProtectionStatusDetails + */ +export interface ProtectionStatusDetails { + /** + * Specifies the protection status error of the resource + */ + errorDetails?: UserFacingError; + /** + * Specifies the protection status of the resource. Possible values include: + * 'ConfiguringProtection', 'ConfiguringProtectionFailed', 'ProtectionConfigured', + * 'ProtectionStopped', 'SoftDeleted', 'SoftDeleting' + */ + status?: Status; +} + +/** + * Backup Instance + */ +export interface BackupInstance { + /** + * Gets or sets the Backup Instance friendly name. + */ + friendlyName?: string; + /** + * Gets or sets the data source information. + */ + dataSourceInfo: Datasource; + /** + * Gets or sets the data source set information. + */ + dataSourceSetInfo?: DatasourceSet; + /** + * Gets or sets the policy information. + */ + policyInfo: PolicyInfo; + /** + * Specifies the protection status of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly protectionStatus?: ProtectionStatusDetails; + /** + * Specifies the current protection state of the resource. Possible values include: 'Invalid', + * 'NotProtected', 'ConfiguringProtection', 'ProtectionConfigured', 'BackupSchedulesSuspended', + * 'RetentionSchedulesSuspended', 'ProtectionStopped', 'ProtectionError', + * 'ConfiguringProtectionFailed', 'SoftDeleting', 'SoftDeleted', 'UpdatingProtection' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly currentProtectionState?: CurrentProtectionState; + /** + * Specifies the protection error of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly protectionErrorDetails?: UserFacingError; + /** + * Specifies the provisioning state of the resource i.e. provisioning/updating/Succeeded/Failed + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: string; + objectType: string; +} + +/** + * BackupInstance Resource + * @summary BackupInstanceResource + */ +export interface BackupInstanceResource extends DppResource { + /** + * BackupInstanceResource properties + */ + properties?: BackupInstance; +} + +/** + * Contains the possible cases for BaseBackupPolicy. + */ +export type BaseBackupPolicyUnion = BaseBackupPolicy | BackupPolicy; + +/** + * BackupPolicy base + * @summary BaseBackupPolicy + */ +export interface BaseBackupPolicy { + /** + * Polymorphic Discriminator + */ + objectType: "BaseBackupPolicy"; + /** + * Type of datasource for the backup management + */ + datasourceTypes: string[]; +} + +/** + * Rule based backup policy + * @summary BackupPolicy + */ +export interface BackupPolicy { + /** + * Polymorphic Discriminator + */ + objectType: "BackupPolicy"; + /** + * Type of datasource for the backup management + */ + datasourceTypes: string[]; + /** + * Policy rule dictionary that contains rules for each backuptype i.e Full/Incremental/Logs etc + */ + policyRules: BasePolicyRuleUnion[]; +} + +/** + * Schedule for backup + * @summary BackupSchedule + */ +export interface BackupSchedule { + /** + * ISO 8601 repeating time interval format + */ + repeatingTimeIntervals: string[]; +} + +/** + * Storage setting + * @summary StorageSetting + */ +export interface StorageSetting { + /** + * Gets or sets the type of the datastore. Possible values include: 'ArchiveStore', + * 'SnapshotStore', 'VaultStore' + */ + datastoreType?: StorageSettingStoreTypes; + /** + * Gets or sets the type. Possible values include: 'GeoRedundant', 'LocallyRedundant' + */ + type?: StorageSettingTypes; +} + +/** + * Backup Vault + * @summary BackupVault + */ +export interface BackupVault { + /** + * Provisioning state of the BackupVault resource. Possible values include: 'Failed', + * 'Provisioning', 'Succeeded', 'Unknown', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; + /** + * Storage Settings + */ + storageSettings: StorageSetting[]; +} + +/** + * An interface representing DppTrackedResource. + */ +export interface DppTrackedResource extends BaseResource { + /** + * Optional ETag. + */ + eTag?: string; + /** + * 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; + /** + * Input Managed Identity Details + */ + identity?: DppIdentityDetails; + /** + * Resource location. + */ + location?: 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 tags. + */ + tags?: { [propertyName: string]: 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; + systemData?: SystemData; +} + +/** + * Backup Vault Resource + * @summary BackupVault Resource + */ +export interface BackupVaultResource extends DppTrackedResource { + /** + * BackupVaultResource properties + */ + properties: BackupVault; +} + +/** + * BaseBackupPolicy resource + * @summary BaseBackupPolicyResource + */ +export interface BaseBackupPolicyResource extends DppResource { + /** + * BaseBackupPolicyResource properties + */ + properties?: BaseBackupPolicyUnion; +} + +/** + * CheckNameAvailability Request + * @summary CheckNameAvailabilityRequest + */ +export interface CheckNameAvailabilityRequest { + /** + * Resource name for which availability needs to be checked + */ + name?: string; + /** + * Describes the Resource type: Microsoft.DataProtection/BackupVaults + */ + type?: string; +} + +/** + * CheckNameAvailability Result + * @summary CheckNameAvailabilityResult + */ +export interface CheckNameAvailabilityResult { + /** + * Gets or sets the message. + */ + message?: string; + /** + * Gets or sets a value indicating whether [name available]. + */ + nameAvailable?: boolean; + /** + * Gets or sets the reason. + */ + reason?: string; +} + +/** + * Localized display information of an operation. + * @summary ClientDiscoveryDisplay + */ +export interface ClientDiscoveryDisplay { + /** + * Description of the operation having details of what operation is about. + */ + description?: string; + /** + * Operations Name itself. + */ + operation?: string; + /** + * Name of the provider for display purposes + */ + provider?: string; + /** + * ResourceType for which this Operation can be performed. + */ + resource?: string; +} + +/** + * Class to represent shoebox log specification in json client discovery. + * @summary ClientDiscoveryForLogSpecification + */ +export interface ClientDiscoveryForLogSpecification { + /** + * blob duration of shoebox log specification + */ + blobDuration?: string; + /** + * Localized display name + */ + displayName?: string; + /** + * Name for shoebox log specification. + */ + name?: string; +} + +/** + * Class to represent shoebox service specification in json client discovery. + * @summary ClientDiscoveryForServiceSpecification + */ +export interface ClientDiscoveryForServiceSpecification { + /** + * List of log specifications of this operation. + */ + logSpecifications?: ClientDiscoveryForLogSpecification[]; +} + +/** + * Class to represent shoebox properties in json client discovery. + * @summary ClientDiscoveryForProperties + */ +export interface ClientDiscoveryForProperties { + /** + * Operation properties. + */ + serviceSpecification?: ClientDiscoveryForServiceSpecification; +} + +/** + * Available operation details. + * @summary ClientDiscoveryValueForSingleApi + */ +export interface ClientDiscoveryValueForSingleApi { + /** + * Contains the localized display information for this particular operation + */ + display?: ClientDiscoveryDisplay; + /** + * Name of the Operation. + */ + name?: string; + /** + * Indicates whether the operation is a data action + */ + isDataAction?: boolean; + /** + * The intended executor of the operation;governs the display of the operation in the RBAC UX and + * the audit logs UX + */ + origin?: string; + /** + * Properties for the given operation. + */ + properties?: ClientDiscoveryForProperties; +} + +/** + * The resource management error additional info. + */ +export interface ErrorAdditionalInfo { + /** + * The additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly info?: any; + /** + * The additional info type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * The resource management error response. + */ +export interface ErrorModel { + /** + * The error additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; + /** + * The error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly code?: string; + /** + * The error details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly details?: ErrorModel[]; + /** + * The error message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; + /** + * The error target. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly target?: string; +} + +/** + * Copy on Expiry Option + * @summary CopyOnExpiryOption + */ +export interface CopyOnExpiryOption { + /** + * Polymorphic Discriminator + */ + objectType: "CopyOnExpiryOption"; +} + +/** + * Duration based custom options to copy + * @summary CustomCopyOption + */ +export interface CustomCopyOption { + /** + * Polymorphic Discriminator + */ + objectType: "CustomCopyOption"; + /** + * Data copied after given timespan + */ + duration?: string; +} + +/** + * Day of the week + * @summary Day + */ +export interface Day { + /** + * Date of the month + */ + date?: number; + /** + * Whether Date is last date of month + */ + isLast?: boolean; +} + +/** + * Identity details + * @summary DppIdentityDetails + */ +export interface DppIdentityDetails { + /** + * The object ID of the service principal object for the managed identity that is used to grant + * role-based access to an Azure resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * A Globally Unique Identifier (GUID) that represents the Azure AD tenant where the resource is + * now a member. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; + /** + * The identityType which can be either SystemAssigned or None + */ + type?: string; +} + +/** + * Metadata pertaining to creation and last modification of the resource. + */ +export interface SystemData { + /** + * The identity that created the resource. + */ + createdBy?: string; + /** + * The type of identity that created the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + createdByType?: CreatedByType; + /** + * The timestamp of resource creation (UTC). + */ + createdAt?: Date; + /** + * The identity that last modified the resource. + */ + lastModifiedBy?: string; + /** + * The type of identity that last modified the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + lastModifiedByType?: CreatedByType; + /** + * The type of identity that last modified the resource. + */ + lastModifiedAt?: Date; +} + +/** + * ListResource + * @summary List Resource + */ +export interface DppResourceList { + /** + * The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + */ + nextLink?: string; +} + +/** + * An interface representing DppTrackedResourceList. + */ +export interface DppTrackedResourceList { + /** + * The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + */ + nextLink?: string; +} + +/** + * The result for export jobs containing blob details. + * @summary ExportJobsResult + */ +export interface ExportJobsResult { + /** + * URL of the blob into which the serialized string of list of jobs is exported. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly blobUrl?: string; + /** + * SAS key to access the blob. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly blobSasKey?: string; + /** + * URL of the blob into which the ExcelFile is uploaded. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly excelFileBlobUrl?: string; + /** + * SAS key to access the ExcelFile blob. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly excelFileBlobSasKey?: string; +} + +/** + * Contains the possible cases for FeatureValidationRequestBase. + */ +export type FeatureValidationRequestBaseUnion = FeatureValidationRequestBase | FeatureValidationRequest; + +/** + * Base class for Backup Feature support + */ +export interface FeatureValidationRequestBase { + /** + * Polymorphic Discriminator + */ + objectType: "FeatureValidationRequestBase"; +} + +/** + * Base class for feature object + */ +export interface FeatureValidationRequest { + /** + * Polymorphic Discriminator + */ + objectType: "FeatureValidationRequest"; + /** + * backup support feature type. Possible values include: 'Invalid', 'DataSourceType' + */ + featureType?: FeatureType; + /** + * backup support feature name. + */ + featureName?: string; +} + +/** + * Elements class for feature request + */ +export interface SupportedFeature { + /** + * support feature type. + */ + featureName?: string; + /** + * feature support status. Possible values include: 'Invalid', 'NotSupported', 'AlphaPreview', + * 'PrivatePreview', 'PublicPreview', 'GenerallyAvailable' + */ + supportStatus?: FeatureSupportStatus; + /** + * support feature type. + */ + exposureControlledFeatures?: string[]; +} + +/** + * Contains the possible cases for FeatureValidationResponseBase. + */ +export type FeatureValidationResponseBaseUnion = FeatureValidationResponseBase | FeatureValidationResponse; + +/** + * Base class for Backup Feature support + */ +export interface FeatureValidationResponseBase { + /** + * Polymorphic Discriminator + */ + objectType: "FeatureValidationResponseBase"; +} + +/** + * Feature Validation Response + */ +export interface FeatureValidationResponse { + /** + * Polymorphic Discriminator + */ + objectType: "FeatureValidationResponse"; + /** + * backup support feature type. Possible values include: 'Invalid', 'DataSourceType' + */ + featureType?: FeatureType; + /** + * Response features + */ + features?: SupportedFeature[]; +} + +/** + * Immediate copy Option + * @summary ImmediateCopyOption + */ +export interface ImmediateCopyOption { + /** + * Polymorphic Discriminator + */ + objectType: "ImmediateCopyOption"; +} + +/** + * Contains the possible cases for ItemLevelRestoreCriteria. + */ +export type ItemLevelRestoreCriteriaUnion = ItemLevelRestoreCriteria | RangeBasedItemLevelRestoreCriteria; + +/** + * Class to contain criteria for item level restore + */ +export interface ItemLevelRestoreCriteria { + /** + * Polymorphic Discriminator + */ + objectType: "ItemLevelRestoreCriteria"; +} + +/** + * Restore target info for Item level restore operation + */ +export interface ItemLevelRestoreTargetInfo { + /** + * Polymorphic Discriminator + */ + objectType: "ItemLevelRestoreTargetInfo"; + /** + * Target Restore region + */ + restoreLocation?: string; + /** + * Restore Criteria + */ + restoreCriteria: ItemLevelRestoreCriteriaUnion[]; + /** + * Information of target DS + */ + datasourceInfo: Datasource; + /** + * Information of target DS Set + */ + datasourceSetInfo?: DatasourceSet; +} + +/** + * Operation Extended Info + * @summary OperationExtendedInfo + */ +export interface OperationExtendedInfo { + /** + * This property will be used as the discriminator for deciding the specific types in the + * polymorphic chain of types. + */ + objectType?: string; +} + +/** + * Operation Job Extended Info + * @summary OperationJobExtendedInfo + */ +export interface OperationJobExtendedInfo extends OperationExtendedInfo { + /** + * Arm Id of the job created for this operation. + */ + jobId?: string; +} + +/** + * Operation Resource + * @summary OperationResource + */ +export interface OperationResource { + /** + * End time of the operation + */ + endTime?: Date; + /** + * Required if status == failed or status == canceled. This is the OData v4 error format, used by + * the RPC and will go into the v2.2 Azure REST API guidelines. + * The full set of optional properties (e.g. inner errors / details) can be found in the "Error + * Response" section. + */ + error?: ErrorModel; + /** + * It should match what is used to GET the operation result + */ + id?: string; + /** + * It must match the last segment of the "id" field, and will typically be a GUID / system + * generated value + */ + name?: string; + /** + * End time of the operation + */ + properties?: OperationExtendedInfo; + /** + * Start time of the operation + */ + startTime?: Date; + status?: string; +} + +/** + * Patch Request content for Microsoft.DataProtection resources + * @summary PatchResourceRequestInput + */ +export interface PatchResourceRequestInput { + /** + * Input Managed Identity Details + */ + identity?: DppIdentityDetails; + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Item Level target info for restore operation + */ +export interface RangeBasedItemLevelRestoreCriteria { + /** + * Polymorphic Discriminator + */ + objectType: "RangeBasedItemLevelRestoreCriteria"; + /** + * minimum value for range prefix match + */ + minMatchingValue?: string; + /** + * maximum value for range prefix match + */ + maxMatchingValue?: string; +} + +/** + * Class encapsulating target details, used where the destination is not a datasource + */ +export interface TargetDetails { + /** + * Restore operation may create multiple files inside location pointed by Url + * Below will be the common prefix for all of them + */ + filePrefix: string; + /** + * Denotes the target location where the data will be restored, + * string value for the enum + * {Microsoft.Internal.AzureBackup.DataProtection.Common.Interface.RestoreTargetLocationType}. + * Possible values include: 'Invalid', 'AzureBlobs', 'AzureFiles' + */ + restoreTargetLocationType: RestoreTargetLocationType; + /** + * Url denoting the restore destination. It can point to container / file share etc + */ + url: string; +} + +/** + * Class encapsulating restore as files target parameters + */ +export interface RestoreFilesTargetInfo { + /** + * Polymorphic Discriminator + */ + objectType: "RestoreFilesTargetInfo"; + /** + * Target Restore region + */ + restoreLocation?: string; + /** + * Destination of RestoreAsFiles operation, when destination is not a datasource + */ + targetDetails: TargetDetails; +} + +/** + * Class encapsulating restore target parameters + */ +export interface RestoreTargetInfo { + /** + * Polymorphic Discriminator + */ + objectType: "RestoreTargetInfo"; + /** + * Target Restore region + */ + restoreLocation?: string; + /** + * Information of target DS + */ + datasourceInfo: Datasource; + /** + * Information of target DS Set + */ + datasourceSetInfo?: DatasourceSet; +} + +/** + * Schedule based backup criteria + * @summary ScheduleBasedBackupCriteria + */ +export interface ScheduleBasedBackupCriteria { + /** + * Polymorphic Discriminator + */ + objectType: "ScheduleBasedBackupCriteria"; + /** + * it contains absolute values like "AllBackup" / "FirstOfDay" / "FirstOfWeek" / "FirstOfMonth" + * and should be part of AbsoluteMarker enum + */ + absoluteCriteria?: AbsoluteMarker[]; + /** + * This is day of the month from 1 to 28 other wise last of month + */ + daysOfMonth?: Day[]; + /** + * It should be Sunday/Monday/T..../Saturday + */ + daysOfTheWeek?: DayOfWeek[]; + /** + * It should be January/February/....../December + */ + monthsOfYear?: Month[]; + /** + * List of schedule times for backup + */ + scheduleTimes?: Date[] | string[]; + /** + * It should be First/Second/Third/Fourth/Last + */ + weeksOfTheMonth?: WeekNumber[]; +} + +/** + * Tagging criteria + * @summary TaggingCriteria + */ +export interface TaggingCriteria { + /** + * Criteria which decides whether the tag can be applied to a triggered backup. + */ + criteria?: BackupCriteriaUnion[]; + /** + * Specifies if tag is default. + */ + isDefault: boolean; + /** + * Retention Tag priority. + */ + taggingPriority: number; + /** + * Retention tag information + */ + tagInfo: RetentionTag; +} + +/** + * Schedule based trigger context + * @summary ScheduleBasedTriggerContext + */ +export interface ScheduleBasedTriggerContext { + /** + * Polymorphic Discriminator + */ + objectType: "ScheduleBasedTriggerContext"; + /** + * Schedule for this backup + */ + schedule: BackupSchedule; + /** + * List of tags that can be applicable for given schedule. + */ + taggingCriteria: TaggingCriteria[]; +} + +/** + * Trigger backup request + * @summary TriggerBackupRequest + */ +export interface TriggerBackupRequest { + /** + * Name for the Rule of the Policy which needs to be applied for this backup + */ + backupRuleOptions: AdHocBackupRuleOptions; +} + +/** + * Validate for backup request + * @summary ValidateForBackupRequest + */ +export interface ValidateForBackupRequest { + backupInstance: BackupInstance; +} + +/** + * Validate restore request object + * @summary ValidateRestoreRequestObject + */ +export interface ValidateRestoreRequestObject { + /** + * Gets or sets the restore request object. + */ + restoreRequestObject: AzureBackupRestoreRequestUnion; +} + +/** + * Optional Parameters. + */ +export interface RecoveryPointsListOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter options. + */ + filter?: string; + /** + * skipToken Filter. + */ + skipToken?: string; +} + +/** + * Optional Parameters. + */ +export interface RecoveryPointsListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * OData filter options. + */ + filter?: string; + /** + * skipToken Filter. + */ + skipToken?: string; +} + +/** + * An interface representing DataProtectionClientOptions. + */ +export interface DataProtectionClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * Defines headers for Get operation. + */ +export interface OperationResultGetHeaders { + /** + * The URL of the resource used to check the status of the asynchronous operation. + */ + location: string; + /** + * The URL of the resource used to check the status of the asynchronous operation. + */ + azureAsyncOperation: string; + /** + * Suggested delay to check the status of the asynchronous operation. The value is an integer + * that represents the seconds. + */ + retryAfter: number; +} + +/** + * Defines headers for Delete operation. + */ +export interface BackupInstancesDeleteHeaders { + /** + * The URL of the resource used to check the status of the asynchronous operation. + */ + location: string; + /** + * The URL of the resource used to check the status of the asynchronous operation. + */ + azureAsyncOperation: string; + /** + * Suggested delay to check the status of the asynchronous operation. The value is an integer + * that represents the seconds. + */ + retryAfter: number; +} + +/** + * Defines headers for AdhocBackup operation. + */ +export interface BackupInstancesAdhocBackupHeaders { + /** + * The URL of the resource used to check the status of the asynchronous operation. + */ + location: string; + /** + * The URL of the resource used to check the status of the asynchronous operation. + */ + azureAsyncOperation: string; + /** + * Suggested delay to check the status of the asynchronous operation. The value is an integer + * that represents the seconds. + */ + retryAfter: number; +} + +/** + * Defines headers for ValidateForBackup operation. + */ +export interface BackupInstancesValidateForBackupHeaders { + /** + * The URL of the resource used to check the status of the asynchronous operation. + */ + location: string; + /** + * The URL of the resource used to check the status of the asynchronous operation. + */ + azureAsyncOperation: string; + /** + * Suggested delay to check the status of the asynchronous operation. The value is an integer + * that represents the seconds. + */ + retryAfter: number; +} + +/** + * Defines headers for TriggerRehydrate operation. + */ +export interface BackupInstancesTriggerRehydrateHeaders { + /** + * The URL of the resource used to check the status of the asynchronous operation. + */ + location: string; + /** + * The URL of the resource used to check the status of the asynchronous operation. + */ + azureAsyncOperation: string; + /** + * Suggested delay to check the status of the asynchronous operation. The value is an integer + * that represents the seconds. + */ + retryAfter: number; +} + +/** + * Defines headers for TriggerRestore operation. + */ +export interface BackupInstancesTriggerRestoreHeaders { + /** + * The URL of the resource used to check the status of the asynchronous operation. + */ + location: string; + /** + * The URL of the resource used to check the status of the asynchronous operation. + */ + azureAsyncOperation: string; + /** + * Suggested delay to check the status of the asynchronous operation. The value is an integer + * that represents the seconds. + */ + retryAfter: number; +} + +/** + * Defines headers for ValidateForRestore operation. + */ +export interface BackupInstancesValidateForRestoreHeaders { + /** + * The URL of the resource used to check the status of the asynchronous operation. + */ + location: string; + /** + * The URL of the resource used to check the status of the asynchronous operation. + */ + azureAsyncOperation: string; + /** + * Suggested delay to check the status of the asynchronous operation. The value is an integer + * that represents the seconds. + */ + retryAfter: number; +} + +/** + * Defines headers for Trigger operation. + */ +export interface ExportJobsTriggerHeaders { + /** + * The URL of the resource used to check the status of the asynchronous operation. + */ + location: string; + /** + * Suggested delay to check the status of the asynchronous operation. The value is an integer + * that represents the seconds. + */ + retryAfter: number; +} + +/** + * @interface + * List of BackupVault resources + * @summary BackupVaultResourceList + * @extends Array, DppResourceList + */ +export interface BackupVaultResourceList extends Array, DppResourceList { +} + +/** + * @interface + * Operations List response which contains list of available APIs. + * @summary ClientDiscoveryResponse + * @extends Array + */ +export interface ClientDiscoveryResponse extends Array { + /** + * Link to the next chunk of Response. + */ + nextLink?: string; +} + +/** + * @interface + * List of BaseBackupPolicy resources + * @summary BaseBackupPolicyResourceList + * @extends Array, DppResourceList + */ +export interface BaseBackupPolicyResourceList extends Array, DppResourceList { +} + +/** + * @interface + * BackupInstance Resource list response + * @summary BackupInstanceResourceList + * @extends Array, DppResourceList + */ +export interface BackupInstanceResourceList extends Array, DppResourceList { +} + +/** + * @interface + * Azure backup recoveryPoint resource list + * @summary AzureBackupRecoveryPointResourceList + * @extends Array, DppResourceList + */ +export interface AzureBackupRecoveryPointResourceList extends Array, DppResourceList { +} + +/** + * @interface + * List of AzureBackup Job resources + * @extends Array, DppResourceList + */ +export interface AzureBackupJobResourceList extends Array, DppResourceList { +} + +/** + * Defines values for RehydrationStatus. + * Possible values include: 'CREATE_IN_PROGRESS', 'COMPLETED', 'DELETE_IN_PROGRESS', 'DELETED', + * 'FAILED' + * @readonly + * @enum {string} + */ +export type RehydrationStatus = 'CREATE_IN_PROGRESS' | 'COMPLETED' | 'DELETE_IN_PROGRESS' | 'DELETED' | 'FAILED'; + +/** + * Defines values for RestoreSourceDataStoreType. + * Possible values include: 'OperationalStore', 'VaultStore', 'ArchiveStore' + * @readonly + * @enum {string} + */ +export type RestoreSourceDataStoreType = 'OperationalStore' | 'VaultStore' | 'ArchiveStore'; + +/** + * Defines values for RehydrationPriority. + * Possible values include: 'Invalid', 'High', 'Standard' + * @readonly + * @enum {string} + */ +export type RehydrationPriority = 'Invalid' | 'High' | 'Standard'; + +/** + * Defines values for SourceDataStoreType. + * Possible values include: 'ArchiveStore', 'SnapshotStore', 'VaultStore' + * @readonly + * @enum {string} + */ +export type SourceDataStoreType = 'ArchiveStore' | 'SnapshotStore' | 'VaultStore'; + +/** + * Defines values for DataStoreTypes. + * Possible values include: 'OperationalStore', 'VaultStore', 'ArchiveStore' + * @readonly + * @enum {string} + */ +export type DataStoreTypes = 'OperationalStore' | 'VaultStore' | 'ArchiveStore'; + +/** + * Defines values for Status. + * Possible values include: 'ConfiguringProtection', 'ConfiguringProtectionFailed', + * 'ProtectionConfigured', 'ProtectionStopped', 'SoftDeleted', 'SoftDeleting' + * @readonly + * @enum {string} + */ +export type Status = 'ConfiguringProtection' | 'ConfiguringProtectionFailed' | 'ProtectionConfigured' | 'ProtectionStopped' | 'SoftDeleted' | 'SoftDeleting'; + +/** + * Defines values for CurrentProtectionState. + * Possible values include: 'Invalid', 'NotProtected', 'ConfiguringProtection', + * 'ProtectionConfigured', 'BackupSchedulesSuspended', 'RetentionSchedulesSuspended', + * 'ProtectionStopped', 'ProtectionError', 'ConfiguringProtectionFailed', 'SoftDeleting', + * 'SoftDeleted', 'UpdatingProtection' + * @readonly + * @enum {string} + */ +export type CurrentProtectionState = 'Invalid' | 'NotProtected' | 'ConfiguringProtection' | 'ProtectionConfigured' | 'BackupSchedulesSuspended' | 'RetentionSchedulesSuspended' | 'ProtectionStopped' | 'ProtectionError' | 'ConfiguringProtectionFailed' | 'SoftDeleting' | 'SoftDeleted' | 'UpdatingProtection'; + +/** + * Defines values for ProvisioningState. + * Possible values include: 'Failed', 'Provisioning', 'Succeeded', 'Unknown', 'Updating' + * @readonly + * @enum {string} + */ +export type ProvisioningState = 'Failed' | 'Provisioning' | 'Succeeded' | 'Unknown' | 'Updating'; + +/** + * Defines values for StorageSettingStoreTypes. + * Possible values include: 'ArchiveStore', 'SnapshotStore', 'VaultStore' + * @readonly + * @enum {string} + */ +export type StorageSettingStoreTypes = 'ArchiveStore' | 'SnapshotStore' | 'VaultStore'; + +/** + * Defines values for StorageSettingTypes. + * Possible values include: 'GeoRedundant', 'LocallyRedundant' + * @readonly + * @enum {string} + */ +export type StorageSettingTypes = 'GeoRedundant' | 'LocallyRedundant'; + +/** + * Defines values for CreatedByType. + * Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + * @readonly + * @enum {string} + */ +export type CreatedByType = 'User' | 'Application' | 'ManagedIdentity' | 'Key'; + +/** + * Defines values for FeatureType. + * Possible values include: 'Invalid', 'DataSourceType' + * @readonly + * @enum {string} + */ +export type FeatureType = 'Invalid' | 'DataSourceType'; + +/** + * Defines values for FeatureSupportStatus. + * Possible values include: 'Invalid', 'NotSupported', 'AlphaPreview', 'PrivatePreview', + * 'PublicPreview', 'GenerallyAvailable' + * @readonly + * @enum {string} + */ +export type FeatureSupportStatus = 'Invalid' | 'NotSupported' | 'AlphaPreview' | 'PrivatePreview' | 'PublicPreview' | 'GenerallyAvailable'; + +/** + * Defines values for RestoreTargetLocationType. + * Possible values include: 'Invalid', 'AzureBlobs', 'AzureFiles' + * @readonly + * @enum {string} + */ +export type RestoreTargetLocationType = 'Invalid' | 'AzureBlobs' | 'AzureFiles'; + +/** + * Defines values for AbsoluteMarker. + * Possible values include: 'AllBackup', 'FirstOfDay', 'FirstOfMonth', 'FirstOfWeek', 'FirstOfYear' + * @readonly + * @enum {string} + */ +export type AbsoluteMarker = 'AllBackup' | 'FirstOfDay' | 'FirstOfMonth' | 'FirstOfWeek' | 'FirstOfYear'; + +/** + * Defines values for DayOfWeek. + * Possible values include: 'Friday', 'Monday', 'Saturday', 'Sunday', 'Thursday', 'Tuesday', + * 'Wednesday' + * @readonly + * @enum {string} + */ +export type DayOfWeek = 'Friday' | 'Monday' | 'Saturday' | 'Sunday' | 'Thursday' | 'Tuesday' | 'Wednesday'; + +/** + * Defines values for Month. + * Possible values include: 'April', 'August', 'December', 'February', 'January', 'July', 'June', + * 'March', 'May', 'November', 'October', 'September' + * @readonly + * @enum {string} + */ +export type Month = 'April' | 'August' | 'December' | 'February' | 'January' | 'July' | 'June' | 'March' | 'May' | 'November' | 'October' | 'September'; + +/** + * Defines values for WeekNumber. + * Possible values include: 'First', 'Fourth', 'Last', 'Second', 'Third' + * @readonly + * @enum {string} + */ +export type WeekNumber = 'First' | 'Fourth' | 'Last' | 'Second' | 'Third'; + +/** + * Contains response data for the getInSubscription operation. + */ +export type BackupVaultsGetInSubscriptionResponse = BackupVaultResourceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BackupVaultResourceList; + }; +}; + +/** + * Contains response data for the getInResourceGroup operation. + */ +export type BackupVaultsGetInResourceGroupResponse = BackupVaultResourceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BackupVaultResourceList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type BackupVaultsGetResponse = BackupVaultResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BackupVaultResource; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type BackupVaultsCreateOrUpdateResponse = BackupVaultResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BackupVaultResource; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type BackupVaultsUpdateResponse = BackupVaultResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BackupVaultResource; + }; +}; + +/** + * Contains response data for the checkNameAvailability operation. + */ +export type BackupVaultsCheckNameAvailabilityResponse = CheckNameAvailabilityResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CheckNameAvailabilityResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type BackupVaultsBeginCreateOrUpdateResponse = BackupVaultResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BackupVaultResource; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type BackupVaultsBeginUpdateResponse = BackupVaultResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BackupVaultResource; + }; +}; + +/** + * Contains response data for the getInSubscriptionNext operation. + */ +export type BackupVaultsGetInSubscriptionNextResponse = BackupVaultResourceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BackupVaultResourceList; + }; +}; + +/** + * Contains response data for the getInResourceGroupNext operation. + */ +export type BackupVaultsGetInResourceGroupNextResponse = BackupVaultResourceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BackupVaultResourceList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type OperationResultGetResponse = OperationJobExtendedInfo & OperationResultGetHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: OperationResultGetHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationJobExtendedInfo; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type OperationStatusGetResponse = OperationResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationResource; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type BackupVaultOperationResultsGetResponse = BackupVaultResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BackupVaultResource; + }; +}; + +/** + * Contains response data for the checkFeatureSupport operation. + */ +export type DataProtectionCheckFeatureSupportResponse = FeatureValidationResponseBaseUnion & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: FeatureValidationResponseBaseUnion; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type DataProtectionOperationsListResponse = ClientDiscoveryResponse & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ClientDiscoveryResponse; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type DataProtectionOperationsListNextResponse = ClientDiscoveryResponse & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ClientDiscoveryResponse; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type BackupPoliciesListResponse = BaseBackupPolicyResourceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BaseBackupPolicyResourceList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type BackupPoliciesGetResponse = BaseBackupPolicyResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BaseBackupPolicyResource; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type BackupPoliciesCreateOrUpdateResponse = BaseBackupPolicyResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BaseBackupPolicyResource; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type BackupPoliciesListNextResponse = BaseBackupPolicyResourceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BaseBackupPolicyResourceList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type BackupInstancesListResponse = BackupInstanceResourceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BackupInstanceResourceList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type BackupInstancesGetResponse = BackupInstanceResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BackupInstanceResource; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type BackupInstancesCreateOrUpdateResponse = BackupInstanceResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BackupInstanceResource; + }; +}; + +/** + * Contains response data for the deleteMethod operation. + */ +export type BackupInstancesDeleteResponse = BackupInstancesDeleteHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BackupInstancesDeleteHeaders; + }; +}; + +/** + * Contains response data for the adhocBackup operation. + */ +export type BackupInstancesAdhocBackupResponse = OperationJobExtendedInfo & BackupInstancesAdhocBackupHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BackupInstancesAdhocBackupHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationJobExtendedInfo; + }; +}; + +/** + * Contains response data for the validateForBackup operation. + */ +export type BackupInstancesValidateForBackupResponse = OperationJobExtendedInfo & BackupInstancesValidateForBackupHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BackupInstancesValidateForBackupHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationJobExtendedInfo; + }; +}; + +/** + * Contains response data for the triggerRehydrate operation. + */ +export type BackupInstancesTriggerRehydrateResponse = BackupInstancesTriggerRehydrateHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BackupInstancesTriggerRehydrateHeaders; + }; +}; + +/** + * Contains response data for the triggerRestore operation. + */ +export type BackupInstancesTriggerRestoreResponse = OperationJobExtendedInfo & BackupInstancesTriggerRestoreHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BackupInstancesTriggerRestoreHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationJobExtendedInfo; + }; +}; + +/** + * Contains response data for the validateForRestore operation. + */ +export type BackupInstancesValidateForRestoreResponse = OperationJobExtendedInfo & BackupInstancesValidateForRestoreHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BackupInstancesValidateForRestoreHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationJobExtendedInfo; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type BackupInstancesBeginCreateOrUpdateResponse = BackupInstanceResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BackupInstanceResource; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type BackupInstancesListNextResponse = BackupInstanceResourceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BackupInstanceResourceList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type RecoveryPointsListResponse = AzureBackupRecoveryPointResourceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AzureBackupRecoveryPointResourceList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type RecoveryPointsGetResponse = AzureBackupRecoveryPointResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AzureBackupRecoveryPointResource; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type RecoveryPointsListNextResponse = AzureBackupRecoveryPointResourceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AzureBackupRecoveryPointResourceList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type JobsListResponse = AzureBackupJobResourceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AzureBackupJobResourceList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type JobsGetResponse = AzureBackupJobResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AzureBackupJobResource; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type JobsListNextResponse = AzureBackupJobResourceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AzureBackupJobResourceList; + }; +}; + +/** + * Contains response data for the find operation. + */ +export type RestorableTimeRangesFindResponse = AzureBackupFindRestorableTimeRangesResponseResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AzureBackupFindRestorableTimeRangesResponseResource; + }; +}; + +/** + * Contains response data for the trigger operation. + */ +export type ExportJobsTriggerResponse = ExportJobsTriggerHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ExportJobsTriggerHeaders; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ExportJobsOperationResultGetResponse = ExportJobsResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExportJobsResult; + }; +}; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/jobsMappers.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/jobsMappers.ts new file mode 100644 index 000000000000..7d52d607aa01 --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/jobsMappers.ts @@ -0,0 +1,78 @@ +/* + * 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, + AbsoluteDeleteOption, + AdhocBasedTaggingCriteria, + AdhocBasedTriggerContext, + AzureBackupDiscreteRecoveryPoint, + AzureBackupFindRestorableTimeRangesResponse, + AzureBackupFindRestorableTimeRangesResponseResource, + AzureBackupJob, + AzureBackupJobResource, + AzureBackupJobResourceList, + AzureBackupParams, + AzureBackupRecoveryPoint, + AzureBackupRecoveryPointResource, + AzureBackupRecoveryPointResourceList, + AzureBackupRule, + AzureOperationalStoreParameters, + AzureRetentionRule, + BackupCriteria, + BackupInstance, + BackupInstanceResource, + BackupInstanceResourceList, + BackupParameters, + BackupPolicy, + BackupSchedule, + BackupVault, + BackupVaultResource, + BackupVaultResourceList, + BaseBackupPolicy, + BaseBackupPolicyResource, + BaseBackupPolicyResourceList, + BasePolicyRule, + BaseResource, + CloudError, + CopyOnExpiryOption, + CopyOption, + CustomCopyOption, + Datasource, + DatasourceSet, + DataStoreInfoBase, + DataStoreParameters, + Day, + DeleteOption, + DppIdentityDetails, + DppResource, + DppResourceList, + DppTrackedResource, + ErrorAdditionalInfo, + ErrorModel, + ImmediateCopyOption, + InnerError, + JobExtendedInfo, + JobSubTask, + PolicyInfo, + PolicyParameters, + ProtectionStatusDetails, + RecoveryPointDataStoreDetails, + RestorableTimeRange, + RestoreJobRecoveryPointDetails, + RetentionTag, + ScheduleBasedBackupCriteria, + ScheduleBasedTriggerContext, + SourceLifeCycle, + StorageSetting, + SystemData, + TaggingCriteria, + TargetCopySetting, + TriggerContext, + UserFacingError +} from "../models/mappers"; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/mappers.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/mappers.ts new file mode 100644 index 000000000000..63041554defc --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/mappers.ts @@ -0,0 +1,3672 @@ +/* + * 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 { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export const CloudError = CloudErrorMapper; +export const BaseResource = BaseResourceMapper; + +export const DeleteOption: msRest.CompositeMapper = { + serializedName: "DeleteOption", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "objectType", + clientName: "objectType" + }, + uberParent: "DeleteOption", + className: "DeleteOption", + modelProperties: { + duration: { + required: true, + serializedName: "duration", + type: { + name: "String" + } + }, + objectType: { + required: true, + serializedName: "objectType", + type: { + name: "String" + } + } + } + } +}; + +export const AbsoluteDeleteOption: msRest.CompositeMapper = { + serializedName: "AbsoluteDeleteOption", + type: { + name: "Composite", + polymorphicDiscriminator: DeleteOption.type.polymorphicDiscriminator, + uberParent: "DeleteOption", + className: "AbsoluteDeleteOption", + modelProperties: { + ...DeleteOption.type.modelProperties + } + } +}; + +export const RecoveryPointsFilters: msRest.CompositeMapper = { + serializedName: "RecoveryPointsFilters", + type: { + name: "Composite", + className: "RecoveryPointsFilters", + modelProperties: { + restorePointDataStoreId: { + serializedName: "restorePointDataStoreId", + type: { + name: "String" + } + }, + isVisible: { + serializedName: "isVisible", + type: { + name: "Boolean" + } + }, + startDate: { + serializedName: "startDate", + type: { + name: "String" + } + }, + endDate: { + serializedName: "endDate", + type: { + name: "String" + } + }, + extendedInfo: { + serializedName: "extendedInfo", + type: { + name: "Boolean" + } + }, + restorePointState: { + serializedName: "restorePointState", + type: { + name: "String" + } + } + } + } +}; + +export const AdhocBackupTriggerOption: msRest.CompositeMapper = { + serializedName: "AdhocBackupTriggerOption", + type: { + name: "Composite", + className: "AdhocBackupTriggerOption", + modelProperties: { + retentionTagOverride: { + serializedName: "retentionTagOverride", + type: { + name: "String" + } + } + } + } +}; + +export const AdHocBackupRuleOptions: msRest.CompositeMapper = { + serializedName: "AdHocBackupRuleOptions", + type: { + name: "Composite", + className: "AdHocBackupRuleOptions", + modelProperties: { + ruleName: { + required: true, + serializedName: "ruleName", + type: { + name: "String" + } + }, + triggerOption: { + required: true, + serializedName: "triggerOption", + type: { + name: "Composite", + className: "AdhocBackupTriggerOption" + } + } + } + } +}; + +export const RetentionTag: msRest.CompositeMapper = { + serializedName: "RetentionTag", + type: { + name: "Composite", + className: "RetentionTag", + modelProperties: { + eTag: { + readOnly: true, + serializedName: "eTag", + type: { + name: "String" + } + }, + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + tagName: { + required: true, + serializedName: "tagName", + type: { + name: "String" + } + } + } + } +}; + +export const AdhocBasedTaggingCriteria: msRest.CompositeMapper = { + serializedName: "AdhocBasedTaggingCriteria", + type: { + name: "Composite", + className: "AdhocBasedTaggingCriteria", + modelProperties: { + tagInfo: { + serializedName: "tagInfo", + type: { + name: "Composite", + className: "RetentionTag" + } + } + } + } +}; + +export const TriggerContext: msRest.CompositeMapper = { + serializedName: "TriggerContext", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "objectType", + clientName: "objectType" + }, + uberParent: "TriggerContext", + className: "TriggerContext", + modelProperties: { + objectType: { + required: true, + serializedName: "objectType", + type: { + name: "String" + } + } + } + } +}; + +export const AdhocBasedTriggerContext: msRest.CompositeMapper = { + serializedName: "AdhocBasedTriggerContext", + type: { + name: "Composite", + polymorphicDiscriminator: TriggerContext.type.polymorphicDiscriminator, + uberParent: "TriggerContext", + className: "AdhocBasedTriggerContext", + modelProperties: { + ...TriggerContext.type.modelProperties, + taggingCriteria: { + required: true, + serializedName: "taggingCriteria", + type: { + name: "Composite", + className: "AdhocBasedTaggingCriteria" + } + } + } + } +}; + +export const RecoveryPointDataStoreDetails: msRest.CompositeMapper = { + serializedName: "RecoveryPointDataStoreDetails", + type: { + name: "Composite", + className: "RecoveryPointDataStoreDetails", + modelProperties: { + creationTime: { + serializedName: "creationTime", + type: { + name: "DateTime" + } + }, + expiryTime: { + serializedName: "expiryTime", + type: { + name: "DateTime" + } + }, + id: { + serializedName: "id", + type: { + name: "String" + } + }, + metaData: { + serializedName: "metaData", + type: { + name: "String" + } + }, + state: { + serializedName: "state", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + visible: { + serializedName: "visible", + type: { + name: "Boolean" + } + }, + rehydrationExpiryTime: { + readOnly: true, + serializedName: "rehydrationExpiryTime", + type: { + name: "DateTime" + } + }, + rehydrationStatus: { + readOnly: true, + serializedName: "rehydrationStatus", + type: { + name: "String" + } + } + } + } +}; + +export const AzureBackupRecoveryPoint: msRest.CompositeMapper = { + serializedName: "AzureBackupRecoveryPoint", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "objectType", + clientName: "objectType" + }, + uberParent: "AzureBackupRecoveryPoint", + className: "AzureBackupRecoveryPoint", + modelProperties: { + objectType: { + required: true, + serializedName: "objectType", + type: { + name: "String" + } + } + } + } +}; + +export const AzureBackupDiscreteRecoveryPoint: msRest.CompositeMapper = { + serializedName: "AzureBackupDiscreteRecoveryPoint", + type: { + name: "Composite", + polymorphicDiscriminator: AzureBackupRecoveryPoint.type.polymorphicDiscriminator, + uberParent: "AzureBackupRecoveryPoint", + className: "AzureBackupDiscreteRecoveryPoint", + modelProperties: { + ...AzureBackupRecoveryPoint.type.modelProperties, + friendlyName: { + serializedName: "friendlyName", + type: { + name: "String" + } + }, + recoveryPointDataStoresDetails: { + serializedName: "recoveryPointDataStoresDetails", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RecoveryPointDataStoreDetails" + } + } + } + }, + recoveryPointTime: { + required: true, + serializedName: "recoveryPointTime", + type: { + name: "DateTime" + } + }, + policyName: { + serializedName: "policyName", + type: { + name: "String" + } + }, + policyVersion: { + serializedName: "policyVersion", + type: { + name: "String" + } + }, + recoveryPointId: { + serializedName: "recoveryPointId", + type: { + name: "String" + } + }, + recoveryPointType: { + serializedName: "recoveryPointType", + type: { + name: "String" + } + }, + retentionTagName: { + serializedName: "retentionTagName", + type: { + name: "String" + } + }, + retentionTagVersion: { + serializedName: "retentionTagVersion", + type: { + name: "String" + } + } + } + } +}; + +export const AzureBackupFindRestorableTimeRangesRequest: msRest.CompositeMapper = { + serializedName: "AzureBackupFindRestorableTimeRangesRequest", + type: { + name: "Composite", + className: "AzureBackupFindRestorableTimeRangesRequest", + modelProperties: { + sourceDataStoreType: { + required: true, + serializedName: "sourceDataStoreType", + type: { + name: "String" + } + }, + startTime: { + serializedName: "startTime", + type: { + name: "String" + } + }, + endTime: { + serializedName: "endTime", + type: { + name: "String" + } + } + } + } +}; + +export const DppWorkerRequest: msRest.CompositeMapper = { + serializedName: "DppWorkerRequest", + type: { + name: "Composite", + className: "DppWorkerRequest", + modelProperties: { + subscriptionId: { + serializedName: "subscriptionId", + type: { + name: "String" + } + }, + uri: { + serializedName: "uri", + type: { + name: "String" + } + }, + headers: { + serializedName: "headers", + type: { + name: "Dictionary", + value: { + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + }, + supportedGroupVersions: { + serializedName: "supportedGroupVersions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + cultureInfo: { + serializedName: "cultureInfo", + type: { + name: "String" + } + }, + parameters: { + serializedName: "parameters", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + httpMethod: { + serializedName: "httpMethod", + type: { + name: "String" + } + } + } + } +}; + +export const AzureBackupFindRestorableTimeRangesRequestResource: msRest.CompositeMapper = { + serializedName: "AzureBackupFindRestorableTimeRangesRequestResource", + type: { + name: "Composite", + className: "AzureBackupFindRestorableTimeRangesRequestResource", + modelProperties: { + ...DppWorkerRequest.type.modelProperties, + content: { + serializedName: "content", + type: { + name: "Composite", + className: "AzureBackupFindRestorableTimeRangesRequest" + } + } + } + } +}; + +export const RestorableTimeRange: msRest.CompositeMapper = { + serializedName: "RestorableTimeRange", + type: { + name: "Composite", + className: "RestorableTimeRange", + modelProperties: { + startTime: { + required: true, + serializedName: "startTime", + type: { + name: "String" + } + }, + endTime: { + required: true, + serializedName: "endTime", + type: { + name: "String" + } + }, + objectType: { + serializedName: "objectType", + type: { + name: "String" + } + } + } + } +}; + +export const AzureBackupFindRestorableTimeRangesResponse: msRest.CompositeMapper = { + serializedName: "AzureBackupFindRestorableTimeRangesResponse", + type: { + name: "Composite", + className: "AzureBackupFindRestorableTimeRangesResponse", + modelProperties: { + restorableTimeRanges: { + serializedName: "restorableTimeRanges", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RestorableTimeRange" + } + } + } + }, + objectType: { + serializedName: "objectType", + type: { + name: "String" + } + } + } + } +}; + +export const DppResource: msRest.CompositeMapper = { + serializedName: "DppResource", + type: { + name: "Composite", + className: "DppResource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const AzureBackupFindRestorableTimeRangesResponseResource: msRest.CompositeMapper = { + serializedName: "AzureBackupFindRestorableTimeRangesResponseResource", + type: { + name: "Composite", + className: "AzureBackupFindRestorableTimeRangesResponseResource", + modelProperties: { + ...DppResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "AzureBackupFindRestorableTimeRangesResponse" + } + } + } + } +}; + +export const InnerError: msRest.CompositeMapper = { + serializedName: "InnerError", + type: { + name: "Composite", + className: "InnerError", + modelProperties: { + additionalInfo: { + serializedName: "additionalInfo", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + code: { + serializedName: "code", + type: { + name: "String" + } + }, + embeddedInnerError: { + serializedName: "embeddedInnerError", + type: { + name: "Composite", + className: "InnerError" + } + } + } + } +}; + +export const UserFacingError: msRest.CompositeMapper = { + serializedName: "UserFacingError", + type: { + name: "Composite", + className: "UserFacingError", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + details: { + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UserFacingError" + } + } + } + }, + innerError: { + serializedName: "innerError", + type: { + name: "Composite", + className: "InnerError" + } + }, + isRetryable: { + serializedName: "isRetryable", + type: { + name: "Boolean" + } + }, + isUserError: { + serializedName: "isUserError", + type: { + name: "Boolean" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + }, + recommendedAction: { + serializedName: "recommendedAction", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + target: { + serializedName: "target", + type: { + name: "String" + } + } + } + } +}; + +export const RestoreJobRecoveryPointDetails: msRest.CompositeMapper = { + serializedName: "RestoreJobRecoveryPointDetails", + type: { + name: "Composite", + className: "RestoreJobRecoveryPointDetails", + modelProperties: { + recoveryPointID: { + serializedName: "recoveryPointID", + type: { + name: "String" + } + }, + recoveryPointTime: { + serializedName: "recoveryPointTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const JobSubTask: msRest.CompositeMapper = { + serializedName: "JobSubTask", + type: { + name: "Composite", + className: "JobSubTask", + modelProperties: { + additionalDetails: { + serializedName: "additionalDetails", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + taskId: { + required: true, + serializedName: "taskId", + type: { + name: "Number" + } + }, + taskName: { + required: true, + serializedName: "taskName", + type: { + name: "String" + } + }, + taskProgress: { + readOnly: true, + serializedName: "taskProgress", + type: { + name: "String" + } + }, + taskStatus: { + required: true, + serializedName: "taskStatus", + type: { + name: "String" + } + } + } + } +}; + +export const JobExtendedInfo: msRest.CompositeMapper = { + serializedName: "JobExtendedInfo", + type: { + name: "Composite", + className: "JobExtendedInfo", + modelProperties: { + additionalDetails: { + serializedName: "additionalDetails", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + backupInstanceState: { + readOnly: true, + serializedName: "backupInstanceState", + type: { + name: "String" + } + }, + dataTransferredInBytes: { + readOnly: true, + serializedName: "dataTransferredInBytes", + type: { + name: "Number" + } + }, + recoveryDestination: { + readOnly: true, + serializedName: "recoveryDestination", + type: { + name: "String" + } + }, + sourceRecoverPoint: { + readOnly: true, + serializedName: "sourceRecoverPoint", + type: { + name: "Composite", + className: "RestoreJobRecoveryPointDetails" + } + }, + subTasks: { + readOnly: true, + serializedName: "subTasks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobSubTask" + } + } + } + }, + targetRecoverPoint: { + readOnly: true, + serializedName: "targetRecoverPoint", + type: { + name: "Composite", + className: "RestoreJobRecoveryPointDetails" + } + } + } + } +}; + +export const AzureBackupJob: msRest.CompositeMapper = { + serializedName: "AzureBackupJob", + type: { + name: "Composite", + className: "AzureBackupJob", + modelProperties: { + activityID: { + required: true, + serializedName: "activityID", + type: { + name: "String" + } + }, + backupInstanceFriendlyName: { + required: true, + serializedName: "backupInstanceFriendlyName", + type: { + name: "String" + } + }, + backupInstanceId: { + readOnly: true, + serializedName: "backupInstanceId", + type: { + name: "String" + } + }, + dataSourceId: { + required: true, + serializedName: "dataSourceId", + type: { + name: "String" + } + }, + dataSourceLocation: { + required: true, + serializedName: "dataSourceLocation", + type: { + name: "String" + } + }, + dataSourceName: { + required: true, + serializedName: "dataSourceName", + type: { + name: "String" + } + }, + dataSourceSetName: { + required: true, + serializedName: "dataSourceSetName", + type: { + name: "String" + } + }, + dataSourceType: { + required: true, + serializedName: "dataSourceType", + type: { + name: "String" + } + }, + duration: { + serializedName: "duration", + type: { + name: "String" + } + }, + endTime: { + readOnly: true, + serializedName: "endTime", + type: { + name: "DateTime" + } + }, + errorDetails: { + readOnly: true, + serializedName: "errorDetails", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UserFacingError" + } + } + } + }, + extendedInfo: { + readOnly: true, + serializedName: "extendedInfo", + type: { + name: "Composite", + className: "JobExtendedInfo" + } + }, + isUserTriggered: { + required: true, + serializedName: "isUserTriggered", + type: { + name: "Boolean" + } + }, + operation: { + required: true, + serializedName: "operation", + type: { + name: "String" + } + }, + operationCategory: { + required: true, + serializedName: "operationCategory", + type: { + name: "String" + } + }, + policyId: { + readOnly: true, + serializedName: "policyId", + type: { + name: "String" + } + }, + policyName: { + readOnly: true, + serializedName: "policyName", + type: { + name: "String" + } + }, + progressEnabled: { + required: true, + serializedName: "progressEnabled", + type: { + name: "Boolean" + } + }, + progressUrl: { + readOnly: true, + serializedName: "progressUrl", + type: { + name: "String" + } + }, + restoreType: { + readOnly: true, + serializedName: "restoreType", + type: { + name: "String" + } + }, + sourceResourceGroup: { + required: true, + serializedName: "sourceResourceGroup", + type: { + name: "String" + } + }, + sourceSubscriptionID: { + required: true, + serializedName: "sourceSubscriptionID", + type: { + name: "String" + } + }, + startTime: { + required: true, + serializedName: "startTime", + type: { + name: "DateTime" + } + }, + status: { + required: true, + serializedName: "status", + type: { + name: "String" + } + }, + subscriptionId: { + required: true, + serializedName: "subscriptionId", + type: { + name: "String" + } + }, + supportedActions: { + required: true, + serializedName: "supportedActions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + vaultName: { + required: true, + serializedName: "vaultName", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + sourceDataStoreName: { + serializedName: "sourceDataStoreName", + type: { + name: "String" + } + }, + destinationDataStoreName: { + serializedName: "destinationDataStoreName", + type: { + name: "String" + } + } + } + } +}; + +export const AzureBackupJobResource: msRest.CompositeMapper = { + serializedName: "AzureBackupJobResource", + type: { + name: "Composite", + className: "AzureBackupJobResource", + modelProperties: { + ...DppResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "AzureBackupJob" + } + } + } + } +}; + +export const BackupParameters: msRest.CompositeMapper = { + serializedName: "BackupParameters", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "objectType", + clientName: "objectType" + }, + uberParent: "BackupParameters", + className: "BackupParameters", + modelProperties: { + objectType: { + required: true, + serializedName: "objectType", + type: { + name: "String" + } + } + } + } +}; + +export const AzureBackupParams: msRest.CompositeMapper = { + serializedName: "AzureBackupParams", + type: { + name: "Composite", + polymorphicDiscriminator: BackupParameters.type.polymorphicDiscriminator, + uberParent: "BackupParameters", + className: "AzureBackupParams", + modelProperties: { + ...BackupParameters.type.modelProperties, + backupType: { + required: true, + serializedName: "backupType", + type: { + name: "String" + } + } + } + } +}; + +export const AzureBackupRestoreRequest: msRest.CompositeMapper = { + serializedName: "AzureBackupRestoreRequest", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "objectType", + clientName: "objectType" + }, + uberParent: "AzureBackupRestoreRequest", + className: "AzureBackupRestoreRequest", + modelProperties: { + restoreTargetInfo: { + required: true, + serializedName: "restoreTargetInfo", + defaultValue: {}, + type: { + name: "Composite", + className: "RestoreTargetInfoBase" + } + }, + sourceDataStoreType: { + required: true, + serializedName: "sourceDataStoreType", + type: { + name: "String" + } + }, + objectType: { + required: true, + serializedName: "objectType", + type: { + name: "String" + } + } + } + } +}; + +export const AzureBackupRecoveryPointBasedRestoreRequest: msRest.CompositeMapper = { + serializedName: "AzureBackupRecoveryPointBasedRestoreRequest", + type: { + name: "Composite", + polymorphicDiscriminator: AzureBackupRestoreRequest.type.polymorphicDiscriminator, + uberParent: "AzureBackupRestoreRequest", + className: "AzureBackupRecoveryPointBasedRestoreRequest", + modelProperties: { + ...AzureBackupRestoreRequest.type.modelProperties, + recoveryPointId: { + required: true, + serializedName: "recoveryPointId", + type: { + name: "String" + } + } + } + } +}; + +export const AzureBackupRecoveryPointResource: msRest.CompositeMapper = { + serializedName: "AzureBackupRecoveryPointResource", + type: { + name: "Composite", + className: "AzureBackupRecoveryPointResource", + modelProperties: { + ...DppResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "AzureBackupRecoveryPoint" + } + } + } + } +}; + +export const AzureBackupRehydrationRequest: msRest.CompositeMapper = { + serializedName: "AzureBackupRehydrationRequest", + type: { + name: "Composite", + className: "AzureBackupRehydrationRequest", + modelProperties: { + recoveryPointId: { + required: true, + serializedName: "recoveryPointId", + type: { + name: "String" + } + }, + rehydrationPriority: { + serializedName: "rehydrationPriority", + type: { + name: "String" + } + }, + rehydrationRetentionDuration: { + required: true, + serializedName: "rehydrationRetentionDuration", + type: { + name: "String" + } + } + } + } +}; + +export const RestoreTargetInfoBase: msRest.CompositeMapper = { + serializedName: "RestoreTargetInfoBase", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "objectType", + clientName: "objectType" + }, + uberParent: "RestoreTargetInfoBase", + className: "RestoreTargetInfoBase", + modelProperties: { + recoveryOption: { + required: true, + isConstant: true, + serializedName: "recoveryOption", + defaultValue: 'FailIfExists', + type: { + name: "String" + } + }, + restoreLocation: { + serializedName: "restoreLocation", + type: { + name: "String" + } + }, + objectType: { + required: true, + serializedName: "objectType", + type: { + name: "String" + } + } + } + } +}; + +export const AzureBackupRestoreWithRehydrationRequest: msRest.CompositeMapper = { + serializedName: "AzureBackupRestoreWithRehydrationRequest", + type: { + name: "Composite", + polymorphicDiscriminator: AzureBackupRestoreRequest.type.polymorphicDiscriminator, + uberParent: "AzureBackupRestoreRequest", + className: "AzureBackupRestoreWithRehydrationRequest", + modelProperties: { + ...AzureBackupRecoveryPointBasedRestoreRequest.type.modelProperties, + rehydrationPriority: { + required: true, + serializedName: "rehydrationPriority", + type: { + name: "String" + } + }, + rehydrationRetentionDuration: { + required: true, + serializedName: "rehydrationRetentionDuration", + type: { + name: "String" + } + } + } + } +}; + +export const AzureBackupRecoveryTimeBasedRestoreRequest: msRest.CompositeMapper = { + serializedName: "AzureBackupRecoveryTimeBasedRestoreRequest", + type: { + name: "Composite", + polymorphicDiscriminator: AzureBackupRestoreRequest.type.polymorphicDiscriminator, + uberParent: "AzureBackupRestoreRequest", + className: "AzureBackupRecoveryTimeBasedRestoreRequest", + modelProperties: { + ...AzureBackupRestoreRequest.type.modelProperties, + recoveryPointTime: { + required: true, + serializedName: "recoveryPointTime", + type: { + name: "String" + } + } + } + } +}; + +export const DataStoreInfoBase: msRest.CompositeMapper = { + serializedName: "DataStoreInfoBase", + type: { + name: "Composite", + className: "DataStoreInfoBase", + modelProperties: { + dataStoreType: { + required: true, + serializedName: "dataStoreType", + type: { + name: "String" + } + }, + objectType: { + required: true, + serializedName: "objectType", + type: { + name: "String" + } + } + } + } +}; + +export const BasePolicyRule: msRest.CompositeMapper = { + serializedName: "BasePolicyRule", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "objectType", + clientName: "objectType" + }, + uberParent: "BasePolicyRule", + className: "BasePolicyRule", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + objectType: { + required: true, + serializedName: "objectType", + type: { + name: "String" + } + } + } + } +}; + +export const AzureBackupRule: msRest.CompositeMapper = { + serializedName: "AzureBackupRule", + type: { + name: "Composite", + polymorphicDiscriminator: BasePolicyRule.type.polymorphicDiscriminator, + uberParent: "BasePolicyRule", + className: "AzureBackupRule", + modelProperties: { + ...BasePolicyRule.type.modelProperties, + backupParameters: { + serializedName: "backupParameters", + type: { + name: "Composite", + className: "BackupParameters" + } + }, + dataStore: { + required: true, + serializedName: "dataStore", + type: { + name: "Composite", + className: "DataStoreInfoBase" + } + }, + trigger: { + required: true, + serializedName: "trigger", + type: { + name: "Composite", + className: "TriggerContext" + } + } + } + } +}; + +export const DataStoreParameters: msRest.CompositeMapper = { + serializedName: "DataStoreParameters", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "objectType", + clientName: "objectType" + }, + uberParent: "DataStoreParameters", + className: "DataStoreParameters", + modelProperties: { + dataStoreType: { + required: true, + serializedName: "dataStoreType", + type: { + name: "String" + } + }, + objectType: { + required: true, + serializedName: "objectType", + type: { + name: "String" + } + } + } + } +}; + +export const AzureOperationalStoreParameters: msRest.CompositeMapper = { + serializedName: "AzureOperationalStoreParameters", + type: { + name: "Composite", + polymorphicDiscriminator: DataStoreParameters.type.polymorphicDiscriminator, + uberParent: "DataStoreParameters", + className: "AzureOperationalStoreParameters", + modelProperties: { + ...DataStoreParameters.type.modelProperties, + resourceGroupId: { + serializedName: "resourceGroupId", + type: { + name: "String" + } + } + } + } +}; + +export const CopyOption: msRest.CompositeMapper = { + serializedName: "CopyOption", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "objectType", + clientName: "objectType" + }, + uberParent: "CopyOption", + className: "CopyOption", + modelProperties: { + objectType: { + required: true, + serializedName: "objectType", + type: { + name: "String" + } + } + } + } +}; + +export const TargetCopySetting: msRest.CompositeMapper = { + serializedName: "TargetCopySetting", + type: { + name: "Composite", + className: "TargetCopySetting", + modelProperties: { + copyAfter: { + required: true, + serializedName: "copyAfter", + type: { + name: "Composite", + className: "CopyOption" + } + }, + dataStore: { + required: true, + serializedName: "dataStore", + type: { + name: "Composite", + className: "DataStoreInfoBase" + } + } + } + } +}; + +export const SourceLifeCycle: msRest.CompositeMapper = { + serializedName: "SourceLifeCycle", + type: { + name: "Composite", + className: "SourceLifeCycle", + modelProperties: { + deleteAfter: { + required: true, + serializedName: "deleteAfter", + type: { + name: "Composite", + className: "DeleteOption" + } + }, + sourceDataStore: { + required: true, + serializedName: "sourceDataStore", + type: { + name: "Composite", + className: "DataStoreInfoBase" + } + }, + targetDataStoreCopySettings: { + serializedName: "targetDataStoreCopySettings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TargetCopySetting" + } + } + } + } + } + } +}; + +export const AzureRetentionRule: msRest.CompositeMapper = { + serializedName: "AzureRetentionRule", + type: { + name: "Composite", + polymorphicDiscriminator: BasePolicyRule.type.polymorphicDiscriminator, + uberParent: "BasePolicyRule", + className: "AzureRetentionRule", + modelProperties: { + ...BasePolicyRule.type.modelProperties, + isDefault: { + serializedName: "isDefault", + type: { + name: "Boolean" + } + }, + lifecycles: { + required: true, + serializedName: "lifecycles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SourceLifeCycle" + } + } + } + } + } + } +}; + +export const BackupCriteria: msRest.CompositeMapper = { + serializedName: "BackupCriteria", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "objectType", + clientName: "objectType" + }, + uberParent: "BackupCriteria", + className: "BackupCriteria", + modelProperties: { + objectType: { + required: true, + serializedName: "objectType", + type: { + name: "String" + } + } + } + } +}; + +export const Datasource: msRest.CompositeMapper = { + serializedName: "Datasource", + type: { + name: "Composite", + className: "Datasource", + modelProperties: { + datasourceType: { + serializedName: "datasourceType", + type: { + name: "String" + } + }, + objectType: { + serializedName: "objectType", + type: { + name: "String" + } + }, + resourceID: { + required: true, + serializedName: "resourceID", + type: { + name: "String" + } + }, + resourceLocation: { + serializedName: "resourceLocation", + type: { + name: "String" + } + }, + resourceName: { + serializedName: "resourceName", + type: { + name: "String" + } + }, + resourceType: { + serializedName: "resourceType", + type: { + name: "String" + } + }, + resourceUri: { + serializedName: "resourceUri", + type: { + name: "String" + } + } + } + } +}; + +export const DatasourceSet: msRest.CompositeMapper = { + serializedName: "DatasourceSet", + type: { + name: "Composite", + className: "DatasourceSet", + modelProperties: { + datasourceType: { + serializedName: "datasourceType", + type: { + name: "String" + } + }, + objectType: { + serializedName: "objectType", + type: { + name: "String" + } + }, + resourceID: { + required: true, + serializedName: "resourceID", + type: { + name: "String" + } + }, + resourceLocation: { + serializedName: "resourceLocation", + type: { + name: "String" + } + }, + resourceName: { + serializedName: "resourceName", + type: { + name: "String" + } + }, + resourceType: { + serializedName: "resourceType", + type: { + name: "String" + } + }, + resourceUri: { + serializedName: "resourceUri", + type: { + name: "String" + } + } + } + } +}; + +export const PolicyParameters: msRest.CompositeMapper = { + serializedName: "PolicyParameters", + type: { + name: "Composite", + className: "PolicyParameters", + modelProperties: { + dataStoreParametersList: { + serializedName: "dataStoreParametersList", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataStoreParameters" + } + } + } + } + } + } +}; + +export const PolicyInfo: msRest.CompositeMapper = { + serializedName: "PolicyInfo", + type: { + name: "Composite", + className: "PolicyInfo", + modelProperties: { + policyId: { + required: true, + serializedName: "policyId", + type: { + name: "String" + } + }, + policyVersion: { + readOnly: true, + serializedName: "policyVersion", + type: { + name: "String" + } + }, + policyParameters: { + serializedName: "policyParameters", + type: { + name: "Composite", + className: "PolicyParameters" + } + } + } + } +}; + +export const ProtectionStatusDetails: msRest.CompositeMapper = { + serializedName: "ProtectionStatusDetails", + type: { + name: "Composite", + className: "ProtectionStatusDetails", + modelProperties: { + errorDetails: { + serializedName: "errorDetails", + type: { + name: "Composite", + className: "UserFacingError" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + } + } + } +}; + +export const BackupInstance: msRest.CompositeMapper = { + serializedName: "BackupInstance", + type: { + name: "Composite", + className: "BackupInstance", + modelProperties: { + friendlyName: { + serializedName: "friendlyName", + type: { + name: "String" + } + }, + dataSourceInfo: { + required: true, + serializedName: "dataSourceInfo", + type: { + name: "Composite", + className: "Datasource" + } + }, + dataSourceSetInfo: { + serializedName: "dataSourceSetInfo", + type: { + name: "Composite", + className: "DatasourceSet" + } + }, + policyInfo: { + required: true, + serializedName: "policyInfo", + type: { + name: "Composite", + className: "PolicyInfo" + } + }, + protectionStatus: { + readOnly: true, + serializedName: "protectionStatus", + type: { + name: "Composite", + className: "ProtectionStatusDetails" + } + }, + currentProtectionState: { + readOnly: true, + serializedName: "currentProtectionState", + type: { + name: "String" + } + }, + protectionErrorDetails: { + readOnly: true, + serializedName: "protectionErrorDetails", + type: { + name: "Composite", + className: "UserFacingError" + } + }, + provisioningState: { + readOnly: true, + serializedName: "provisioningState", + type: { + name: "String" + } + }, + objectType: { + required: true, + serializedName: "objectType", + type: { + name: "String" + } + } + } + } +}; + +export const BackupInstanceResource: msRest.CompositeMapper = { + serializedName: "BackupInstanceResource", + type: { + name: "Composite", + className: "BackupInstanceResource", + modelProperties: { + ...DppResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "BackupInstance" + } + } + } + } +}; + +export const BaseBackupPolicy: msRest.CompositeMapper = { + serializedName: "BaseBackupPolicy", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "objectType", + clientName: "objectType" + }, + uberParent: "BaseBackupPolicy", + className: "BaseBackupPolicy", + modelProperties: { + datasourceTypes: { + required: true, + serializedName: "datasourceTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + objectType: { + required: true, + serializedName: "objectType", + type: { + name: "String" + } + } + } + } +}; + +export const BackupPolicy: msRest.CompositeMapper = { + serializedName: "BackupPolicy", + type: { + name: "Composite", + polymorphicDiscriminator: BaseBackupPolicy.type.polymorphicDiscriminator, + uberParent: "BaseBackupPolicy", + className: "BackupPolicy", + modelProperties: { + ...BaseBackupPolicy.type.modelProperties, + policyRules: { + required: true, + serializedName: "policyRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BasePolicyRule" + } + } + } + } + } + } +}; + +export const BackupSchedule: msRest.CompositeMapper = { + serializedName: "BackupSchedule", + type: { + name: "Composite", + className: "BackupSchedule", + modelProperties: { + repeatingTimeIntervals: { + required: true, + serializedName: "repeatingTimeIntervals", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const StorageSetting: msRest.CompositeMapper = { + serializedName: "StorageSetting", + type: { + name: "Composite", + className: "StorageSetting", + modelProperties: { + datastoreType: { + serializedName: "datastoreType", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const BackupVault: msRest.CompositeMapper = { + serializedName: "BackupVault", + type: { + name: "Composite", + className: "BackupVault", + modelProperties: { + provisioningState: { + readOnly: true, + serializedName: "provisioningState", + type: { + name: "String" + } + }, + storageSettings: { + required: true, + serializedName: "storageSettings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StorageSetting" + } + } + } + } + } + } +}; + +export const DppTrackedResource: msRest.CompositeMapper = { + serializedName: "DppTrackedResource", + type: { + name: "Composite", + className: "DppTrackedResource", + modelProperties: { + eTag: { + serializedName: "eTag", + type: { + name: "String" + } + }, + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "DppIdentityDetails" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const BackupVaultResource: msRest.CompositeMapper = { + serializedName: "BackupVaultResource", + type: { + name: "Composite", + className: "BackupVaultResource", + modelProperties: { + ...DppTrackedResource.type.modelProperties, + properties: { + required: true, + serializedName: "properties", + type: { + name: "Composite", + className: "BackupVault" + } + } + } + } +}; + +export const BaseBackupPolicyResource: msRest.CompositeMapper = { + serializedName: "BaseBackupPolicyResource", + type: { + name: "Composite", + className: "BaseBackupPolicyResource", + modelProperties: { + ...DppResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "BaseBackupPolicy" + } + } + } + } +}; + +export const CheckNameAvailabilityRequest: msRest.CompositeMapper = { + serializedName: "CheckNameAvailabilityRequest", + type: { + name: "Composite", + className: "CheckNameAvailabilityRequest", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const CheckNameAvailabilityResult: msRest.CompositeMapper = { + serializedName: "CheckNameAvailabilityResult", + type: { + name: "Composite", + className: "CheckNameAvailabilityResult", + modelProperties: { + message: { + serializedName: "message", + type: { + name: "String" + } + }, + nameAvailable: { + serializedName: "nameAvailable", + type: { + name: "Boolean" + } + }, + reason: { + serializedName: "reason", + type: { + name: "String" + } + } + } + } +}; + +export const ClientDiscoveryDisplay: msRest.CompositeMapper = { + serializedName: "ClientDiscoveryDisplay", + type: { + name: "Composite", + className: "ClientDiscoveryDisplay", + modelProperties: { + description: { + serializedName: "description", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + provider: { + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + type: { + name: "String" + } + } + } + } +}; + +export const ClientDiscoveryForLogSpecification: msRest.CompositeMapper = { + serializedName: "ClientDiscoveryForLogSpecification", + type: { + name: "Composite", + className: "ClientDiscoveryForLogSpecification", + modelProperties: { + blobDuration: { + serializedName: "blobDuration", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + +export const ClientDiscoveryForServiceSpecification: msRest.CompositeMapper = { + serializedName: "ClientDiscoveryForServiceSpecification", + type: { + name: "Composite", + className: "ClientDiscoveryForServiceSpecification", + modelProperties: { + logSpecifications: { + serializedName: "logSpecifications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ClientDiscoveryForLogSpecification" + } + } + } + } + } + } +}; + +export const ClientDiscoveryForProperties: msRest.CompositeMapper = { + serializedName: "ClientDiscoveryForProperties", + type: { + name: "Composite", + className: "ClientDiscoveryForProperties", + modelProperties: { + serviceSpecification: { + serializedName: "serviceSpecification", + type: { + name: "Composite", + className: "ClientDiscoveryForServiceSpecification" + } + } + } + } +}; + +export const ClientDiscoveryValueForSingleApi: msRest.CompositeMapper = { + serializedName: "ClientDiscoveryValueForSingleApi", + type: { + name: "Composite", + className: "ClientDiscoveryValueForSingleApi", + modelProperties: { + display: { + serializedName: "display", + type: { + name: "Composite", + className: "ClientDiscoveryDisplay" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + isDataAction: { + serializedName: "isDataAction", + type: { + name: "Boolean" + } + }, + origin: { + serializedName: "origin", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ClientDiscoveryForProperties" + } + } + } + } +}; + +export const ErrorAdditionalInfo: msRest.CompositeMapper = { + serializedName: "ErrorAdditionalInfo", + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + info: { + readOnly: true, + serializedName: "info", + type: { + name: "Object" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorModel: msRest.CompositeMapper = { + serializedName: "Error", + type: { + name: "Composite", + className: "ErrorModel", + modelProperties: { + additionalInfo: { + readOnly: true, + serializedName: "additionalInfo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + }, + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + details: { + readOnly: true, + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorModel" + } + } + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + target: { + readOnly: true, + serializedName: "target", + type: { + name: "String" + } + } + } + } +}; + +export const CopyOnExpiryOption: msRest.CompositeMapper = { + serializedName: "CopyOnExpiryOption", + type: { + name: "Composite", + polymorphicDiscriminator: CopyOption.type.polymorphicDiscriminator, + uberParent: "CopyOption", + className: "CopyOnExpiryOption", + modelProperties: { + ...CopyOption.type.modelProperties + } + } +}; + +export const CustomCopyOption: msRest.CompositeMapper = { + serializedName: "CustomCopyOption", + type: { + name: "Composite", + polymorphicDiscriminator: CopyOption.type.polymorphicDiscriminator, + uberParent: "CopyOption", + className: "CustomCopyOption", + modelProperties: { + ...CopyOption.type.modelProperties, + duration: { + serializedName: "duration", + type: { + name: "String" + } + } + } + } +}; + +export const Day: msRest.CompositeMapper = { + serializedName: "Day", + type: { + name: "Composite", + className: "Day", + modelProperties: { + date: { + serializedName: "date", + type: { + name: "Number" + } + }, + isLast: { + serializedName: "isLast", + type: { + name: "Boolean" + } + } + } + } +}; + +export const DppIdentityDetails: msRest.CompositeMapper = { + serializedName: "DppIdentityDetails", + type: { + name: "Composite", + className: "DppIdentityDetails", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + tenantId: { + readOnly: true, + serializedName: "tenantId", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const SystemData: msRest.CompositeMapper = { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + +export const DppResourceList: msRest.CompositeMapper = { + serializedName: "DppResourceList", + type: { + name: "Composite", + className: "DppResourceList", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const DppTrackedResourceList: msRest.CompositeMapper = { + serializedName: "DppTrackedResourceList", + type: { + name: "Composite", + className: "DppTrackedResourceList", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ExportJobsResult: msRest.CompositeMapper = { + serializedName: "ExportJobsResult", + type: { + name: "Composite", + className: "ExportJobsResult", + modelProperties: { + blobUrl: { + readOnly: true, + serializedName: "blobUrl", + type: { + name: "String" + } + }, + blobSasKey: { + readOnly: true, + serializedName: "blobSasKey", + type: { + name: "String" + } + }, + excelFileBlobUrl: { + readOnly: true, + serializedName: "excelFileBlobUrl", + type: { + name: "String" + } + }, + excelFileBlobSasKey: { + readOnly: true, + serializedName: "excelFileBlobSasKey", + type: { + name: "String" + } + } + } + } +}; + +export const FeatureValidationRequestBase: msRest.CompositeMapper = { + serializedName: "FeatureValidationRequestBase", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "objectType", + clientName: "objectType" + }, + uberParent: "FeatureValidationRequestBase", + className: "FeatureValidationRequestBase", + modelProperties: { + objectType: { + required: true, + serializedName: "objectType", + type: { + name: "String" + } + } + } + } +}; + +export const FeatureValidationRequest: msRest.CompositeMapper = { + serializedName: "FeatureValidationRequest", + type: { + name: "Composite", + polymorphicDiscriminator: FeatureValidationRequestBase.type.polymorphicDiscriminator, + uberParent: "FeatureValidationRequestBase", + className: "FeatureValidationRequest", + modelProperties: { + ...FeatureValidationRequestBase.type.modelProperties, + featureType: { + serializedName: "featureType", + type: { + name: "String" + } + }, + featureName: { + serializedName: "featureName", + type: { + name: "String" + } + } + } + } +}; + +export const SupportedFeature: msRest.CompositeMapper = { + serializedName: "SupportedFeature", + type: { + name: "Composite", + className: "SupportedFeature", + modelProperties: { + featureName: { + serializedName: "featureName", + type: { + name: "String" + } + }, + supportStatus: { + serializedName: "supportStatus", + type: { + name: "String" + } + }, + exposureControlledFeatures: { + serializedName: "exposureControlledFeatures", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const FeatureValidationResponseBase: msRest.CompositeMapper = { + serializedName: "FeatureValidationResponseBase", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "objectType", + clientName: "objectType" + }, + uberParent: "FeatureValidationResponseBase", + className: "FeatureValidationResponseBase", + modelProperties: { + objectType: { + required: true, + serializedName: "objectType", + type: { + name: "String" + } + } + } + } +}; + +export const FeatureValidationResponse: msRest.CompositeMapper = { + serializedName: "FeatureValidationResponse", + type: { + name: "Composite", + polymorphicDiscriminator: FeatureValidationResponseBase.type.polymorphicDiscriminator, + uberParent: "FeatureValidationResponseBase", + className: "FeatureValidationResponse", + modelProperties: { + ...FeatureValidationResponseBase.type.modelProperties, + featureType: { + serializedName: "featureType", + type: { + name: "String" + } + }, + features: { + serializedName: "features", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SupportedFeature" + } + } + } + } + } + } +}; + +export const ImmediateCopyOption: msRest.CompositeMapper = { + serializedName: "ImmediateCopyOption", + type: { + name: "Composite", + polymorphicDiscriminator: CopyOption.type.polymorphicDiscriminator, + uberParent: "CopyOption", + className: "ImmediateCopyOption", + modelProperties: { + ...CopyOption.type.modelProperties + } + } +}; + +export const ItemLevelRestoreCriteria: msRest.CompositeMapper = { + serializedName: "ItemLevelRestoreCriteria", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "objectType", + clientName: "objectType" + }, + uberParent: "ItemLevelRestoreCriteria", + className: "ItemLevelRestoreCriteria", + modelProperties: { + objectType: { + required: true, + serializedName: "objectType", + type: { + name: "String" + } + } + } + } +}; + +export const ItemLevelRestoreTargetInfo: msRest.CompositeMapper = { + serializedName: "ItemLevelRestoreTargetInfo", + type: { + name: "Composite", + polymorphicDiscriminator: RestoreTargetInfoBase.type.polymorphicDiscriminator, + uberParent: "RestoreTargetInfoBase", + className: "ItemLevelRestoreTargetInfo", + modelProperties: { + ...RestoreTargetInfoBase.type.modelProperties, + restoreCriteria: { + required: true, + serializedName: "restoreCriteria", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ItemLevelRestoreCriteria" + } + } + } + }, + datasourceInfo: { + required: true, + serializedName: "datasourceInfo", + type: { + name: "Composite", + className: "Datasource" + } + }, + datasourceSetInfo: { + serializedName: "datasourceSetInfo", + type: { + name: "Composite", + className: "DatasourceSet" + } + } + } + } +}; + +export const OperationExtendedInfo: msRest.CompositeMapper = { + serializedName: "OperationExtendedInfo", + type: { + name: "Composite", + className: "OperationExtendedInfo", + modelProperties: { + objectType: { + serializedName: "objectType", + type: { + name: "String" + } + } + } + } +}; + +export const OperationJobExtendedInfo: msRest.CompositeMapper = { + serializedName: "OperationJobExtendedInfo", + type: { + name: "Composite", + className: "OperationJobExtendedInfo", + modelProperties: { + ...OperationExtendedInfo.type.modelProperties, + jobId: { + serializedName: "jobId", + type: { + name: "String" + } + } + } + } +}; + +export const OperationResource: msRest.CompositeMapper = { + serializedName: "OperationResource", + type: { + name: "Composite", + className: "OperationResource", + modelProperties: { + endTime: { + serializedName: "endTime", + type: { + name: "DateTime" + } + }, + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorModel" + } + }, + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "OperationExtendedInfo" + } + }, + startTime: { + serializedName: "startTime", + type: { + name: "DateTime" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + } + } + } +}; + +export const PatchResourceRequestInput: msRest.CompositeMapper = { + serializedName: "PatchResourceRequestInput", + type: { + name: "Composite", + className: "PatchResourceRequestInput", + modelProperties: { + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "DppIdentityDetails" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const RangeBasedItemLevelRestoreCriteria: msRest.CompositeMapper = { + serializedName: "RangeBasedItemLevelRestoreCriteria", + type: { + name: "Composite", + polymorphicDiscriminator: ItemLevelRestoreCriteria.type.polymorphicDiscriminator, + uberParent: "ItemLevelRestoreCriteria", + className: "RangeBasedItemLevelRestoreCriteria", + modelProperties: { + ...ItemLevelRestoreCriteria.type.modelProperties, + minMatchingValue: { + serializedName: "minMatchingValue", + type: { + name: "String" + } + }, + maxMatchingValue: { + serializedName: "maxMatchingValue", + type: { + name: "String" + } + } + } + } +}; + +export const TargetDetails: msRest.CompositeMapper = { + serializedName: "TargetDetails", + type: { + name: "Composite", + className: "TargetDetails", + modelProperties: { + filePrefix: { + required: true, + serializedName: "filePrefix", + type: { + name: "String" + } + }, + restoreTargetLocationType: { + required: true, + serializedName: "restoreTargetLocationType", + type: { + name: "String" + } + }, + url: { + required: true, + serializedName: "url", + type: { + name: "String" + } + } + } + } +}; + +export const RestoreFilesTargetInfo: msRest.CompositeMapper = { + serializedName: "RestoreFilesTargetInfo", + type: { + name: "Composite", + polymorphicDiscriminator: RestoreTargetInfoBase.type.polymorphicDiscriminator, + uberParent: "RestoreTargetInfoBase", + className: "RestoreFilesTargetInfo", + modelProperties: { + ...RestoreTargetInfoBase.type.modelProperties, + targetDetails: { + required: true, + serializedName: "targetDetails", + type: { + name: "Composite", + className: "TargetDetails" + } + } + } + } +}; + +export const RestoreTargetInfo: msRest.CompositeMapper = { + serializedName: "RestoreTargetInfo", + type: { + name: "Composite", + polymorphicDiscriminator: RestoreTargetInfoBase.type.polymorphicDiscriminator, + uberParent: "RestoreTargetInfoBase", + className: "RestoreTargetInfo", + modelProperties: { + ...RestoreTargetInfoBase.type.modelProperties, + datasourceInfo: { + required: true, + serializedName: "datasourceInfo", + type: { + name: "Composite", + className: "Datasource" + } + }, + datasourceSetInfo: { + serializedName: "datasourceSetInfo", + type: { + name: "Composite", + className: "DatasourceSet" + } + } + } + } +}; + +export const ScheduleBasedBackupCriteria: msRest.CompositeMapper = { + serializedName: "ScheduleBasedBackupCriteria", + type: { + name: "Composite", + polymorphicDiscriminator: BackupCriteria.type.polymorphicDiscriminator, + uberParent: "BackupCriteria", + className: "ScheduleBasedBackupCriteria", + modelProperties: { + ...BackupCriteria.type.modelProperties, + absoluteCriteria: { + serializedName: "absoluteCriteria", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + daysOfMonth: { + serializedName: "daysOfMonth", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Day" + } + } + } + }, + daysOfTheWeek: { + serializedName: "daysOfTheWeek", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + monthsOfYear: { + serializedName: "monthsOfYear", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + scheduleTimes: { + serializedName: "scheduleTimes", + type: { + name: "Sequence", + element: { + type: { + name: "DateTime" + } + } + } + }, + weeksOfTheMonth: { + serializedName: "weeksOfTheMonth", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const TaggingCriteria: msRest.CompositeMapper = { + serializedName: "TaggingCriteria", + type: { + name: "Composite", + className: "TaggingCriteria", + modelProperties: { + criteria: { + serializedName: "criteria", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BackupCriteria" + } + } + } + }, + isDefault: { + required: true, + serializedName: "isDefault", + type: { + name: "Boolean" + } + }, + taggingPriority: { + required: true, + serializedName: "taggingPriority", + type: { + name: "Number" + } + }, + tagInfo: { + required: true, + serializedName: "tagInfo", + type: { + name: "Composite", + className: "RetentionTag" + } + } + } + } +}; + +export const ScheduleBasedTriggerContext: msRest.CompositeMapper = { + serializedName: "ScheduleBasedTriggerContext", + type: { + name: "Composite", + polymorphicDiscriminator: TriggerContext.type.polymorphicDiscriminator, + uberParent: "TriggerContext", + className: "ScheduleBasedTriggerContext", + modelProperties: { + ...TriggerContext.type.modelProperties, + schedule: { + required: true, + serializedName: "schedule", + type: { + name: "Composite", + className: "BackupSchedule" + } + }, + taggingCriteria: { + required: true, + serializedName: "taggingCriteria", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TaggingCriteria" + } + } + } + } + } + } +}; + +export const TriggerBackupRequest: msRest.CompositeMapper = { + serializedName: "TriggerBackupRequest", + type: { + name: "Composite", + className: "TriggerBackupRequest", + modelProperties: { + backupRuleOptions: { + required: true, + serializedName: "backupRuleOptions", + type: { + name: "Composite", + className: "AdHocBackupRuleOptions" + } + } + } + } +}; + +export const ValidateForBackupRequest: msRest.CompositeMapper = { + serializedName: "ValidateForBackupRequest", + type: { + name: "Composite", + className: "ValidateForBackupRequest", + modelProperties: { + backupInstance: { + required: true, + serializedName: "backupInstance", + type: { + name: "Composite", + className: "BackupInstance" + } + } + } + } +}; + +export const ValidateRestoreRequestObject: msRest.CompositeMapper = { + serializedName: "ValidateRestoreRequestObject", + type: { + name: "Composite", + className: "ValidateRestoreRequestObject", + modelProperties: { + restoreRequestObject: { + required: true, + serializedName: "restoreRequestObject", + defaultValue: {}, + type: { + name: "Composite", + className: "AzureBackupRestoreRequest" + } + } + } + } +}; + +export const OperationResultGetHeaders: msRest.CompositeMapper = { + serializedName: "operationresult-get-headers", + type: { + name: "Composite", + className: "OperationResultGetHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + } + } + } +}; + +export const BackupInstancesDeleteHeaders: msRest.CompositeMapper = { + serializedName: "backupinstances-delete-headers", + type: { + name: "Composite", + className: "BackupInstancesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + } + } + } +}; + +export const BackupInstancesAdhocBackupHeaders: msRest.CompositeMapper = { + serializedName: "backupinstances-adhocbackup-headers", + type: { + name: "Composite", + className: "BackupInstancesAdhocBackupHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + } + } + } +}; + +export const BackupInstancesValidateForBackupHeaders: msRest.CompositeMapper = { + serializedName: "backupinstances-validateforbackup-headers", + type: { + name: "Composite", + className: "BackupInstancesValidateForBackupHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + } + } + } +}; + +export const BackupInstancesTriggerRehydrateHeaders: msRest.CompositeMapper = { + serializedName: "backupinstances-triggerrehydrate-headers", + type: { + name: "Composite", + className: "BackupInstancesTriggerRehydrateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + } + } + } +}; + +export const BackupInstancesTriggerRestoreHeaders: msRest.CompositeMapper = { + serializedName: "backupinstances-triggerrestore-headers", + type: { + name: "Composite", + className: "BackupInstancesTriggerRestoreHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + } + } + } +}; + +export const BackupInstancesValidateForRestoreHeaders: msRest.CompositeMapper = { + serializedName: "backupinstances-validateforrestore-headers", + type: { + name: "Composite", + className: "BackupInstancesValidateForRestoreHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + } + } + } +}; + +export const ExportJobsTriggerHeaders: msRest.CompositeMapper = { + serializedName: "exportjobs-trigger-headers", + type: { + name: "Composite", + className: "ExportJobsTriggerHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + } + } + } +}; + +export const BackupVaultResourceList: msRest.CompositeMapper = { + serializedName: "BackupVaultResourceList", + type: { + name: "Composite", + className: "BackupVaultResourceList", + modelProperties: { + ...DppResourceList.type.modelProperties, + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BackupVaultResource" + } + } + } + } + } + } +}; + +export const ClientDiscoveryResponse: msRest.CompositeMapper = { + serializedName: "ClientDiscoveryResponse", + type: { + name: "Composite", + className: "ClientDiscoveryResponse", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + }, + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ClientDiscoveryValueForSingleApi" + } + } + } + } + } + } +}; + +export const BaseBackupPolicyResourceList: msRest.CompositeMapper = { + serializedName: "BaseBackupPolicyResourceList", + type: { + name: "Composite", + className: "BaseBackupPolicyResourceList", + modelProperties: { + ...DppResourceList.type.modelProperties, + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BaseBackupPolicyResource" + } + } + } + } + } + } +}; + +export const BackupInstanceResourceList: msRest.CompositeMapper = { + serializedName: "BackupInstanceResourceList", + type: { + name: "Composite", + className: "BackupInstanceResourceList", + modelProperties: { + ...DppResourceList.type.modelProperties, + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BackupInstanceResource" + } + } + } + } + } + } +}; + +export const AzureBackupRecoveryPointResourceList: msRest.CompositeMapper = { + serializedName: "AzureBackupRecoveryPointResourceList", + type: { + name: "Composite", + className: "AzureBackupRecoveryPointResourceList", + modelProperties: { + ...DppResourceList.type.modelProperties, + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AzureBackupRecoveryPointResource" + } + } + } + } + } + } +}; + +export const AzureBackupJobResourceList: msRest.CompositeMapper = { + serializedName: "AzureBackupJobResourceList", + type: { + name: "Composite", + className: "AzureBackupJobResourceList", + modelProperties: { + ...DppResourceList.type.modelProperties, + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AzureBackupJobResource" + } + } + } + } + } + } +}; + +export const discriminators = { + 'DeleteOption.AbsoluteDeleteOption' : AbsoluteDeleteOption, + 'TriggerContext.AdhocBasedTriggerContext' : AdhocBasedTriggerContext, + 'AzureBackupRecoveryPoint.AzureBackupDiscreteRecoveryPoint' : AzureBackupDiscreteRecoveryPoint, + 'BackupParameters.AzureBackupParams' : AzureBackupParams, + 'AzureBackupRecoveryPoint' : AzureBackupRecoveryPoint, + 'AzureBackupRestoreRequest.AzureBackupRecoveryPointBasedRestoreRequest' : AzureBackupRecoveryPointBasedRestoreRequest, + 'RestoreTargetInfoBase' : RestoreTargetInfoBase, + 'AzureBackupRestoreRequest' : AzureBackupRestoreRequest, + 'AzureBackupRestoreRequest.AzureBackupRestoreWithRehydrationRequest' : AzureBackupRestoreWithRehydrationRequest, + 'AzureBackupRestoreRequest.AzureBackupRecoveryTimeBasedRestoreRequest' : AzureBackupRecoveryTimeBasedRestoreRequest, + 'BackupParameters' : BackupParameters, + 'TriggerContext' : TriggerContext, + 'BasePolicyRule.AzureBackupRule' : AzureBackupRule, + 'DataStoreParameters.AzureOperationalStoreParameters' : AzureOperationalStoreParameters, + 'DeleteOption' : DeleteOption, + 'CopyOption' : CopyOption, + 'BasePolicyRule.AzureRetentionRule' : AzureRetentionRule, + 'BackupCriteria' : BackupCriteria, + 'DataStoreParameters' : DataStoreParameters, + 'BasePolicyRule' : BasePolicyRule, + 'BaseBackupPolicy.BackupPolicy' : BackupPolicy, + 'BaseBackupPolicy' : BaseBackupPolicy, + 'CopyOption.CopyOnExpiryOption' : CopyOnExpiryOption, + 'CopyOption.CustomCopyOption' : CustomCopyOption, + 'FeatureValidationRequestBase.FeatureValidationRequest' : FeatureValidationRequest, + 'FeatureValidationRequestBase' : FeatureValidationRequestBase, + 'FeatureValidationResponseBase.FeatureValidationResponse' : FeatureValidationResponse, + 'FeatureValidationResponseBase' : FeatureValidationResponseBase, + 'CopyOption.ImmediateCopyOption' : ImmediateCopyOption, + 'ItemLevelRestoreCriteria' : ItemLevelRestoreCriteria, + 'RestoreTargetInfoBase.ItemLevelRestoreTargetInfo' : ItemLevelRestoreTargetInfo, + 'ItemLevelRestoreCriteria.RangeBasedItemLevelRestoreCriteria' : RangeBasedItemLevelRestoreCriteria, + 'RestoreTargetInfoBase.RestoreFilesTargetInfo' : RestoreFilesTargetInfo, + 'RestoreTargetInfoBase.RestoreTargetInfo' : RestoreTargetInfo, + 'BackupCriteria.ScheduleBasedBackupCriteria' : ScheduleBasedBackupCriteria, + 'TriggerContext.ScheduleBasedTriggerContext' : ScheduleBasedTriggerContext + +}; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/operationResultMappers.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/operationResultMappers.ts new file mode 100644 index 000000000000..2fdb88565680 --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/operationResultMappers.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, + CloudError, + ErrorAdditionalInfo, + ErrorModel, + OperationExtendedInfo, + OperationJobExtendedInfo, + OperationResultGetHeaders +} from "../models/mappers"; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/operationStatusMappers.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/operationStatusMappers.ts new file mode 100644 index 000000000000..2add91a9dbb2 --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/operationStatusMappers.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, + CloudError, + ErrorAdditionalInfo, + ErrorModel, + OperationExtendedInfo, + OperationJobExtendedInfo, + OperationResource +} from "../models/mappers"; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/parameters.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/parameters.ts new file mode 100644 index 000000000000..7f6a05436792 --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/parameters.ts @@ -0,0 +1,156 @@ +/* + * 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"; + +export const acceptLanguage: msRest.OperationParameter = { + parameterPath: "acceptLanguage", + mapper: { + serializedName: "accept-language", + defaultValue: 'en-US', + type: { + name: "String" + } + } +}; +export const apiVersion: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; +export const backupInstanceName: msRest.OperationURLParameter = { + parameterPath: "backupInstanceName", + mapper: { + required: true, + serializedName: "backupInstanceName", + type: { + name: "String" + } + } +}; +export const backupPolicyName: msRest.OperationURLParameter = { + parameterPath: "backupPolicyName", + mapper: { + required: true, + serializedName: "backupPolicyName", + type: { + name: "String" + } + } +}; +export const filter: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "filter" + ], + mapper: { + serializedName: "$filter", + type: { + name: "String" + } + } +}; +export const jobId: msRest.OperationURLParameter = { + parameterPath: "jobId", + mapper: { + required: true, + serializedName: "jobId", + type: { + name: "String" + } + } +}; +export const location: msRest.OperationURLParameter = { + parameterPath: "location", + mapper: { + required: true, + serializedName: "location", + type: { + name: "String" + } + } +}; +export const nextPageLink: msRest.OperationURLParameter = { + parameterPath: "nextPageLink", + mapper: { + required: true, + serializedName: "nextLink", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const operationId: msRest.OperationURLParameter = { + parameterPath: "operationId", + mapper: { + required: true, + serializedName: "operationId", + type: { + name: "String" + } + } +}; +export const recoveryPointId: msRest.OperationURLParameter = { + parameterPath: "recoveryPointId", + mapper: { + required: true, + serializedName: "recoveryPointId", + type: { + name: "String" + } + } +}; +export const resourceGroupName: msRest.OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + required: true, + serializedName: "resourceGroupName", + type: { + name: "String" + } + } +}; +export const skipToken: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "skipToken" + ], + mapper: { + serializedName: "$skipToken", + type: { + name: "String" + } + } +}; +export const subscriptionId: msRest.OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + required: true, + serializedName: "subscriptionId", + type: { + name: "String" + } + } +}; +export const vaultName: msRest.OperationURLParameter = { + parameterPath: "vaultName", + mapper: { + required: true, + serializedName: "vaultName", + type: { + name: "String" + } + } +}; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/recoveryPointsMappers.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/recoveryPointsMappers.ts new file mode 100644 index 000000000000..7d52d607aa01 --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/recoveryPointsMappers.ts @@ -0,0 +1,78 @@ +/* + * 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, + AbsoluteDeleteOption, + AdhocBasedTaggingCriteria, + AdhocBasedTriggerContext, + AzureBackupDiscreteRecoveryPoint, + AzureBackupFindRestorableTimeRangesResponse, + AzureBackupFindRestorableTimeRangesResponseResource, + AzureBackupJob, + AzureBackupJobResource, + AzureBackupJobResourceList, + AzureBackupParams, + AzureBackupRecoveryPoint, + AzureBackupRecoveryPointResource, + AzureBackupRecoveryPointResourceList, + AzureBackupRule, + AzureOperationalStoreParameters, + AzureRetentionRule, + BackupCriteria, + BackupInstance, + BackupInstanceResource, + BackupInstanceResourceList, + BackupParameters, + BackupPolicy, + BackupSchedule, + BackupVault, + BackupVaultResource, + BackupVaultResourceList, + BaseBackupPolicy, + BaseBackupPolicyResource, + BaseBackupPolicyResourceList, + BasePolicyRule, + BaseResource, + CloudError, + CopyOnExpiryOption, + CopyOption, + CustomCopyOption, + Datasource, + DatasourceSet, + DataStoreInfoBase, + DataStoreParameters, + Day, + DeleteOption, + DppIdentityDetails, + DppResource, + DppResourceList, + DppTrackedResource, + ErrorAdditionalInfo, + ErrorModel, + ImmediateCopyOption, + InnerError, + JobExtendedInfo, + JobSubTask, + PolicyInfo, + PolicyParameters, + ProtectionStatusDetails, + RecoveryPointDataStoreDetails, + RestorableTimeRange, + RestoreJobRecoveryPointDetails, + RetentionTag, + ScheduleBasedBackupCriteria, + ScheduleBasedTriggerContext, + SourceLifeCycle, + StorageSetting, + SystemData, + TaggingCriteria, + TargetCopySetting, + TriggerContext, + UserFacingError +} from "../models/mappers"; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/restorableTimeRangesMappers.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/restorableTimeRangesMappers.ts new file mode 100644 index 000000000000..957a0671639a --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/models/restorableTimeRangesMappers.ts @@ -0,0 +1,73 @@ +/* + * 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, + AbsoluteDeleteOption, + AdhocBasedTaggingCriteria, + AdhocBasedTriggerContext, + AzureBackupDiscreteRecoveryPoint, + AzureBackupFindRestorableTimeRangesRequest, + AzureBackupFindRestorableTimeRangesResponse, + AzureBackupFindRestorableTimeRangesResponseResource, + AzureBackupJob, + AzureBackupJobResource, + AzureBackupParams, + AzureBackupRecoveryPoint, + AzureBackupRecoveryPointResource, + AzureBackupRule, + AzureOperationalStoreParameters, + AzureRetentionRule, + BackupCriteria, + BackupInstance, + BackupInstanceResource, + BackupParameters, + BackupPolicy, + BackupSchedule, + BackupVault, + BackupVaultResource, + BaseBackupPolicy, + BaseBackupPolicyResource, + BasePolicyRule, + BaseResource, + CloudError, + CopyOnExpiryOption, + CopyOption, + CustomCopyOption, + Datasource, + DatasourceSet, + DataStoreInfoBase, + DataStoreParameters, + Day, + DeleteOption, + DppIdentityDetails, + DppResource, + DppTrackedResource, + ErrorAdditionalInfo, + ErrorModel, + ImmediateCopyOption, + InnerError, + JobExtendedInfo, + JobSubTask, + PolicyInfo, + PolicyParameters, + ProtectionStatusDetails, + RecoveryPointDataStoreDetails, + RestorableTimeRange, + RestoreJobRecoveryPointDetails, + RetentionTag, + ScheduleBasedBackupCriteria, + ScheduleBasedTriggerContext, + SourceLifeCycle, + StorageSetting, + SystemData, + TaggingCriteria, + TargetCopySetting, + TriggerContext, + UserFacingError +} from "../models/mappers"; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/backupInstances.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/backupInstances.ts new file mode 100644 index 000000000000..d71fdeca4ae2 --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/backupInstances.ts @@ -0,0 +1,704 @@ +/* + * 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/backupInstancesMappers"; +import * as Parameters from "../models/parameters"; +import { DataProtectionClientContext } from "../dataProtectionClientContext"; + +/** Class representing a BackupInstances. */ +export class BackupInstances { + private readonly client: DataProtectionClientContext; + + /** + * Create a BackupInstances. + * @param {DataProtectionClientContext} client Reference to the service client. + */ + constructor(client: DataProtectionClientContext) { + this.client = client; + } + + /** + * Gets a backup instances belonging to a backup vault + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param [options] The optional parameters + * @returns Promise + */ + list(vaultName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param callback The callback + */ + list(vaultName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param options The optional parameters + * @param callback The callback + */ + list(vaultName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(vaultName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + vaultName, + resourceGroupName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets a backup instance with name in a backup vault + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupInstanceName The name of the backup instance + * @param [options] The optional parameters + * @returns Promise + */ + get(vaultName: string, resourceGroupName: string, backupInstanceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupInstanceName The name of the backup instance + * @param callback The callback + */ + get(vaultName: string, resourceGroupName: string, backupInstanceName: string, callback: msRest.ServiceCallback): void; + /** + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupInstanceName The name of the backup instance + * @param options The optional parameters + * @param callback The callback + */ + get(vaultName: string, resourceGroupName: string, backupInstanceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(vaultName: string, resourceGroupName: string, backupInstanceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + vaultName, + resourceGroupName, + backupInstanceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Create or update a backup instance in a backup vault + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupInstanceName The name of the backup instance + * @param parameters Request body for operation + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(vaultName: string, resourceGroupName: string, backupInstanceName: string, parameters: Models.BackupInstanceResource, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(vaultName,resourceGroupName,backupInstanceName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Delete a backup instance in a backup vault + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupInstanceName The name of the backup instance + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(vaultName: string, resourceGroupName: string, backupInstanceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(vaultName,resourceGroupName,backupInstanceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Trigger adhoc backup + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupInstanceName The name of the backup instance + * @param parameters Request body for operation + * @param [options] The optional parameters + * @returns Promise + */ + adhocBackup(vaultName: string, resourceGroupName: string, backupInstanceName: string, parameters: Models.TriggerBackupRequest, options?: msRest.RequestOptionsBase): Promise { + return this.beginAdhocBackup(vaultName,resourceGroupName,backupInstanceName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Validate whether adhoc backup will be successful or not + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param parameters Request body for operation + * @param [options] The optional parameters + * @returns Promise + */ + validateForBackup(vaultName: string, resourceGroupName: string, parameters: Models.ValidateForBackupRequest, options?: msRest.RequestOptionsBase): Promise { + return this.beginValidateForBackup(vaultName,resourceGroupName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * rehydrate recovery point for restore for a BackupInstance + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param parameters Request body for operation + * @param backupInstanceName + * @param [options] The optional parameters + * @returns Promise + */ + triggerRehydrate(resourceGroupName: string, vaultName: string, parameters: Models.AzureBackupRehydrationRequest, backupInstanceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginTriggerRehydrate(resourceGroupName,vaultName,parameters,backupInstanceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Triggers restore for a BackupInstance + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupInstanceName The name of the backup instance + * @param parameters Request body for operation + * @param [options] The optional parameters + * @returns Promise + */ + triggerRestore(vaultName: string, resourceGroupName: string, backupInstanceName: string, parameters: Models.AzureBackupRestoreRequestUnion, options?: msRest.RequestOptionsBase): Promise { + return this.beginTriggerRestore(vaultName,resourceGroupName,backupInstanceName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Validates if Restore can be triggered for a DataSource + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupInstanceName The name of the backup instance + * @param parameters Request body for operation + * @param [options] The optional parameters + * @returns Promise + */ + validateForRestore(vaultName: string, resourceGroupName: string, backupInstanceName: string, parameters: Models.ValidateRestoreRequestObject, options?: msRest.RequestOptionsBase): Promise { + return this.beginValidateForRestore(vaultName,resourceGroupName,backupInstanceName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Create or update a backup instance in a backup vault + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupInstanceName The name of the backup instance + * @param parameters Request body for operation + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(vaultName: string, resourceGroupName: string, backupInstanceName: string, parameters: Models.BackupInstanceResource, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + vaultName, + resourceGroupName, + backupInstanceName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Delete a backup instance in a backup vault + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupInstanceName The name of the backup instance + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(vaultName: string, resourceGroupName: string, backupInstanceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + vaultName, + resourceGroupName, + backupInstanceName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Trigger adhoc backup + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupInstanceName The name of the backup instance + * @param parameters Request body for operation + * @param [options] The optional parameters + * @returns Promise + */ + beginAdhocBackup(vaultName: string, resourceGroupName: string, backupInstanceName: string, parameters: Models.TriggerBackupRequest, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + vaultName, + resourceGroupName, + backupInstanceName, + parameters, + options + }, + beginAdhocBackupOperationSpec, + options); + } + + /** + * Validate whether adhoc backup will be successful or not + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param parameters Request body for operation + * @param [options] The optional parameters + * @returns Promise + */ + beginValidateForBackup(vaultName: string, resourceGroupName: string, parameters: Models.ValidateForBackupRequest, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + vaultName, + resourceGroupName, + parameters, + options + }, + beginValidateForBackupOperationSpec, + options); + } + + /** + * rehydrate recovery point for restore for a BackupInstance + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param parameters Request body for operation + * @param backupInstanceName + * @param [options] The optional parameters + * @returns Promise + */ + beginTriggerRehydrate(resourceGroupName: string, vaultName: string, parameters: Models.AzureBackupRehydrationRequest, backupInstanceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + vaultName, + parameters, + backupInstanceName, + options + }, + beginTriggerRehydrateOperationSpec, + options); + } + + /** + * Triggers restore for a BackupInstance + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupInstanceName The name of the backup instance + * @param parameters Request body for operation + * @param [options] The optional parameters + * @returns Promise + */ + beginTriggerRestore(vaultName: string, resourceGroupName: string, backupInstanceName: string, parameters: Models.AzureBackupRestoreRequestUnion, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + vaultName, + resourceGroupName, + backupInstanceName, + parameters, + options + }, + beginTriggerRestoreOperationSpec, + options); + } + + /** + * Validates if Restore can be triggered for a DataSource + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupInstanceName The name of the backup instance + * @param parameters Request body for operation + * @param [options] The optional parameters + * @returns Promise + */ + beginValidateForRestore(vaultName: string, resourceGroupName: string, backupInstanceName: string, parameters: Models.ValidateRestoreRequestObject, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + vaultName, + resourceGroupName, + backupInstanceName, + parameters, + options + }, + beginValidateForRestoreOperationSpec, + options); + } + + /** + * Gets a backup instances belonging to a backup vault + * @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: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BackupInstanceResourceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.backupInstanceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BackupInstanceResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.backupInstanceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.BackupInstanceResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.BackupInstanceResource + }, + 201: { + bodyMapper: Mappers.BackupInstanceResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.backupInstanceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + headersMapper: Mappers.BackupInstancesDeleteHeaders + }, + 202: { + headersMapper: Mappers.BackupInstancesDeleteHeaders + }, + 204: { + headersMapper: Mappers.BackupInstancesDeleteHeaders + }, + default: { + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.BackupInstancesDeleteHeaders + } + }, + serializer +}; + +const beginAdhocBackupOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/backup", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.backupInstanceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.TriggerBackupRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.OperationJobExtendedInfo, + headersMapper: Mappers.BackupInstancesAdhocBackupHeaders + }, + 202: { + headersMapper: Mappers.BackupInstancesAdhocBackupHeaders + }, + default: { + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.BackupInstancesAdhocBackupHeaders + } + }, + serializer +}; + +const beginValidateForBackupOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/validateForBackup", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ValidateForBackupRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.OperationJobExtendedInfo, + headersMapper: Mappers.BackupInstancesValidateForBackupHeaders + }, + 202: { + headersMapper: Mappers.BackupInstancesValidateForBackupHeaders + }, + default: { + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.BackupInstancesValidateForBackupHeaders + } + }, + serializer +}; + +const beginTriggerRehydrateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/rehydrate", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vaultName, + Parameters.backupInstanceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.AzureBackupRehydrationRequest, + required: true + } + }, + responses: { + 202: { + headersMapper: Mappers.BackupInstancesTriggerRehydrateHeaders + }, + 204: { + headersMapper: Mappers.BackupInstancesTriggerRehydrateHeaders + }, + default: { + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.BackupInstancesTriggerRehydrateHeaders + } + }, + serializer +}; + +const beginTriggerRestoreOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/restore", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.backupInstanceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.AzureBackupRestoreRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.OperationJobExtendedInfo, + headersMapper: Mappers.BackupInstancesTriggerRestoreHeaders + }, + 202: { + headersMapper: Mappers.BackupInstancesTriggerRestoreHeaders + }, + default: { + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.BackupInstancesTriggerRestoreHeaders + } + }, + serializer +}; + +const beginValidateForRestoreOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/validateRestore", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.backupInstanceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ValidateRestoreRequestObject, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.OperationJobExtendedInfo, + headersMapper: Mappers.BackupInstancesValidateForRestoreHeaders + }, + 202: { + headersMapper: Mappers.BackupInstancesValidateForRestoreHeaders + }, + default: { + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.BackupInstancesValidateForRestoreHeaders + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BackupInstanceResourceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/backupPolicies.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/backupPolicies.ts new file mode 100644 index 000000000000..f1f819947b6d --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/backupPolicies.ts @@ -0,0 +1,335 @@ +/* + * 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/backupPoliciesMappers"; +import * as Parameters from "../models/parameters"; +import { DataProtectionClientContext } from "../dataProtectionClientContext"; + +/** Class representing a BackupPolicies. */ +export class BackupPolicies { + private readonly client: DataProtectionClientContext; + + /** + * Create a BackupPolicies. + * @param {DataProtectionClientContext} client Reference to the service client. + */ + constructor(client: DataProtectionClientContext) { + this.client = client; + } + + /** + * Returns list of backup policies belonging to a backup vault + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param [options] The optional parameters + * @returns Promise + */ + list(vaultName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param callback The callback + */ + list(vaultName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param options The optional parameters + * @param callback The callback + */ + list(vaultName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(vaultName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + vaultName, + resourceGroupName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets a backup policy belonging to a backup vault + * @summary Gets a backup policy belonging to a backup vault + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupPolicyName + * @param [options] The optional parameters + * @returns Promise + */ + get(vaultName: string, resourceGroupName: string, backupPolicyName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupPolicyName + * @param callback The callback + */ + get(vaultName: string, resourceGroupName: string, backupPolicyName: string, callback: msRest.ServiceCallback): void; + /** + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupPolicyName + * @param options The optional parameters + * @param callback The callback + */ + get(vaultName: string, resourceGroupName: string, backupPolicyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(vaultName: string, resourceGroupName: string, backupPolicyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + vaultName, + resourceGroupName, + backupPolicyName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * @summary Creates or Updates a backup policy belonging to a backup vault + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupPolicyName Name of the policy + * @param parameters Request body for operation + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(vaultName: string, resourceGroupName: string, backupPolicyName: string, parameters: Models.BaseBackupPolicyResource, options?: msRest.RequestOptionsBase): Promise; + /** + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupPolicyName Name of the policy + * @param parameters Request body for operation + * @param callback The callback + */ + createOrUpdate(vaultName: string, resourceGroupName: string, backupPolicyName: string, parameters: Models.BaseBackupPolicyResource, callback: msRest.ServiceCallback): void; + /** + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupPolicyName Name of the policy + * @param parameters Request body for operation + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(vaultName: string, resourceGroupName: string, backupPolicyName: string, parameters: Models.BaseBackupPolicyResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(vaultName: string, resourceGroupName: string, backupPolicyName: string, parameters: Models.BaseBackupPolicyResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + vaultName, + resourceGroupName, + backupPolicyName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * @summary Deletes a backup policy belonging to a backup vault + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupPolicyName + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(vaultName: string, resourceGroupName: string, backupPolicyName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupPolicyName + * @param callback The callback + */ + deleteMethod(vaultName: string, resourceGroupName: string, backupPolicyName: string, callback: msRest.ServiceCallback): void; + /** + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupPolicyName + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(vaultName: string, resourceGroupName: string, backupPolicyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(vaultName: string, resourceGroupName: string, backupPolicyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + vaultName, + resourceGroupName, + backupPolicyName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Returns list of backup policies belonging to a backup vault + * @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: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BaseBackupPolicyResourceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.backupPolicyName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BaseBackupPolicyResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.backupPolicyName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.BaseBackupPolicyResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.BaseBackupPolicyResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.backupPolicyName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BaseBackupPolicyResourceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/backupVaultOperationResults.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/backupVaultOperationResults.ts new file mode 100644 index 000000000000..4c8c3f38cea1 --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/backupVaultOperationResults.ts @@ -0,0 +1,90 @@ +/* + * 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/backupVaultOperationResultsMappers"; +import * as Parameters from "../models/parameters"; +import { DataProtectionClientContext } from "../dataProtectionClientContext"; + +/** Class representing a BackupVaultOperationResults. */ +export class BackupVaultOperationResults { + private readonly client: DataProtectionClientContext; + + /** + * Create a BackupVaultOperationResults. + * @param {DataProtectionClientContext} client Reference to the service client. + */ + constructor(client: DataProtectionClientContext) { + this.client = client; + } + + /** + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup 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 backup vault. + * @param resourceGroupName The name of the resource group where the backup 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 backup vault. + * @param resourceGroupName The name of the resource group where the backup 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.DataProtection/backupVaults/{vaultName}/operationResults/{operationId}", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.operationId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BackupVaultResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/backupVaults.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/backupVaults.ts new file mode 100644 index 000000000000..73e55e0025a8 --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/backupVaults.ts @@ -0,0 +1,551 @@ +/* + * 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/backupVaultsMappers"; +import * as Parameters from "../models/parameters"; +import { DataProtectionClientContext } from "../dataProtectionClientContext"; + +/** Class representing a BackupVaults. */ +export class BackupVaults { + private readonly client: DataProtectionClientContext; + + /** + * Create a BackupVaults. + * @param {DataProtectionClientContext} client Reference to the service client. + */ + constructor(client: DataProtectionClientContext) { + this.client = client; + } + + /** + * Returns resource collection belonging to a subscription. + * @param [options] The optional parameters + * @returns Promise + */ + getInSubscription(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + getInSubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + getInSubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getInSubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + getInSubscriptionOperationSpec, + callback) as Promise; + } + + /** + * Returns resource collection belonging to a resource group. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param [options] The optional parameters + * @returns Promise + */ + getInResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param callback The callback + */ + getInResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param options The optional parameters + * @param callback The callback + */ + getInResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getInResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + getInResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Returns a resource belonging to a resource group. + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup 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 backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param callback The callback + */ + get(vaultName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup 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; + } + + /** + * Creates or updates a BackupVault resource belonging to a resource group. + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param parameters Request body for operation + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(vaultName: string, resourceGroupName: string, parameters: Models.BackupVaultResource, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(vaultName,resourceGroupName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a BackupVault resource from the resource group. + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(vaultName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param callback The callback + */ + deleteMethod(vaultName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(vaultName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(vaultName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + vaultName, + resourceGroupName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a + * resource. + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param parameters Request body for operation + * @param [options] The optional parameters + * @returns Promise + */ + update(vaultName: string, resourceGroupName: string, parameters: Models.PatchResourceRequestInput, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(vaultName,resourceGroupName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @summary API to check for resource name availability + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param location The location in which uniqueness will be verified. + * @param parameters Check name availability request + * @param [options] The optional parameters + * @returns Promise + */ + checkNameAvailability(resourceGroupName: string, location: string, parameters: Models.CheckNameAvailabilityRequest, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param location The location in which uniqueness will be verified. + * @param parameters Check name availability request + * @param callback The callback + */ + checkNameAvailability(resourceGroupName: string, location: string, parameters: Models.CheckNameAvailabilityRequest, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param location The location in which uniqueness will be verified. + * @param parameters Check name availability request + * @param options The optional parameters + * @param callback The callback + */ + checkNameAvailability(resourceGroupName: string, location: string, parameters: Models.CheckNameAvailabilityRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + checkNameAvailability(resourceGroupName: string, location: string, parameters: Models.CheckNameAvailabilityRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + location, + parameters, + options + }, + checkNameAvailabilityOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a BackupVault resource belonging to a resource group. + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param parameters Request body for operation + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(vaultName: string, resourceGroupName: string, parameters: Models.BackupVaultResource, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + vaultName, + resourceGroupName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a + * resource. + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param parameters Request body for operation + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(vaultName: string, resourceGroupName: string, parameters: Models.PatchResourceRequestInput, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + vaultName, + resourceGroupName, + parameters, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Returns resource collection belonging to a subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + getInSubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + getInSubscriptionNext(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 + */ + getInSubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getInSubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + getInSubscriptionNextOperationSpec, + callback) as Promise; + } + + /** + * Returns resource collection belonging to a resource group. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + getInResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + getInResourceGroupNext(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 + */ + getInResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getInResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + getInResourceGroupNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getInSubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/backupVaults", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BackupVaultResourceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getInResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BackupVaultResourceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BackupVaultResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/locations/{location}/checkNameAvailability", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.location + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.CheckNameAvailabilityRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.CheckNameAvailabilityResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.BackupVaultResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.BackupVaultResource + }, + 201: { + bodyMapper: Mappers.BackupVaultResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.PatchResourceRequestInput, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.BackupVaultResource + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getInSubscriptionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BackupVaultResourceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getInResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BackupVaultResourceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/dataProtection.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/dataProtection.ts new file mode 100644 index 000000000000..75830181d543 --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/dataProtection.ts @@ -0,0 +1,92 @@ +/* + * 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/dataProtectionMappers"; +import * as Parameters from "../models/parameters"; +import { DataProtectionClientContext } from "../dataProtectionClientContext"; + +/** Class representing a DataProtection. */ +export class DataProtection { + private readonly client: DataProtectionClientContext; + + /** + * Create a DataProtection. + * @param {DataProtectionClientContext} client Reference to the service client. + */ + constructor(client: DataProtectionClientContext) { + this.client = client; + } + + /** + * @summary Validates if a feature is supported + * @param location + * @param parameters Feature support request object + * @param [options] The optional parameters + * @returns Promise + */ + checkFeatureSupport(location: string, parameters: Models.FeatureValidationRequestBaseUnion, options?: msRest.RequestOptionsBase): Promise; + /** + * @param location + * @param parameters Feature support request object + * @param callback The callback + */ + checkFeatureSupport(location: string, parameters: Models.FeatureValidationRequestBaseUnion, callback: msRest.ServiceCallback): void; + /** + * @param location + * @param parameters Feature support request object + * @param options The optional parameters + * @param callback The callback + */ + checkFeatureSupport(location: string, parameters: Models.FeatureValidationRequestBaseUnion, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + checkFeatureSupport(location: string, parameters: Models.FeatureValidationRequestBaseUnion, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + location, + parameters, + options + }, + checkFeatureSupportOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const checkFeatureSupportOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/checkFeatureSupport", + urlParameters: [ + Parameters.subscriptionId, + Parameters.location + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.FeatureValidationRequestBase, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.FeatureValidationResponseBase + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/dataProtectionOperations.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/dataProtectionOperations.ts new file mode 100644 index 000000000000..9dcd86daa284 --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/dataProtectionOperations.ts @@ -0,0 +1,125 @@ +/* + * 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/dataProtectionOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { DataProtectionClientContext } from "../dataProtectionClientContext"; + +/** Class representing a DataProtectionOperations. */ +export class DataProtectionOperations { + private readonly client: DataProtectionClientContext; + + /** + * Create a DataProtectionOperations. + * @param {DataProtectionClientContext} client Reference to the service client. + */ + constructor(client: DataProtectionClientContext) { + this.client = client; + } + + /** + * Returns the list of available operations. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @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 { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Returns the list of available operations. + * @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: "GET", + path: "providers/Microsoft.DataProtection/operations", + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ClientDiscoveryResponse + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ClientDiscoveryResponse + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/exportJobs.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/exportJobs.ts new file mode 100644 index 000000000000..1493db938789 --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/exportJobs.ts @@ -0,0 +1,89 @@ +/* + * 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/exportJobsMappers"; +import * as Parameters from "../models/parameters"; +import { DataProtectionClientContext } from "../dataProtectionClientContext"; + +/** Class representing a ExportJobs. */ +export class ExportJobs { + private readonly client: DataProtectionClientContext; + + /** + * Create a ExportJobs. + * @param {DataProtectionClientContext} client Reference to the service client. + */ + constructor(client: DataProtectionClientContext) { + this.client = client; + } + + /** + * Triggers export of jobs and returns an OperationID to track. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param [options] The optional parameters + * @returns Promise + */ + trigger(resourceGroupName: string, vaultName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginTrigger(resourceGroupName,vaultName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Triggers export of jobs and returns an OperationID to track. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param [options] The optional parameters + * @returns Promise + */ + beginTrigger(resourceGroupName: string, vaultName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + vaultName, + options + }, + beginTriggerOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const beginTriggerOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/exportBackupJobs", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 202: { + headersMapper: Mappers.ExportJobsTriggerHeaders + }, + 204: { + headersMapper: Mappers.ExportJobsTriggerHeaders + }, + default: { + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.ExportJobsTriggerHeaders + } + }, + serializer +}; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/exportJobsOperationResult.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/exportJobsOperationResult.ts new file mode 100644 index 000000000000..3b0449f3696a --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/exportJobsOperationResult.ts @@ -0,0 +1,94 @@ +/* + * 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/exportJobsOperationResultMappers"; +import * as Parameters from "../models/parameters"; +import { DataProtectionClientContext } from "../dataProtectionClientContext"; + +/** Class representing a ExportJobsOperationResult. */ +export class ExportJobsOperationResult { + private readonly client: DataProtectionClientContext; + + /** + * Create a ExportJobsOperationResult. + * @param {DataProtectionClientContext} client Reference to the service client. + */ + constructor(client: DataProtectionClientContext) { + this.client = client; + } + + /** + * Gets the operation result of operation triggered by Export Jobs API. If the operation is + * successful, then it also contains URL of a Blob and a SAS key to access the same. The blob + * contains exported jobs in JSON serialized format. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param operationId OperationID which represents the export job. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, vaultName: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param operationId OperationID which represents the export job. + * @param callback The callback + */ + get(resourceGroupName: string, vaultName: string, operationId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param operationId OperationID which represents the export job. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, vaultName: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, vaultName: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + 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.DataProtection/backupVaults/{vaultName}/backupJobs/operations/{operationId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName, + Parameters.operationId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ExportJobsResult + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/index.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/index.ts new file mode 100644 index 000000000000..198307c8453e --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/index.ts @@ -0,0 +1,22 @@ +/* + * 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 "./backupVaults"; +export * from "./operationResult"; +export * from "./operationStatus"; +export * from "./backupVaultOperationResults"; +export * from "./dataProtection"; +export * from "./dataProtectionOperations"; +export * from "./backupPolicies"; +export * from "./backupInstances"; +export * from "./recoveryPoints"; +export * from "./jobs"; +export * from "./restorableTimeRanges"; +export * from "./exportJobs"; +export * from "./exportJobsOperationResult"; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/jobs.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/jobs.ts new file mode 100644 index 000000000000..df899efae1a5 --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/jobs.ts @@ -0,0 +1,203 @@ +/* + * 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/jobsMappers"; +import * as Parameters from "../models/parameters"; +import { DataProtectionClientContext } from "../dataProtectionClientContext"; + +/** Class representing a Jobs. */ +export class Jobs { + private readonly client: DataProtectionClientContext; + + /** + * Create a Jobs. + * @param {DataProtectionClientContext} client Reference to the service client. + */ + constructor(client: DataProtectionClientContext) { + this.client = client; + } + + /** + * Returns list of jobs belonging to a backup vault + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, vaultName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param callback The callback + */ + list(resourceGroupName: string, vaultName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, vaultName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, vaultName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets a job with id in a backup vault + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param jobId The Job ID. This is a GUID-formatted string (e.g. + * 00000000-0000-0000-0000-000000000000). + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, vaultName: string, jobId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param jobId The Job ID. This is a GUID-formatted string (e.g. + * 00000000-0000-0000-0000-000000000000). + * @param callback The callback + */ + get(resourceGroupName: string, vaultName: string, jobId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param jobId The Job ID. This is a GUID-formatted string (e.g. + * 00000000-0000-0000-0000-000000000000). + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, vaultName: string, jobId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, vaultName: string, jobId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + jobId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Returns list of jobs belonging to a backup vault + * @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: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AzureBackupJobResourceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs/{jobId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName, + Parameters.jobId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AzureBackupJobResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AzureBackupJobResourceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/operationResult.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/operationResult.ts new file mode 100644 index 000000000000..cfad90586c4d --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/operationResult.ts @@ -0,0 +1,92 @@ +/* + * 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/operationResultMappers"; +import * as Parameters from "../models/parameters"; +import { DataProtectionClientContext } from "../dataProtectionClientContext"; + +/** Class representing a OperationResult. */ +export class OperationResult { + private readonly client: DataProtectionClientContext; + + /** + * Create a OperationResult. + * @param {DataProtectionClientContext} client Reference to the service client. + */ + constructor(client: DataProtectionClientContext) { + this.client = client; + } + + /** + * Gets the operation result for a resource + * @summary Gets the operation status for a resource. + * @param operationId + * @param location + * @param [options] The optional parameters + * @returns Promise + */ + get(operationId: string, location: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param operationId + * @param location + * @param callback The callback + */ + get(operationId: string, location: string, callback: msRest.ServiceCallback): void; + /** + * @param operationId + * @param location + * @param options The optional parameters + * @param callback The callback + */ + get(operationId: string, location: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(operationId: string, location: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + operationId, + location, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/operationResults/{operationId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.operationId, + Parameters.location + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationJobExtendedInfo, + headersMapper: Mappers.OperationResultGetHeaders + }, + 202: { + headersMapper: Mappers.OperationResultGetHeaders + }, + default: { + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.OperationResultGetHeaders + } + }, + serializer +}; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/operationStatus.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/operationStatus.ts new file mode 100644 index 000000000000..06fbac2d0bf4 --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/operationStatus.ts @@ -0,0 +1,86 @@ +/* + * 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/operationStatusMappers"; +import * as Parameters from "../models/parameters"; +import { DataProtectionClientContext } from "../dataProtectionClientContext"; + +/** Class representing a OperationStatus. */ +export class OperationStatus { + private readonly client: DataProtectionClientContext; + + /** + * Create a OperationStatus. + * @param {DataProtectionClientContext} client Reference to the service client. + */ + constructor(client: DataProtectionClientContext) { + this.client = client; + } + + /** + * @summary Gets the operation status for a resource. + * @param location + * @param operationId + * @param [options] The optional parameters + * @returns Promise + */ + get(location: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param location + * @param operationId + * @param callback The callback + */ + get(location: string, operationId: string, callback: msRest.ServiceCallback): void; + /** + * @param location + * @param operationId + * @param options The optional parameters + * @param callback The callback + */ + get(location: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(location: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + location, + 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.DataProtection/locations/{location}/operationStatus/{operationId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.location, + Parameters.operationId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/recoveryPoints.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/recoveryPoints.ts new file mode 100644 index 000000000000..a3983f0f09a4 --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/recoveryPoints.ts @@ -0,0 +1,214 @@ +/* + * 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/recoveryPointsMappers"; +import * as Parameters from "../models/parameters"; +import { DataProtectionClientContext } from "../dataProtectionClientContext"; + +/** Class representing a RecoveryPoints. */ +export class RecoveryPoints { + private readonly client: DataProtectionClientContext; + + /** + * Create a RecoveryPoints. + * @param {DataProtectionClientContext} client Reference to the service client. + */ + constructor(client: DataProtectionClientContext) { + this.client = client; + } + + /** + * Returns a list of Recovery Points for a DataSource in a vault. + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupInstanceName The name of the backup instance + * @param [options] The optional parameters + * @returns Promise + */ + list(vaultName: string, resourceGroupName: string, backupInstanceName: string, options?: Models.RecoveryPointsListOptionalParams): Promise; + /** + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupInstanceName The name of the backup instance + * @param callback The callback + */ + list(vaultName: string, resourceGroupName: string, backupInstanceName: string, callback: msRest.ServiceCallback): void; + /** + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupInstanceName The name of the backup instance + * @param options The optional parameters + * @param callback The callback + */ + list(vaultName: string, resourceGroupName: string, backupInstanceName: string, options: Models.RecoveryPointsListOptionalParams, callback: msRest.ServiceCallback): void; + list(vaultName: string, resourceGroupName: string, backupInstanceName: string, options?: Models.RecoveryPointsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + vaultName, + resourceGroupName, + backupInstanceName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets a Recovery Point using recoveryPointId for a Datasource. + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupInstanceName The name of the backup instance + * @param recoveryPointId + * @param [options] The optional parameters + * @returns Promise + */ + get(vaultName: string, resourceGroupName: string, backupInstanceName: string, recoveryPointId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupInstanceName The name of the backup instance + * @param recoveryPointId + * @param callback The callback + */ + get(vaultName: string, resourceGroupName: string, backupInstanceName: string, recoveryPointId: string, callback: msRest.ServiceCallback): void; + /** + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupInstanceName The name of the backup instance + * @param recoveryPointId + * @param options The optional parameters + * @param callback The callback + */ + get(vaultName: string, resourceGroupName: string, backupInstanceName: string, recoveryPointId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(vaultName: string, resourceGroupName: string, backupInstanceName: string, recoveryPointId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + vaultName, + resourceGroupName, + backupInstanceName, + recoveryPointId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Returns a list of Recovery Points for a DataSource in 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.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; + /** + * @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.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; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/recoveryPoints", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.backupInstanceName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.skipToken + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AzureBackupRecoveryPointResourceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/recoveryPoints/{recoveryPointId}", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.backupInstanceName, + Parameters.recoveryPointId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AzureBackupRecoveryPointResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.skipToken + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AzureBackupRecoveryPointResourceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/restorableTimeRanges.ts b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/restorableTimeRanges.ts new file mode 100644 index 000000000000..3a78c0a66c1f --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/src/operations/restorableTimeRanges.ts @@ -0,0 +1,101 @@ +/* + * 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/restorableTimeRangesMappers"; +import * as Parameters from "../models/parameters"; +import { DataProtectionClientContext } from "../dataProtectionClientContext"; + +/** Class representing a RestorableTimeRanges. */ +export class RestorableTimeRanges { + private readonly client: DataProtectionClientContext; + + /** + * Create a RestorableTimeRanges. + * @param {DataProtectionClientContext} client Reference to the service client. + */ + constructor(client: DataProtectionClientContext) { + this.client = client; + } + + /** + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupInstanceName The name of the backup instance + * @param parameters Request body for operation + * @param [options] The optional parameters + * @returns Promise + */ + find(vaultName: string, resourceGroupName: string, backupInstanceName: string, parameters: Models.AzureBackupFindRestorableTimeRangesRequest, options?: msRest.RequestOptionsBase): Promise; + /** + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupInstanceName The name of the backup instance + * @param parameters Request body for operation + * @param callback The callback + */ + find(vaultName: string, resourceGroupName: string, backupInstanceName: string, parameters: Models.AzureBackupFindRestorableTimeRangesRequest, callback: msRest.ServiceCallback): void; + /** + * @param vaultName The name of the backup vault. + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param backupInstanceName The name of the backup instance + * @param parameters Request body for operation + * @param options The optional parameters + * @param callback The callback + */ + find(vaultName: string, resourceGroupName: string, backupInstanceName: string, parameters: Models.AzureBackupFindRestorableTimeRangesRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + find(vaultName: string, resourceGroupName: string, backupInstanceName: string, parameters: Models.AzureBackupFindRestorableTimeRangesRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + vaultName, + resourceGroupName, + backupInstanceName, + parameters, + options + }, + findOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const findOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/findRestorableTimeRanges", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.backupInstanceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.AzureBackupFindRestorableTimeRangesRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.AzureBackupFindRestorableTimeRangesResponseResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/dataprotectionplatform/arm-dataprotectionplatform/tsconfig.json b/sdk/dataprotectionplatform/arm-dataprotectionplatform/tsconfig.json new file mode 100644 index 000000000000..422b584abd5e --- /dev/null +++ b/sdk/dataprotectionplatform/arm-dataprotectionplatform/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "es6", + "moduleResolution": "node", + "strict": true, + "target": "es5", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": ["es6", "dom"], + "declaration": true, + "outDir": "./esm", + "importHelpers": true + }, + "include": ["./src/**/*.ts"], + "exclude": ["node_modules"] +}