From 18ee7e7577f990ebb1012ecbe18c238f6776e8c8 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 1 Sep 2023 22:16:06 +0000 Subject: [PATCH] CodeGen from PR 24974 in Azure/azure-rest-api-specs Merge c6548659fc78961bf6d77bd34a1e5630fb78dca7 into 80c21c17b4a7aa57f637ee594f7cfd653255a7e0 --- common/config/rush/pnpm-lock.yaml | 101 +- rush.json | 7 +- .../CHANGELOG.md | 5 + .../LICENSE | 21 + .../README.md | 109 + .../_meta.json | 8 + .../api-extractor.json | 31 + .../package.json | 116 + ...arm-recoveryservicesdatareplication.api.md | 1973 ++++++ .../rollup.config.js | 122 + .../sample.env | 4 + .../azureSiteRecoveryManagementServiceAPI.ts | 306 + .../src/index.ts | 13 + .../src/lroImpl.ts | 42 + .../src/models/index.ts | 3567 +++++++++++ .../src/models/mappers.ts | 5306 +++++++++++++++++ .../src/models/parameters.ts | 382 ++ .../src/operations/dra.ts | 500 ++ .../src/operations/draOperationStatus.ts | 78 + .../src/operations/emailConfiguration.ts | 287 + .../src/operations/event.ts | 242 + .../src/operations/fabric.ts | 710 +++ .../src/operations/fabricOperationsStatus.ts | 75 + .../src/operations/index.ts | 26 + .../src/operations/operations.ts | 149 + .../src/operations/policy.ts | 500 ++ .../src/operations/policyOperationStatus.ts | 78 + .../src/operations/protectedItem.ts | 638 ++ .../protectedItemOperationStatus.ts | 79 + .../src/operations/recoveryPoints.ts | 270 + .../src/operations/replicationExtension.ts | 506 ++ .../replicationExtensionOperationStatus.ts | 85 + .../src/operations/vault.ts | 710 +++ .../src/operations/vaultOperationStatus.ts | 75 + .../src/operations/workflow.ts | 242 + .../src/operations/workflowOperationStatus.ts | 78 + .../src/operationsInterfaces/dra.ts | 105 + .../draOperationStatus.ts | 31 + .../emailConfiguration.ts | 59 + .../src/operationsInterfaces/event.ts | 44 + .../src/operationsInterfaces/fabric.ts | 127 + .../fabricOperationsStatus.ts | 29 + .../src/operationsInterfaces/index.ts | 26 + .../src/operationsInterfaces/operations.ts | 22 + .../src/operationsInterfaces/policy.ts | 105 + .../policyOperationStatus.ts | 31 + .../src/operationsInterfaces/protectedItem.ts | 144 + .../protectedItemOperationStatus.ts | 31 + .../operationsInterfaces/recoveryPoints.ts | 48 + .../replicationExtension.ts | 111 + .../replicationExtensionOperationStatus.ts | 31 + .../src/operationsInterfaces/vault.ts | 127 + .../vaultOperationStatus.ts | 29 + .../src/operationsInterfaces/workflow.ts | 44 + .../workflowOperationStatus.ts | 31 + .../src/pagingHelper.ts | 39 + .../test/sampleTest.ts | 43 + .../tsconfig.json | 27 + .../ci.mgmt.yml | 38 + 59 files changed, 18728 insertions(+), 35 deletions(-) create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/CHANGELOG.md create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/LICENSE create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/README.md create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/_meta.json create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/api-extractor.json create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/package.json create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/review/arm-recoveryservicesdatareplication.api.md create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/rollup.config.js create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/sample.env create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/azureSiteRecoveryManagementServiceAPI.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/index.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/lroImpl.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/models/index.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/models/mappers.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/models/parameters.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/dra.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/draOperationStatus.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/emailConfiguration.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/event.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/fabric.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/fabricOperationsStatus.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/index.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/operations.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/policy.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/policyOperationStatus.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/protectedItem.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/protectedItemOperationStatus.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/recoveryPoints.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/replicationExtension.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/replicationExtensionOperationStatus.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/vault.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/vaultOperationStatus.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/workflow.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/workflowOperationStatus.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/dra.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/draOperationStatus.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/emailConfiguration.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/event.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/fabric.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/fabricOperationsStatus.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/index.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/operations.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/policy.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/policyOperationStatus.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/protectedItem.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/protectedItemOperationStatus.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/recoveryPoints.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/replicationExtension.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/replicationExtensionOperationStatus.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/vault.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/vaultOperationStatus.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/workflow.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/workflowOperationStatus.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/pagingHelper.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/test/sampleTest.ts create mode 100644 sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/tsconfig.json create mode 100644 sdk/recoveryservicesdatareplication/ci.mgmt.yml diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index ce0fc6ae2c58..c0130b540f1b 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -180,6 +180,7 @@ specifiers: '@rush-temp/arm-recoveryservices': file:./projects/arm-recoveryservices.tgz '@rush-temp/arm-recoveryservices-siterecovery': file:./projects/arm-recoveryservices-siterecovery.tgz '@rush-temp/arm-recoveryservicesbackup': file:./projects/arm-recoveryservicesbackup.tgz + '@rush-temp/arm-recoveryservicesdatareplication': file:./projects/arm-recoveryservicesdatareplication.tgz '@rush-temp/arm-rediscache': file:./projects/arm-rediscache.tgz '@rush-temp/arm-redisenterprisecache': file:./projects/arm-redisenterprisecache.tgz '@rush-temp/arm-relay': file:./projects/arm-relay.tgz @@ -542,6 +543,7 @@ dependencies: '@rush-temp/arm-recoveryservices': file:projects/arm-recoveryservices.tgz '@rush-temp/arm-recoveryservices-siterecovery': file:projects/arm-recoveryservices-siterecovery.tgz '@rush-temp/arm-recoveryservicesbackup': file:projects/arm-recoveryservicesbackup.tgz + '@rush-temp/arm-recoveryservicesdatareplication': file:projects/arm-recoveryservicesdatareplication.tgz '@rush-temp/arm-rediscache': file:projects/arm-rediscache.tgz '@rush-temp/arm-redisenterprisecache': file:projects/arm-redisenterprisecache.tgz '@rush-temp/arm-relay': file:projects/arm-relay.tgz @@ -2401,7 +2403,7 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 14.18.56 + '@types/node': 16.18.46 dev: false /@types/chai-as-promised/7.1.5: @@ -2423,7 +2425,7 @@ packages: /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 14.18.56 + '@types/node': 16.18.46 dev: false /@types/cookie/0.4.1: @@ -2433,7 +2435,7 @@ packages: /@types/cors/2.8.13: resolution: {integrity: sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==} dependencies: - '@types/node': 14.18.56 + '@types/node': 16.18.46 dev: false /@types/debug/4.1.8: @@ -2445,7 +2447,7 @@ packages: /@types/decompress/4.2.4: resolution: {integrity: sha512-/C8kTMRTNiNuWGl5nEyKbPiMv6HA+0RbEXzFhFBEzASM6+oa4tJro9b8nj7eRlOFfuLdzUU+DS/GPDlvvzMOhA==} dependencies: - '@types/node': 14.18.56 + '@types/node': 16.18.46 dev: false /@types/eslint/8.4.10: @@ -2466,7 +2468,7 @@ packages: /@types/express-serve-static-core/4.17.36: resolution: {integrity: sha512-zbivROJ0ZqLAtMzgzIUC4oNqDG9iF0lSsAqpOD9kbs5xcIM3dTiyuHvBc7R8MtWBp3AAWGaovJa+wzWPjLYW7Q==} dependencies: - '@types/node': 14.18.56 + '@types/node': 16.18.46 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 '@types/send': 0.17.1 @@ -2484,13 +2486,13 @@ packages: /@types/fs-extra/8.1.2: resolution: {integrity: sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg==} dependencies: - '@types/node': 14.18.56 + '@types/node': 16.18.46 dev: false /@types/fs-extra/9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 14.18.56 + '@types/node': 16.18.46 dev: false /@types/http-errors/2.0.1: @@ -2507,7 +2509,7 @@ packages: /@types/is-buffer/2.0.0: resolution: {integrity: sha512-0f7N/e3BAz32qDYvgB4d2cqv1DqUwvGxHkXsrucICn8la1Vb6Yl6Eg8mPScGwUiqHJeE7diXlzaK+QMA9m4Gxw==} dependencies: - '@types/node': 14.18.56 + '@types/node': 16.18.46 dev: false /@types/json-schema/7.0.12: @@ -2521,13 +2523,13 @@ packages: /@types/jsonwebtoken/9.0.2: resolution: {integrity: sha512-drE6uz7QBKq1fYqqoFKTDRdFCPHd5TCub75BM+D+cMx7NU9hUz7SESLfC2fSCXVFMO5Yj8sOWHuGqPgjc+fz0Q==} dependencies: - '@types/node': 14.18.56 + '@types/node': 16.18.46 dev: false /@types/jws/3.2.5: resolution: {integrity: sha512-xGTxZH34xOryaTN8CMsvhh9lfNqFuHiMoRvsLYWQdBJHqiECyfInXVl2eK8Jz2emxZWMIn5RBlmr3oDVPeWujw==} dependencies: - '@types/node': 14.18.56 + '@types/node': 16.18.46 dev: false /@types/linkify-it/3.0.2: @@ -2578,13 +2580,13 @@ packages: /@types/mysql/2.15.21: resolution: {integrity: sha512-NPotx5CVful7yB+qZbWtXL2fA4e7aEHkihHLjklc6ID8aq7bhguHgeIoC1EmSNTAuCgI6ZXrjt2ZSaXnYX0EUg==} dependencies: - '@types/node': 14.18.56 + '@types/node': 16.18.46 dev: false /@types/node-fetch/2.6.4: resolution: {integrity: sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==} dependencies: - '@types/node': 14.18.56 + '@types/node': 16.18.46 form-data: 3.0.1 dev: false @@ -2609,7 +2611,7 @@ packages: /@types/pg/8.6.1: resolution: {integrity: sha512-1Kc4oAGzAl7uqUStZCDvaLFqZrW9qWSjXOmBfdgyBP5La7Us6Mg4GBvRlSoaZMhQF/zSj1C8CtKMBkoiT8eL8w==} dependencies: - '@types/node': 14.18.56 + '@types/node': 16.18.46 pg-protocol: 1.6.0 pg-types: 2.2.0 dev: false @@ -2637,7 +2639,7 @@ packages: /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 14.18.56 + '@types/node': 16.18.46 dev: false /@types/resolve/1.20.2: @@ -2660,7 +2662,7 @@ packages: resolution: {integrity: sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==} dependencies: '@types/mime': 1.3.2 - '@types/node': 14.18.56 + '@types/node': 16.18.46 dev: false /@types/serve-static/1.15.2: @@ -2668,7 +2670,7 @@ packages: dependencies: '@types/http-errors': 2.0.1 '@types/mime': 3.0.1 - '@types/node': 14.18.56 + '@types/node': 16.18.46 dev: false /@types/shimmer/1.0.2: @@ -2688,13 +2690,13 @@ packages: /@types/stoppable/1.1.1: resolution: {integrity: sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==} dependencies: - '@types/node': 14.18.56 + '@types/node': 16.18.46 dev: false /@types/through/0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 14.18.56 + '@types/node': 16.18.46 dev: false /@types/tough-cookie/4.0.2: @@ -2708,7 +2710,7 @@ packages: /@types/tunnel/0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - '@types/node': 14.18.56 + '@types/node': 16.18.46 dev: false /@types/underscore/1.11.8: @@ -2726,19 +2728,19 @@ packages: /@types/ws/7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 14.18.56 + '@types/node': 16.18.46 dev: false /@types/ws/8.5.5: resolution: {integrity: sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==} dependencies: - '@types/node': 14.18.56 + '@types/node': 16.18.46 dev: false /@types/xml2js/0.4.11: resolution: {integrity: sha512-JdigeAKmCyoJUiQljjr7tQG3if9NkqGUgwEUqBvV0N7LM4HyQk7UXCnusRa1lnvXAEYJ8mw8GtZWioagNztOwA==} dependencies: - '@types/node': 14.18.56 + '@types/node': 16.18.46 dev: false /@types/yargs-parser/21.0.0: @@ -2755,7 +2757,7 @@ packages: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 14.18.56 + '@types/node': 16.18.46 dev: false optional: true @@ -3793,7 +3795,7 @@ packages: resolution: {integrity: sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==} deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) dependencies: - ms: 2.1.1 + ms: 2.1.3 dev: false /debug/3.2.7: @@ -4024,7 +4026,7 @@ packages: dependencies: semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.3.0-dev.20230828 + typescript: 5.3.0-dev.20230901 dev: false /ecdsa-sig-formatter/1.0.11: @@ -4075,7 +4077,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.13 - '@types/node': 14.18.56 + '@types/node': 16.18.46 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -5005,7 +5007,7 @@ packages: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.0.4 + minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 dev: false @@ -7343,7 +7345,7 @@ packages: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 14.18.56 + '@types/node': 16.18.46 long: 5.2.3 dev: false @@ -8604,8 +8606,8 @@ packages: hasBin: true dev: false - /typescript/5.3.0-dev.20230828: - resolution: {integrity: sha512-uBVHpn+yxJsHMANa01Fn1Ni/3v4HzKcZbbzsbLYxgPKNJTAWQM8FoZWOFh5mrjZmpJcpGtPBcwbeuTUDOCD6QA==} + /typescript/5.3.0-dev.20230901: + resolution: {integrity: sha512-WF0nADzGdbBjQf948j5pSOko6uf7ax2KO1FqrPiX3RsQ99901TdBERuL5ivUu08KKOWV/+JyzUclUWIke5IwCw==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -14873,6 +14875,37 @@ packages: - supports-color dev: false + file:projects/arm-recoveryservicesdatareplication.tgz: + resolution: {integrity: sha512-t9rFggYdbcOj6SN7v4Orh6L5jlHneFk5aXSLNdHscj+ZPXEVx5r4pl4FebsR8r2fOTve4862dWRWNMuWGLGNfA==, tarball: file:projects/arm-recoveryservicesdatareplication.tgz} + name: '@rush-temp/arm-recoveryservicesdatareplication' + version: 0.0.0 + dependencies: + '@azure/identity': 2.1.0 + '@microsoft/api-extractor': 7.36.4_@types+node@14.18.56 + '@rollup/plugin-commonjs': 24.1.0_rollup@2.79.1 + '@rollup/plugin-json': 6.0.0_rollup@2.79.1 + '@rollup/plugin-multi-entry': 6.0.0_rollup@2.79.1 + '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1 + '@types/chai': 4.3.5 + '@types/node': 14.18.56 + chai: 4.3.8 + cross-env: 7.0.3 + dotenv: 16.3.1 + mkdirp: 2.1.6 + mocha: 7.2.0 + rimraf: 3.0.2 + rollup: 2.79.1 + rollup-plugin-sourcemaps: 0.6.3_ucobf5wm57tspgeyqakc4keoiu + ts-node: 10.9.1_6nxu25mniawxro3tsddnfyxbbu + tslib: 2.6.2 + typescript: 5.0.4 + uglify-js: 3.17.4 + transitivePeerDependencies: + - '@swc/core' + - '@swc/wasm' + - supports-color + dev: false + file:projects/arm-rediscache.tgz: resolution: {integrity: sha512-JDTsZOuYhef+ouTE3gpTZ6HfGpWoq4Q9NoKyE0OYCHoY6CeiGUqYivKUwEYzmiKIjAyDW9LBLQjjexvhG/xNEg==, tarball: file:projects/arm-rediscache.tgz} name: '@rush-temp/arm-rediscache' @@ -16804,7 +16837,7 @@ packages: dev: false file:projects/communication-identity.tgz: - resolution: {integrity: sha512-2XT/HftYvN2/fg8w6fl0RYHvu3MhQdcnLgI5dncs+48sJcLosntwsk9tZcITm7kXu4sGUrOvIqGcuKZ4PYHsew==, tarball: file:projects/communication-identity.tgz} + resolution: {integrity: sha512-JG9T9VS1aWHfOQeT0jkuqWA8FaoOoFWn2T87HVTCl5Ryo+c+TId7mKGFFdLS20mPlam1lmBkF/t56dbZHmJ1Ww==, tarball: file:projects/communication-identity.tgz} name: '@rush-temp/communication-identity' version: 0.0.0 dependencies: @@ -19415,7 +19448,7 @@ packages: dev: false file:projects/monitor-opentelemetry.tgz: - resolution: {integrity: sha512-txQ3DbyA7Wgxw1EsuU3mcah7TbeNjtEwuRsFdSZjaNathN/XmUqrBqKqF4NqflTwnvn7rsBVzL2KsYJmLZ3WZQ==, tarball: file:projects/monitor-opentelemetry.tgz} + resolution: {integrity: sha512-ZmBBSL5cvKPPSAtyDrWMJtkBe5QJ/+T0m5O7OGiEcheKgp9OQBPTubpqF4a0yFfsCNvbATIiP2AdnnPgBHVYEw==, tarball: file:projects/monitor-opentelemetry.tgz} name: '@rush-temp/monitor-opentelemetry' version: 0.0.0 dependencies: @@ -19459,7 +19492,7 @@ packages: dev: false file:projects/monitor-query.tgz: - resolution: {integrity: sha512-6YIUe9/df2jEBDFWghColdVxMimDSQAPJegJTMlXRntGWYb8j5M7ahirX/33kb7i+YWBONcaG4exDPtDulBASQ==, tarball: file:projects/monitor-query.tgz} + resolution: {integrity: sha512-W8as2SFRWqIP922vVA7UKQYBtTgSQPoTxlTBNjn5VQsC5Ed01PROVZY/KUr0sQYCv2MUtk5ATKYQccqRVkyUFQ==, tarball: file:projects/monitor-query.tgz} name: '@rush-temp/monitor-query' version: 0.0.0 dependencies: @@ -20461,7 +20494,7 @@ packages: dev: false file:projects/schema-registry-json.tgz: - resolution: {integrity: sha512-/WChF8ihkoLN9gFKm6UkN6qKMsttGgzow7jcmzwccH5+i0vjhPGff/vg0giqwdMIw1pMkqwtzI2q53wqFnlKsA==, tarball: file:projects/schema-registry-json.tgz} + resolution: {integrity: sha512-7fuY0AN7Hvc3NlOTj4ieNZfvngaSyhFlbSyPCp8BSrJPEeX07zJUC3XQ21H6xaxk9Xd/kuOuq15a8YEosZHorw==, tarball: file:projects/schema-registry-json.tgz} name: '@rush-temp/schema-registry-json' version: 0.0.0 dependencies: diff --git a/rush.json b/rush.json index b6f940e8ebf9..a47eaa6bd83d 100644 --- a/rush.json +++ b/rush.json @@ -2089,6 +2089,11 @@ "packageName": "@azure/arm-defendereasm", "projectFolder": "sdk/defendereasm/arm-defendereasm", "versionPolicyName": "management" + }, + { + "packageName": "@azure/arm-recoveryservicesdatareplication", + "projectFolder": "sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication", + "versionPolicyName": "management" } ] -} +} \ No newline at end of file diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/CHANGELOG.md b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/CHANGELOG.md new file mode 100644 index 000000000000..10197f0bb965 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0-beta.1 (2023-09-01) + +The package of @azure/arm-recoveryservicesdatareplication is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/LICENSE b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/LICENSE new file mode 100644 index 000000000000..3a1d9b6f24f7 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2023 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. \ No newline at end of file diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/README.md b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/README.md new file mode 100644 index 000000000000..98f145e7864b --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/README.md @@ -0,0 +1,109 @@ +# Azure Site Recovery Management client library for JavaScript + +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure Site Recovery Management client. + +A first party Azure service enabling the data replication. + +[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication) | +[Package (NPM)](https://www.npmjs.com/package/@azure/arm-recoveryservicesdatareplication) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-recoveryservicesdatareplication?view=azure-node-preview) | +[Samples](https://github.com/Azure-Samples/azure-samples-js-management) + +## Getting started + +### Currently supported environments + +- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule) +- Latest versions of Safari, Chrome, Edge and Firefox. + +See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. + +### Prerequisites + +- An [Azure subscription][azure_sub]. + +### Install the `@azure/arm-recoveryservicesdatareplication` package + +Install the Azure Site Recovery Management client library for JavaScript with `npm`: + +```bash +npm install @azure/arm-recoveryservicesdatareplication +``` + +### Create and authenticate a `AzureSiteRecoveryManagementServiceAPI` + +To create a client object to access the Azure Site Recovery Management API, you will need the `endpoint` of your Azure Site Recovery Management resource and a `credential`. The Azure Site Recovery Management client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your Azure Site Recovery Management resource in the [Azure Portal][azure_portal]. + +You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token). + +To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package: + +```bash +npm install @azure/identity +``` + +You will also need to **register a new AAD application and grant access to Azure Site Recovery Management** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). +Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. + +For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). + +```javascript +const { AzureSiteRecoveryManagementServiceAPI } = require("@azure/arm-recoveryservicesdatareplication"); +const { DefaultAzureCredential } = require("@azure/identity"); +// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details. + +const subscriptionId = "00000000-0000-0000-0000-000000000000"; +const client = new AzureSiteRecoveryManagementServiceAPI(new DefaultAzureCredential(), subscriptionId); + +// For client-side applications running in the browser, use this code instead: +// const credential = new InteractiveBrowserCredential({ +// tenantId: "", +// clientId: "" +// }); +// const client = new AzureSiteRecoveryManagementServiceAPI(credential, subscriptionId); +``` + + +### JavaScript Bundle +To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). + +## Key concepts + +### AzureSiteRecoveryManagementServiceAPI + +`AzureSiteRecoveryManagementServiceAPI` is the primary interface for developers using the Azure Site Recovery Management client library. Explore the methods on this client object to understand the different features of the Azure Site Recovery Management service that you can access. + +## Troubleshooting + +### Logging + +Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: + +```javascript +const { setLogLevel } = require("@azure/logger"); +setLogLevel("info"); +``` + +For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). + +## Next steps + +Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library. + +## Contributing + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. + +## 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%2Fsdk%2Frecoveryservicesdatareplication%2Farm-recoveryservicesdatareplication%2FREADME.png) + +[azure_cli]: https://docs.microsoft.com/cli/azure +[azure_sub]: https://azure.microsoft.com/free/ +[azure_sub]: https://azure.microsoft.com/free/ +[azure_portal]: https://portal.azure.com +[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity +[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/_meta.json b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/_meta.json new file mode 100644 index 000000000000..99de1b20c7b5 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/_meta.json @@ -0,0 +1,8 @@ +{ + "commit": "b5de319be003b965b0c5f4d3abcf2d0084e0fe03", + "readme": "specification/recoveryservicesdatareplication/resource-manager/readme.md", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/recoveryservicesdatareplication/resource-manager/readme.md --use=@autorest/typescript@^6.0.4", + "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.2", + "use": "@autorest/typescript@^6.0.4" +} \ No newline at end of file diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/api-extractor.json b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/api-extractor.json new file mode 100644 index 000000000000..76008121ea57 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/api-extractor.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "./types/arm-recoveryservicesdatareplication.d.ts" + }, + "messages": { + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, + "extractorMessageReporting": { + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } + } + } +} \ No newline at end of file diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/package.json b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/package.json new file mode 100644 index 000000000000..095a29316bf5 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/package.json @@ -0,0 +1,116 @@ +{ + "name": "@azure/arm-recoveryservicesdatareplication", + "sdk-type": "mgmt", + "author": "Microsoft Corporation", + "description": "A generated SDK for AzureSiteRecoveryManagementServiceAPI.", + "version": "1.0.0-beta.1", + "engines": { + "node": ">=14.0.0" + }, + "dependencies": { + "@azure/core-lro": "^2.5.4", + "@azure/abort-controller": "^1.0.0", + "@azure/core-paging": "^1.2.0", + "@azure/core-client": "^1.7.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-rest-pipeline": "^1.12.0", + "tslib": "^2.2.0" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "license": "MIT", + "main": "./dist/index.js", + "module": "./dist-esm/src/index.js", + "types": "./types/arm-recoveryservicesdatareplication.d.ts", + "devDependencies": { + "@microsoft/api-extractor": "^7.31.1", + "@rollup/plugin-commonjs": "^24.0.0", + "@rollup/plugin-json": "^6.0.0", + "@rollup/plugin-multi-entry": "^6.0.0", + "@rollup/plugin-node-resolve": "^13.1.3", + "mkdirp": "^2.1.2", + "rollup": "^2.66.1", + "rollup-plugin-sourcemaps": "^0.6.3", + "typescript": "~5.0.0", + "uglify-js": "^3.4.9", + "rimraf": "^3.0.0", + "dotenv": "^16.0.0", + "@azure/identity": "^2.0.1", + "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^1.0.0", + "mocha": "^7.1.1", + "@types/chai": "^4.2.8", + "chai": "^4.2.0", + "cross-env": "^7.0.2", + "@types/node": "^14.0.0", + "ts-node": "^10.0.0", + "@azure/dev-tool": "^1.0.0" + }, + "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", + "dist-esm/**/*.js", + "dist-esm/**/*.js.map", + "dist-esm/**/*.d.ts", + "dist-esm/**/*.d.ts.map", + "src/**/*.ts", + "README.md", + "LICENSE", + "rollup.config.js", + "tsconfig.json", + "review/*", + "CHANGELOG.md", + "types/*" + ], + "scripts": { + "build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "api-extractor run --local", + "lint": "echo skipped", + "audit": "echo skipped", + "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "build:node": "echo skipped", + "build:browser": "echo skipped", + "build:test": "echo skipped", + "build:samples": "echo skipped.", + "check-format": "echo skipped", + "execute:samples": "echo skipped", + "format": "echo skipped", + "test": "npm run integration-test", + "test:node": "echo skipped", + "test:browser": "echo skipped", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:browser": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:browser": "echo skipped" + }, + "sideEffects": false, + "//metadata": { + "constantPaths": [ + { + "path": "src/azureSiteRecoveryManagementServiceAPI.ts", + "prefix": "packageDetails" + } + ] + }, + "autoPublish": true, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication" +} \ No newline at end of file diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/review/arm-recoveryservicesdatareplication.api.md b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/review/arm-recoveryservicesdatareplication.api.md new file mode 100644 index 000000000000..2c330088b58b --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/review/arm-recoveryservicesdatareplication.api.md @@ -0,0 +1,1973 @@ +## API Report File for "@azure/arm-recoveryservicesdatareplication" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import * as coreAuth from '@azure/core-auth'; +import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PagedAsyncIterableIterator } from '@azure/core-paging'; +import { SimplePollerLike } from '@azure/core-lro'; + +// @public +export type ActionType = string; + +// @public +export interface AzStackHCIClusterProperties { + clusterName: string; + resourceName: string; + storageAccountName: string; + storageContainers: StorageContainerProperties[]; +} + +// @public +export interface AzStackHCIFabricModelCustomProperties extends FabricModelCustomProperties { + readonly applianceName?: string[]; + azStackHciSiteId: string; + cluster: AzStackHCIClusterProperties; + readonly fabricContainerId?: string; + readonly fabricResourceId?: string; + instanceType: "AzStackHCI"; + readonly migrationHubUri?: string; + migrationSolutionId: string; +} + +// @public (undocumented) +export class AzureSiteRecoveryManagementServiceAPI extends coreClient.ServiceClient { + // (undocumented) + $host: string; + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AzureSiteRecoveryManagementServiceAPIOptionalParams); + // (undocumented) + apiVersion: string; + checkNameAvailability(location: string, options?: CheckNameAvailabilityOptionalParams): Promise; + deploymentPreflight(resourceGroupName: string, deploymentId: string, options?: DeploymentPreflightOptionalParams): Promise; + // (undocumented) + dra: Dra; + // (undocumented) + draOperationStatus: DraOperationStatus; + // (undocumented) + emailConfiguration: EmailConfiguration; + // (undocumented) + event: Event_2; + // (undocumented) + fabric: Fabric; + // (undocumented) + fabricOperationsStatus: FabricOperationsStatus; + // (undocumented) + operations: Operations; + // (undocumented) + policy: Policy; + // (undocumented) + policyOperationStatus: PolicyOperationStatus; + // (undocumented) + protectedItem: ProtectedItem; + // (undocumented) + protectedItemOperationStatus: ProtectedItemOperationStatus; + // (undocumented) + recoveryPoints: RecoveryPoints; + // (undocumented) + replicationExtension: ReplicationExtension; + // (undocumented) + replicationExtensionOperationStatus: ReplicationExtensionOperationStatus; + // (undocumented) + subscriptionId: string; + // (undocumented) + vault: Vault; + // (undocumented) + vaultOperationStatus: VaultOperationStatus; + // (undocumented) + workflow: Workflow; + // (undocumented) + workflowOperationStatus: WorkflowOperationStatus; +} + +// @public +export interface AzureSiteRecoveryManagementServiceAPIOptionalParams extends coreClient.ServiceClientOptions { + $host?: string; + apiVersion?: string; + endpoint?: string; +} + +// @public +export interface CheckNameAvailabilityModel { + name?: string; + type?: string; +} + +// @public +export interface CheckNameAvailabilityOptionalParams extends coreClient.OperationOptions { + body?: CheckNameAvailabilityModel; +} + +// @public +export type CheckNameAvailabilityResponse = CheckNameAvailabilityResponseModel; + +// @public +export interface CheckNameAvailabilityResponseModel { + message?: string; + nameAvailable?: boolean; + reason?: string; +} + +// @public +export interface DeploymentPreflightModel { + resources?: DeploymentPreflightResource[]; +} + +// @public +export interface DeploymentPreflightOptionalParams extends coreClient.OperationOptions { + body?: DeploymentPreflightModel; +} + +// @public +export interface DeploymentPreflightResource { + apiVersion?: string; + location?: string; + name?: string; + type?: string; +} + +// @public +export type DeploymentPreflightResponse = DeploymentPreflightModel; + +// @public +export interface Dra { + beginCreate(resourceGroupName: string, fabricName: string, fabricAgentName: string, options?: DraCreateOptionalParams): Promise, DraCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, fabricName: string, fabricAgentName: string, options?: DraCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, fabricName: string, fabricAgentName: string, options?: DraDeleteOptionalParams): Promise, DraDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, fabricName: string, fabricAgentName: string, options?: DraDeleteOptionalParams): Promise; + get(resourceGroupName: string, fabricName: string, fabricAgentName: string, options?: DraGetOptionalParams): Promise; + list(resourceGroupName: string, fabricName: string, options?: DraListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface DraCreateOptionalParams extends coreClient.OperationOptions { + body?: DraModel; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DraCreateResponse = DraModel; + +// @public +export interface DraDeleteHeaders { + azureAsyncOperation?: string; + // (undocumented) + location?: string; +} + +// @public +export interface DraDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DraDeleteResponse = DraDeleteHeaders; + +// @public +export interface DraGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DraGetResponse = DraModel; + +// @public +export interface DraListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DraListNextResponse = DraModelCollection; + +// @public +export interface DraListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DraListResponse = DraModelCollection; + +// @public +export interface DraModel { + readonly id?: string; + readonly name?: string; + properties: DraModelProperties; + readonly systemData?: DraModelSystemData; + readonly type?: string; +} + +// @public +export interface DraModelCollection { + nextLink?: string; + value?: DraModel[]; +} + +// @public +export interface DraModelCustomProperties { + instanceType: "VMware"; +} + +// @public (undocumented) +export type DraModelCustomPropertiesUnion = DraModelCustomProperties | VMwareDraModelCustomProperties; + +// @public +export interface DraModelProperties { + authenticationIdentity: IdentityModel; + readonly correlationId?: string; + customProperties: DraModelCustomPropertiesUnion; + readonly healthErrors?: HealthErrorModel[]; + readonly isResponsive?: boolean; + readonly lastHeartbeat?: Date; + machineId: string; + machineName: string; + readonly provisioningState?: ProvisioningState; + resourceAccessIdentity: IdentityModel; + readonly versionNumber?: string; +} + +// @public (undocumented) +export interface DraModelSystemData extends SystemDataModel { +} + +// @public +export interface DraOperationStatus { + get(resourceGroupName: string, fabricName: string, fabricAgentName: string, operationId: string, options?: DraOperationStatusGetOptionalParams): Promise; +} + +// @public +export interface DraOperationStatusGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DraOperationStatusGetResponse = OperationStatus; + +// @public +export interface EmailConfiguration { + create(resourceGroupName: string, vaultName: string, emailConfigurationName: string, options?: EmailConfigurationCreateOptionalParams): Promise; + get(resourceGroupName: string, vaultName: string, emailConfigurationName: string, options?: EmailConfigurationGetOptionalParams): Promise; + list(resourceGroupName: string, vaultName: string, options?: EmailConfigurationListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface EmailConfigurationCreateOptionalParams extends coreClient.OperationOptions { + body?: EmailConfigurationModel; +} + +// @public +export type EmailConfigurationCreateResponse = EmailConfigurationModel; + +// @public +export interface EmailConfigurationGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type EmailConfigurationGetResponse = EmailConfigurationModel; + +// @public +export interface EmailConfigurationListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type EmailConfigurationListNextResponse = EmailConfigurationModelCollection; + +// @public +export interface EmailConfigurationListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type EmailConfigurationListResponse = EmailConfigurationModelCollection; + +// @public +export interface EmailConfigurationModel { + readonly id?: string; + readonly name?: string; + properties: EmailConfigurationModelProperties; + readonly systemData?: EmailConfigurationModelSystemData; + readonly type?: string; +} + +// @public +export interface EmailConfigurationModelCollection { + nextLink?: string; + value?: EmailConfigurationModel[]; +} + +// @public +export interface EmailConfigurationModelProperties { + customEmailAddresses?: string[]; + locale?: string; + sendToOwners: boolean; +} + +// @public (undocumented) +export interface EmailConfigurationModelSystemData extends SystemDataModel { +} + +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} + +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface ErrorModel { + readonly causes?: string; + readonly code?: string; + readonly creationTime?: Date; + readonly message?: string; + readonly recommendation?: string; + readonly severity?: string; + readonly type?: string; +} + +// @public +export interface ErrorResponse { + error?: ErrorDetail; +} + +// @public +interface Event_2 { + get(resourceGroupName: string, vaultName: string, eventName: string, options?: EventGetOptionalParams): Promise; + list(resourceGroupName: string, vaultName: string, options?: EventListOptionalParams): PagedAsyncIterableIterator; +} +export { Event_2 as Event } + +// @public +export interface EventGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type EventGetResponse = EventModel; + +// @public +export interface EventListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type EventListNextResponse = EventModelCollection; + +// @public +export interface EventListOptionalParams extends coreClient.OperationOptions { + continuationToken?: string; + filter?: string; +} + +// @public +export type EventListResponse = EventModelCollection; + +// @public +export interface EventModel { + readonly id?: string; + readonly name?: string; + properties: EventModelProperties; + readonly systemData?: EventModelSystemData; + readonly type?: string; +} + +// @public +export interface EventModelCollection { + nextLink?: string; + value?: EventModel[]; +} + +// @public +export interface EventModelCustomProperties { + instanceType: "HyperVToAzStackHCI"; +} + +// @public (undocumented) +export type EventModelCustomPropertiesUnion = EventModelCustomProperties | HyperVToAzStackHCIEventModelCustomProperties; + +// @public +export interface EventModelProperties { + readonly correlationId?: string; + customProperties: EventModelCustomPropertiesUnion; + readonly description?: string; + readonly eventName?: string; + readonly eventType?: string; + readonly healthErrors?: HealthErrorModel[]; + readonly resourceName?: string; + readonly resourceType?: string; + readonly severity?: string; + readonly timeOfOccurrence?: Date; +} + +// @public (undocumented) +export interface EventModelSystemData extends SystemDataModel { +} + +// @public +export interface Fabric { + beginCreate(resourceGroupName: string, fabricName: string, options?: FabricCreateOptionalParams): Promise, FabricCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, fabricName: string, options?: FabricCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, fabricName: string, options?: FabricDeleteOptionalParams): Promise, FabricDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, fabricName: string, options?: FabricDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, fabricName: string, options?: FabricUpdateOptionalParams): Promise, FabricUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, fabricName: string, options?: FabricUpdateOptionalParams): Promise; + get(resourceGroupName: string, fabricName: string, options?: FabricGetOptionalParams): Promise; + list(resourceGroupName: string, options?: FabricListOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: FabricListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface FabricCreateOptionalParams extends coreClient.OperationOptions { + body?: FabricModel; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type FabricCreateResponse = FabricModel; + +// @public +export interface FabricDeleteHeaders { + azureAsyncOperation?: string; + // (undocumented) + location?: string; +} + +// @public +export interface FabricDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type FabricDeleteResponse = FabricDeleteHeaders; + +// @public +export interface FabricGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FabricGetResponse = FabricModel; + +// @public +export interface FabricListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FabricListBySubscriptionNextResponse = FabricModelCollection; + +// @public +export interface FabricListBySubscriptionOptionalParams extends coreClient.OperationOptions { + continuationToken?: string; +} + +// @public +export type FabricListBySubscriptionResponse = FabricModelCollection; + +// @public +export interface FabricListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FabricListNextResponse = FabricModelCollection; + +// @public +export interface FabricListOptionalParams extends coreClient.OperationOptions { + continuationToken?: string; +} + +// @public +export type FabricListResponse = FabricModelCollection; + +// @public +export interface FabricModel { + readonly id?: string; + location: string; + readonly name?: string; + properties: FabricModelProperties; + readonly systemData?: FabricModelSystemData; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; +} + +// @public +export interface FabricModelCollection { + nextLink?: string; + value?: FabricModel[]; +} + +// @public +export interface FabricModelCustomProperties { + instanceType: "AzStackHCI" | "HyperVMigrate" | "VMwareMigrate"; +} + +// @public (undocumented) +export type FabricModelCustomPropertiesUnion = FabricModelCustomProperties | AzStackHCIFabricModelCustomProperties | HyperVMigrateFabricModelCustomProperties | VMwareMigrateFabricModelCustomProperties; + +// @public +export interface FabricModelProperties { + customProperties: FabricModelCustomPropertiesUnion; + readonly health?: HealthStatus; + readonly healthErrors?: HealthErrorModel[]; + readonly provisioningState?: ProvisioningState; + readonly serviceEndpoint?: string; + readonly serviceResourceId?: string; +} + +// @public (undocumented) +export interface FabricModelSystemData extends SystemDataModel { +} + +// @public +export interface FabricModelUpdate { + readonly id?: string; + readonly name?: string; + properties?: FabricModelProperties; + readonly systemData?: FabricModelUpdateSystemData; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; +} + +// @public (undocumented) +export interface FabricModelUpdateSystemData extends SystemDataModel { +} + +// @public +export interface FabricOperationsStatus { + get(resourceGroupName: string, fabricName: string, operationId: string, options?: FabricOperationsStatusGetOptionalParams): Promise; +} + +// @public +export interface FabricOperationsStatusGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FabricOperationsStatusGetResponse = OperationStatus; + +// @public +export interface FabricUpdateHeaders { + azureAsyncOperation?: string; + // (undocumented) + location?: string; +} + +// @public +export interface FabricUpdateOptionalParams extends coreClient.OperationOptions { + body?: FabricModelUpdate; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type FabricUpdateResponse = FabricModel; + +// @public +export interface FailoverProtectedItemProperties { + readonly networkName?: string; + readonly protectedItemName?: string; + readonly recoveryPointId?: string; + readonly recoveryPointTime?: Date; + readonly subnet?: string; + readonly testVmName?: string; + readonly vmName?: string; +} + +// @public +export interface FailoverWorkflowModelCustomProperties extends WorkflowModelCustomProperties { + instanceType: "FailoverWorkflowDetails"; + readonly protectedItemDetails?: FailoverProtectedItemProperties[]; +} + +// @public +export function getContinuationToken(page: unknown): string | undefined; + +// @public +export interface HealthErrorModel { + affectedResourceCorrelationIds?: string[]; + affectedResourceType?: string; + readonly category?: string; + readonly causes?: string; + childErrors?: InnerHealthErrorModel[]; + readonly code?: string; + readonly creationTime?: Date; + readonly healthCategory?: string; + readonly isCustomerResolvable?: boolean; + readonly message?: string; + readonly recommendation?: string; + readonly severity?: string; + readonly source?: string; + readonly summary?: string; +} + +// @public +export type HealthStatus = string; + +// @public +export interface HyperVMigrateFabricModelCustomProperties extends FabricModelCustomProperties { + readonly fabricContainerId?: string; + readonly fabricResourceId?: string; + hyperVSiteId: string; + instanceType: "HyperVMigrate"; + readonly migrationHubUri?: string; + migrationSolutionId: string; +} + +// @public +export interface HyperVToAzStackHCIDiskInput { + diskFileFormat: string; + diskId: string; + diskSizeGB: number; + isDynamic?: boolean; + isOsDisk: boolean; + storageContainerId?: string; +} + +// @public +export interface HyperVToAzStackHCIEventModelCustomProperties extends EventModelCustomProperties { + readonly eventSourceFriendlyName?: string; + instanceType: "HyperVToAzStackHCI"; + readonly protectedItemFriendlyName?: string; + readonly serverType?: string; + readonly sourceApplianceName?: string; + readonly targetApplianceName?: string; +} + +// @public +export interface HyperVToAzStackHCINicInput { + readonly networkName?: string; + nicId: string; + selectionTypeForFailover: VMNicSelection; + targetNetworkId: string; + testNetworkId: string; +} + +// @public +export interface HyperVToAzStackHCIPlannedFailoverModelCustomProperties extends PlannedFailoverModelCustomProperties { + instanceType: "HyperVToAzStackHCI"; + shutdownSourceVM: boolean; +} + +// @public +export interface HyperVToAzStackHCIPolicyModelCustomProperties extends PolicyModelCustomProperties { + appConsistentFrequencyInMinutes: number; + crashConsistentFrequencyInMinutes: number; + instanceType: "HyperVToAzStackHCI"; + recoveryPointHistoryInMinutes: number; +} + +// @public +export interface HyperVToAzStackHCIProtectedDiskProperties { + readonly capacityInBytes?: number; + readonly diskType?: string; + readonly isDynamic?: boolean; + readonly isOsDisk?: boolean; + readonly migrateDiskName?: string; + readonly seedDiskName?: string; + readonly sourceDiskId?: string; + readonly sourceDiskName?: string; + readonly storageContainerId?: string; + readonly storageContainerLocalPath?: string; + readonly testMigrateDiskName?: string; +} + +// @public +export interface HyperVToAzStackHCIProtectedItemModelCustomProperties extends ProtectedItemModelCustomProperties { + readonly activeLocation?: ProtectedItemActiveLocation; + customLocationRegion: string; + disksToInclude: HyperVToAzStackHCIDiskInput[]; + dynamicMemoryConfig?: ProtectedItemDynamicMemoryConfig; + fabricDiscoveryMachineId: string; + readonly failoverRecoveryPointId?: string; + readonly firmwareType?: string; + hyperVGeneration: string; + readonly initialReplicationProgressPercentage?: number; + instanceType: "HyperVToAzStackHCI"; + isDynamicRam?: boolean; + readonly lastRecoveryPointId?: string; + readonly lastRecoveryPointReceived?: Date; + readonly lastReplicationUpdateTime?: Date; + nicsToInclude: HyperVToAzStackHCINicInput[]; + readonly osName?: string; + readonly osType?: string; + readonly protectedDisks?: HyperVToAzStackHCIProtectedDiskProperties[]; + readonly protectedNics?: HyperVToAzStackHCIProtectedNicProperties[]; + readonly resyncProgressPercentage?: number; + runAsAccountId: string; + readonly sourceApplianceName?: string; + readonly sourceCpuCores?: number; + sourceDraName: string; + readonly sourceMemoryInMegaBytes?: number; + readonly sourceVmName?: string; + storageContainerId: string; + readonly targetApplianceName?: string; + targetArcClusterCustomLocationId: string; + readonly targetAzStackHciClusterName?: string; + targetCpuCores?: number; + targetDraName: string; + targetHciClusterId: string; + readonly targetLocation?: string; + targetMemoryInMegaBytes?: number; + targetNetworkId?: string; + targetResourceGroupId: string; + readonly targetVmBiosId?: string; + targetVmName?: string; + testNetworkId?: string; +} + +// @public +export interface HyperVToAzStackHCIProtectedNicProperties { + readonly macAddress?: string; + readonly networkName?: string; + readonly nicId?: string; + readonly selectionTypeForFailover?: VMNicSelection; + readonly targetNetworkId?: string; + readonly testNetworkId?: string; +} + +// @public +export interface HyperVToAzStackHCIRecoveryPointModelCustomProperties extends RecoveryPointModelCustomProperties { + readonly diskIds?: string[]; + instanceType: "HyperVToAzStackHCI"; +} + +// @public +export interface HyperVToAzStackHCIReplicationExtensionModelCustomProperties extends ReplicationExtensionModelCustomProperties { + readonly asrServiceUri?: string; + azStackHciFabricArmId: string; + readonly azStackHciSiteId?: string; + readonly gatewayServiceUri?: string; + hyperVFabricArmId: string; + readonly hyperVSiteId?: string; + instanceType: "HyperVToAzStackHCI"; + readonly rcmServiceUri?: string; + readonly resourceGroup?: string; + readonly resourceLocation?: string; + readonly sourceGatewayServiceId?: string; + readonly sourceStorageContainerName?: string; + storageAccountId?: string; + storageAccountSasSecretName?: string; + readonly subscriptionId?: string; + readonly targetGatewayServiceId?: string; + readonly targetStorageContainerName?: string; +} + +// @public +export interface IdentityModel { + aadAuthority: string; + applicationId: string; + audience: string; + objectId: string; + tenantId: string; +} + +// @public +export interface InnerHealthErrorModel { + readonly category?: string; + readonly causes?: string; + readonly code?: string; + readonly creationTime?: Date; + readonly healthCategory?: string; + readonly isCustomerResolvable?: boolean; + readonly message?: string; + readonly recommendation?: string; + readonly severity?: string; + readonly source?: string; + readonly summary?: string; +} + +// @public +export enum KnownActionType { + Internal = "Internal" +} + +// @public +export enum KnownHealthStatus { + Critical = "Critical", + Normal = "Normal", + Warning = "Warning" +} + +// @public +export enum KnownOrigin { + System = "system", + User = "user", + UserSystem = "user,system" +} + +// @public +export enum KnownProtectedItemActiveLocation { + Primary = "Primary", + Recovery = "Recovery" +} + +// @public +export enum KnownProtectionState { + CancelFailoverFailedOnPrimary = "CancelFailoverFailedOnPrimary", + CancelFailoverFailedOnRecovery = "CancelFailoverFailedOnRecovery", + CancelFailoverInProgressOnPrimary = "CancelFailoverInProgressOnPrimary", + CancelFailoverInProgressOnRecovery = "CancelFailoverInProgressOnRecovery", + CancelFailoverStatesBegin = "CancelFailoverStatesBegin", + CancelFailoverStatesEnd = "CancelFailoverStatesEnd", + ChangeRecoveryPointCompleted = "ChangeRecoveryPointCompleted", + ChangeRecoveryPointFailed = "ChangeRecoveryPointFailed", + ChangeRecoveryPointInitiated = "ChangeRecoveryPointInitiated", + ChangeRecoveryPointStatesBegin = "ChangeRecoveryPointStatesBegin", + ChangeRecoveryPointStatesEnd = "ChangeRecoveryPointStatesEnd", + CommitFailoverCompleted = "CommitFailoverCompleted", + CommitFailoverFailedOnPrimary = "CommitFailoverFailedOnPrimary", + CommitFailoverFailedOnRecovery = "CommitFailoverFailedOnRecovery", + CommitFailoverInProgressOnPrimary = "CommitFailoverInProgressOnPrimary", + CommitFailoverInProgressOnRecovery = "CommitFailoverInProgressOnRecovery", + CommitFailoverStatesBegin = "CommitFailoverStatesBegin", + CommitFailoverStatesEnd = "CommitFailoverStatesEnd", + DisablingFailed = "DisablingFailed", + DisablingProtection = "DisablingProtection", + EnablingFailed = "EnablingFailed", + EnablingProtection = "EnablingProtection", + InitialReplicationCompletedOnPrimary = "InitialReplicationCompletedOnPrimary", + InitialReplicationCompletedOnRecovery = "InitialReplicationCompletedOnRecovery", + InitialReplicationFailed = "InitialReplicationFailed", + InitialReplicationInProgress = "InitialReplicationInProgress", + InitialReplicationStatesBegin = "InitialReplicationStatesBegin", + InitialReplicationStatesEnd = "InitialReplicationStatesEnd", + MarkedForDeletion = "MarkedForDeletion", + PlannedFailoverCompleted = "PlannedFailoverCompleted", + PlannedFailoverCompleting = "PlannedFailoverCompleting", + PlannedFailoverCompletionFailed = "PlannedFailoverCompletionFailed", + PlannedFailoverFailed = "PlannedFailoverFailed", + PlannedFailoverInitiated = "PlannedFailoverInitiated", + PlannedFailoverTransitionStatesBegin = "PlannedFailoverTransitionStatesBegin", + PlannedFailoverTransitionStatesEnd = "PlannedFailoverTransitionStatesEnd", + Protected = "Protected", + ProtectedStatesBegin = "ProtectedStatesBegin", + ProtectedStatesEnd = "ProtectedStatesEnd", + ReprotectFailed = "ReprotectFailed", + ReprotectInitiated = "ReprotectInitiated", + ReprotectStatesBegin = "ReprotectStatesBegin", + ReprotectStatesEnd = "ReprotectStatesEnd", + UnplannedFailoverCompleted = "UnplannedFailoverCompleted", + UnplannedFailoverCompleting = "UnplannedFailoverCompleting", + UnplannedFailoverCompletionFailed = "UnplannedFailoverCompletionFailed", + UnplannedFailoverFailed = "UnplannedFailoverFailed", + UnplannedFailoverInitiated = "UnplannedFailoverInitiated", + UnplannedFailoverTransitionStatesBegin = "UnplannedFailoverTransitionStatesBegin", + UnplannedFailoverTransitionStatesEnd = "UnplannedFailoverTransitionStatesEnd", + UnprotectedStatesBegin = "UnprotectedStatesBegin", + UnprotectedStatesEnd = "UnprotectedStatesEnd" +} + +// @public +export enum KnownProvisioningState { + Canceled = "Canceled", + Creating = "Creating", + Deleted = "Deleted", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownRecoveryPointType { + ApplicationConsistent = "ApplicationConsistent", + CrashConsistent = "CrashConsistent" +} + +// @public +export enum KnownReplicationVaultType { + DisasterRecovery = "DisasterRecovery", + Migrate = "Migrate" +} + +// @public +export enum KnownResynchronizationState { + None = "None", + ResynchronizationCompleted = "ResynchronizationCompleted", + ResynchronizationFailed = "ResynchronizationFailed", + ResynchronizationInitiated = "ResynchronizationInitiated" +} + +// @public +export enum KnownTaskState { + Cancelled = "Cancelled", + Failed = "Failed", + Pending = "Pending", + Skipped = "Skipped", + Started = "Started", + Succeeded = "Succeeded" +} + +// @public +export enum KnownTestFailoverState { + MarkedForDeletion = "MarkedForDeletion", + None = "None", + TestFailoverCleanupCompleting = "TestFailoverCleanupCompleting", + TestFailoverCleanupInitiated = "TestFailoverCleanupInitiated", + TestFailoverCompleted = "TestFailoverCompleted", + TestFailoverCompleting = "TestFailoverCompleting", + TestFailoverCompletionFailed = "TestFailoverCompletionFailed", + TestFailoverFailed = "TestFailoverFailed", + TestFailoverInitiated = "TestFailoverInitiated" +} + +// @public +export enum KnownVMNicSelection { + NotSelected = "NotSelected", + SelectedByDefault = "SelectedByDefault", + SelectedByUser = "SelectedByUser", + SelectedByUserOverride = "SelectedByUserOverride" +} + +// @public +export enum KnownVMwareToAzureMigrateResyncState { + None = "None", + PreparedForResynchronization = "PreparedForResynchronization", + StartedResynchronization = "StartedResynchronization" +} + +// @public +export enum KnownWorkflowObjectType { + AvsDiskPool = "AvsDiskPool", + Dra = "Dra", + Fabric = "Fabric", + Policy = "Policy", + ProtectedItem = "ProtectedItem", + RecoveryPlan = "RecoveryPlan", + ReplicationExtension = "ReplicationExtension", + Vault = "Vault" +} + +// @public +export enum KnownWorkflowState { + Cancelled = "Cancelled", + Cancelling = "Cancelling", + CompletedWithErrors = "CompletedWithErrors", + CompletedWithInformation = "CompletedWithInformation", + CompletedWithWarnings = "CompletedWithWarnings", + Failed = "Failed", + Pending = "Pending", + Started = "Started", + Succeeded = "Succeeded" +} + +// @public +export interface Operation { + readonly actionType?: ActionType; + display?: OperationDisplay; + readonly isDataAction?: boolean; + readonly name?: string; + readonly origin?: Origin; +} + +// @public +export interface OperationDisplay { + readonly description?: string; + readonly operation?: string; + readonly provider?: string; + readonly resource?: string; +} + +// @public +export interface OperationListResult { + readonly nextLink?: string; + readonly value?: Operation[]; +} + +// @public +export interface OperationModel { + display?: OperationModelProperties; + isDataAction?: boolean; + name?: string; + origin?: string; +} + +// @public +export interface OperationModelCollection { + nextLink?: string; + value?: OperationModel[]; +} + +// @public +export interface OperationModelProperties { + description?: string; + operation?: string; + provider?: string; + resource?: string; +} + +// @public +export interface Operations { + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListNextResponse = OperationListResult; + +// @public +export interface OperationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListResponse = OperationListResult; + +// @public +export interface OperationStatus { + endTime?: string; + id?: string; + name?: string; + startTime?: string; + status?: string; +} + +// @public +export type Origin = string; + +// @public +export interface PlannedFailoverModel { + properties: PlannedFailoverModelProperties; +} + +// @public +export interface PlannedFailoverModelCustomProperties { + instanceType: "HyperVToAzStackHCI" | "VMwareToAzStackHCI"; +} + +// @public (undocumented) +export type PlannedFailoverModelCustomPropertiesUnion = PlannedFailoverModelCustomProperties | HyperVToAzStackHCIPlannedFailoverModelCustomProperties | VMwareToAzStackHCIPlannedFailoverModelCustomProperties; + +// @public +export interface PlannedFailoverModelProperties { + customProperties: PlannedFailoverModelCustomPropertiesUnion; +} + +// @public +export interface Policy { + beginCreate(resourceGroupName: string, vaultName: string, policyName: string, options?: PolicyCreateOptionalParams): Promise, PolicyCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, vaultName: string, policyName: string, options?: PolicyCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, vaultName: string, policyName: string, options?: PolicyDeleteOptionalParams): Promise, PolicyDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, vaultName: string, policyName: string, options?: PolicyDeleteOptionalParams): Promise; + get(resourceGroupName: string, vaultName: string, policyName: string, options?: PolicyGetOptionalParams): Promise; + list(resourceGroupName: string, vaultName: string, options?: PolicyListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PolicyCreateOptionalParams extends coreClient.OperationOptions { + body?: PolicyModel; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PolicyCreateResponse = PolicyModel; + +// @public +export interface PolicyDeleteHeaders { + azureAsyncOperation?: string; + // (undocumented) + location?: string; +} + +// @public +export interface PolicyDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PolicyDeleteResponse = PolicyDeleteHeaders; + +// @public +export interface PolicyGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PolicyGetResponse = PolicyModel; + +// @public +export interface PolicyListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PolicyListNextResponse = PolicyModelCollection; + +// @public +export interface PolicyListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PolicyListResponse = PolicyModelCollection; + +// @public +export interface PolicyModel { + readonly id?: string; + readonly name?: string; + properties: PolicyModelProperties; + readonly systemData?: PolicyModelSystemData; + readonly type?: string; +} + +// @public +export interface PolicyModelCollection { + nextLink?: string; + value?: PolicyModel[]; +} + +// @public +export interface PolicyModelCustomProperties { + instanceType: "HyperVToAzStackHCI" | "VMwareToAzStackHCI"; +} + +// @public (undocumented) +export type PolicyModelCustomPropertiesUnion = PolicyModelCustomProperties | HyperVToAzStackHCIPolicyModelCustomProperties | VMwareToAzStackHCIPolicyModelCustomProperties; + +// @public +export interface PolicyModelProperties { + customProperties: PolicyModelCustomPropertiesUnion; + readonly provisioningState?: ProvisioningState; +} + +// @public (undocumented) +export interface PolicyModelSystemData extends SystemDataModel { +} + +// @public +export interface PolicyOperationStatus { + get(resourceGroupName: string, vaultName: string, policyName: string, operationId: string, options?: PolicyOperationStatusGetOptionalParams): Promise; +} + +// @public +export interface PolicyOperationStatusGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PolicyOperationStatusGetResponse = OperationStatus; + +// @public +export interface ProtectedItem { + beginCreate(resourceGroupName: string, vaultName: string, protectedItemName: string, options?: ProtectedItemCreateOptionalParams): Promise, ProtectedItemCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, vaultName: string, protectedItemName: string, options?: ProtectedItemCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, vaultName: string, protectedItemName: string, options?: ProtectedItemDeleteOptionalParams): Promise, ProtectedItemDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, vaultName: string, protectedItemName: string, options?: ProtectedItemDeleteOptionalParams): Promise; + beginPlannedFailover(resourceGroupName: string, vaultName: string, protectedItemName: string, options?: ProtectedItemPlannedFailoverOptionalParams): Promise, ProtectedItemPlannedFailoverResponse>>; + beginPlannedFailoverAndWait(resourceGroupName: string, vaultName: string, protectedItemName: string, options?: ProtectedItemPlannedFailoverOptionalParams): Promise; + get(resourceGroupName: string, vaultName: string, protectedItemName: string, options?: ProtectedItemGetOptionalParams): Promise; + list(resourceGroupName: string, vaultName: string, options?: ProtectedItemListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export type ProtectedItemActiveLocation = string; + +// @public +export interface ProtectedItemCreateOptionalParams extends coreClient.OperationOptions { + body?: ProtectedItemModel; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ProtectedItemCreateResponse = ProtectedItemModel; + +// @public +export interface ProtectedItemDeleteHeaders { + azureAsyncOperation?: string; + // (undocumented) + location?: string; +} + +// @public +export interface ProtectedItemDeleteOptionalParams extends coreClient.OperationOptions { + forceDelete?: boolean; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ProtectedItemDeleteResponse = ProtectedItemDeleteHeaders; + +// @public +export interface ProtectedItemDynamicMemoryConfig { + maximumMemoryInMegaBytes: number; + minimumMemoryInMegaBytes: number; + targetMemoryBufferPercentage: number; +} + +// @public +export interface ProtectedItemGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ProtectedItemGetResponse = ProtectedItemModel; + +// @public +export interface ProtectedItemJobProperties { + readonly displayName?: string; + readonly endTime?: Date; + readonly id?: string; + readonly name?: string; + readonly scenarioName?: string; + readonly startTime?: Date; + readonly state?: string; +} + +// @public +export interface ProtectedItemListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ProtectedItemListNextResponse = ProtectedItemModelCollection; + +// @public +export interface ProtectedItemListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ProtectedItemListResponse = ProtectedItemModelCollection; + +// @public +export interface ProtectedItemModel { + readonly id?: string; + readonly name?: string; + properties: ProtectedItemModelProperties; + readonly systemData?: ProtectedItemModelSystemData; + readonly type?: string; +} + +// @public +export interface ProtectedItemModelCollection { + nextLink?: string; + value?: ProtectedItemModel[]; +} + +// @public +export interface ProtectedItemModelCustomProperties { + instanceType: "HyperVToAzStackHCI" | "VMwareToAzStackHCI"; +} + +// @public (undocumented) +export type ProtectedItemModelCustomPropertiesUnion = ProtectedItemModelCustomProperties | HyperVToAzStackHCIProtectedItemModelCustomProperties | VMwareToAzStackHCIProtectedItemModelCustomProperties; + +// @public +export interface ProtectedItemModelProperties { + readonly allowedJobs?: string[]; + readonly correlationId?: string; + readonly currentJob?: ProtectedItemModelPropertiesCurrentJob; + customProperties: ProtectedItemModelCustomPropertiesUnion; + readonly draId?: string; + readonly fabricId?: string; + readonly fabricObjectId?: string; + readonly fabricObjectName?: string; + readonly healthErrors?: HealthErrorModel[]; + readonly lastFailedEnableProtectionJob?: ProtectedItemModelPropertiesLastFailedEnableProtectionJob; + readonly lastFailedPlannedFailoverJob?: ProtectedItemModelPropertiesLastFailedPlannedFailoverJob; + readonly lastSuccessfulPlannedFailoverTime?: Date; + readonly lastSuccessfulTestFailoverTime?: Date; + readonly lastSuccessfulUnplannedFailoverTime?: Date; + readonly lastTestFailoverJob?: ProtectedItemModelPropertiesLastTestFailoverJob; + policyName: string; + readonly protectionState?: ProtectionState; + readonly protectionStateDescription?: string; + readonly provisioningState?: ProvisioningState; + replicationExtensionName: string; + readonly replicationHealth?: HealthStatus; + readonly resynchronizationState?: ResynchronizationState; + readonly resyncRequired?: boolean; + readonly sourceFabricProviderId?: string; + readonly targetDraId?: string; + readonly targetFabricId?: string; + readonly targetFabricProviderId?: string; + readonly testFailoverState?: TestFailoverState; + readonly testFailoverStateDescription?: string; +} + +// @public (undocumented) +export interface ProtectedItemModelPropertiesCurrentJob extends ProtectedItemJobProperties { +} + +// @public (undocumented) +export interface ProtectedItemModelPropertiesLastFailedEnableProtectionJob extends ProtectedItemJobProperties { +} + +// @public (undocumented) +export interface ProtectedItemModelPropertiesLastFailedPlannedFailoverJob extends ProtectedItemJobProperties { +} + +// @public (undocumented) +export interface ProtectedItemModelPropertiesLastTestFailoverJob extends ProtectedItemJobProperties { +} + +// @public (undocumented) +export interface ProtectedItemModelSystemData extends SystemDataModel { +} + +// @public +export interface ProtectedItemOperationStatus { + get(resourceGroupName: string, vaultName: string, protectedItemName: string, operationId: string, options?: ProtectedItemOperationStatusGetOptionalParams): Promise; +} + +// @public +export interface ProtectedItemOperationStatusGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ProtectedItemOperationStatusGetResponse = OperationStatus; + +// @public +export interface ProtectedItemPlannedFailoverHeaders { + azureAsyncOperation?: string; + // (undocumented) + location?: string; +} + +// @public +export interface ProtectedItemPlannedFailoverOptionalParams extends coreClient.OperationOptions { + body?: PlannedFailoverModel; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ProtectedItemPlannedFailoverResponse = PlannedFailoverModel; + +// @public +export type ProtectionState = string; + +// @public +export type ProvisioningState = string; + +// @public +export interface RecoveryPointModel { + readonly id?: string; + readonly name?: string; + properties: RecoveryPointModelProperties; + readonly systemData?: RecoveryPointModelSystemData; + readonly type?: string; +} + +// @public +export interface RecoveryPointModelCollection { + nextLink?: string; + value?: RecoveryPointModel[]; +} + +// @public +export interface RecoveryPointModelCustomProperties { + instanceType: "HyperVToAzStackHCI"; +} + +// @public (undocumented) +export type RecoveryPointModelCustomPropertiesUnion = RecoveryPointModelCustomProperties | HyperVToAzStackHCIRecoveryPointModelCustomProperties; + +// @public +export interface RecoveryPointModelProperties { + customProperties: RecoveryPointModelCustomPropertiesUnion; + recoveryPointTime: Date; + recoveryPointType: RecoveryPointType; +} + +// @public (undocumented) +export interface RecoveryPointModelSystemData extends SystemDataModel { +} + +// @public +export interface RecoveryPoints { + get(resourceGroupName: string, vaultName: string, protectedItemName: string, recoveryPointName: string, options?: RecoveryPointsGetOptionalParams): Promise; + list(resourceGroupName: string, vaultName: string, protectedItemName: string, options?: RecoveryPointsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface RecoveryPointsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RecoveryPointsGetResponse = RecoveryPointModel; + +// @public +export interface RecoveryPointsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RecoveryPointsListNextResponse = RecoveryPointModelCollection; + +// @public +export interface RecoveryPointsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RecoveryPointsListResponse = RecoveryPointModelCollection; + +// @public +export type RecoveryPointType = string; + +// @public +export interface ReplicationExtension { + beginCreate(resourceGroupName: string, vaultName: string, replicationExtensionName: string, options?: ReplicationExtensionCreateOptionalParams): Promise, ReplicationExtensionCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, vaultName: string, replicationExtensionName: string, options?: ReplicationExtensionCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, vaultName: string, replicationExtensionName: string, options?: ReplicationExtensionDeleteOptionalParams): Promise, ReplicationExtensionDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, vaultName: string, replicationExtensionName: string, options?: ReplicationExtensionDeleteOptionalParams): Promise; + get(resourceGroupName: string, vaultName: string, replicationExtensionName: string, options?: ReplicationExtensionGetOptionalParams): Promise; + list(resourceGroupName: string, vaultName: string, options?: ReplicationExtensionListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ReplicationExtensionCreateOptionalParams extends coreClient.OperationOptions { + body?: ReplicationExtensionModel; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ReplicationExtensionCreateResponse = ReplicationExtensionModel; + +// @public +export interface ReplicationExtensionDeleteHeaders { + azureAsyncOperation?: string; + // (undocumented) + location?: string; +} + +// @public +export interface ReplicationExtensionDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ReplicationExtensionDeleteResponse = ReplicationExtensionDeleteHeaders; + +// @public +export interface ReplicationExtensionGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ReplicationExtensionGetResponse = ReplicationExtensionModel; + +// @public +export interface ReplicationExtensionListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ReplicationExtensionListNextResponse = ReplicationExtensionModelCollection; + +// @public +export interface ReplicationExtensionListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ReplicationExtensionListResponse = ReplicationExtensionModelCollection; + +// @public +export interface ReplicationExtensionModel { + readonly id?: string; + readonly name?: string; + properties: ReplicationExtensionModelProperties; + readonly systemData?: ReplicationExtensionModelSystemData; + readonly type?: string; +} + +// @public +export interface ReplicationExtensionModelCollection { + nextLink?: string; + value?: ReplicationExtensionModel[]; +} + +// @public +export interface ReplicationExtensionModelCustomProperties { + instanceType: "HyperVToAzStackHCI" | "VMwareToAzStackHCI"; +} + +// @public (undocumented) +export type ReplicationExtensionModelCustomPropertiesUnion = ReplicationExtensionModelCustomProperties | HyperVToAzStackHCIReplicationExtensionModelCustomProperties | VMwareToAzStackHCIReplicationExtensionModelCustomProperties; + +// @public +export interface ReplicationExtensionModelProperties { + customProperties: ReplicationExtensionModelCustomPropertiesUnion; + readonly provisioningState?: ProvisioningState; +} + +// @public (undocumented) +export interface ReplicationExtensionModelSystemData extends SystemDataModel { +} + +// @public +export interface ReplicationExtensionOperationStatus { + get(resourceGroupName: string, vaultName: string, replicationExtensionName: string, operationId: string, options?: ReplicationExtensionOperationStatusGetOptionalParams): Promise; +} + +// @public +export interface ReplicationExtensionOperationStatusGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ReplicationExtensionOperationStatusGetResponse = OperationStatus; + +// @public +export type ReplicationVaultType = string; + +// @public +export type ResynchronizationState = string; + +// @public +export interface StorageContainerProperties { + clusterSharedVolumePath: string; + name: string; +} + +// @public +export interface SystemDataModel { + createdAt?: Date; + createdBy?: string; + createdByType?: string; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: string; +} + +// @public +export interface TaskModel { + childrenWorkflows?: WorkflowModel[]; + customProperties?: TaskModelCustomProperties; + readonly endTime?: Date; + readonly startTime?: Date; + readonly state?: TaskState; + readonly taskName?: string; +} + +// @public +export interface TaskModelCustomProperties { + instanceType: string; +} + +// @public +export type TaskState = string; + +// @public +export interface TestFailoverCleanupWorkflowModelCustomProperties extends WorkflowModelCustomProperties { + readonly comments?: string; + instanceType: "TestFailoverCleanupWorkflowDetails"; +} + +// @public +export type TestFailoverState = string; + +// @public +export interface TestFailoverWorkflowModelCustomProperties extends WorkflowModelCustomProperties { + instanceType: "TestFailoverWorkflowDetails"; + readonly protectedItemDetails?: FailoverProtectedItemProperties[]; +} + +// @public +export interface Vault { + beginCreate(resourceGroupName: string, vaultName: string, options?: VaultCreateOptionalParams): Promise, VaultCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, vaultName: string, options?: VaultCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, vaultName: string, options?: VaultDeleteOptionalParams): Promise, VaultDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, vaultName: string, options?: VaultDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, vaultName: string, options?: VaultUpdateOptionalParams): Promise, VaultUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, vaultName: string, options?: VaultUpdateOptionalParams): Promise; + get(resourceGroupName: string, vaultName: string, options?: VaultGetOptionalParams): Promise; + list(resourceGroupName: string, options?: VaultListOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: VaultListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface VaultCreateOptionalParams extends coreClient.OperationOptions { + body?: VaultModel; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VaultCreateResponse = VaultModel; + +// @public +export interface VaultDeleteHeaders { + azureAsyncOperation?: string; + // (undocumented) + location?: string; +} + +// @public +export interface VaultDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VaultDeleteResponse = VaultDeleteHeaders; + +// @public +export interface VaultGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VaultGetResponse = VaultModel; + +// @public +export interface VaultListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VaultListBySubscriptionNextResponse = VaultModelCollection; + +// @public +export interface VaultListBySubscriptionOptionalParams extends coreClient.OperationOptions { + continuationToken?: string; +} + +// @public +export type VaultListBySubscriptionResponse = VaultModelCollection; + +// @public +export interface VaultListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VaultListNextResponse = VaultModelCollection; + +// @public +export interface VaultListOptionalParams extends coreClient.OperationOptions { + continuationToken?: string; +} + +// @public +export type VaultListResponse = VaultModelCollection; + +// @public +export interface VaultModel { + readonly id?: string; + location: string; + readonly name?: string; + properties?: VaultModelProperties; + readonly systemData?: VaultModelSystemData; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; +} + +// @public +export interface VaultModelCollection { + nextLink?: string; + value?: VaultModel[]; +} + +// @public +export interface VaultModelProperties { + readonly provisioningState?: ProvisioningState; + readonly serviceResourceId?: string; + vaultType?: ReplicationVaultType; +} + +// @public (undocumented) +export interface VaultModelSystemData extends SystemDataModel { +} + +// @public +export interface VaultModelUpdate { + readonly id?: string; + readonly name?: string; + properties?: VaultModelProperties; + readonly systemData?: VaultModelUpdateSystemData; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; +} + +// @public (undocumented) +export interface VaultModelUpdateSystemData extends SystemDataModel { +} + +// @public +export interface VaultOperationStatus { + get(resourceGroupName: string, vaultName: string, operationId: string, options?: VaultOperationStatusGetOptionalParams): Promise; +} + +// @public +export interface VaultOperationStatusGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VaultOperationStatusGetResponse = OperationStatus; + +// @public +export interface VaultUpdateHeaders { + azureAsyncOperation?: string; + // (undocumented) + location?: string; +} + +// @public +export interface VaultUpdateOptionalParams extends coreClient.OperationOptions { + body?: VaultModelUpdate; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VaultUpdateResponse = VaultModel; + +// @public +export type VMNicSelection = string; + +// @public +export interface VMwareDraModelCustomProperties extends DraModelCustomProperties { + biosId: string; + instanceType: "VMware"; + marsAuthenticationIdentity: IdentityModel; +} + +// @public +export interface VMwareMigrateFabricModelCustomProperties extends FabricModelCustomProperties { + instanceType: "VMwareMigrate"; + migrationSolutionId: string; + vmwareSiteId: string; +} + +// @public +export interface VMwareToAzStackHCIDiskInput { + diskFileFormat: string; + diskId: string; + diskSizeGB: number; + isDynamic?: boolean; + isOsDisk: boolean; + storageContainerId?: string; +} + +// @public +export interface VMwareToAzStackHCINicInput { + label: string; + readonly networkName?: string; + nicId: string; + selectionTypeForFailover: VMNicSelection; + targetNetworkId: string; + testNetworkId: string; +} + +// @public +export interface VMwareToAzStackHCIPlannedFailoverModelCustomProperties extends PlannedFailoverModelCustomProperties { + instanceType: "VMwareToAzStackHCI"; + shutdownSourceVM: boolean; +} + +// @public +export interface VMwareToAzStackHCIPolicyModelCustomProperties extends PolicyModelCustomProperties { + appConsistentFrequencyInMinutes: number; + crashConsistentFrequencyInMinutes: number; + instanceType: "VMwareToAzStackHCI"; + recoveryPointHistoryInMinutes: number; +} + +// @public +export interface VMwareToAzStackHCIProtectedDiskProperties { + readonly capacityInBytes?: number; + readonly diskType?: string; + readonly isDynamic?: boolean; + readonly isOsDisk?: boolean; + readonly migrateDiskName?: string; + readonly seedDiskName?: string; + readonly sourceDiskId?: string; + readonly sourceDiskName?: string; + readonly storageContainerId?: string; + readonly storageContainerLocalPath?: string; + readonly testMigrateDiskName?: string; +} + +// @public +export interface VMwareToAzStackHCIProtectedItemModelCustomProperties extends ProtectedItemModelCustomProperties { + readonly activeLocation?: ProtectedItemActiveLocation; + customLocationRegion: string; + disksToInclude: VMwareToAzStackHCIDiskInput[]; + dynamicMemoryConfig?: ProtectedItemDynamicMemoryConfig; + fabricDiscoveryMachineId: string; + readonly failoverRecoveryPointId?: string; + readonly firmwareType?: string; + hyperVGeneration: string; + readonly initialReplicationProgressPercentage?: number; + instanceType: "VMwareToAzStackHCI"; + isDynamicRam?: boolean; + readonly lastRecoveryPointId?: string; + readonly lastRecoveryPointReceived?: Date; + readonly lastReplicationUpdateTime?: Date; + readonly migrationProgressPercentage?: number; + nicsToInclude: VMwareToAzStackHCINicInput[]; + readonly osName?: string; + readonly osType?: string; + performAutoResync?: boolean; + readonly protectedDisks?: VMwareToAzStackHCIProtectedDiskProperties[]; + readonly protectedNics?: VMwareToAzStackHCIProtectedNicProperties[]; + readonly resumeProgressPercentage?: number; + readonly resumeRetryCount?: number; + readonly resyncProgressPercentage?: number; + readonly resyncRequired?: boolean; + readonly resyncRetryCount?: number; + readonly resyncState?: VMwareToAzureMigrateResyncState; + runAsAccountId: string; + readonly sourceApplianceName?: string; + readonly sourceCpuCores?: number; + sourceDraName: string; + readonly sourceMemoryInMegaBytes?: number; + readonly sourceVmName?: string; + storageContainerId: string; + readonly targetApplianceName?: string; + targetArcClusterCustomLocationId: string; + readonly targetAzStackHciClusterName?: string; + targetCpuCores?: number; + targetDraName: string; + targetHciClusterId: string; + readonly targetLocation?: string; + targetMemoryInMegaBytes?: number; + targetNetworkId?: string; + targetResourceGroupId: string; + readonly targetVmBiosId?: string; + targetVmName?: string; + testNetworkId?: string; +} + +// @public +export interface VMwareToAzStackHCIProtectedNicProperties { + isPrimaryNic?: boolean; + readonly label?: string; + readonly macAddress?: string; + readonly networkName?: string; + readonly nicId?: string; + readonly selectionTypeForFailover?: VMNicSelection; + readonly targetNetworkId?: string; + readonly testNetworkId?: string; +} + +// @public +export interface VMwareToAzStackHCIReplicationExtensionModelCustomProperties extends ReplicationExtensionModelCustomProperties { + readonly asrServiceUri?: string; + azStackHciFabricArmId: string; + readonly azStackHciSiteId?: string; + readonly gatewayServiceUri?: string; + instanceType: "VMwareToAzStackHCI"; + readonly rcmServiceUri?: string; + readonly resourceGroup?: string; + readonly resourceLocation?: string; + readonly sourceGatewayServiceId?: string; + readonly sourceStorageContainerName?: string; + storageAccountId?: string; + storageAccountSasSecretName?: string; + readonly subscriptionId?: string; + readonly targetGatewayServiceId?: string; + readonly targetStorageContainerName?: string; + vmwareFabricArmId: string; + readonly vmwareSiteId?: string; +} + +// @public +export type VMwareToAzureMigrateResyncState = string; + +// @public +export interface Workflow { + get(resourceGroupName: string, vaultName: string, jobName: string, options?: WorkflowGetOptionalParams): Promise; + list(resourceGroupName: string, vaultName: string, options?: WorkflowListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface WorkflowGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WorkflowGetResponse = WorkflowModel; + +// @public +export interface WorkflowListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WorkflowListNextResponse = WorkflowModelCollection; + +// @public +export interface WorkflowListOptionalParams extends coreClient.OperationOptions { + continuationToken?: string; + filter?: string; +} + +// @public +export type WorkflowListResponse = WorkflowModelCollection; + +// @public +export interface WorkflowModel { + readonly id?: string; + readonly name?: string; + properties: WorkflowModelProperties; + readonly systemData?: WorkflowModelSystemData; + readonly type?: string; +} + +// @public +export interface WorkflowModelCollection { + nextLink?: string; + value?: WorkflowModel[]; +} + +// @public +export interface WorkflowModelCustomProperties { + readonly affectedObjectDetails?: { + [propertyName: string]: string; + }; + instanceType: "FailoverWorkflowDetails" | "TestFailoverCleanupWorkflowDetails" | "TestFailoverWorkflowDetails"; +} + +// @public (undocumented) +export type WorkflowModelCustomPropertiesUnion = WorkflowModelCustomProperties | FailoverWorkflowModelCustomProperties | TestFailoverCleanupWorkflowModelCustomProperties | TestFailoverWorkflowModelCustomProperties; + +// @public +export interface WorkflowModelProperties { + readonly activityId?: string; + readonly allowedActions?: string[]; + customProperties: WorkflowModelCustomPropertiesUnion; + readonly displayName?: string; + readonly endTime?: Date; + readonly errors?: ErrorModel[]; + readonly objectId?: string; + readonly objectInternalId?: string; + readonly objectInternalName?: string; + readonly objectName?: string; + readonly objectType?: WorkflowObjectType; + readonly replicationProviderId?: string; + readonly sourceFabricProviderId?: string; + readonly startTime?: Date; + readonly state?: WorkflowState; + readonly targetFabricProviderId?: string; + readonly tasks?: TaskModel[]; +} + +// @public (undocumented) +export interface WorkflowModelSystemData extends SystemDataModel { +} + +// @public +export type WorkflowObjectType = string; + +// @public +export interface WorkflowOperationStatus { + get(resourceGroupName: string, vaultName: string, jobName: string, operationId: string, options?: WorkflowOperationStatusGetOptionalParams): Promise; +} + +// @public +export interface WorkflowOperationStatusGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WorkflowOperationStatusGetResponse = OperationStatus; + +// @public +export type WorkflowState = string; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/rollup.config.js b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/rollup.config.js new file mode 100644 index 000000000000..3f89d7309da5 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/rollup.config.js @@ -0,0 +1,122 @@ +/* + * 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 nodeResolve from "@rollup/plugin-node-resolve"; +import cjs from "@rollup/plugin-commonjs"; +import sourcemaps from "rollup-plugin-sourcemaps"; +import multiEntry from "@rollup/plugin-multi-entry"; +import json from "@rollup/plugin-json"; + +import nodeBuiltins from "builtin-modules"; + +// #region Warning Handler + +/** + * A function that can determine whether a rollup warning should be ignored. If + * the function returns `true`, then the warning will not be displayed. + */ + +function ignoreNiseSinonEval(warning) { + return ( + warning.code === "EVAL" && + warning.id && + (warning.id.includes("node_modules/nise") || + warning.id.includes("node_modules/sinon")) === true + ); +} + +function ignoreChaiCircularDependency(warning) { + return ( + warning.code === "CIRCULAR_DEPENDENCY" && + warning.importer && warning.importer.includes("node_modules/chai") === true + ); +} + +const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval]; + +/** + * Construct a warning handler for the shared rollup configuration + * that ignores certain warnings that are not relevant to testing. + */ +function makeOnWarnForTesting() { + return (warning, warn) => { + // If every inhibitor returns false (i.e. no inhibitors), then show the warning + if (warningInhibitors.every((inhib) => !inhib(warning))) { + warn(warning); + } + }; +} + +// #endregion + +function makeBrowserTestConfig() { + const config = { + input: { + include: ["dist-esm/test/**/*.spec.js"], + exclude: ["dist-esm/test/**/node/**"] + }, + output: { + file: `dist-test/index.browser.js`, + format: "umd", + sourcemap: true + }, + preserveSymlinks: false, + plugins: [ + multiEntry({ exports: false }), + nodeResolve({ + mainFields: ["module", "browser"] + }), + cjs(), + json(), + sourcemaps() + //viz({ filename: "dist-test/browser-stats.html", sourcemap: true }) + ], + onwarn: makeOnWarnForTesting(), + // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, + // rollup started respecting the "sideEffects" field in package.json. Since + // our package.json sets "sideEffects=false", this also applies to test + // code, which causes all tests to be removed by tree-shaking. + treeshake: false + }; + + return config; +} + +const defaultConfigurationOptions = { + disableBrowserBundle: false +}; + +export function makeConfig(pkg, options) { + options = { + ...defaultConfigurationOptions, + ...(options || {}) + }; + + const baseConfig = { + // Use the package's module field if it has one + input: pkg["module"] || "dist-esm/src/index.js", + external: [ + ...nodeBuiltins, + ...Object.keys(pkg.dependencies), + ...Object.keys(pkg.devDependencies) + ], + output: { file: "dist/index.js", format: "cjs", sourcemap: true }, + preserveSymlinks: false, + plugins: [sourcemaps(), nodeResolve()] + }; + + const config = [baseConfig]; + + if (!options.disableBrowserBundle) { + config.push(makeBrowserTestConfig()); + } + + return config; +} + +export default makeConfig(require("./package.json")); diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/sample.env b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/sample.env new file mode 100644 index 000000000000..672847a3fea0 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/sample.env @@ -0,0 +1,4 @@ +# App registration secret for AAD authentication +AZURE_CLIENT_SECRET= +AZURE_CLIENT_ID= +AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/azureSiteRecoveryManagementServiceAPI.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/azureSiteRecoveryManagementServiceAPI.ts new file mode 100644 index 000000000000..00a099051e23 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/azureSiteRecoveryManagementServiceAPI.ts @@ -0,0 +1,306 @@ +/* + * 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 coreClient from "@azure/core-client"; +import * as coreRestPipeline from "@azure/core-rest-pipeline"; +import { + PipelineRequest, + PipelineResponse, + SendRequest +} from "@azure/core-rest-pipeline"; +import * as coreAuth from "@azure/core-auth"; +import { + DraImpl, + DraOperationStatusImpl, + EmailConfigurationImpl, + EventImpl, + FabricImpl, + FabricOperationsStatusImpl, + PolicyImpl, + PolicyOperationStatusImpl, + ProtectedItemImpl, + ProtectedItemOperationStatusImpl, + RecoveryPointsImpl, + ReplicationExtensionImpl, + ReplicationExtensionOperationStatusImpl, + OperationsImpl, + VaultImpl, + VaultOperationStatusImpl, + WorkflowImpl, + WorkflowOperationStatusImpl +} from "./operations"; +import { + Dra, + DraOperationStatus, + EmailConfiguration, + Event, + Fabric, + FabricOperationsStatus, + Policy, + PolicyOperationStatus, + ProtectedItem, + ProtectedItemOperationStatus, + RecoveryPoints, + ReplicationExtension, + ReplicationExtensionOperationStatus, + Operations, + Vault, + VaultOperationStatus, + Workflow, + WorkflowOperationStatus +} from "./operationsInterfaces"; +import * as Parameters from "./models/parameters"; +import * as Mappers from "./models/mappers"; +import { + AzureSiteRecoveryManagementServiceAPIOptionalParams, + CheckNameAvailabilityOptionalParams, + CheckNameAvailabilityResponse, + DeploymentPreflightOptionalParams, + DeploymentPreflightResponse +} from "./models"; + +export class AzureSiteRecoveryManagementServiceAPI extends coreClient.ServiceClient { + $host: string; + subscriptionId: string; + apiVersion: string; + + /** + * Initializes a new instance of the AzureSiteRecoveryManagementServiceAPI class. + * @param credentials Subscription credentials which uniquely identify client subscription. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. + * @param options The parameter options + */ + constructor( + credentials: coreAuth.TokenCredential, + subscriptionId: string, + options?: AzureSiteRecoveryManagementServiceAPIOptionalParams + ) { + if (credentials === undefined) { + throw new Error("'credentials' cannot be null"); + } + if (subscriptionId === undefined) { + throw new Error("'subscriptionId' cannot be null"); + } + + // Initializing default values for options + if (!options) { + options = {}; + } + const defaults: AzureSiteRecoveryManagementServiceAPIOptionalParams = { + requestContentType: "application/json; charset=utf-8", + credential: credentials + }; + + const packageDetails = `azsdk-js-arm-recoveryservicesdatareplication/1.0.0-beta.1`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; + + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + endpoint: + options.endpoint ?? options.baseUri ?? "https://management.azure.com" + }; + super(optionsWithDefaults); + + let bearerTokenAuthenticationPolicyFound: boolean = false; + if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { + const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); + bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + (pipelinePolicy) => + pipelinePolicy.name === + coreRestPipeline.bearerTokenAuthenticationPolicyName + ); + } + if ( + !options || + !options.pipeline || + options.pipeline.getOrderedPolicies().length == 0 || + !bearerTokenAuthenticationPolicyFound + ) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + credential: credentials, + scopes: + optionsWithDefaults.credentialScopes ?? + `${optionsWithDefaults.endpoint}/.default`, + challengeCallbacks: { + authorizeRequestOnChallenge: + coreClient.authorizeRequestOnClaimChallenge + } + }) + ); + } + // Parameter assignments + this.subscriptionId = subscriptionId; + + // Assigning values to Constant parameters + this.$host = options.$host || "https://management.azure.com"; + this.apiVersion = options.apiVersion || "2021-02-16-preview"; + this.dra = new DraImpl(this); + this.draOperationStatus = new DraOperationStatusImpl(this); + this.emailConfiguration = new EmailConfigurationImpl(this); + this.event = new EventImpl(this); + this.fabric = new FabricImpl(this); + this.fabricOperationsStatus = new FabricOperationsStatusImpl(this); + this.policy = new PolicyImpl(this); + this.policyOperationStatus = new PolicyOperationStatusImpl(this); + this.protectedItem = new ProtectedItemImpl(this); + this.protectedItemOperationStatus = new ProtectedItemOperationStatusImpl( + this + ); + this.recoveryPoints = new RecoveryPointsImpl(this); + this.replicationExtension = new ReplicationExtensionImpl(this); + this.replicationExtensionOperationStatus = new ReplicationExtensionOperationStatusImpl( + this + ); + this.operations = new OperationsImpl(this); + this.vault = new VaultImpl(this); + this.vaultOperationStatus = new VaultOperationStatusImpl(this); + this.workflow = new WorkflowImpl(this); + this.workflowOperationStatus = new WorkflowOperationStatusImpl(this); + this.addCustomApiVersionPolicy(options.apiVersion); + } + + /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ + private addCustomApiVersionPolicy(apiVersion?: string) { + if (!apiVersion) { + return; + } + const apiVersionPolicy = { + name: "CustomApiVersionPolicy", + async sendRequest( + request: PipelineRequest, + next: SendRequest + ): Promise { + const param = request.url.split("?"); + if (param.length > 1) { + const newParams = param[1].split("&").map((item) => { + if (item.indexOf("api-version") > -1) { + return "api-version=" + apiVersion; + } else { + return item; + } + }); + request.url = param[0] + "?" + newParams.join("&"); + } + return next(request); + } + }; + this.pipeline.addPolicy(apiVersionPolicy); + } + + /** + * Checks the resource name availability. + * @param location The name of the Azure region. + * @param options The options parameters. + */ + checkNameAvailability( + location: string, + options?: CheckNameAvailabilityOptionalParams + ): Promise { + return this.sendOperationRequest( + { location, options }, + checkNameAvailabilityOperationSpec + ); + } + + /** + * Performs resource deployment validation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentId Deployment Id. + * @param options The options parameters. + */ + deploymentPreflight( + resourceGroupName: string, + deploymentId: string, + options?: DeploymentPreflightOptionalParams + ): Promise { + return this.sendOperationRequest( + { resourceGroupName, deploymentId, options }, + deploymentPreflightOperationSpec + ); + } + + dra: Dra; + draOperationStatus: DraOperationStatus; + emailConfiguration: EmailConfiguration; + event: Event; + fabric: Fabric; + fabricOperationsStatus: FabricOperationsStatus; + policy: Policy; + policyOperationStatus: PolicyOperationStatus; + protectedItem: ProtectedItem; + protectedItemOperationStatus: ProtectedItemOperationStatus; + recoveryPoints: RecoveryPoints; + replicationExtension: ReplicationExtension; + replicationExtensionOperationStatus: ReplicationExtensionOperationStatus; + operations: Operations; + vault: Vault; + vaultOperationStatus: VaultOperationStatus; + workflow: Workflow; + workflowOperationStatus: WorkflowOperationStatus; +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/locations/{location}/checkNameAvailability", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.CheckNameAvailabilityResponseModel + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body8, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deploymentPreflightOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/deployments/{deploymentId}/preflight", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.DeploymentPreflightModel + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body9, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deploymentId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/index.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/index.ts new file mode 100644 index 000000000000..11715d7c2c0b --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/index.ts @@ -0,0 +1,13 @@ +/* + * 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 { getContinuationToken } from "./pagingHelper"; +export * from "./models"; +export { AzureSiteRecoveryManagementServiceAPI } from "./azureSiteRecoveryManagementServiceAPI"; +export * from "./operationsInterfaces"; diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/lroImpl.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/lroImpl.ts new file mode 100644 index 000000000000..dd803cd5e28c --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/lroImpl.ts @@ -0,0 +1,42 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortSignalLike } from "@azure/abort-controller"; +import { LongRunningOperation, LroResponse } from "@azure/core-lro"; + +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: ( + path: string, + options?: { abortSignal?: AbortSignalLike } + ) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal + }); + } + }; +} diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/models/index.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/models/index.ts new file mode 100644 index 000000000000..5dbef4cf0595 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/models/index.ts @@ -0,0 +1,3567 @@ +/* + * 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 coreClient from "@azure/core-client"; + +export type DraModelCustomPropertiesUnion = + | DraModelCustomProperties + | VMwareDraModelCustomProperties; +export type EventModelCustomPropertiesUnion = + | EventModelCustomProperties + | HyperVToAzStackHCIEventModelCustomProperties; +export type FabricModelCustomPropertiesUnion = + | FabricModelCustomProperties + | AzStackHCIFabricModelCustomProperties + | HyperVMigrateFabricModelCustomProperties + | VMwareMigrateFabricModelCustomProperties; +export type PolicyModelCustomPropertiesUnion = + | PolicyModelCustomProperties + | HyperVToAzStackHCIPolicyModelCustomProperties + | VMwareToAzStackHCIPolicyModelCustomProperties; +export type ProtectedItemModelCustomPropertiesUnion = + | ProtectedItemModelCustomProperties + | HyperVToAzStackHCIProtectedItemModelCustomProperties + | VMwareToAzStackHCIProtectedItemModelCustomProperties; +export type PlannedFailoverModelCustomPropertiesUnion = + | PlannedFailoverModelCustomProperties + | HyperVToAzStackHCIPlannedFailoverModelCustomProperties + | VMwareToAzStackHCIPlannedFailoverModelCustomProperties; +export type RecoveryPointModelCustomPropertiesUnion = + | RecoveryPointModelCustomProperties + | HyperVToAzStackHCIRecoveryPointModelCustomProperties; +export type ReplicationExtensionModelCustomPropertiesUnion = + | ReplicationExtensionModelCustomProperties + | HyperVToAzStackHCIReplicationExtensionModelCustomProperties + | VMwareToAzStackHCIReplicationExtensionModelCustomProperties; +export type WorkflowModelCustomPropertiesUnion = + | WorkflowModelCustomProperties + | FailoverWorkflowModelCustomProperties + | TestFailoverCleanupWorkflowModelCustomProperties + | TestFailoverWorkflowModelCustomProperties; + +/** Dra model. */ +export interface DraModel { + /** Dra model properties. */ + properties: DraModelProperties; + /** + * Gets or sets the Id of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Gets or sets the name of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Gets or sets the type of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly systemData?: DraModelSystemData; +} + +/** Dra model properties. */ +export interface DraModelProperties { + /** + * Gets or sets the Dra correlation Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly correlationId?: string; + /** Gets or sets the machine Id where Dra is running. */ + machineId: string; + /** Gets or sets the machine name where Dra is running. */ + machineName: string; + /** Identity model. */ + authenticationIdentity: IdentityModel; + /** Identity model. */ + resourceAccessIdentity: IdentityModel; + /** + * Gets or sets a value indicating whether Dra is responsive. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isResponsive?: boolean; + /** + * Gets or sets the time when last heartbeat was sent by the Dra. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastHeartbeat?: Date; + /** + * Gets or sets the Dra version. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly versionNumber?: string; + /** + * Gets or sets the provisioning state of the Dra. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** + * Gets or sets the list of health errors. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly healthErrors?: HealthErrorModel[]; + /** Dra model custom properties. */ + customProperties: DraModelCustomPropertiesUnion; +} + +/** Identity model. */ +export interface IdentityModel { + /** Gets or sets the tenant Id of the SPN with which Dra communicates to service. */ + tenantId: string; + /** + * Gets or sets the client/application Id of the SPN with which Dra communicates to + * service. + */ + applicationId: string; + /** Gets or sets the object Id of the SPN with which Dra communicates to service. */ + objectId: string; + /** Gets or sets the audience of the SPN with which Dra communicates to service. */ + audience: string; + /** Gets or sets the authority of the SPN with which Dra communicates to service. */ + aadAuthority: string; +} + +/** Health error model. */ +export interface HealthErrorModel { + /** Gets or sets the type of affected resource type. */ + affectedResourceType?: string; + /** + * Gets or sets the list of affected resource correlation Ids. This can be used to + * uniquely identify the count of items affected by a specific category and severity + * as well as count of item affected by an specific issue. + */ + affectedResourceCorrelationIds?: string[]; + /** Gets or sets a list of child health errors associated with this error. */ + childErrors?: InnerHealthErrorModel[]; + /** + * Gets or sets the error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * Gets or sets the health category. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly healthCategory?: string; + /** + * Gets or sets the error category. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly category?: string; + /** + * Gets or sets the error severity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly severity?: string; + /** + * Gets or sets the error source. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly source?: string; + /** + * Gets or sets the error creation time. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly creationTime?: Date; + /** + * Gets or sets a value indicating whether the error is customer resolvable. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isCustomerResolvable?: boolean; + /** + * Gets or sets the error summary. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly summary?: string; + /** + * Gets or sets the error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * Gets or sets possible causes of the error. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly causes?: string; + /** + * Gets or sets recommended action to resolve the error. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly recommendation?: string; +} + +/** Inner health error model. */ +export interface InnerHealthErrorModel { + /** + * Gets or sets the error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * Gets or sets the health category. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly healthCategory?: string; + /** + * Gets or sets the error category. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly category?: string; + /** + * Gets or sets the error severity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly severity?: string; + /** + * Gets or sets the error source. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly source?: string; + /** + * Gets or sets the error creation time. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly creationTime?: Date; + /** + * Gets or sets a value indicating whether the error is customer resolvable. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isCustomerResolvable?: boolean; + /** + * Gets or sets the error summary. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly summary?: string; + /** + * Gets or sets the error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * Gets or sets possible causes of the error. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly causes?: string; + /** + * Gets or sets recommended action to resolve the error. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly recommendation?: string; +} + +/** Dra model custom properties. */ +export interface DraModelCustomProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + instanceType: "VMware"; +} + +/** System data required to be defined for Azure resources. */ +export interface SystemDataModel { + /** Gets or sets identity that created the resource. */ + createdBy?: string; + /** + * Gets or sets the type of identity that created the resource: user, application, + * managedIdentity. + */ + createdByType?: string; + /** Gets or sets the timestamp of resource creation (UTC). */ + createdAt?: Date; + /** Gets or sets the identity that last modified the resource. */ + lastModifiedBy?: string; + /** + * Gets or sets the type of identity that last modified the resource: user, application, + * managedIdentity. + */ + lastModifiedByType?: string; + /** Gets or sets the timestamp of resource last modification (UTC). */ + lastModifiedAt?: Date; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +/** The error detail. */ +export interface ErrorDetail { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * 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; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; +} + +/** Dra model collection. */ +export interface DraModelCollection { + /** Gets or sets the list of Dras. */ + value?: DraModel[]; + /** Gets or sets the value of next link. */ + nextLink?: string; +} + +/** Defines the operation status. */ +export interface OperationStatus { + /** Gets or sets the Id. */ + id?: string; + /** Gets or sets the operation name. */ + name?: string; + /** + * Gets or sets the status of the operation. ARM expects the terminal status to be one of + * Succeeded/ Failed/ Canceled. All other values imply that the operation is still running. + */ + status?: string; + /** Gets or sets the start time. */ + startTime?: string; + /** Gets or sets the end time. */ + endTime?: string; +} + +/** Email configuration model. */ +export interface EmailConfigurationModel { + /** Email configuration model properties. */ + properties: EmailConfigurationModelProperties; + /** + * Gets or sets the Id of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Gets or sets the name of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Gets or sets the type of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly systemData?: EmailConfigurationModelSystemData; +} + +/** Email configuration model properties. */ +export interface EmailConfigurationModelProperties { + /** Gets or sets a value indicating whether to send email to subscription administrator. */ + sendToOwners: boolean; + /** Gets or sets the custom email address for sending emails. */ + customEmailAddresses?: string[]; + /** Gets or sets the locale for the email notification. */ + locale?: string; +} + +/** Email configuration model collection. */ +export interface EmailConfigurationModelCollection { + /** Gets or sets the list of email configurations. */ + value?: EmailConfigurationModel[]; + /** Gets or sets the value of next link. */ + nextLink?: string; +} + +/** Event model. */ +export interface EventModel { + /** Event model properties. */ + properties: EventModelProperties; + /** + * Gets or sets the Id of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Gets or sets the name of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Gets or sets the type of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly systemData?: EventModelSystemData; +} + +/** Event model properties. */ +export interface EventModelProperties { + /** + * Gets or sets the resource type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceType?: string; + /** + * Gets or sets the resource name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceName?: string; + /** + * Gets or sets the event type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly eventType?: string; + /** + * Gets or sets the event name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly eventName?: string; + /** + * Gets or sets the time at which the event occurred at source. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly timeOfOccurrence?: Date; + /** + * Gets or sets the event severity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly severity?: string; + /** + * Gets or sets the event description. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; + /** + * Gets or sets the event correlation Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly correlationId?: string; + /** + * Gets or sets the errors associated with this event. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly healthErrors?: HealthErrorModel[]; + /** Event model custom properties. */ + customProperties: EventModelCustomPropertiesUnion; +} + +/** Event model custom properties. */ +export interface EventModelCustomProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + instanceType: "HyperVToAzStackHCI"; +} + +/** Event model collection. */ +export interface EventModelCollection { + /** Gets or sets the list of events. */ + value?: EventModel[]; + /** Gets or sets the value of next link. */ + nextLink?: string; +} + +/** Fabric model. */ +export interface FabricModel { + /** Gets or sets the location of the fabric. */ + location: string; + /** Gets or sets the resource tags. */ + tags?: { [propertyName: string]: string }; + /** Fabric model properties. */ + properties: FabricModelProperties; + /** + * Gets or sets the Id of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Gets or sets the name of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Gets or sets the type of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly systemData?: FabricModelSystemData; +} + +/** Fabric model properties. */ +export interface FabricModelProperties { + /** + * Gets or sets the provisioning state of the fabric. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** + * Gets or sets the service endpoint. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly serviceEndpoint?: string; + /** + * Gets or sets the service resource Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly serviceResourceId?: string; + /** + * Gets or sets the fabric health. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly health?: HealthStatus; + /** + * Gets or sets the list of health errors. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly healthErrors?: HealthErrorModel[]; + /** Fabric model custom properties. */ + customProperties: FabricModelCustomPropertiesUnion; +} + +/** Fabric model custom properties. */ +export interface FabricModelCustomProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + instanceType: "AzStackHCI" | "HyperVMigrate" | "VMwareMigrate"; +} + +/** Fabric model for update. */ +export interface FabricModelUpdate { + /** Gets or sets the resource tags. */ + tags?: { [propertyName: string]: string }; + /** Fabric model properties. */ + properties?: FabricModelProperties; + /** + * Gets or sets the Id of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Gets or sets the name of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Gets or sets the type of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly systemData?: FabricModelUpdateSystemData; +} + +/** Fabric model collection. */ +export interface FabricModelCollection { + /** Gets or sets the list of fabrics. */ + value?: FabricModel[]; + /** Gets or sets the value of next link. */ + nextLink?: string; +} + +/** Policy model. */ +export interface PolicyModel { + /** Policy model properties. */ + properties: PolicyModelProperties; + /** + * Gets or sets the Id of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Gets or sets the name of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Gets or sets the type of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly systemData?: PolicyModelSystemData; +} + +/** Policy model properties. */ +export interface PolicyModelProperties { + /** + * Gets or sets the provisioning state of the policy. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** Policy model custom properties. */ + customProperties: PolicyModelCustomPropertiesUnion; +} + +/** Policy model custom properties. */ +export interface PolicyModelCustomProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + instanceType: "HyperVToAzStackHCI" | "VMwareToAzStackHCI"; +} + +/** Policy model collection. */ +export interface PolicyModelCollection { + /** Gets or sets the list of policies. */ + value?: PolicyModel[]; + /** Gets or sets the value of next link. */ + nextLink?: string; +} + +/** Protected item model. */ +export interface ProtectedItemModel { + /** Protected item model properties. */ + properties: ProtectedItemModelProperties; + /** + * Gets or sets the Id of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Gets or sets the name of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Gets or sets the type of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly systemData?: ProtectedItemModelSystemData; +} + +/** Protected item model properties. */ +export interface ProtectedItemModelProperties { + /** Gets or sets the policy name. */ + policyName: string; + /** Gets or sets the replication extension name. */ + replicationExtensionName: string; + /** + * Gets or sets the protected item correlation Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly correlationId?: string; + /** + * Gets or sets the provisioning state of the Dra. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** + * Gets or sets the protection state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly protectionState?: ProtectionState; + /** + * Gets or sets the protection state description. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly protectionStateDescription?: string; + /** + * Gets or sets the test failover state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly testFailoverState?: TestFailoverState; + /** + * Gets or sets the Test failover state description. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly testFailoverStateDescription?: string; + /** + * Gets or sets the resynchronization state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resynchronizationState?: ResynchronizationState; + /** + * Gets or sets the fabric object Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fabricObjectId?: string; + /** + * Gets or sets the fabric object name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fabricObjectName?: string; + /** + * Gets or sets the source fabric provider Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceFabricProviderId?: string; + /** + * Gets or sets the target fabric provider Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetFabricProviderId?: string; + /** + * Gets or sets the fabric Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fabricId?: string; + /** + * Gets or sets the target fabric Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetFabricId?: string; + /** + * Gets or sets the DRA Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly draId?: string; + /** + * Gets or sets the target DRA Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetDraId?: string; + /** + * Gets or sets a value indicating whether resynchronization is required or not. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resyncRequired?: boolean; + /** + * Gets or sets the Last successful planned failover time. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastSuccessfulPlannedFailoverTime?: Date; + /** + * Gets or sets the Last successful unplanned failover time. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastSuccessfulUnplannedFailoverTime?: Date; + /** + * Gets or sets the Last successful test failover time. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastSuccessfulTestFailoverTime?: Date; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly currentJob?: ProtectedItemModelPropertiesCurrentJob; + /** + * Gets or sets the allowed scenarios on the protected item. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly allowedJobs?: string[]; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly lastFailedEnableProtectionJob?: ProtectedItemModelPropertiesLastFailedEnableProtectionJob; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly lastFailedPlannedFailoverJob?: ProtectedItemModelPropertiesLastFailedPlannedFailoverJob; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly lastTestFailoverJob?: ProtectedItemModelPropertiesLastTestFailoverJob; + /** + * Gets or sets protected item replication health. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly replicationHealth?: HealthStatus; + /** + * Gets or sets the list of health errors. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly healthErrors?: HealthErrorModel[]; + /** Protected item model custom properties. */ + customProperties: ProtectedItemModelCustomPropertiesUnion; +} + +/** Protected item job properties. */ +export interface ProtectedItemJobProperties { + /** + * Gets or sets protection scenario name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly scenarioName?: string; + /** + * Gets or sets workflow Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Gets or sets workflow name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Gets or sets the workflow friendly display name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly displayName?: string; + /** + * Gets or sets workflow state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly state?: string; + /** + * Gets or sets start time of the workflow. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly startTime?: Date; + /** + * Gets or sets end time of the workflow. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly endTime?: Date; +} + +/** Protected item model custom properties. */ +export interface ProtectedItemModelCustomProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + instanceType: "HyperVToAzStackHCI" | "VMwareToAzStackHCI"; +} + +/** Protected item model collection. */ +export interface ProtectedItemModelCollection { + /** Gets or sets the list of protected items. */ + value?: ProtectedItemModel[]; + /** Gets or sets the value of next link. */ + nextLink?: string; +} + +/** Planned failover model. */ +export interface PlannedFailoverModel { + /** Planned failover model properties. */ + properties: PlannedFailoverModelProperties; +} + +/** Planned failover model properties. */ +export interface PlannedFailoverModelProperties { + /** Planned failover model custom properties. */ + customProperties: PlannedFailoverModelCustomPropertiesUnion; +} + +/** Planned failover model custom properties. */ +export interface PlannedFailoverModelCustomProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + instanceType: "HyperVToAzStackHCI" | "VMwareToAzStackHCI"; +} + +/** Recovery point model. */ +export interface RecoveryPointModel { + /** Recovery point model properties. */ + properties: RecoveryPointModelProperties; + /** + * Gets or sets the Id of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Gets or sets the name of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Gets or sets the type of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly systemData?: RecoveryPointModelSystemData; +} + +/** Recovery point model properties. */ +export interface RecoveryPointModelProperties { + /** Gets or sets the recovery point time. */ + recoveryPointTime: Date; + /** Gets or sets the recovery point type. */ + recoveryPointType: RecoveryPointType; + /** Recovery point model custom properties. */ + customProperties: RecoveryPointModelCustomPropertiesUnion; +} + +/** Recovery point model custom properties. */ +export interface RecoveryPointModelCustomProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + instanceType: "HyperVToAzStackHCI"; +} + +/** Recovery point model collection. */ +export interface RecoveryPointModelCollection { + /** Gets or sets the list of recovery points. */ + value?: RecoveryPointModel[]; + /** Gets or sets the value of next link. */ + nextLink?: string; +} + +/** Replication extension model. */ +export interface ReplicationExtensionModel { + /** Replication extension model properties. */ + properties: ReplicationExtensionModelProperties; + /** + * Gets or sets the Id of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Gets or sets the name of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Gets or sets the type of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly systemData?: ReplicationExtensionModelSystemData; +} + +/** Replication extension model properties. */ +export interface ReplicationExtensionModelProperties { + /** + * Gets or sets the provisioning state of the replication extension. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** Replication extension model custom properties. */ + customProperties: ReplicationExtensionModelCustomPropertiesUnion; +} + +/** Replication extension model custom properties. */ +export interface ReplicationExtensionModelCustomProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + instanceType: "HyperVToAzStackHCI" | "VMwareToAzStackHCI"; +} + +/** Replication extension model collection. */ +export interface ReplicationExtensionModelCollection { + /** Gets or sets the list of replication extensions. */ + value?: ReplicationExtensionModel[]; + /** Gets or sets the value of next link. */ + nextLink?: string; +} + +/** Check name availability model. */ +export interface CheckNameAvailabilityModel { + /** Gets or sets the resource name. */ + name?: string; + /** Gets or sets the resource type. */ + type?: string; +} + +/** Check name availability response model. */ +export interface CheckNameAvailabilityResponseModel { + /** Gets or sets a value indicating whether resource name is available or not. */ + nameAvailable?: boolean; + /** Gets or sets the reason for resource name unavailability. */ + reason?: string; + /** Gets or sets the message for resource name unavailability. */ + message?: string; +} + +/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ +export interface OperationListResult { + /** + * List of operations supported by the resource provider + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: Operation[]; + /** + * URL to get the next set of operation list results (if there are any). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Details of a REST API operation, returned from the Resource Provider Operations API */ +export interface Operation { + /** + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isDataAction?: boolean; + /** Localized display information for this particular operation. */ + display?: OperationDisplay; + /** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly origin?: Origin; + /** + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly actionType?: ActionType; +} + +/** Localized display information for this particular operation. */ +export interface OperationDisplay { + /** + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provider?: string; + /** + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resource?: string; + /** + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operation?: string; + /** + * The short, localized friendly description of the operation; suitable for tool tips and detailed views. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; +} + +/** Deployment preflight model. */ +export interface DeploymentPreflightModel { + /** Gets or sets the list of resources. */ + resources?: DeploymentPreflightResource[]; +} + +/** Deployment preflight resource. */ +export interface DeploymentPreflightResource { + /** Gets or sets the resource name. */ + name?: string; + /** Gets or sets the resource type. */ + type?: string; + /** Gets or sets the location of the resource. */ + location?: string; + /** Gets or sets the Api version. */ + apiVersion?: string; +} + +/** Vault model. */ +export interface VaultModel { + /** Gets or sets the location of the vault. */ + location: string; + /** Gets or sets the resource tags. */ + tags?: { [propertyName: string]: string }; + /** Vault properties. */ + properties?: VaultModelProperties; + /** + * Gets or sets the Id of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Gets or sets the name of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Gets or sets the type of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly systemData?: VaultModelSystemData; +} + +/** Vault properties. */ +export interface VaultModelProperties { + /** + * Gets or sets the provisioning state of the vault. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** + * Gets or sets the service resource Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly serviceResourceId?: string; + /** Gets or sets the type of vault. */ + vaultType?: ReplicationVaultType; +} + +/** Vault model for update. */ +export interface VaultModelUpdate { + /** Gets or sets the resource tags. */ + tags?: { [propertyName: string]: string }; + /** Vault properties. */ + properties?: VaultModelProperties; + /** + * Gets or sets the Id of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Gets or sets the name of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Gets or sets the type of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly systemData?: VaultModelUpdateSystemData; +} + +/** Vault model collection. */ +export interface VaultModelCollection { + /** Gets or sets the list of vaults. */ + value?: VaultModel[]; + /** Gets or sets the value of next link. */ + nextLink?: string; +} + +/** Workflow model. */ +export interface WorkflowModel { + /** Workflow model properties. */ + properties: WorkflowModelProperties; + /** + * Gets or sets the Id of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Gets or sets the name of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Gets or sets the type of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly systemData?: WorkflowModelSystemData; +} + +/** Workflow model properties. */ +export interface WorkflowModelProperties { + /** + * Gets or sets the friendly display name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly displayName?: string; + /** + * Gets or sets the workflow state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly state?: WorkflowState; + /** + * Gets or sets the start time. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly startTime?: Date; + /** + * Gets or sets the end time. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly endTime?: Date; + /** + * Gets or sets the affected object Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly objectId?: string; + /** + * Gets or sets the affected object name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly objectName?: string; + /** + * Gets or sets the affected object internal Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly objectInternalId?: string; + /** + * Gets or sets the affected object internal name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly objectInternalName?: string; + /** + * Gets or sets the object type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly objectType?: WorkflowObjectType; + /** + * Gets or sets the replication provider. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly replicationProviderId?: string; + /** + * Gets or sets the source fabric provider. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceFabricProviderId?: string; + /** + * Gets or sets the target fabric provider. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetFabricProviderId?: string; + /** + * Gets or sets the list of allowed actions on the workflow. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly allowedActions?: string[]; + /** + * Gets or sets the workflow activity id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly activityId?: string; + /** + * Gets or sets the list of tasks. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tasks?: TaskModel[]; + /** + * Gets or sets the list of errors. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly errors?: ErrorModel[]; + /** Workflow model custom properties. */ + customProperties: WorkflowModelCustomPropertiesUnion; +} + +/** Task model. */ +export interface TaskModel { + /** + * Gets or sets the task name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly taskName?: string; + /** + * Gets or sets the task state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly state?: TaskState; + /** + * Gets or sets the start time. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly startTime?: Date; + /** + * Gets or sets the end time. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly endTime?: Date; + /** Task model custom properties. */ + customProperties?: TaskModelCustomProperties; + /** Gets or sets the list of children workflow models. */ + childrenWorkflows?: WorkflowModel[]; +} + +/** Task model custom properties. */ +export interface TaskModelCustomProperties { + /** Gets or sets the instance type. */ + instanceType: string; +} + +/** Error model. */ +export interface ErrorModel { + /** + * Gets or sets the error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * Gets or sets the error type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Gets or sets the error severity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly severity?: string; + /** + * Gets or sets the creation time of error. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly creationTime?: Date; + /** + * Gets or sets the error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * Gets or sets the possible causes of error. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly causes?: string; + /** + * Gets or sets the recommended action to resolve error. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly recommendation?: string; +} + +/** Workflow model custom properties. */ +export interface WorkflowModelCustomProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + instanceType: + | "FailoverWorkflowDetails" + | "TestFailoverCleanupWorkflowDetails" + | "TestFailoverWorkflowDetails"; + /** + * Gets or sets any custom properties of the affected object. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly affectedObjectDetails?: { [propertyName: string]: string }; +} + +/** Workflow model collection. */ +export interface WorkflowModelCollection { + /** Gets or sets the list of workflows. */ + value?: WorkflowModel[]; + /** Gets or sets the value of next link. */ + nextLink?: string; +} + +/** AzStackHCI cluster properties. */ +export interface AzStackHCIClusterProperties { + /** Gets or sets the AzStackHCICluster FQDN name. */ + clusterName: string; + /** Gets or sets the AzStackHCICluster resource name. */ + resourceName: string; + /** Gets or sets the Storage account name. */ + storageAccountName: string; + /** Gets or sets the list of AzStackHCICluster Storage Container. */ + storageContainers: StorageContainerProperties[]; +} + +/** Storage container properties. */ +export interface StorageContainerProperties { + /** Gets or sets the Name. */ + name: string; + /** Gets or sets the ClusterSharedVolumePath. */ + clusterSharedVolumePath: string; +} + +/** Failover properties of the protected item. */ +export interface FailoverProtectedItemProperties { + /** + * Gets or sets the protected item name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly protectedItemName?: string; + /** + * Gets or sets the VM name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly vmName?: string; + /** + * Gets or sets the test VM name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly testVmName?: string; + /** + * Gets or sets the recovery point Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly recoveryPointId?: string; + /** + * Gets or sets the recovery point time. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly recoveryPointTime?: Date; + /** + * Gets or sets the network name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly networkName?: string; + /** + * Gets or sets the network subnet. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly subnet?: string; +} + +/** HyperVToAzStack disk input. */ +export interface HyperVToAzStackHCIDiskInput { + /** Gets or sets the disk Id. */ + diskId: string; + /** Gets or sets the target storage account ARM Id. */ + storageContainerId?: string; + /** + * Gets or sets a value indicating whether dynamic sizing is enabled on the virtual hard + * disk. + */ + isDynamic?: boolean; + /** Gets or sets the disk size in GB. */ + diskSizeGB: number; + /** Gets or sets the type of the virtual hard disk, vhd or vhdx. */ + diskFileFormat: string; + /** Gets or sets a value indicating whether disk is os disk. */ + isOsDisk: boolean; +} + +/** HyperVToAzStackHCI NIC properties. */ +export interface HyperVToAzStackHCINicInput { + /** Gets or sets the NIC Id. */ + nicId: string; + /** + * Gets or sets the network name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly networkName?: string; + /** Gets or sets the target network Id within AzStackHCI Cluster. */ + targetNetworkId: string; + /** Gets or sets the target test network Id within AzStackHCI Cluster. */ + testNetworkId: string; + /** Gets or sets the selection type of the NIC. */ + selectionTypeForFailover: VMNicSelection; +} + +/** HyperVToAzStackHCI protected disk properties. */ +export interface HyperVToAzStackHCIProtectedDiskProperties { + /** + * Gets or sets the ARM Id of the storage container. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly storageContainerId?: string; + /** + * Gets or sets the local path of the storage container. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly storageContainerLocalPath?: string; + /** + * Gets or sets the source disk Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceDiskId?: string; + /** + * Gets or sets the source disk Name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceDiskName?: string; + /** + * Gets or sets the seed disk name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly seedDiskName?: string; + /** + * Gets or sets the test failover clone disk. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly testMigrateDiskName?: string; + /** + * Gets or sets the failover clone disk. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly migrateDiskName?: string; + /** + * Gets or sets a value indicating whether the disk is the OS disk. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isOsDisk?: boolean; + /** + * Gets or sets the disk capacity in bytes. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly capacityInBytes?: number; + /** + * Gets or sets a value indicating whether dynamic sizing is enabled on the virtual hard + * disk. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isDynamic?: boolean; + /** + * Gets or sets the disk type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly diskType?: string; +} + +/** Protected item dynamic memory config. */ +export interface ProtectedItemDynamicMemoryConfig { + /** Gets or sets maximum memory in MB. */ + maximumMemoryInMegaBytes: number; + /** Gets or sets minimum memory in MB. */ + minimumMemoryInMegaBytes: number; + /** Gets or sets target memory buffer in %. */ + targetMemoryBufferPercentage: number; +} + +/** HyperVToAzStackHCI NIC properties. */ +export interface HyperVToAzStackHCIProtectedNicProperties { + /** + * Gets or sets the NIC Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nicId?: string; + /** + * Gets or sets the NIC mac address. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly macAddress?: string; + /** + * Gets or sets the network name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly networkName?: string; + /** + * Gets or sets the target network Id within AzStackHCI Cluster. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetNetworkId?: string; + /** + * Gets or sets the target test network Id within AzStackHCI Cluster. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly testNetworkId?: string; + /** + * Gets or sets the selection type of the NIC. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly selectionTypeForFailover?: VMNicSelection; +} + +/** Operation model. */ +export interface OperationModel { + /** Gets or sets the name of the operation. */ + name?: string; + /** + * Gets or sets a value indicating whether the action is specific to data plane or + * control plane. + */ + isDataAction?: boolean; + /** Gets or sets the executor of the operation. */ + origin?: string; + /** Operation model properties. */ + display?: OperationModelProperties; +} + +/** Operation model properties. */ +export interface OperationModelProperties { + /** Gets or sets the resource provider name. */ + provider?: string; + /** Gets or sets resource name. */ + resource?: string; + /** Gets or sets the operation. */ + operation?: string; + /** Gets or sets the description. */ + description?: string; +} + +/** Available operations of the service. */ +export interface OperationModelCollection { + /** Gets or sets the list of operations. */ + value?: OperationModel[]; + /** Gets or sets the value of next link. */ + nextLink?: string; +} + +/** VMwareToAzStack disk input. */ +export interface VMwareToAzStackHCIDiskInput { + /** Gets or sets the disk Id. */ + diskId: string; + /** Gets or sets the target storage account ARM Id. */ + storageContainerId?: string; + /** + * Gets or sets a value indicating whether dynamic sizing is enabled on the virtual hard + * disk. + */ + isDynamic?: boolean; + /** Gets or sets the disk size in GB. */ + diskSizeGB: number; + /** Gets or sets the type of the virtual hard disk, vhd or vhdx. */ + diskFileFormat: string; + /** Gets or sets a value indicating whether disk is os disk. */ + isOsDisk: boolean; +} + +/** VMwareToAzStackHCI NIC properties. */ +export interface VMwareToAzStackHCINicInput { + /** Gets or sets the NIC Id. */ + nicId: string; + /** Gets or sets the NIC label. */ + label: string; + /** + * Gets or sets the network name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly networkName?: string; + /** Gets or sets the target network Id within AzStackHCI Cluster. */ + targetNetworkId: string; + /** Gets or sets the target test network Id within AzStackHCI Cluster. */ + testNetworkId: string; + /** Gets or sets the selection type of the NIC. */ + selectionTypeForFailover: VMNicSelection; +} + +/** VMwareToAzStackHCI protected disk properties. */ +export interface VMwareToAzStackHCIProtectedDiskProperties { + /** + * Gets or sets the ARM Id of the storage container. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly storageContainerId?: string; + /** + * Gets or sets the local path of the storage container. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly storageContainerLocalPath?: string; + /** + * Gets or sets the source disk Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceDiskId?: string; + /** + * Gets or sets the source disk Name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceDiskName?: string; + /** + * Gets or sets the seed disk name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly seedDiskName?: string; + /** + * Gets or sets the test failover clone disk. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly testMigrateDiskName?: string; + /** + * Gets or sets the failover clone disk. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly migrateDiskName?: string; + /** + * Gets or sets a value indicating whether the disk is the OS disk. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isOsDisk?: boolean; + /** + * Gets or sets the disk capacity in bytes. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly capacityInBytes?: number; + /** + * Gets or sets a value indicating whether dynamic sizing is enabled on the virtual hard + * disk. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isDynamic?: boolean; + /** + * Gets or sets the disk type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly diskType?: string; +} + +/** VMwareToAzStackHCI NIC properties. */ +export interface VMwareToAzStackHCIProtectedNicProperties { + /** + * Gets or sets the NIC Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nicId?: string; + /** + * Gets or sets the NIC mac address. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly macAddress?: string; + /** + * Gets or sets the NIC label. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly label?: string; + /** Gets or sets a value indicating whether this is the primary NIC. */ + isPrimaryNic?: boolean; + /** + * Gets or sets the network name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly networkName?: string; + /** + * Gets or sets the target network Id within AzStackHCI Cluster. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetNetworkId?: string; + /** + * Gets or sets the target test network Id within AzStackHCI Cluster. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly testNetworkId?: string; + /** + * Gets or sets the selection type of the NIC. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly selectionTypeForFailover?: VMNicSelection; +} + +/** VMware DRA model custom properties. */ +export interface VMwareDraModelCustomProperties + extends DraModelCustomProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + instanceType: "VMware"; + /** Gets or sets the BIOS Id of the DRA machine. */ + biosId: string; + /** Identity model. */ + marsAuthenticationIdentity: IdentityModel; +} + +export interface DraModelSystemData extends SystemDataModel {} + +export interface EmailConfigurationModelSystemData extends SystemDataModel {} + +export interface EventModelSystemData extends SystemDataModel {} + +export interface FabricModelSystemData extends SystemDataModel {} + +export interface FabricModelUpdateSystemData extends SystemDataModel {} + +export interface PolicyModelSystemData extends SystemDataModel {} + +export interface ProtectedItemModelSystemData extends SystemDataModel {} + +export interface RecoveryPointModelSystemData extends SystemDataModel {} + +export interface ReplicationExtensionModelSystemData extends SystemDataModel {} + +export interface VaultModelSystemData extends SystemDataModel {} + +export interface VaultModelUpdateSystemData extends SystemDataModel {} + +export interface WorkflowModelSystemData extends SystemDataModel {} + +/** + * HyperV to AzStackHCI event model custom properties. This class provides provider specific + * details for events of type DataContract.HealthEvents.HealthEventType.ProtectedItemHealth and + * DataContract.HealthEvents.HealthEventType.AgentHealth. + */ +export interface HyperVToAzStackHCIEventModelCustomProperties + extends EventModelCustomProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + instanceType: "HyperVToAzStackHCI"; + /** + * Gets or sets the friendly name of the source which has raised this health event. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly eventSourceFriendlyName?: string; + /** + * Gets or sets the protected item friendly name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly protectedItemFriendlyName?: string; + /** + * Gets or sets the source appliance name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceApplianceName?: string; + /** + * Gets or sets the source target name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetApplianceName?: string; + /** + * Gets or sets the server type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly serverType?: string; +} + +/** AzStackHCI fabric model custom properties. */ +export interface AzStackHCIFabricModelCustomProperties + extends FabricModelCustomProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + instanceType: "AzStackHCI"; + /** Gets or sets the ARM Id of the AzStackHCI site. */ + azStackHciSiteId: string; + /** + * Gets or sets the Appliance name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly applianceName?: string[]; + /** AzStackHCI cluster properties. */ + cluster: AzStackHCIClusterProperties; + /** + * Gets or sets the fabric resource Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fabricResourceId?: string; + /** + * Gets or sets the fabric container Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fabricContainerId?: string; + /** Gets or sets the Migration solution ARM Id. */ + migrationSolutionId: string; + /** + * Gets or sets the migration hub Uri. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly migrationHubUri?: string; +} + +/** HyperV migrate fabric model custom properties. */ +export interface HyperVMigrateFabricModelCustomProperties + extends FabricModelCustomProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + instanceType: "HyperVMigrate"; + /** Gets or sets the ARM Id of the HyperV site. */ + hyperVSiteId: string; + /** + * Gets or sets the fabric resource Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fabricResourceId?: string; + /** + * Gets or sets the fabric container Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fabricContainerId?: string; + /** Gets or sets the migration solution ARM Id. */ + migrationSolutionId: string; + /** + * Gets or sets the migration hub Uri. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly migrationHubUri?: string; +} + +/** VMware migrate fabric model custom properties. */ +export interface VMwareMigrateFabricModelCustomProperties + extends FabricModelCustomProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + instanceType: "VMwareMigrate"; + /** Gets or sets the ARM Id of the VMware site. */ + vmwareSiteId: string; + /** Gets or sets the ARM Id of the migration solution. */ + migrationSolutionId: string; +} + +/** HyperV To AzStackHCI Policy model custom properties. */ +export interface HyperVToAzStackHCIPolicyModelCustomProperties + extends PolicyModelCustomProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + instanceType: "HyperVToAzStackHCI"; + /** + * Gets or sets the duration in minutes until which the recovery points need to be + * stored. + */ + recoveryPointHistoryInMinutes: number; + /** Gets or sets the crash consistent snapshot frequency (in minutes). */ + crashConsistentFrequencyInMinutes: number; + /** Gets or sets the app consistent snapshot frequency (in minutes). */ + appConsistentFrequencyInMinutes: number; +} + +/** VMware To AzStackHCI Policy model custom properties. */ +export interface VMwareToAzStackHCIPolicyModelCustomProperties + extends PolicyModelCustomProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + instanceType: "VMwareToAzStackHCI"; + /** + * Gets or sets the duration in minutes until which the recovery points need to be + * stored. + */ + recoveryPointHistoryInMinutes: number; + /** Gets or sets the crash consistent snapshot frequency (in minutes). */ + crashConsistentFrequencyInMinutes: number; + /** Gets or sets the app consistent snapshot frequency (in minutes). */ + appConsistentFrequencyInMinutes: number; +} + +export interface ProtectedItemModelPropertiesCurrentJob + extends ProtectedItemJobProperties {} + +export interface ProtectedItemModelPropertiesLastFailedEnableProtectionJob + extends ProtectedItemJobProperties {} + +export interface ProtectedItemModelPropertiesLastFailedPlannedFailoverJob + extends ProtectedItemJobProperties {} + +export interface ProtectedItemModelPropertiesLastTestFailoverJob + extends ProtectedItemJobProperties {} + +/** HyperV to AzStackHCI Protected item model custom properties. */ +export interface HyperVToAzStackHCIProtectedItemModelCustomProperties + extends ProtectedItemModelCustomProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + instanceType: "HyperVToAzStackHCI"; + /** + * Gets or sets the location of the protected item. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly activeLocation?: ProtectedItemActiveLocation; + /** Gets or sets the Target HCI Cluster ARM Id. */ + targetHciClusterId: string; + /** Gets or sets the Target Arc Cluster Custom Location ARM Id. */ + targetArcClusterCustomLocationId: string; + /** + * Gets or sets the Target AzStackHCI cluster name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetAzStackHciClusterName?: string; + /** Gets or sets the ARM Id of the discovered machine. */ + fabricDiscoveryMachineId: string; + /** Gets or sets the list of disks to replicate. */ + disksToInclude: HyperVToAzStackHCIDiskInput[]; + /** Gets or sets the list of VM NIC to replicate. */ + nicsToInclude: HyperVToAzStackHCINicInput[]; + /** + * Gets or sets the source VM display name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceVmName?: string; + /** + * Gets or sets the source VM CPU cores. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceCpuCores?: number; + /** + * Gets or sets the source VM ram memory size in megabytes. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceMemoryInMegaBytes?: number; + /** Gets or sets the target VM display name. */ + targetVmName?: string; + /** Gets or sets the target resource group ARM Id. */ + targetResourceGroupId: string; + /** Gets or sets the target storage container ARM Id. */ + storageContainerId: string; + /** Gets or sets the hypervisor generation of the virtual machine. */ + hyperVGeneration: string; + /** Gets or sets the target network Id within AzStackHCI Cluster. */ + targetNetworkId?: string; + /** Gets or sets the target test network Id within AzStackHCI Cluster. */ + testNetworkId?: string; + /** Gets or sets the target CPU cores. */ + targetCpuCores?: number; + /** Gets or sets a value indicating whether memory is dynamical. */ + isDynamicRam?: boolean; + /** Protected item dynamic memory config. */ + dynamicMemoryConfig?: ProtectedItemDynamicMemoryConfig; + /** Gets or sets the target memory in mega-bytes. */ + targetMemoryInMegaBytes?: number; + /** Gets or sets the Run As account Id. */ + runAsAccountId: string; + /** Gets or sets the source DRA name. */ + sourceDraName: string; + /** Gets or sets the target DRA name. */ + targetDraName: string; + /** + * Gets or sets the source appliance name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceApplianceName?: string; + /** + * Gets or sets the target appliance name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetApplianceName?: string; + /** + * Gets or sets the type of the OS. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly osType?: string; + /** + * Gets or sets the name of the OS. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly osName?: string; + /** + * Gets or sets the firmware type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly firmwareType?: string; + /** + * Gets or sets the target location. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetLocation?: string; + /** Gets or sets the location of Azure Arc HCI custom location resource. */ + customLocationRegion: string; + /** + * Gets or sets the recovery point Id to which the VM was failed over. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly failoverRecoveryPointId?: string; + /** + * Gets or sets the last recovery point received time. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastRecoveryPointReceived?: Date; + /** + * Gets or sets the last recovery point Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastRecoveryPointId?: string; + /** + * Gets or sets the initial replication progress percentage. This is calculated based on + * total bytes processed for all disks in the source VM. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly initialReplicationProgressPercentage?: number; + /** + * Gets or sets the resync progress percentage. This is calculated based on total bytes + * processed for all disks in the source VM. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resyncProgressPercentage?: number; + /** + * Gets or sets the list of protected disks. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly protectedDisks?: HyperVToAzStackHCIProtectedDiskProperties[]; + /** + * Gets or sets the VM NIC details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly protectedNics?: HyperVToAzStackHCIProtectedNicProperties[]; + /** + * Gets or sets the BIOS Id of the target AzStackHCI VM. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetVmBiosId?: string; + /** + * Gets or sets the latest timestamp that replication status is updated. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastReplicationUpdateTime?: Date; +} + +/** VMware to AzStackHCI Protected item model custom properties. */ +export interface VMwareToAzStackHCIProtectedItemModelCustomProperties + extends ProtectedItemModelCustomProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + instanceType: "VMwareToAzStackHCI"; + /** + * Gets or sets the location of the protected item. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly activeLocation?: ProtectedItemActiveLocation; + /** Gets or sets the Target HCI Cluster ARM Id. */ + targetHciClusterId: string; + /** Gets or sets the Target Arc Cluster Custom Location ARM Id. */ + targetArcClusterCustomLocationId: string; + /** + * Gets or sets the Target AzStackHCI cluster name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetAzStackHciClusterName?: string; + /** Gets or sets the target storage container ARM Id. */ + storageContainerId: string; + /** Gets or sets the target resource group ARM Id. */ + targetResourceGroupId: string; + /** + * Gets or sets the target location. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetLocation?: string; + /** Gets or sets the location of Azure Arc HCI custom location resource. */ + customLocationRegion: string; + /** Gets or sets the list of disks to replicate. */ + disksToInclude: VMwareToAzStackHCIDiskInput[]; + /** Gets or sets the list of VM NIC to replicate. */ + nicsToInclude: VMwareToAzStackHCINicInput[]; + /** + * Gets or sets the list of protected disks. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly protectedDisks?: VMwareToAzStackHCIProtectedDiskProperties[]; + /** + * Gets or sets the VM NIC details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly protectedNics?: VMwareToAzStackHCIProtectedNicProperties[]; + /** + * Gets or sets the BIOS Id of the target AzStackHCI VM. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetVmBiosId?: string; + /** Gets or sets the target VM display name. */ + targetVmName?: string; + /** Gets or sets the hypervisor generation of the virtual machine possible values are 1,2. */ + hyperVGeneration: string; + /** Gets or sets the target network Id within AzStackHCI Cluster. */ + targetNetworkId?: string; + /** Gets or sets the target test network Id within AzStackHCI Cluster. */ + testNetworkId?: string; + /** Gets or sets the target CPU cores. */ + targetCpuCores?: number; + /** Gets or sets a value indicating whether memory is dynamical. */ + isDynamicRam?: boolean; + /** Protected item dynamic memory config. */ + dynamicMemoryConfig?: ProtectedItemDynamicMemoryConfig; + /** Gets or sets the target memory in mega-bytes. */ + targetMemoryInMegaBytes?: number; + /** + * Gets or sets the type of the OS. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly osType?: string; + /** + * Gets or sets the name of the OS. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly osName?: string; + /** + * Gets or sets the firmware type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly firmwareType?: string; + /** Gets or sets the ARM Id of the discovered machine. */ + fabricDiscoveryMachineId: string; + /** + * Gets or sets the source VM display name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceVmName?: string; + /** + * Gets or sets the source VM CPU cores. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceCpuCores?: number; + /** + * Gets or sets the source VM ram memory size in megabytes. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceMemoryInMegaBytes?: number; + /** Gets or sets the run as account Id. */ + runAsAccountId: string; + /** Gets or sets the source DRA name. */ + sourceDraName: string; + /** Gets or sets the target DRA name. */ + targetDraName: string; + /** + * Gets or sets the source appliance name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceApplianceName?: string; + /** + * Gets or sets the target appliance name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetApplianceName?: string; + /** + * Gets or sets the recovery point Id to which the VM was failed over. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly failoverRecoveryPointId?: string; + /** + * Gets or sets the last recovery point received time. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastRecoveryPointReceived?: Date; + /** + * Gets or sets the last recovery point Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastRecoveryPointId?: string; + /** + * Gets or sets the initial replication progress percentage. This is calculated based on + * total bytes processed for all disks in the source VM. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly initialReplicationProgressPercentage?: number; + /** + * Gets or sets the migration progress percentage. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly migrationProgressPercentage?: number; + /** + * Gets or sets the resume progress percentage. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resumeProgressPercentage?: number; + /** + * Gets or sets the resync progress percentage. This is calculated based on total bytes + * processed for all disks in the source VM. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resyncProgressPercentage?: number; + /** + * Gets or sets the resync retry count. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resyncRetryCount?: number; + /** + * Gets or sets a value indicating whether resync is required. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resyncRequired?: boolean; + /** + * Gets or sets the resync state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resyncState?: VMwareToAzureMigrateResyncState; + /** Gets or sets a value indicating whether auto resync is to be done. */ + performAutoResync?: boolean; + /** + * Gets or sets the resume retry count. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resumeRetryCount?: number; + /** + * Gets or sets the latest timestamp that replication status is updated. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastReplicationUpdateTime?: Date; +} + +/** HyperV to AzStackHCI planned failover model custom properties. */ +export interface HyperVToAzStackHCIPlannedFailoverModelCustomProperties + extends PlannedFailoverModelCustomProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + instanceType: "HyperVToAzStackHCI"; + /** Gets or sets a value indicating whether VM needs to be shut down. */ + shutdownSourceVM: boolean; +} + +/** VMware to AzStackHCI planned failover model custom properties. */ +export interface VMwareToAzStackHCIPlannedFailoverModelCustomProperties + extends PlannedFailoverModelCustomProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + instanceType: "VMwareToAzStackHCI"; + /** Gets or sets a value indicating whether VM needs to be shut down. */ + shutdownSourceVM: boolean; +} + +/** HyperV to AzStackHCI recovery point model custom properties. */ +export interface HyperVToAzStackHCIRecoveryPointModelCustomProperties + extends RecoveryPointModelCustomProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + instanceType: "HyperVToAzStackHCI"; + /** + * Gets or sets the list of the disk Ids. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly diskIds?: string[]; +} + +/** HyperV to AzStackHCI Replication extension model custom properties. */ +export interface HyperVToAzStackHCIReplicationExtensionModelCustomProperties + extends ReplicationExtensionModelCustomProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + instanceType: "HyperVToAzStackHCI"; + /** Gets or sets the ARM Id of the source HyperV fabric. */ + hyperVFabricArmId: string; + /** + * Gets or sets the ARM Id of the HyperV site. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly hyperVSiteId?: string; + /** Gets or sets the ARM Id of the target AzStackHCI fabric. */ + azStackHciFabricArmId: string; + /** + * Gets or sets the ARM Id of the AzStackHCI site. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly azStackHciSiteId?: string; + /** Gets or sets the storage account Id. */ + storageAccountId?: string; + /** Gets or sets the Sas Secret of storage account. */ + storageAccountSasSecretName?: string; + /** + * Gets or sets the Uri of ASR. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly asrServiceUri?: string; + /** + * Gets or sets the Uri of Rcm. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly rcmServiceUri?: string; + /** + * Gets or sets the Uri of Gateway. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly gatewayServiceUri?: string; + /** + * Gets or sets the gateway service Id of source. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceGatewayServiceId?: string; + /** + * Gets or sets the gateway service Id of target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetGatewayServiceId?: string; + /** + * Gets or sets the source storage container name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceStorageContainerName?: string; + /** + * Gets or sets the target storage container name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetStorageContainerName?: string; + /** + * Gets or sets the resource location. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceLocation?: string; + /** + * Gets or sets the subscription. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly subscriptionId?: string; + /** + * Gets or sets the resource group. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceGroup?: string; +} + +/** VMware to AzStackHCI Replication extension model custom properties. */ +export interface VMwareToAzStackHCIReplicationExtensionModelCustomProperties + extends ReplicationExtensionModelCustomProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + instanceType: "VMwareToAzStackHCI"; + /** Gets or sets the ARM Id of the source VMware fabric. */ + vmwareFabricArmId: string; + /** + * Gets or sets the ARM Id of the VMware site. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly vmwareSiteId?: string; + /** Gets or sets the ARM Id of the target AzStackHCI fabric. */ + azStackHciFabricArmId: string; + /** + * Gets or sets the ARM Id of the AzStackHCI site. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly azStackHciSiteId?: string; + /** Gets or sets the storage account Id. */ + storageAccountId?: string; + /** Gets or sets the Sas Secret of storage account. */ + storageAccountSasSecretName?: string; + /** + * Gets or sets the Uri of ASR. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly asrServiceUri?: string; + /** + * Gets or sets the Uri of Rcm. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly rcmServiceUri?: string; + /** + * Gets or sets the Uri of Gateway. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly gatewayServiceUri?: string; + /** + * Gets or sets the gateway service Id of source. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceGatewayServiceId?: string; + /** + * Gets or sets the gateway service Id of target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetGatewayServiceId?: string; + /** + * Gets or sets the source storage container name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceStorageContainerName?: string; + /** + * Gets or sets the target storage container name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetStorageContainerName?: string; + /** + * Gets or sets the resource location. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceLocation?: string; + /** + * Gets or sets the subscription. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly subscriptionId?: string; + /** + * Gets or sets the resource group. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceGroup?: string; +} + +/** Failover workflow model custom properties. */ +export interface FailoverWorkflowModelCustomProperties + extends WorkflowModelCustomProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + instanceType: "FailoverWorkflowDetails"; + /** + * Gets or sets the failed over protected item details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly protectedItemDetails?: FailoverProtectedItemProperties[]; +} + +/** Test failover cleanup workflow model custom properties. */ +export interface TestFailoverCleanupWorkflowModelCustomProperties + extends WorkflowModelCustomProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + instanceType: "TestFailoverCleanupWorkflowDetails"; + /** + * Gets or sets the test failover cleanup comments. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly comments?: string; +} + +/** Test failover workflow model custom properties. */ +export interface TestFailoverWorkflowModelCustomProperties + extends WorkflowModelCustomProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + instanceType: "TestFailoverWorkflowDetails"; + /** + * Gets or sets the test VM details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly protectedItemDetails?: FailoverProtectedItemProperties[]; +} + +/** Defines headers for Dra_delete operation. */ +export interface DraDeleteHeaders { + /** Tracking URL for long running operation. */ + azureAsyncOperation?: string; + location?: string; +} + +/** Defines headers for Fabric_update operation. */ +export interface FabricUpdateHeaders { + /** Tracking URL for long running operation. */ + azureAsyncOperation?: string; + location?: string; +} + +/** Defines headers for Fabric_delete operation. */ +export interface FabricDeleteHeaders { + /** Tracking URL for long running operation. */ + azureAsyncOperation?: string; + location?: string; +} + +/** Defines headers for Policy_delete operation. */ +export interface PolicyDeleteHeaders { + /** Tracking URL for long running operation. */ + azureAsyncOperation?: string; + location?: string; +} + +/** Defines headers for ProtectedItem_delete operation. */ +export interface ProtectedItemDeleteHeaders { + /** Tracking URL for long running operation. */ + azureAsyncOperation?: string; + location?: string; +} + +/** Defines headers for ProtectedItem_plannedFailover operation. */ +export interface ProtectedItemPlannedFailoverHeaders { + /** Tracking URL for long running operation. */ + azureAsyncOperation?: string; + location?: string; +} + +/** Defines headers for ReplicationExtension_delete operation. */ +export interface ReplicationExtensionDeleteHeaders { + /** Tracking URL for long running operation. */ + azureAsyncOperation?: string; + location?: string; +} + +/** Defines headers for Vault_update operation. */ +export interface VaultUpdateHeaders { + /** Tracking URL for long running operation. */ + azureAsyncOperation?: string; + location?: string; +} + +/** Defines headers for Vault_delete operation. */ +export interface VaultDeleteHeaders { + /** Tracking URL for long running operation. */ + azureAsyncOperation?: string; + location?: string; +} + +/** Known values of {@link ProvisioningState} that the service accepts. */ +export enum KnownProvisioningState { + /** Canceled */ + Canceled = "Canceled", + /** Creating */ + Creating = "Creating", + /** Deleting */ + Deleting = "Deleting", + /** Deleted */ + Deleted = "Deleted", + /** Failed */ + Failed = "Failed", + /** Succeeded */ + Succeeded = "Succeeded", + /** Updating */ + Updating = "Updating" +} + +/** + * Defines values for ProvisioningState. \ + * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Canceled** \ + * **Creating** \ + * **Deleting** \ + * **Deleted** \ + * **Failed** \ + * **Succeeded** \ + * **Updating** + */ +export type ProvisioningState = string; + +/** Known values of {@link HealthStatus} that the service accepts. */ +export enum KnownHealthStatus { + /** Normal */ + Normal = "Normal", + /** Warning */ + Warning = "Warning", + /** Critical */ + Critical = "Critical" +} + +/** + * Defines values for HealthStatus. \ + * {@link KnownHealthStatus} can be used interchangeably with HealthStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Normal** \ + * **Warning** \ + * **Critical** + */ +export type HealthStatus = string; + +/** Known values of {@link ProtectionState} that the service accepts. */ +export enum KnownProtectionState { + /** UnprotectedStatesBegin */ + UnprotectedStatesBegin = "UnprotectedStatesBegin", + /** EnablingProtection */ + EnablingProtection = "EnablingProtection", + /** EnablingFailed */ + EnablingFailed = "EnablingFailed", + /** DisablingProtection */ + DisablingProtection = "DisablingProtection", + /** MarkedForDeletion */ + MarkedForDeletion = "MarkedForDeletion", + /** DisablingFailed */ + DisablingFailed = "DisablingFailed", + /** UnprotectedStatesEnd */ + UnprotectedStatesEnd = "UnprotectedStatesEnd", + /** InitialReplicationStatesBegin */ + InitialReplicationStatesBegin = "InitialReplicationStatesBegin", + /** InitialReplicationInProgress */ + InitialReplicationInProgress = "InitialReplicationInProgress", + /** InitialReplicationCompletedOnPrimary */ + InitialReplicationCompletedOnPrimary = "InitialReplicationCompletedOnPrimary", + /** InitialReplicationCompletedOnRecovery */ + InitialReplicationCompletedOnRecovery = "InitialReplicationCompletedOnRecovery", + /** InitialReplicationFailed */ + InitialReplicationFailed = "InitialReplicationFailed", + /** InitialReplicationStatesEnd */ + InitialReplicationStatesEnd = "InitialReplicationStatesEnd", + /** ProtectedStatesBegin */ + ProtectedStatesBegin = "ProtectedStatesBegin", + /** Protected */ + Protected = "Protected", + /** ProtectedStatesEnd */ + ProtectedStatesEnd = "ProtectedStatesEnd", + /** PlannedFailoverTransitionStatesBegin */ + PlannedFailoverTransitionStatesBegin = "PlannedFailoverTransitionStatesBegin", + /** PlannedFailoverInitiated */ + PlannedFailoverInitiated = "PlannedFailoverInitiated", + /** PlannedFailoverCompleting */ + PlannedFailoverCompleting = "PlannedFailoverCompleting", + /** PlannedFailoverCompleted */ + PlannedFailoverCompleted = "PlannedFailoverCompleted", + /** PlannedFailoverFailed */ + PlannedFailoverFailed = "PlannedFailoverFailed", + /** PlannedFailoverCompletionFailed */ + PlannedFailoverCompletionFailed = "PlannedFailoverCompletionFailed", + /** PlannedFailoverTransitionStatesEnd */ + PlannedFailoverTransitionStatesEnd = "PlannedFailoverTransitionStatesEnd", + /** UnplannedFailoverTransitionStatesBegin */ + UnplannedFailoverTransitionStatesBegin = "UnplannedFailoverTransitionStatesBegin", + /** UnplannedFailoverInitiated */ + UnplannedFailoverInitiated = "UnplannedFailoverInitiated", + /** UnplannedFailoverCompleting */ + UnplannedFailoverCompleting = "UnplannedFailoverCompleting", + /** UnplannedFailoverCompleted */ + UnplannedFailoverCompleted = "UnplannedFailoverCompleted", + /** UnplannedFailoverFailed */ + UnplannedFailoverFailed = "UnplannedFailoverFailed", + /** UnplannedFailoverCompletionFailed */ + UnplannedFailoverCompletionFailed = "UnplannedFailoverCompletionFailed", + /** UnplannedFailoverTransitionStatesEnd */ + UnplannedFailoverTransitionStatesEnd = "UnplannedFailoverTransitionStatesEnd", + /** CommitFailoverStatesBegin */ + CommitFailoverStatesBegin = "CommitFailoverStatesBegin", + /** CommitFailoverInProgressOnPrimary */ + CommitFailoverInProgressOnPrimary = "CommitFailoverInProgressOnPrimary", + /** CommitFailoverInProgressOnRecovery */ + CommitFailoverInProgressOnRecovery = "CommitFailoverInProgressOnRecovery", + /** CommitFailoverCompleted */ + CommitFailoverCompleted = "CommitFailoverCompleted", + /** CommitFailoverFailedOnPrimary */ + CommitFailoverFailedOnPrimary = "CommitFailoverFailedOnPrimary", + /** CommitFailoverFailedOnRecovery */ + CommitFailoverFailedOnRecovery = "CommitFailoverFailedOnRecovery", + /** CommitFailoverStatesEnd */ + CommitFailoverStatesEnd = "CommitFailoverStatesEnd", + /** CancelFailoverStatesBegin */ + CancelFailoverStatesBegin = "CancelFailoverStatesBegin", + /** CancelFailoverInProgressOnPrimary */ + CancelFailoverInProgressOnPrimary = "CancelFailoverInProgressOnPrimary", + /** CancelFailoverInProgressOnRecovery */ + CancelFailoverInProgressOnRecovery = "CancelFailoverInProgressOnRecovery", + /** CancelFailoverFailedOnPrimary */ + CancelFailoverFailedOnPrimary = "CancelFailoverFailedOnPrimary", + /** CancelFailoverFailedOnRecovery */ + CancelFailoverFailedOnRecovery = "CancelFailoverFailedOnRecovery", + /** CancelFailoverStatesEnd */ + CancelFailoverStatesEnd = "CancelFailoverStatesEnd", + /** ChangeRecoveryPointStatesBegin */ + ChangeRecoveryPointStatesBegin = "ChangeRecoveryPointStatesBegin", + /** ChangeRecoveryPointInitiated */ + ChangeRecoveryPointInitiated = "ChangeRecoveryPointInitiated", + /** ChangeRecoveryPointCompleted */ + ChangeRecoveryPointCompleted = "ChangeRecoveryPointCompleted", + /** ChangeRecoveryPointFailed */ + ChangeRecoveryPointFailed = "ChangeRecoveryPointFailed", + /** ChangeRecoveryPointStatesEnd */ + ChangeRecoveryPointStatesEnd = "ChangeRecoveryPointStatesEnd", + /** ReprotectStatesBegin */ + ReprotectStatesBegin = "ReprotectStatesBegin", + /** ReprotectInitiated */ + ReprotectInitiated = "ReprotectInitiated", + /** ReprotectFailed */ + ReprotectFailed = "ReprotectFailed", + /** ReprotectStatesEnd */ + ReprotectStatesEnd = "ReprotectStatesEnd" +} + +/** + * Defines values for ProtectionState. \ + * {@link KnownProtectionState} can be used interchangeably with ProtectionState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **UnprotectedStatesBegin** \ + * **EnablingProtection** \ + * **EnablingFailed** \ + * **DisablingProtection** \ + * **MarkedForDeletion** \ + * **DisablingFailed** \ + * **UnprotectedStatesEnd** \ + * **InitialReplicationStatesBegin** \ + * **InitialReplicationInProgress** \ + * **InitialReplicationCompletedOnPrimary** \ + * **InitialReplicationCompletedOnRecovery** \ + * **InitialReplicationFailed** \ + * **InitialReplicationStatesEnd** \ + * **ProtectedStatesBegin** \ + * **Protected** \ + * **ProtectedStatesEnd** \ + * **PlannedFailoverTransitionStatesBegin** \ + * **PlannedFailoverInitiated** \ + * **PlannedFailoverCompleting** \ + * **PlannedFailoverCompleted** \ + * **PlannedFailoverFailed** \ + * **PlannedFailoverCompletionFailed** \ + * **PlannedFailoverTransitionStatesEnd** \ + * **UnplannedFailoverTransitionStatesBegin** \ + * **UnplannedFailoverInitiated** \ + * **UnplannedFailoverCompleting** \ + * **UnplannedFailoverCompleted** \ + * **UnplannedFailoverFailed** \ + * **UnplannedFailoverCompletionFailed** \ + * **UnplannedFailoverTransitionStatesEnd** \ + * **CommitFailoverStatesBegin** \ + * **CommitFailoverInProgressOnPrimary** \ + * **CommitFailoverInProgressOnRecovery** \ + * **CommitFailoverCompleted** \ + * **CommitFailoverFailedOnPrimary** \ + * **CommitFailoverFailedOnRecovery** \ + * **CommitFailoverStatesEnd** \ + * **CancelFailoverStatesBegin** \ + * **CancelFailoverInProgressOnPrimary** \ + * **CancelFailoverInProgressOnRecovery** \ + * **CancelFailoverFailedOnPrimary** \ + * **CancelFailoverFailedOnRecovery** \ + * **CancelFailoverStatesEnd** \ + * **ChangeRecoveryPointStatesBegin** \ + * **ChangeRecoveryPointInitiated** \ + * **ChangeRecoveryPointCompleted** \ + * **ChangeRecoveryPointFailed** \ + * **ChangeRecoveryPointStatesEnd** \ + * **ReprotectStatesBegin** \ + * **ReprotectInitiated** \ + * **ReprotectFailed** \ + * **ReprotectStatesEnd** + */ +export type ProtectionState = string; + +/** Known values of {@link TestFailoverState} that the service accepts. */ +export enum KnownTestFailoverState { + /** None */ + None = "None", + /** TestFailoverInitiated */ + TestFailoverInitiated = "TestFailoverInitiated", + /** TestFailoverCompleting */ + TestFailoverCompleting = "TestFailoverCompleting", + /** TestFailoverCompleted */ + TestFailoverCompleted = "TestFailoverCompleted", + /** TestFailoverFailed */ + TestFailoverFailed = "TestFailoverFailed", + /** TestFailoverCompletionFailed */ + TestFailoverCompletionFailed = "TestFailoverCompletionFailed", + /** TestFailoverCleanupInitiated */ + TestFailoverCleanupInitiated = "TestFailoverCleanupInitiated", + /** TestFailoverCleanupCompleting */ + TestFailoverCleanupCompleting = "TestFailoverCleanupCompleting", + /** MarkedForDeletion */ + MarkedForDeletion = "MarkedForDeletion" +} + +/** + * Defines values for TestFailoverState. \ + * {@link KnownTestFailoverState} can be used interchangeably with TestFailoverState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **TestFailoverInitiated** \ + * **TestFailoverCompleting** \ + * **TestFailoverCompleted** \ + * **TestFailoverFailed** \ + * **TestFailoverCompletionFailed** \ + * **TestFailoverCleanupInitiated** \ + * **TestFailoverCleanupCompleting** \ + * **MarkedForDeletion** + */ +export type TestFailoverState = string; + +/** Known values of {@link ResynchronizationState} that the service accepts. */ +export enum KnownResynchronizationState { + /** None */ + None = "None", + /** ResynchronizationInitiated */ + ResynchronizationInitiated = "ResynchronizationInitiated", + /** ResynchronizationCompleted */ + ResynchronizationCompleted = "ResynchronizationCompleted", + /** ResynchronizationFailed */ + ResynchronizationFailed = "ResynchronizationFailed" +} + +/** + * Defines values for ResynchronizationState. \ + * {@link KnownResynchronizationState} can be used interchangeably with ResynchronizationState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **ResynchronizationInitiated** \ + * **ResynchronizationCompleted** \ + * **ResynchronizationFailed** + */ +export type ResynchronizationState = string; + +/** Known values of {@link RecoveryPointType} that the service accepts. */ +export enum KnownRecoveryPointType { + /** ApplicationConsistent */ + ApplicationConsistent = "ApplicationConsistent", + /** CrashConsistent */ + CrashConsistent = "CrashConsistent" +} + +/** + * Defines values for RecoveryPointType. \ + * {@link KnownRecoveryPointType} can be used interchangeably with RecoveryPointType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ApplicationConsistent** \ + * **CrashConsistent** + */ +export type RecoveryPointType = string; + +/** Known values of {@link Origin} that the service accepts. */ +export enum KnownOrigin { + /** User */ + User = "user", + /** System */ + System = "system", + /** UserSystem */ + UserSystem = "user,system" +} + +/** + * Defines values for Origin. \ + * {@link KnownOrigin} can be used interchangeably with Origin, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **user** \ + * **system** \ + * **user,system** + */ +export type Origin = string; + +/** Known values of {@link ActionType} that the service accepts. */ +export enum KnownActionType { + /** Internal */ + Internal = "Internal" +} + +/** + * Defines values for ActionType. \ + * {@link KnownActionType} can be used interchangeably with ActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Internal** + */ +export type ActionType = string; + +/** Known values of {@link ReplicationVaultType} that the service accepts. */ +export enum KnownReplicationVaultType { + /** DisasterRecovery */ + DisasterRecovery = "DisasterRecovery", + /** Migrate */ + Migrate = "Migrate" +} + +/** + * Defines values for ReplicationVaultType. \ + * {@link KnownReplicationVaultType} can be used interchangeably with ReplicationVaultType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **DisasterRecovery** \ + * **Migrate** + */ +export type ReplicationVaultType = string; + +/** Known values of {@link WorkflowState} that the service accepts. */ +export enum KnownWorkflowState { + /** Pending */ + Pending = "Pending", + /** Started */ + Started = "Started", + /** Cancelling */ + Cancelling = "Cancelling", + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Cancelled */ + Cancelled = "Cancelled", + /** CompletedWithInformation */ + CompletedWithInformation = "CompletedWithInformation", + /** CompletedWithWarnings */ + CompletedWithWarnings = "CompletedWithWarnings", + /** CompletedWithErrors */ + CompletedWithErrors = "CompletedWithErrors" +} + +/** + * Defines values for WorkflowState. \ + * {@link KnownWorkflowState} can be used interchangeably with WorkflowState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Pending** \ + * **Started** \ + * **Cancelling** \ + * **Succeeded** \ + * **Failed** \ + * **Cancelled** \ + * **CompletedWithInformation** \ + * **CompletedWithWarnings** \ + * **CompletedWithErrors** + */ +export type WorkflowState = string; + +/** Known values of {@link WorkflowObjectType} that the service accepts. */ +export enum KnownWorkflowObjectType { + /** AvsDiskPool */ + AvsDiskPool = "AvsDiskPool", + /** Dra */ + Dra = "Dra", + /** Fabric */ + Fabric = "Fabric", + /** Policy */ + Policy = "Policy", + /** ProtectedItem */ + ProtectedItem = "ProtectedItem", + /** RecoveryPlan */ + RecoveryPlan = "RecoveryPlan", + /** ReplicationExtension */ + ReplicationExtension = "ReplicationExtension", + /** Vault */ + Vault = "Vault" +} + +/** + * Defines values for WorkflowObjectType. \ + * {@link KnownWorkflowObjectType} can be used interchangeably with WorkflowObjectType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AvsDiskPool** \ + * **Dra** \ + * **Fabric** \ + * **Policy** \ + * **ProtectedItem** \ + * **RecoveryPlan** \ + * **ReplicationExtension** \ + * **Vault** + */ +export type WorkflowObjectType = string; + +/** Known values of {@link TaskState} that the service accepts. */ +export enum KnownTaskState { + /** Pending */ + Pending = "Pending", + /** Started */ + Started = "Started", + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Cancelled */ + Cancelled = "Cancelled", + /** Skipped */ + Skipped = "Skipped" +} + +/** + * Defines values for TaskState. \ + * {@link KnownTaskState} can be used interchangeably with TaskState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Pending** \ + * **Started** \ + * **Succeeded** \ + * **Failed** \ + * **Cancelled** \ + * **Skipped** + */ +export type TaskState = string; + +/** Known values of {@link VMNicSelection} that the service accepts. */ +export enum KnownVMNicSelection { + /** NotSelected */ + NotSelected = "NotSelected", + /** SelectedByUser */ + SelectedByUser = "SelectedByUser", + /** SelectedByDefault */ + SelectedByDefault = "SelectedByDefault", + /** SelectedByUserOverride */ + SelectedByUserOverride = "SelectedByUserOverride" +} + +/** + * Defines values for VMNicSelection. \ + * {@link KnownVMNicSelection} can be used interchangeably with VMNicSelection, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotSelected** \ + * **SelectedByUser** \ + * **SelectedByDefault** \ + * **SelectedByUserOverride** + */ +export type VMNicSelection = string; + +/** Known values of {@link ProtectedItemActiveLocation} that the service accepts. */ +export enum KnownProtectedItemActiveLocation { + /** Primary */ + Primary = "Primary", + /** Recovery */ + Recovery = "Recovery" +} + +/** + * Defines values for ProtectedItemActiveLocation. \ + * {@link KnownProtectedItemActiveLocation} can be used interchangeably with ProtectedItemActiveLocation, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Primary** \ + * **Recovery** + */ +export type ProtectedItemActiveLocation = string; + +/** Known values of {@link VMwareToAzureMigrateResyncState} that the service accepts. */ +export enum KnownVMwareToAzureMigrateResyncState { + /** None */ + None = "None", + /** PreparedForResynchronization */ + PreparedForResynchronization = "PreparedForResynchronization", + /** StartedResynchronization */ + StartedResynchronization = "StartedResynchronization" +} + +/** + * Defines values for VMwareToAzureMigrateResyncState. \ + * {@link KnownVMwareToAzureMigrateResyncState} can be used interchangeably with VMwareToAzureMigrateResyncState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **PreparedForResynchronization** \ + * **StartedResynchronization** + */ +export type VMwareToAzureMigrateResyncState = string; + +/** Optional parameters. */ +export interface DraGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type DraGetResponse = DraModel; + +/** Optional parameters. */ +export interface DraCreateOptionalParams extends coreClient.OperationOptions { + /** Dra model. */ + body?: DraModel; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type DraCreateResponse = DraModel; + +/** Optional parameters. */ +export interface DraDeleteOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type DraDeleteResponse = DraDeleteHeaders; + +/** Optional parameters. */ +export interface DraListOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type DraListResponse = DraModelCollection; + +/** Optional parameters. */ +export interface DraListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type DraListNextResponse = DraModelCollection; + +/** Optional parameters. */ +export interface DraOperationStatusGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type DraOperationStatusGetResponse = OperationStatus; + +/** Optional parameters. */ +export interface EmailConfigurationGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type EmailConfigurationGetResponse = EmailConfigurationModel; + +/** Optional parameters. */ +export interface EmailConfigurationCreateOptionalParams + extends coreClient.OperationOptions { + /** EmailConfiguration model. */ + body?: EmailConfigurationModel; +} + +/** Contains response data for the create operation. */ +export type EmailConfigurationCreateResponse = EmailConfigurationModel; + +/** Optional parameters. */ +export interface EmailConfigurationListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type EmailConfigurationListResponse = EmailConfigurationModelCollection; + +/** Optional parameters. */ +export interface EmailConfigurationListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type EmailConfigurationListNextResponse = EmailConfigurationModelCollection; + +/** Optional parameters. */ +export interface EventGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type EventGetResponse = EventModel; + +/** Optional parameters. */ +export interface EventListOptionalParams extends coreClient.OperationOptions { + /** Filter string. */ + filter?: string; + /** Continuation token. */ + continuationToken?: string; +} + +/** Contains response data for the list operation. */ +export type EventListResponse = EventModelCollection; + +/** Optional parameters. */ +export interface EventListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type EventListNextResponse = EventModelCollection; + +/** Optional parameters. */ +export interface FabricGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type FabricGetResponse = FabricModel; + +/** Optional parameters. */ +export interface FabricCreateOptionalParams + extends coreClient.OperationOptions { + /** Fabric properties. */ + body?: FabricModel; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type FabricCreateResponse = FabricModel; + +/** Optional parameters. */ +export interface FabricUpdateOptionalParams + extends coreClient.OperationOptions { + /** Fabric properties. */ + body?: FabricModelUpdate; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type FabricUpdateResponse = FabricModel; + +/** Optional parameters. */ +export interface FabricDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type FabricDeleteResponse = FabricDeleteHeaders; + +/** Optional parameters. */ +export interface FabricListBySubscriptionOptionalParams + extends coreClient.OperationOptions { + /** Continuation token from the previous call. */ + continuationToken?: string; +} + +/** Contains response data for the listBySubscription operation. */ +export type FabricListBySubscriptionResponse = FabricModelCollection; + +/** Optional parameters. */ +export interface FabricListOptionalParams extends coreClient.OperationOptions { + /** Continuation token from the previous call. */ + continuationToken?: string; +} + +/** Contains response data for the list operation. */ +export type FabricListResponse = FabricModelCollection; + +/** Optional parameters. */ +export interface FabricListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type FabricListBySubscriptionNextResponse = FabricModelCollection; + +/** Optional parameters. */ +export interface FabricListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type FabricListNextResponse = FabricModelCollection; + +/** Optional parameters. */ +export interface FabricOperationsStatusGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type FabricOperationsStatusGetResponse = OperationStatus; + +/** Optional parameters. */ +export interface PolicyGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PolicyGetResponse = PolicyModel; + +/** Optional parameters. */ +export interface PolicyCreateOptionalParams + extends coreClient.OperationOptions { + /** Policy model. */ + body?: PolicyModel; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type PolicyCreateResponse = PolicyModel; + +/** Optional parameters. */ +export interface PolicyDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type PolicyDeleteResponse = PolicyDeleteHeaders; + +/** Optional parameters. */ +export interface PolicyListOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type PolicyListResponse = PolicyModelCollection; + +/** Optional parameters. */ +export interface PolicyListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type PolicyListNextResponse = PolicyModelCollection; + +/** Optional parameters. */ +export interface PolicyOperationStatusGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PolicyOperationStatusGetResponse = OperationStatus; + +/** Optional parameters. */ +export interface ProtectedItemGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ProtectedItemGetResponse = ProtectedItemModel; + +/** Optional parameters. */ +export interface ProtectedItemCreateOptionalParams + extends coreClient.OperationOptions { + /** Protected item model. */ + body?: ProtectedItemModel; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type ProtectedItemCreateResponse = ProtectedItemModel; + +/** Optional parameters. */ +export interface ProtectedItemDeleteOptionalParams + extends coreClient.OperationOptions { + /** A flag indicating whether to do force delete or not. */ + forceDelete?: boolean; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type ProtectedItemDeleteResponse = ProtectedItemDeleteHeaders; + +/** Optional parameters. */ +export interface ProtectedItemListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ProtectedItemListResponse = ProtectedItemModelCollection; + +/** Optional parameters. */ +export interface ProtectedItemPlannedFailoverOptionalParams + extends coreClient.OperationOptions { + /** Planned failover model. */ + body?: PlannedFailoverModel; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the plannedFailover operation. */ +export type ProtectedItemPlannedFailoverResponse = PlannedFailoverModel; + +/** Optional parameters. */ +export interface ProtectedItemListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ProtectedItemListNextResponse = ProtectedItemModelCollection; + +/** Optional parameters. */ +export interface ProtectedItemOperationStatusGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ProtectedItemOperationStatusGetResponse = OperationStatus; + +/** Optional parameters. */ +export interface RecoveryPointsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type RecoveryPointsGetResponse = RecoveryPointModel; + +/** Optional parameters. */ +export interface RecoveryPointsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type RecoveryPointsListResponse = RecoveryPointModelCollection; + +/** Optional parameters. */ +export interface RecoveryPointsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type RecoveryPointsListNextResponse = RecoveryPointModelCollection; + +/** Optional parameters. */ +export interface ReplicationExtensionGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ReplicationExtensionGetResponse = ReplicationExtensionModel; + +/** Optional parameters. */ +export interface ReplicationExtensionCreateOptionalParams + extends coreClient.OperationOptions { + /** Replication extension model. */ + body?: ReplicationExtensionModel; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type ReplicationExtensionCreateResponse = ReplicationExtensionModel; + +/** Optional parameters. */ +export interface ReplicationExtensionDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type ReplicationExtensionDeleteResponse = ReplicationExtensionDeleteHeaders; + +/** Optional parameters. */ +export interface ReplicationExtensionListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ReplicationExtensionListResponse = ReplicationExtensionModelCollection; + +/** Optional parameters. */ +export interface ReplicationExtensionListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ReplicationExtensionListNextResponse = ReplicationExtensionModelCollection; + +/** Optional parameters. */ +export interface ReplicationExtensionOperationStatusGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ReplicationExtensionOperationStatusGetResponse = OperationStatus; + +/** Optional parameters. */ +export interface CheckNameAvailabilityOptionalParams + extends coreClient.OperationOptions { + /** Resource details. */ + body?: CheckNameAvailabilityModel; +} + +/** Contains response data for the checkNameAvailability operation. */ +export type CheckNameAvailabilityResponse = CheckNameAvailabilityResponseModel; + +/** Optional parameters. */ +export interface DeploymentPreflightOptionalParams + extends coreClient.OperationOptions { + /** Deployment preflight model. */ + body?: DeploymentPreflightModel; +} + +/** Contains response data for the deploymentPreflight operation. */ +export type DeploymentPreflightResponse = DeploymentPreflightModel; + +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OperationsListResponse = OperationListResult; + +/** Optional parameters. */ +export interface OperationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type OperationsListNextResponse = OperationListResult; + +/** Optional parameters. */ +export interface VaultGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type VaultGetResponse = VaultModel; + +/** Optional parameters. */ +export interface VaultCreateOptionalParams extends coreClient.OperationOptions { + /** Vault properties. */ + body?: VaultModel; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type VaultCreateResponse = VaultModel; + +/** Optional parameters. */ +export interface VaultUpdateOptionalParams extends coreClient.OperationOptions { + /** Vault properties. */ + body?: VaultModelUpdate; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type VaultUpdateResponse = VaultModel; + +/** Optional parameters. */ +export interface VaultDeleteOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type VaultDeleteResponse = VaultDeleteHeaders; + +/** Optional parameters. */ +export interface VaultListBySubscriptionOptionalParams + extends coreClient.OperationOptions { + /** Continuation token from the previous call. */ + continuationToken?: string; +} + +/** Contains response data for the listBySubscription operation. */ +export type VaultListBySubscriptionResponse = VaultModelCollection; + +/** Optional parameters. */ +export interface VaultListOptionalParams extends coreClient.OperationOptions { + /** Continuation token from the previous call. */ + continuationToken?: string; +} + +/** Contains response data for the list operation. */ +export type VaultListResponse = VaultModelCollection; + +/** Optional parameters. */ +export interface VaultListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type VaultListBySubscriptionNextResponse = VaultModelCollection; + +/** Optional parameters. */ +export interface VaultListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type VaultListNextResponse = VaultModelCollection; + +/** Optional parameters. */ +export interface VaultOperationStatusGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type VaultOperationStatusGetResponse = OperationStatus; + +/** Optional parameters. */ +export interface WorkflowGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type WorkflowGetResponse = WorkflowModel; + +/** Optional parameters. */ +export interface WorkflowListOptionalParams + extends coreClient.OperationOptions { + /** Filter string. */ + filter?: string; + /** Continuation token. */ + continuationToken?: string; +} + +/** Contains response data for the list operation. */ +export type WorkflowListResponse = WorkflowModelCollection; + +/** Optional parameters. */ +export interface WorkflowListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type WorkflowListNextResponse = WorkflowModelCollection; + +/** Optional parameters. */ +export interface WorkflowOperationStatusGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type WorkflowOperationStatusGetResponse = OperationStatus; + +/** Optional parameters. */ +export interface AzureSiteRecoveryManagementServiceAPIOptionalParams + extends coreClient.ServiceClientOptions { + /** server parameter */ + $host?: string; + /** Api Version */ + apiVersion?: string; + /** Overrides client endpoint. */ + endpoint?: string; +} diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/models/mappers.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/models/mappers.ts new file mode 100644 index 000000000000..95a49e62acae --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/models/mappers.ts @@ -0,0 +1,5306 @@ +/* + * 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 coreClient from "@azure/core-client"; + +export const DraModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DraModel", + modelProperties: { + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "DraModelProperties" + } + }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "DraModelSystemData" + } + } + } + } +}; + +export const DraModelProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DraModelProperties", + modelProperties: { + correlationId: { + serializedName: "correlationId", + readOnly: true, + type: { + name: "String" + } + }, + machineId: { + constraints: { + MinLength: 1 + }, + serializedName: "machineId", + required: true, + type: { + name: "String" + } + }, + machineName: { + constraints: { + MinLength: 1 + }, + serializedName: "machineName", + required: true, + type: { + name: "String" + } + }, + authenticationIdentity: { + serializedName: "authenticationIdentity", + type: { + name: "Composite", + className: "IdentityModel" + } + }, + resourceAccessIdentity: { + serializedName: "resourceAccessIdentity", + type: { + name: "Composite", + className: "IdentityModel" + } + }, + isResponsive: { + serializedName: "isResponsive", + readOnly: true, + type: { + name: "Boolean" + } + }, + lastHeartbeat: { + serializedName: "lastHeartbeat", + readOnly: true, + type: { + name: "DateTime" + } + }, + versionNumber: { + serializedName: "versionNumber", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + healthErrors: { + serializedName: "healthErrors", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HealthErrorModel" + } + } + } + }, + customProperties: { + serializedName: "customProperties", + type: { + name: "Composite", + className: "DraModelCustomProperties" + } + } + } + } +}; + +export const IdentityModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IdentityModel", + modelProperties: { + tenantId: { + constraints: { + MinLength: 1 + }, + serializedName: "tenantId", + required: true, + type: { + name: "String" + } + }, + applicationId: { + constraints: { + MinLength: 1 + }, + serializedName: "applicationId", + required: true, + type: { + name: "String" + } + }, + objectId: { + constraints: { + MinLength: 1 + }, + serializedName: "objectId", + required: true, + type: { + name: "String" + } + }, + audience: { + constraints: { + MinLength: 1 + }, + serializedName: "audience", + required: true, + type: { + name: "String" + } + }, + aadAuthority: { + constraints: { + MinLength: 1 + }, + serializedName: "aadAuthority", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const HealthErrorModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HealthErrorModel", + modelProperties: { + affectedResourceType: { + serializedName: "affectedResourceType", + type: { + name: "String" + } + }, + affectedResourceCorrelationIds: { + serializedName: "affectedResourceCorrelationIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + childErrors: { + serializedName: "childErrors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InnerHealthErrorModel" + } + } + } + }, + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + healthCategory: { + serializedName: "healthCategory", + readOnly: true, + type: { + name: "String" + } + }, + category: { + serializedName: "category", + readOnly: true, + type: { + name: "String" + } + }, + severity: { + serializedName: "severity", + readOnly: true, + type: { + name: "String" + } + }, + source: { + serializedName: "source", + readOnly: true, + type: { + name: "String" + } + }, + creationTime: { + serializedName: "creationTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + isCustomerResolvable: { + serializedName: "isCustomerResolvable", + readOnly: true, + type: { + name: "Boolean" + } + }, + summary: { + serializedName: "summary", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + causes: { + serializedName: "causes", + readOnly: true, + type: { + name: "String" + } + }, + recommendation: { + serializedName: "recommendation", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const InnerHealthErrorModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InnerHealthErrorModel", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + healthCategory: { + serializedName: "healthCategory", + readOnly: true, + type: { + name: "String" + } + }, + category: { + serializedName: "category", + readOnly: true, + type: { + name: "String" + } + }, + severity: { + serializedName: "severity", + readOnly: true, + type: { + name: "String" + } + }, + source: { + serializedName: "source", + readOnly: true, + type: { + name: "String" + } + }, + creationTime: { + serializedName: "creationTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + isCustomerResolvable: { + serializedName: "isCustomerResolvable", + readOnly: true, + type: { + name: "Boolean" + } + }, + summary: { + serializedName: "summary", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + causes: { + serializedName: "causes", + readOnly: true, + type: { + name: "String" + } + }, + recommendation: { + serializedName: "recommendation", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const DraModelCustomProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DraModelCustomProperties", + uberParent: "DraModelCustomProperties", + polymorphicDiscriminator: { + serializedName: "instanceType", + clientName: "instanceType" + }, + modelProperties: { + instanceType: { + constraints: { + MinLength: 1 + }, + serializedName: "instanceType", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const SystemDataModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemDataModel", + 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 ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + } +}; + +export const ErrorDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + info: { + serializedName: "info", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } +}; + +export const DraModelCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DraModelCollection", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DraModel" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const OperationStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationStatus", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + startTime: { + serializedName: "startTime", + type: { + name: "String" + } + }, + endTime: { + serializedName: "endTime", + type: { + name: "String" + } + } + } + } +}; + +export const EmailConfigurationModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EmailConfigurationModel", + modelProperties: { + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "EmailConfigurationModelProperties" + } + }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "EmailConfigurationModelSystemData" + } + } + } + } +}; + +export const EmailConfigurationModelProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EmailConfigurationModelProperties", + modelProperties: { + sendToOwners: { + serializedName: "sendToOwners", + required: true, + type: { + name: "Boolean" + } + }, + customEmailAddresses: { + serializedName: "customEmailAddresses", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + locale: { + serializedName: "locale", + type: { + name: "String" + } + } + } + } +}; + +export const EmailConfigurationModelCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EmailConfigurationModelCollection", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EmailConfigurationModel" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const EventModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EventModel", + modelProperties: { + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "EventModelProperties" + } + }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "EventModelSystemData" + } + } + } + } +}; + +export const EventModelProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EventModelProperties", + modelProperties: { + resourceType: { + serializedName: "resourceType", + readOnly: true, + type: { + name: "String" + } + }, + resourceName: { + serializedName: "resourceName", + readOnly: true, + type: { + name: "String" + } + }, + eventType: { + serializedName: "eventType", + readOnly: true, + type: { + name: "String" + } + }, + eventName: { + serializedName: "eventName", + readOnly: true, + type: { + name: "String" + } + }, + timeOfOccurrence: { + serializedName: "timeOfOccurrence", + readOnly: true, + type: { + name: "DateTime" + } + }, + severity: { + serializedName: "severity", + readOnly: true, + type: { + name: "String" + } + }, + description: { + serializedName: "description", + readOnly: true, + type: { + name: "String" + } + }, + correlationId: { + serializedName: "correlationId", + readOnly: true, + type: { + name: "String" + } + }, + healthErrors: { + serializedName: "healthErrors", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HealthErrorModel" + } + } + } + }, + customProperties: { + serializedName: "customProperties", + type: { + name: "Composite", + className: "EventModelCustomProperties" + } + } + } + } +}; + +export const EventModelCustomProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EventModelCustomProperties", + uberParent: "EventModelCustomProperties", + polymorphicDiscriminator: { + serializedName: "instanceType", + clientName: "instanceType" + }, + modelProperties: { + instanceType: { + constraints: { + MinLength: 1 + }, + serializedName: "instanceType", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const EventModelCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EventModelCollection", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EventModel" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const FabricModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FabricModel", + modelProperties: { + location: { + constraints: { + MinLength: 1 + }, + serializedName: "location", + required: true, + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "FabricModelProperties" + } + }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "FabricModelSystemData" + } + } + } + } +}; + +export const FabricModelProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FabricModelProperties", + modelProperties: { + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + serviceEndpoint: { + serializedName: "serviceEndpoint", + readOnly: true, + type: { + name: "String" + } + }, + serviceResourceId: { + serializedName: "serviceResourceId", + readOnly: true, + type: { + name: "String" + } + }, + health: { + serializedName: "health", + readOnly: true, + type: { + name: "String" + } + }, + healthErrors: { + serializedName: "healthErrors", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HealthErrorModel" + } + } + } + }, + customProperties: { + serializedName: "customProperties", + type: { + name: "Composite", + className: "FabricModelCustomProperties" + } + } + } + } +}; + +export const FabricModelCustomProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FabricModelCustomProperties", + uberParent: "FabricModelCustomProperties", + polymorphicDiscriminator: { + serializedName: "instanceType", + clientName: "instanceType" + }, + modelProperties: { + instanceType: { + constraints: { + MinLength: 1 + }, + serializedName: "instanceType", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const FabricModelUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FabricModelUpdate", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "FabricModelProperties" + } + }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "FabricModelUpdateSystemData" + } + } + } + } +}; + +export const FabricModelCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FabricModelCollection", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FabricModel" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PolicyModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PolicyModel", + modelProperties: { + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "PolicyModelProperties" + } + }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "PolicyModelSystemData" + } + } + } + } +}; + +export const PolicyModelProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PolicyModelProperties", + modelProperties: { + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + customProperties: { + serializedName: "customProperties", + type: { + name: "Composite", + className: "PolicyModelCustomProperties" + } + } + } + } +}; + +export const PolicyModelCustomProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PolicyModelCustomProperties", + uberParent: "PolicyModelCustomProperties", + polymorphicDiscriminator: { + serializedName: "instanceType", + clientName: "instanceType" + }, + modelProperties: { + instanceType: { + constraints: { + MinLength: 1 + }, + serializedName: "instanceType", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const PolicyModelCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PolicyModelCollection", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PolicyModel" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ProtectedItemModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProtectedItemModel", + modelProperties: { + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ProtectedItemModelProperties" + } + }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "ProtectedItemModelSystemData" + } + } + } + } +}; + +export const ProtectedItemModelProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProtectedItemModelProperties", + modelProperties: { + policyName: { + constraints: { + MinLength: 1 + }, + serializedName: "policyName", + required: true, + type: { + name: "String" + } + }, + replicationExtensionName: { + constraints: { + MinLength: 1 + }, + serializedName: "replicationExtensionName", + required: true, + type: { + name: "String" + } + }, + correlationId: { + serializedName: "correlationId", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + protectionState: { + serializedName: "protectionState", + readOnly: true, + type: { + name: "String" + } + }, + protectionStateDescription: { + serializedName: "protectionStateDescription", + readOnly: true, + type: { + name: "String" + } + }, + testFailoverState: { + serializedName: "testFailoverState", + readOnly: true, + type: { + name: "String" + } + }, + testFailoverStateDescription: { + serializedName: "testFailoverStateDescription", + readOnly: true, + type: { + name: "String" + } + }, + resynchronizationState: { + serializedName: "resynchronizationState", + readOnly: true, + type: { + name: "String" + } + }, + fabricObjectId: { + serializedName: "fabricObjectId", + readOnly: true, + type: { + name: "String" + } + }, + fabricObjectName: { + serializedName: "fabricObjectName", + readOnly: true, + type: { + name: "String" + } + }, + sourceFabricProviderId: { + serializedName: "sourceFabricProviderId", + readOnly: true, + type: { + name: "String" + } + }, + targetFabricProviderId: { + serializedName: "targetFabricProviderId", + readOnly: true, + type: { + name: "String" + } + }, + fabricId: { + serializedName: "fabricId", + readOnly: true, + type: { + name: "String" + } + }, + targetFabricId: { + serializedName: "targetFabricId", + readOnly: true, + type: { + name: "String" + } + }, + draId: { + serializedName: "draId", + readOnly: true, + type: { + name: "String" + } + }, + targetDraId: { + serializedName: "targetDraId", + readOnly: true, + type: { + name: "String" + } + }, + resyncRequired: { + serializedName: "resyncRequired", + readOnly: true, + type: { + name: "Boolean" + } + }, + lastSuccessfulPlannedFailoverTime: { + serializedName: "lastSuccessfulPlannedFailoverTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + lastSuccessfulUnplannedFailoverTime: { + serializedName: "lastSuccessfulUnplannedFailoverTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + lastSuccessfulTestFailoverTime: { + serializedName: "lastSuccessfulTestFailoverTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + currentJob: { + serializedName: "currentJob", + type: { + name: "Composite", + className: "ProtectedItemModelPropertiesCurrentJob" + } + }, + allowedJobs: { + serializedName: "allowedJobs", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + lastFailedEnableProtectionJob: { + serializedName: "lastFailedEnableProtectionJob", + type: { + name: "Composite", + className: "ProtectedItemModelPropertiesLastFailedEnableProtectionJob" + } + }, + lastFailedPlannedFailoverJob: { + serializedName: "lastFailedPlannedFailoverJob", + type: { + name: "Composite", + className: "ProtectedItemModelPropertiesLastFailedPlannedFailoverJob" + } + }, + lastTestFailoverJob: { + serializedName: "lastTestFailoverJob", + type: { + name: "Composite", + className: "ProtectedItemModelPropertiesLastTestFailoverJob" + } + }, + replicationHealth: { + serializedName: "replicationHealth", + readOnly: true, + type: { + name: "String" + } + }, + healthErrors: { + serializedName: "healthErrors", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HealthErrorModel" + } + } + } + }, + customProperties: { + serializedName: "customProperties", + type: { + name: "Composite", + className: "ProtectedItemModelCustomProperties" + } + } + } + } +}; + +export const ProtectedItemJobProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProtectedItemJobProperties", + modelProperties: { + scenarioName: { + serializedName: "scenarioName", + readOnly: true, + type: { + name: "String" + } + }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + readOnly: true, + type: { + name: "String" + } + }, + state: { + serializedName: "state", + readOnly: true, + type: { + name: "String" + } + }, + startTime: { + serializedName: "startTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + endTime: { + serializedName: "endTime", + readOnly: true, + type: { + name: "DateTime" + } + } + } + } +}; + +export const ProtectedItemModelCustomProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProtectedItemModelCustomProperties", + uberParent: "ProtectedItemModelCustomProperties", + polymorphicDiscriminator: { + serializedName: "instanceType", + clientName: "instanceType" + }, + modelProperties: { + instanceType: { + constraints: { + MinLength: 1 + }, + serializedName: "instanceType", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ProtectedItemModelCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProtectedItemModelCollection", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ProtectedItemModel" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PlannedFailoverModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PlannedFailoverModel", + modelProperties: { + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "PlannedFailoverModelProperties" + } + } + } + } +}; + +export const PlannedFailoverModelProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PlannedFailoverModelProperties", + modelProperties: { + customProperties: { + serializedName: "customProperties", + type: { + name: "Composite", + className: "PlannedFailoverModelCustomProperties" + } + } + } + } +}; + +export const PlannedFailoverModelCustomProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PlannedFailoverModelCustomProperties", + uberParent: "PlannedFailoverModelCustomProperties", + polymorphicDiscriminator: { + serializedName: "instanceType", + clientName: "instanceType" + }, + modelProperties: { + instanceType: { + constraints: { + MinLength: 1 + }, + serializedName: "instanceType", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const RecoveryPointModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RecoveryPointModel", + modelProperties: { + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "RecoveryPointModelProperties" + } + }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "RecoveryPointModelSystemData" + } + } + } + } +}; + +export const RecoveryPointModelProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RecoveryPointModelProperties", + modelProperties: { + recoveryPointTime: { + serializedName: "recoveryPointTime", + required: true, + type: { + name: "DateTime" + } + }, + recoveryPointType: { + serializedName: "recoveryPointType", + required: true, + type: { + name: "String" + } + }, + customProperties: { + serializedName: "customProperties", + type: { + name: "Composite", + className: "RecoveryPointModelCustomProperties" + } + } + } + } +}; + +export const RecoveryPointModelCustomProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RecoveryPointModelCustomProperties", + uberParent: "RecoveryPointModelCustomProperties", + polymorphicDiscriminator: { + serializedName: "instanceType", + clientName: "instanceType" + }, + modelProperties: { + instanceType: { + constraints: { + MinLength: 1 + }, + serializedName: "instanceType", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const RecoveryPointModelCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RecoveryPointModelCollection", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RecoveryPointModel" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ReplicationExtensionModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReplicationExtensionModel", + modelProperties: { + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ReplicationExtensionModelProperties" + } + }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "ReplicationExtensionModelSystemData" + } + } + } + } +}; + +export const ReplicationExtensionModelProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReplicationExtensionModelProperties", + modelProperties: { + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + customProperties: { + serializedName: "customProperties", + type: { + name: "Composite", + className: "ReplicationExtensionModelCustomProperties" + } + } + } + } +}; + +export const ReplicationExtensionModelCustomProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReplicationExtensionModelCustomProperties", + uberParent: "ReplicationExtensionModelCustomProperties", + polymorphicDiscriminator: { + serializedName: "instanceType", + clientName: "instanceType" + }, + modelProperties: { + instanceType: { + constraints: { + MinLength: 1 + }, + serializedName: "instanceType", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ReplicationExtensionModelCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReplicationExtensionModelCollection", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReplicationExtensionModel" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const CheckNameAvailabilityModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CheckNameAvailabilityModel", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const CheckNameAvailabilityResponseModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CheckNameAvailabilityResponseModel", + modelProperties: { + nameAvailable: { + serializedName: "nameAvailable", + type: { + name: "Boolean" + } + }, + reason: { + serializedName: "reason", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const OperationListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const Operation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + isDataAction: { + serializedName: "isDataAction", + readOnly: true, + type: { + name: "Boolean" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", + readOnly: true, + type: { + name: "String" + } + }, + actionType: { + serializedName: "actionType", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const OperationDisplay: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + readOnly: true, + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + readOnly: true, + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + readOnly: true, + type: { + name: "String" + } + }, + description: { + serializedName: "description", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const DeploymentPreflightModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DeploymentPreflightModel", + modelProperties: { + resources: { + serializedName: "resources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DeploymentPreflightResource" + } + } + } + } + } + } +}; + +export const DeploymentPreflightResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DeploymentPreflightResource", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + apiVersion: { + serializedName: "apiVersion", + type: { + name: "String" + } + } + } + } +}; + +export const VaultModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VaultModel", + modelProperties: { + location: { + constraints: { + MinLength: 1 + }, + serializedName: "location", + required: true, + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "VaultModelProperties" + } + }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "VaultModelSystemData" + } + } + } + } +}; + +export const VaultModelProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VaultModelProperties", + modelProperties: { + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + serviceResourceId: { + serializedName: "serviceResourceId", + readOnly: true, + type: { + name: "String" + } + }, + vaultType: { + serializedName: "vaultType", + type: { + name: "String" + } + } + } + } +}; + +export const VaultModelUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VaultModelUpdate", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "VaultModelProperties" + } + }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "VaultModelUpdateSystemData" + } + } + } + } +}; + +export const VaultModelCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VaultModelCollection", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VaultModel" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const WorkflowModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkflowModel", + modelProperties: { + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "WorkflowModelProperties" + } + }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "WorkflowModelSystemData" + } + } + } + } +}; + +export const WorkflowModelProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkflowModelProperties", + modelProperties: { + displayName: { + serializedName: "displayName", + readOnly: true, + type: { + name: "String" + } + }, + state: { + serializedName: "state", + readOnly: true, + type: { + name: "String" + } + }, + startTime: { + serializedName: "startTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + endTime: { + serializedName: "endTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + objectId: { + serializedName: "objectId", + readOnly: true, + type: { + name: "String" + } + }, + objectName: { + serializedName: "objectName", + readOnly: true, + type: { + name: "String" + } + }, + objectInternalId: { + serializedName: "objectInternalId", + readOnly: true, + type: { + name: "String" + } + }, + objectInternalName: { + serializedName: "objectInternalName", + readOnly: true, + type: { + name: "String" + } + }, + objectType: { + serializedName: "objectType", + readOnly: true, + type: { + name: "String" + } + }, + replicationProviderId: { + serializedName: "replicationProviderId", + readOnly: true, + type: { + name: "String" + } + }, + sourceFabricProviderId: { + serializedName: "sourceFabricProviderId", + readOnly: true, + type: { + name: "String" + } + }, + targetFabricProviderId: { + serializedName: "targetFabricProviderId", + readOnly: true, + type: { + name: "String" + } + }, + allowedActions: { + serializedName: "allowedActions", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + activityId: { + serializedName: "activityId", + readOnly: true, + type: { + name: "String" + } + }, + tasks: { + serializedName: "tasks", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TaskModel" + } + } + } + }, + errors: { + serializedName: "errors", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorModel" + } + } + } + }, + customProperties: { + serializedName: "customProperties", + type: { + name: "Composite", + className: "WorkflowModelCustomProperties" + } + } + } + } +}; + +export const TaskModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TaskModel", + modelProperties: { + taskName: { + serializedName: "taskName", + readOnly: true, + type: { + name: "String" + } + }, + state: { + serializedName: "state", + readOnly: true, + type: { + name: "String" + } + }, + startTime: { + serializedName: "startTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + endTime: { + serializedName: "endTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + customProperties: { + serializedName: "customProperties", + type: { + name: "Composite", + className: "TaskModelCustomProperties" + } + }, + childrenWorkflows: { + serializedName: "childrenWorkflows", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkflowModel" + } + } + } + } + } + } +}; + +export const TaskModelCustomProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TaskModelCustomProperties", + modelProperties: { + instanceType: { + constraints: { + MinLength: 1 + }, + serializedName: "instanceType", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ErrorModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorModel", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + severity: { + serializedName: "severity", + readOnly: true, + type: { + name: "String" + } + }, + creationTime: { + serializedName: "creationTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + causes: { + serializedName: "causes", + readOnly: true, + type: { + name: "String" + } + }, + recommendation: { + serializedName: "recommendation", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const WorkflowModelCustomProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkflowModelCustomProperties", + uberParent: "WorkflowModelCustomProperties", + polymorphicDiscriminator: { + serializedName: "instanceType", + clientName: "instanceType" + }, + modelProperties: { + instanceType: { + constraints: { + MinLength: 1 + }, + serializedName: "instanceType", + required: true, + type: { + name: "String" + } + }, + affectedObjectDetails: { + serializedName: "affectedObjectDetails", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const WorkflowModelCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkflowModelCollection", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkflowModel" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const AzStackHCIClusterProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzStackHCIClusterProperties", + modelProperties: { + clusterName: { + constraints: { + MinLength: 1 + }, + serializedName: "clusterName", + required: true, + type: { + name: "String" + } + }, + resourceName: { + constraints: { + MinLength: 1 + }, + serializedName: "resourceName", + required: true, + type: { + name: "String" + } + }, + storageAccountName: { + constraints: { + MinLength: 1 + }, + serializedName: "storageAccountName", + required: true, + type: { + name: "String" + } + }, + storageContainers: { + serializedName: "storageContainers", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StorageContainerProperties" + } + } + } + } + } + } +}; + +export const StorageContainerProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageContainerProperties", + modelProperties: { + name: { + constraints: { + MinLength: 1 + }, + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + clusterSharedVolumePath: { + constraints: { + MinLength: 1 + }, + serializedName: "clusterSharedVolumePath", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const FailoverProtectedItemProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FailoverProtectedItemProperties", + modelProperties: { + protectedItemName: { + serializedName: "protectedItemName", + readOnly: true, + type: { + name: "String" + } + }, + vmName: { + serializedName: "vmName", + readOnly: true, + type: { + name: "String" + } + }, + testVmName: { + serializedName: "testVmName", + readOnly: true, + type: { + name: "String" + } + }, + recoveryPointId: { + serializedName: "recoveryPointId", + readOnly: true, + type: { + name: "String" + } + }, + recoveryPointTime: { + serializedName: "recoveryPointTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + networkName: { + serializedName: "networkName", + readOnly: true, + type: { + name: "String" + } + }, + subnet: { + serializedName: "subnet", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const HyperVToAzStackHCIDiskInput: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HyperVToAzStackHCIDiskInput", + modelProperties: { + diskId: { + constraints: { + MinLength: 1 + }, + serializedName: "diskId", + required: true, + type: { + name: "String" + } + }, + storageContainerId: { + serializedName: "storageContainerId", + type: { + name: "String" + } + }, + isDynamic: { + serializedName: "isDynamic", + type: { + name: "Boolean" + } + }, + diskSizeGB: { + serializedName: "diskSizeGB", + required: true, + type: { + name: "Number" + } + }, + diskFileFormat: { + constraints: { + MinLength: 1 + }, + serializedName: "diskFileFormat", + required: true, + type: { + name: "String" + } + }, + isOsDisk: { + serializedName: "isOsDisk", + required: true, + type: { + name: "Boolean" + } + } + } + } +}; + +export const HyperVToAzStackHCINicInput: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HyperVToAzStackHCINicInput", + modelProperties: { + nicId: { + constraints: { + MinLength: 1 + }, + serializedName: "nicId", + required: true, + type: { + name: "String" + } + }, + networkName: { + serializedName: "networkName", + readOnly: true, + type: { + name: "String" + } + }, + targetNetworkId: { + constraints: { + MinLength: 1 + }, + serializedName: "targetNetworkId", + required: true, + type: { + name: "String" + } + }, + testNetworkId: { + constraints: { + MinLength: 1 + }, + serializedName: "testNetworkId", + required: true, + type: { + name: "String" + } + }, + selectionTypeForFailover: { + serializedName: "selectionTypeForFailover", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const HyperVToAzStackHCIProtectedDiskProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HyperVToAzStackHCIProtectedDiskProperties", + modelProperties: { + storageContainerId: { + serializedName: "storageContainerId", + readOnly: true, + type: { + name: "String" + } + }, + storageContainerLocalPath: { + serializedName: "storageContainerLocalPath", + readOnly: true, + type: { + name: "String" + } + }, + sourceDiskId: { + serializedName: "sourceDiskId", + readOnly: true, + type: { + name: "String" + } + }, + sourceDiskName: { + serializedName: "sourceDiskName", + readOnly: true, + type: { + name: "String" + } + }, + seedDiskName: { + serializedName: "seedDiskName", + readOnly: true, + type: { + name: "String" + } + }, + testMigrateDiskName: { + serializedName: "testMigrateDiskName", + readOnly: true, + type: { + name: "String" + } + }, + migrateDiskName: { + serializedName: "migrateDiskName", + readOnly: true, + type: { + name: "String" + } + }, + isOsDisk: { + serializedName: "isOsDisk", + readOnly: true, + type: { + name: "Boolean" + } + }, + capacityInBytes: { + serializedName: "capacityInBytes", + readOnly: true, + type: { + name: "Number" + } + }, + isDynamic: { + serializedName: "isDynamic", + readOnly: true, + type: { + name: "Boolean" + } + }, + diskType: { + serializedName: "diskType", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ProtectedItemDynamicMemoryConfig: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProtectedItemDynamicMemoryConfig", + modelProperties: { + maximumMemoryInMegaBytes: { + serializedName: "maximumMemoryInMegaBytes", + required: true, + type: { + name: "Number" + } + }, + minimumMemoryInMegaBytes: { + serializedName: "minimumMemoryInMegaBytes", + required: true, + type: { + name: "Number" + } + }, + targetMemoryBufferPercentage: { + serializedName: "targetMemoryBufferPercentage", + required: true, + type: { + name: "Number" + } + } + } + } +}; + +export const HyperVToAzStackHCIProtectedNicProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HyperVToAzStackHCIProtectedNicProperties", + modelProperties: { + nicId: { + serializedName: "nicId", + readOnly: true, + type: { + name: "String" + } + }, + macAddress: { + serializedName: "macAddress", + readOnly: true, + type: { + name: "String" + } + }, + networkName: { + serializedName: "networkName", + readOnly: true, + type: { + name: "String" + } + }, + targetNetworkId: { + serializedName: "targetNetworkId", + readOnly: true, + type: { + name: "String" + } + }, + testNetworkId: { + serializedName: "testNetworkId", + readOnly: true, + type: { + name: "String" + } + }, + selectionTypeForFailover: { + serializedName: "selectionTypeForFailover", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const OperationModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationModel", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + isDataAction: { + serializedName: "isDataAction", + type: { + name: "Boolean" + } + }, + origin: { + serializedName: "origin", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationModelProperties" + } + } + } + } +}; + +export const OperationModelProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationModelProperties", + modelProperties: { + provider: { + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const OperationModelCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationModelCollection", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationModel" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const VMwareToAzStackHCIDiskInput: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VMwareToAzStackHCIDiskInput", + modelProperties: { + diskId: { + constraints: { + MinLength: 1 + }, + serializedName: "diskId", + required: true, + type: { + name: "String" + } + }, + storageContainerId: { + serializedName: "storageContainerId", + type: { + name: "String" + } + }, + isDynamic: { + serializedName: "isDynamic", + type: { + name: "Boolean" + } + }, + diskSizeGB: { + serializedName: "diskSizeGB", + required: true, + type: { + name: "Number" + } + }, + diskFileFormat: { + constraints: { + MinLength: 1 + }, + serializedName: "diskFileFormat", + required: true, + type: { + name: "String" + } + }, + isOsDisk: { + serializedName: "isOsDisk", + required: true, + type: { + name: "Boolean" + } + } + } + } +}; + +export const VMwareToAzStackHCINicInput: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VMwareToAzStackHCINicInput", + modelProperties: { + nicId: { + constraints: { + MinLength: 1 + }, + serializedName: "nicId", + required: true, + type: { + name: "String" + } + }, + label: { + constraints: { + MinLength: 1 + }, + serializedName: "label", + required: true, + type: { + name: "String" + } + }, + networkName: { + serializedName: "networkName", + readOnly: true, + type: { + name: "String" + } + }, + targetNetworkId: { + constraints: { + MinLength: 1 + }, + serializedName: "targetNetworkId", + required: true, + type: { + name: "String" + } + }, + testNetworkId: { + constraints: { + MinLength: 1 + }, + serializedName: "testNetworkId", + required: true, + type: { + name: "String" + } + }, + selectionTypeForFailover: { + serializedName: "selectionTypeForFailover", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const VMwareToAzStackHCIProtectedDiskProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VMwareToAzStackHCIProtectedDiskProperties", + modelProperties: { + storageContainerId: { + serializedName: "storageContainerId", + readOnly: true, + type: { + name: "String" + } + }, + storageContainerLocalPath: { + serializedName: "storageContainerLocalPath", + readOnly: true, + type: { + name: "String" + } + }, + sourceDiskId: { + serializedName: "sourceDiskId", + readOnly: true, + type: { + name: "String" + } + }, + sourceDiskName: { + serializedName: "sourceDiskName", + readOnly: true, + type: { + name: "String" + } + }, + seedDiskName: { + serializedName: "seedDiskName", + readOnly: true, + type: { + name: "String" + } + }, + testMigrateDiskName: { + serializedName: "testMigrateDiskName", + readOnly: true, + type: { + name: "String" + } + }, + migrateDiskName: { + serializedName: "migrateDiskName", + readOnly: true, + type: { + name: "String" + } + }, + isOsDisk: { + serializedName: "isOsDisk", + readOnly: true, + type: { + name: "Boolean" + } + }, + capacityInBytes: { + serializedName: "capacityInBytes", + readOnly: true, + type: { + name: "Number" + } + }, + isDynamic: { + serializedName: "isDynamic", + readOnly: true, + type: { + name: "Boolean" + } + }, + diskType: { + serializedName: "diskType", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const VMwareToAzStackHCIProtectedNicProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VMwareToAzStackHCIProtectedNicProperties", + modelProperties: { + nicId: { + serializedName: "nicId", + readOnly: true, + type: { + name: "String" + } + }, + macAddress: { + serializedName: "macAddress", + readOnly: true, + type: { + name: "String" + } + }, + label: { + serializedName: "label", + readOnly: true, + type: { + name: "String" + } + }, + isPrimaryNic: { + serializedName: "isPrimaryNic", + type: { + name: "Boolean" + } + }, + networkName: { + serializedName: "networkName", + readOnly: true, + type: { + name: "String" + } + }, + targetNetworkId: { + serializedName: "targetNetworkId", + readOnly: true, + type: { + name: "String" + } + }, + testNetworkId: { + serializedName: "testNetworkId", + readOnly: true, + type: { + name: "String" + } + }, + selectionTypeForFailover: { + serializedName: "selectionTypeForFailover", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const VMwareDraModelCustomProperties: coreClient.CompositeMapper = { + serializedName: "VMware", + type: { + name: "Composite", + className: "VMwareDraModelCustomProperties", + uberParent: "DraModelCustomProperties", + polymorphicDiscriminator: + DraModelCustomProperties.type.polymorphicDiscriminator, + modelProperties: { + ...DraModelCustomProperties.type.modelProperties, + biosId: { + constraints: { + MinLength: 1 + }, + serializedName: "biosId", + required: true, + type: { + name: "String" + } + }, + marsAuthenticationIdentity: { + serializedName: "marsAuthenticationIdentity", + type: { + name: "Composite", + className: "IdentityModel" + } + } + } + } +}; + +export const DraModelSystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DraModelSystemData", + modelProperties: { + ...SystemDataModel.type.modelProperties + } + } +}; + +export const EmailConfigurationModelSystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EmailConfigurationModelSystemData", + modelProperties: { + ...SystemDataModel.type.modelProperties + } + } +}; + +export const EventModelSystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EventModelSystemData", + modelProperties: { + ...SystemDataModel.type.modelProperties + } + } +}; + +export const FabricModelSystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FabricModelSystemData", + modelProperties: { + ...SystemDataModel.type.modelProperties + } + } +}; + +export const FabricModelUpdateSystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FabricModelUpdateSystemData", + modelProperties: { + ...SystemDataModel.type.modelProperties + } + } +}; + +export const PolicyModelSystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PolicyModelSystemData", + modelProperties: { + ...SystemDataModel.type.modelProperties + } + } +}; + +export const ProtectedItemModelSystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProtectedItemModelSystemData", + modelProperties: { + ...SystemDataModel.type.modelProperties + } + } +}; + +export const RecoveryPointModelSystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RecoveryPointModelSystemData", + modelProperties: { + ...SystemDataModel.type.modelProperties + } + } +}; + +export const ReplicationExtensionModelSystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReplicationExtensionModelSystemData", + modelProperties: { + ...SystemDataModel.type.modelProperties + } + } +}; + +export const VaultModelSystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VaultModelSystemData", + modelProperties: { + ...SystemDataModel.type.modelProperties + } + } +}; + +export const VaultModelUpdateSystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VaultModelUpdateSystemData", + modelProperties: { + ...SystemDataModel.type.modelProperties + } + } +}; + +export const WorkflowModelSystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkflowModelSystemData", + modelProperties: { + ...SystemDataModel.type.modelProperties + } + } +}; + +export const HyperVToAzStackHCIEventModelCustomProperties: coreClient.CompositeMapper = { + serializedName: "HyperVToAzStackHCI", + type: { + name: "Composite", + className: "HyperVToAzStackHCIEventModelCustomProperties", + uberParent: "EventModelCustomProperties", + polymorphicDiscriminator: + EventModelCustomProperties.type.polymorphicDiscriminator, + modelProperties: { + ...EventModelCustomProperties.type.modelProperties, + eventSourceFriendlyName: { + serializedName: "eventSourceFriendlyName", + readOnly: true, + type: { + name: "String" + } + }, + protectedItemFriendlyName: { + serializedName: "protectedItemFriendlyName", + readOnly: true, + type: { + name: "String" + } + }, + sourceApplianceName: { + serializedName: "sourceApplianceName", + readOnly: true, + type: { + name: "String" + } + }, + targetApplianceName: { + serializedName: "targetApplianceName", + readOnly: true, + type: { + name: "String" + } + }, + serverType: { + serializedName: "serverType", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const AzStackHCIFabricModelCustomProperties: coreClient.CompositeMapper = { + serializedName: "AzStackHCI", + type: { + name: "Composite", + className: "AzStackHCIFabricModelCustomProperties", + uberParent: "FabricModelCustomProperties", + polymorphicDiscriminator: + FabricModelCustomProperties.type.polymorphicDiscriminator, + modelProperties: { + ...FabricModelCustomProperties.type.modelProperties, + azStackHciSiteId: { + constraints: { + MinLength: 1 + }, + serializedName: "azStackHciSiteId", + required: true, + type: { + name: "String" + } + }, + applianceName: { + serializedName: "applianceName", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + cluster: { + serializedName: "cluster", + type: { + name: "Composite", + className: "AzStackHCIClusterProperties" + } + }, + fabricResourceId: { + serializedName: "fabricResourceId", + readOnly: true, + type: { + name: "String" + } + }, + fabricContainerId: { + serializedName: "fabricContainerId", + readOnly: true, + type: { + name: "String" + } + }, + migrationSolutionId: { + constraints: { + MinLength: 1 + }, + serializedName: "migrationSolutionId", + required: true, + type: { + name: "String" + } + }, + migrationHubUri: { + serializedName: "migrationHubUri", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const HyperVMigrateFabricModelCustomProperties: coreClient.CompositeMapper = { + serializedName: "HyperVMigrate", + type: { + name: "Composite", + className: "HyperVMigrateFabricModelCustomProperties", + uberParent: "FabricModelCustomProperties", + polymorphicDiscriminator: + FabricModelCustomProperties.type.polymorphicDiscriminator, + modelProperties: { + ...FabricModelCustomProperties.type.modelProperties, + hyperVSiteId: { + constraints: { + MinLength: 1 + }, + serializedName: "hyperVSiteId", + required: true, + type: { + name: "String" + } + }, + fabricResourceId: { + serializedName: "fabricResourceId", + readOnly: true, + type: { + name: "String" + } + }, + fabricContainerId: { + serializedName: "fabricContainerId", + readOnly: true, + type: { + name: "String" + } + }, + migrationSolutionId: { + constraints: { + MinLength: 1 + }, + serializedName: "migrationSolutionId", + required: true, + type: { + name: "String" + } + }, + migrationHubUri: { + serializedName: "migrationHubUri", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const VMwareMigrateFabricModelCustomProperties: coreClient.CompositeMapper = { + serializedName: "VMwareMigrate", + type: { + name: "Composite", + className: "VMwareMigrateFabricModelCustomProperties", + uberParent: "FabricModelCustomProperties", + polymorphicDiscriminator: + FabricModelCustomProperties.type.polymorphicDiscriminator, + modelProperties: { + ...FabricModelCustomProperties.type.modelProperties, + vmwareSiteId: { + constraints: { + MinLength: 1 + }, + serializedName: "vmwareSiteId", + required: true, + type: { + name: "String" + } + }, + migrationSolutionId: { + constraints: { + MinLength: 1 + }, + serializedName: "migrationSolutionId", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const HyperVToAzStackHCIPolicyModelCustomProperties: coreClient.CompositeMapper = { + serializedName: "HyperVToAzStackHCI", + type: { + name: "Composite", + className: "HyperVToAzStackHCIPolicyModelCustomProperties", + uberParent: "PolicyModelCustomProperties", + polymorphicDiscriminator: + PolicyModelCustomProperties.type.polymorphicDiscriminator, + modelProperties: { + ...PolicyModelCustomProperties.type.modelProperties, + recoveryPointHistoryInMinutes: { + serializedName: "recoveryPointHistoryInMinutes", + required: true, + type: { + name: "Number" + } + }, + crashConsistentFrequencyInMinutes: { + serializedName: "crashConsistentFrequencyInMinutes", + required: true, + type: { + name: "Number" + } + }, + appConsistentFrequencyInMinutes: { + serializedName: "appConsistentFrequencyInMinutes", + required: true, + type: { + name: "Number" + } + } + } + } +}; + +export const VMwareToAzStackHCIPolicyModelCustomProperties: coreClient.CompositeMapper = { + serializedName: "VMwareToAzStackHCI", + type: { + name: "Composite", + className: "VMwareToAzStackHCIPolicyModelCustomProperties", + uberParent: "PolicyModelCustomProperties", + polymorphicDiscriminator: + PolicyModelCustomProperties.type.polymorphicDiscriminator, + modelProperties: { + ...PolicyModelCustomProperties.type.modelProperties, + recoveryPointHistoryInMinutes: { + serializedName: "recoveryPointHistoryInMinutes", + required: true, + type: { + name: "Number" + } + }, + crashConsistentFrequencyInMinutes: { + serializedName: "crashConsistentFrequencyInMinutes", + required: true, + type: { + name: "Number" + } + }, + appConsistentFrequencyInMinutes: { + serializedName: "appConsistentFrequencyInMinutes", + required: true, + type: { + name: "Number" + } + } + } + } +}; + +export const ProtectedItemModelPropertiesCurrentJob: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProtectedItemModelPropertiesCurrentJob", + modelProperties: { + ...ProtectedItemJobProperties.type.modelProperties + } + } +}; + +export const ProtectedItemModelPropertiesLastFailedEnableProtectionJob: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProtectedItemModelPropertiesLastFailedEnableProtectionJob", + modelProperties: { + ...ProtectedItemJobProperties.type.modelProperties + } + } +}; + +export const ProtectedItemModelPropertiesLastFailedPlannedFailoverJob: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProtectedItemModelPropertiesLastFailedPlannedFailoverJob", + modelProperties: { + ...ProtectedItemJobProperties.type.modelProperties + } + } +}; + +export const ProtectedItemModelPropertiesLastTestFailoverJob: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProtectedItemModelPropertiesLastTestFailoverJob", + modelProperties: { + ...ProtectedItemJobProperties.type.modelProperties + } + } +}; + +export const HyperVToAzStackHCIProtectedItemModelCustomProperties: coreClient.CompositeMapper = { + serializedName: "HyperVToAzStackHCI", + type: { + name: "Composite", + className: "HyperVToAzStackHCIProtectedItemModelCustomProperties", + uberParent: "ProtectedItemModelCustomProperties", + polymorphicDiscriminator: + ProtectedItemModelCustomProperties.type.polymorphicDiscriminator, + modelProperties: { + ...ProtectedItemModelCustomProperties.type.modelProperties, + activeLocation: { + serializedName: "activeLocation", + readOnly: true, + type: { + name: "String" + } + }, + targetHciClusterId: { + constraints: { + MinLength: 1 + }, + serializedName: "targetHciClusterId", + required: true, + type: { + name: "String" + } + }, + targetArcClusterCustomLocationId: { + constraints: { + MinLength: 1 + }, + serializedName: "targetArcClusterCustomLocationId", + required: true, + type: { + name: "String" + } + }, + targetAzStackHciClusterName: { + serializedName: "targetAzStackHciClusterName", + readOnly: true, + type: { + name: "String" + } + }, + fabricDiscoveryMachineId: { + constraints: { + MinLength: 1 + }, + serializedName: "fabricDiscoveryMachineId", + required: true, + type: { + name: "String" + } + }, + disksToInclude: { + constraints: { + MinItems: 1 + }, + serializedName: "disksToInclude", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HyperVToAzStackHCIDiskInput" + } + } + } + }, + nicsToInclude: { + constraints: { + MinItems: 1 + }, + serializedName: "nicsToInclude", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HyperVToAzStackHCINicInput" + } + } + } + }, + sourceVmName: { + serializedName: "sourceVmName", + readOnly: true, + type: { + name: "String" + } + }, + sourceCpuCores: { + serializedName: "sourceCpuCores", + readOnly: true, + type: { + name: "Number" + } + }, + sourceMemoryInMegaBytes: { + serializedName: "sourceMemoryInMegaBytes", + readOnly: true, + type: { + name: "Number" + } + }, + targetVmName: { + serializedName: "targetVmName", + type: { + name: "String" + } + }, + targetResourceGroupId: { + constraints: { + MinLength: 1 + }, + serializedName: "targetResourceGroupId", + required: true, + type: { + name: "String" + } + }, + storageContainerId: { + constraints: { + MinLength: 1 + }, + serializedName: "storageContainerId", + required: true, + type: { + name: "String" + } + }, + hyperVGeneration: { + constraints: { + MinLength: 1 + }, + serializedName: "hyperVGeneration", + required: true, + type: { + name: "String" + } + }, + targetNetworkId: { + serializedName: "targetNetworkId", + type: { + name: "String" + } + }, + testNetworkId: { + serializedName: "testNetworkId", + type: { + name: "String" + } + }, + targetCpuCores: { + serializedName: "targetCpuCores", + type: { + name: "Number" + } + }, + isDynamicRam: { + serializedName: "isDynamicRam", + type: { + name: "Boolean" + } + }, + dynamicMemoryConfig: { + serializedName: "dynamicMemoryConfig", + type: { + name: "Composite", + className: "ProtectedItemDynamicMemoryConfig" + } + }, + targetMemoryInMegaBytes: { + serializedName: "targetMemoryInMegaBytes", + type: { + name: "Number" + } + }, + runAsAccountId: { + constraints: { + MinLength: 1 + }, + serializedName: "runAsAccountId", + required: true, + type: { + name: "String" + } + }, + sourceDraName: { + constraints: { + MinLength: 1 + }, + serializedName: "sourceDraName", + required: true, + type: { + name: "String" + } + }, + targetDraName: { + constraints: { + MinLength: 1 + }, + serializedName: "targetDraName", + required: true, + type: { + name: "String" + } + }, + sourceApplianceName: { + serializedName: "sourceApplianceName", + readOnly: true, + type: { + name: "String" + } + }, + targetApplianceName: { + serializedName: "targetApplianceName", + readOnly: true, + type: { + name: "String" + } + }, + osType: { + serializedName: "osType", + readOnly: true, + type: { + name: "String" + } + }, + osName: { + serializedName: "osName", + readOnly: true, + type: { + name: "String" + } + }, + firmwareType: { + serializedName: "firmwareType", + readOnly: true, + type: { + name: "String" + } + }, + targetLocation: { + serializedName: "targetLocation", + readOnly: true, + type: { + name: "String" + } + }, + customLocationRegion: { + constraints: { + MinLength: 1 + }, + serializedName: "customLocationRegion", + required: true, + type: { + name: "String" + } + }, + failoverRecoveryPointId: { + serializedName: "failoverRecoveryPointId", + readOnly: true, + type: { + name: "String" + } + }, + lastRecoveryPointReceived: { + serializedName: "lastRecoveryPointReceived", + readOnly: true, + type: { + name: "DateTime" + } + }, + lastRecoveryPointId: { + serializedName: "lastRecoveryPointId", + readOnly: true, + type: { + name: "String" + } + }, + initialReplicationProgressPercentage: { + serializedName: "initialReplicationProgressPercentage", + readOnly: true, + type: { + name: "Number" + } + }, + resyncProgressPercentage: { + serializedName: "resyncProgressPercentage", + readOnly: true, + type: { + name: "Number" + } + }, + protectedDisks: { + serializedName: "protectedDisks", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HyperVToAzStackHCIProtectedDiskProperties" + } + } + } + }, + protectedNics: { + serializedName: "protectedNics", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HyperVToAzStackHCIProtectedNicProperties" + } + } + } + }, + targetVmBiosId: { + serializedName: "targetVmBiosId", + readOnly: true, + type: { + name: "String" + } + }, + lastReplicationUpdateTime: { + serializedName: "lastReplicationUpdateTime", + readOnly: true, + type: { + name: "DateTime" + } + } + } + } +}; + +export const VMwareToAzStackHCIProtectedItemModelCustomProperties: coreClient.CompositeMapper = { + serializedName: "VMwareToAzStackHCI", + type: { + name: "Composite", + className: "VMwareToAzStackHCIProtectedItemModelCustomProperties", + uberParent: "ProtectedItemModelCustomProperties", + polymorphicDiscriminator: + ProtectedItemModelCustomProperties.type.polymorphicDiscriminator, + modelProperties: { + ...ProtectedItemModelCustomProperties.type.modelProperties, + activeLocation: { + serializedName: "activeLocation", + readOnly: true, + type: { + name: "String" + } + }, + targetHciClusterId: { + constraints: { + MinLength: 1 + }, + serializedName: "targetHciClusterId", + required: true, + type: { + name: "String" + } + }, + targetArcClusterCustomLocationId: { + constraints: { + MinLength: 1 + }, + serializedName: "targetArcClusterCustomLocationId", + required: true, + type: { + name: "String" + } + }, + targetAzStackHciClusterName: { + serializedName: "targetAzStackHciClusterName", + readOnly: true, + type: { + name: "String" + } + }, + storageContainerId: { + constraints: { + MinLength: 1 + }, + serializedName: "storageContainerId", + required: true, + type: { + name: "String" + } + }, + targetResourceGroupId: { + constraints: { + MinLength: 1 + }, + serializedName: "targetResourceGroupId", + required: true, + type: { + name: "String" + } + }, + targetLocation: { + serializedName: "targetLocation", + readOnly: true, + type: { + name: "String" + } + }, + customLocationRegion: { + constraints: { + MinLength: 1 + }, + serializedName: "customLocationRegion", + required: true, + type: { + name: "String" + } + }, + disksToInclude: { + constraints: { + MinItems: 1 + }, + serializedName: "disksToInclude", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VMwareToAzStackHCIDiskInput" + } + } + } + }, + nicsToInclude: { + constraints: { + MinItems: 1 + }, + serializedName: "nicsToInclude", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VMwareToAzStackHCINicInput" + } + } + } + }, + protectedDisks: { + serializedName: "protectedDisks", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VMwareToAzStackHCIProtectedDiskProperties" + } + } + } + }, + protectedNics: { + serializedName: "protectedNics", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VMwareToAzStackHCIProtectedNicProperties" + } + } + } + }, + targetVmBiosId: { + serializedName: "targetVmBiosId", + readOnly: true, + type: { + name: "String" + } + }, + targetVmName: { + serializedName: "targetVmName", + type: { + name: "String" + } + }, + hyperVGeneration: { + constraints: { + MinLength: 1 + }, + serializedName: "hyperVGeneration", + required: true, + type: { + name: "String" + } + }, + targetNetworkId: { + serializedName: "targetNetworkId", + type: { + name: "String" + } + }, + testNetworkId: { + serializedName: "testNetworkId", + type: { + name: "String" + } + }, + targetCpuCores: { + serializedName: "targetCpuCores", + type: { + name: "Number" + } + }, + isDynamicRam: { + serializedName: "isDynamicRam", + type: { + name: "Boolean" + } + }, + dynamicMemoryConfig: { + serializedName: "dynamicMemoryConfig", + type: { + name: "Composite", + className: "ProtectedItemDynamicMemoryConfig" + } + }, + targetMemoryInMegaBytes: { + serializedName: "targetMemoryInMegaBytes", + type: { + name: "Number" + } + }, + osType: { + serializedName: "osType", + readOnly: true, + type: { + name: "String" + } + }, + osName: { + serializedName: "osName", + readOnly: true, + type: { + name: "String" + } + }, + firmwareType: { + serializedName: "firmwareType", + readOnly: true, + type: { + name: "String" + } + }, + fabricDiscoveryMachineId: { + constraints: { + MinLength: 1 + }, + serializedName: "fabricDiscoveryMachineId", + required: true, + type: { + name: "String" + } + }, + sourceVmName: { + serializedName: "sourceVmName", + readOnly: true, + type: { + name: "String" + } + }, + sourceCpuCores: { + serializedName: "sourceCpuCores", + readOnly: true, + type: { + name: "Number" + } + }, + sourceMemoryInMegaBytes: { + serializedName: "sourceMemoryInMegaBytes", + readOnly: true, + type: { + name: "Number" + } + }, + runAsAccountId: { + constraints: { + MinLength: 1 + }, + serializedName: "runAsAccountId", + required: true, + type: { + name: "String" + } + }, + sourceDraName: { + constraints: { + MinLength: 1 + }, + serializedName: "sourceDraName", + required: true, + type: { + name: "String" + } + }, + targetDraName: { + constraints: { + MinLength: 1 + }, + serializedName: "targetDraName", + required: true, + type: { + name: "String" + } + }, + sourceApplianceName: { + serializedName: "sourceApplianceName", + readOnly: true, + type: { + name: "String" + } + }, + targetApplianceName: { + serializedName: "targetApplianceName", + readOnly: true, + type: { + name: "String" + } + }, + failoverRecoveryPointId: { + serializedName: "failoverRecoveryPointId", + readOnly: true, + type: { + name: "String" + } + }, + lastRecoveryPointReceived: { + serializedName: "lastRecoveryPointReceived", + readOnly: true, + type: { + name: "DateTime" + } + }, + lastRecoveryPointId: { + serializedName: "lastRecoveryPointId", + readOnly: true, + type: { + name: "String" + } + }, + initialReplicationProgressPercentage: { + serializedName: "initialReplicationProgressPercentage", + readOnly: true, + type: { + name: "Number" + } + }, + migrationProgressPercentage: { + serializedName: "migrationProgressPercentage", + readOnly: true, + type: { + name: "Number" + } + }, + resumeProgressPercentage: { + serializedName: "resumeProgressPercentage", + readOnly: true, + type: { + name: "Number" + } + }, + resyncProgressPercentage: { + serializedName: "resyncProgressPercentage", + readOnly: true, + type: { + name: "Number" + } + }, + resyncRetryCount: { + serializedName: "resyncRetryCount", + readOnly: true, + type: { + name: "Number" + } + }, + resyncRequired: { + serializedName: "resyncRequired", + readOnly: true, + type: { + name: "Boolean" + } + }, + resyncState: { + serializedName: "resyncState", + readOnly: true, + type: { + name: "String" + } + }, + performAutoResync: { + serializedName: "performAutoResync", + type: { + name: "Boolean" + } + }, + resumeRetryCount: { + serializedName: "resumeRetryCount", + readOnly: true, + type: { + name: "Number" + } + }, + lastReplicationUpdateTime: { + serializedName: "lastReplicationUpdateTime", + readOnly: true, + type: { + name: "DateTime" + } + } + } + } +}; + +export const HyperVToAzStackHCIPlannedFailoverModelCustomProperties: coreClient.CompositeMapper = { + serializedName: "HyperVToAzStackHCI", + type: { + name: "Composite", + className: "HyperVToAzStackHCIPlannedFailoverModelCustomProperties", + uberParent: "PlannedFailoverModelCustomProperties", + polymorphicDiscriminator: + PlannedFailoverModelCustomProperties.type.polymorphicDiscriminator, + modelProperties: { + ...PlannedFailoverModelCustomProperties.type.modelProperties, + shutdownSourceVM: { + serializedName: "shutdownSourceVM", + required: true, + type: { + name: "Boolean" + } + } + } + } +}; + +export const VMwareToAzStackHCIPlannedFailoverModelCustomProperties: coreClient.CompositeMapper = { + serializedName: "VMwareToAzStackHCI", + type: { + name: "Composite", + className: "VMwareToAzStackHCIPlannedFailoverModelCustomProperties", + uberParent: "PlannedFailoverModelCustomProperties", + polymorphicDiscriminator: + PlannedFailoverModelCustomProperties.type.polymorphicDiscriminator, + modelProperties: { + ...PlannedFailoverModelCustomProperties.type.modelProperties, + shutdownSourceVM: { + serializedName: "shutdownSourceVM", + required: true, + type: { + name: "Boolean" + } + } + } + } +}; + +export const HyperVToAzStackHCIRecoveryPointModelCustomProperties: coreClient.CompositeMapper = { + serializedName: "HyperVToAzStackHCI", + type: { + name: "Composite", + className: "HyperVToAzStackHCIRecoveryPointModelCustomProperties", + uberParent: "RecoveryPointModelCustomProperties", + polymorphicDiscriminator: + RecoveryPointModelCustomProperties.type.polymorphicDiscriminator, + modelProperties: { + ...RecoveryPointModelCustomProperties.type.modelProperties, + diskIds: { + serializedName: "diskIds", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const HyperVToAzStackHCIReplicationExtensionModelCustomProperties: coreClient.CompositeMapper = { + serializedName: "HyperVToAzStackHCI", + type: { + name: "Composite", + className: "HyperVToAzStackHCIReplicationExtensionModelCustomProperties", + uberParent: "ReplicationExtensionModelCustomProperties", + polymorphicDiscriminator: + ReplicationExtensionModelCustomProperties.type.polymorphicDiscriminator, + modelProperties: { + ...ReplicationExtensionModelCustomProperties.type.modelProperties, + hyperVFabricArmId: { + constraints: { + MinLength: 1 + }, + serializedName: "hyperVFabricArmId", + required: true, + type: { + name: "String" + } + }, + hyperVSiteId: { + serializedName: "hyperVSiteId", + readOnly: true, + type: { + name: "String" + } + }, + azStackHciFabricArmId: { + constraints: { + MinLength: 1 + }, + serializedName: "azStackHciFabricArmId", + required: true, + type: { + name: "String" + } + }, + azStackHciSiteId: { + serializedName: "azStackHciSiteId", + readOnly: true, + type: { + name: "String" + } + }, + storageAccountId: { + serializedName: "storageAccountId", + type: { + name: "String" + } + }, + storageAccountSasSecretName: { + serializedName: "storageAccountSasSecretName", + type: { + name: "String" + } + }, + asrServiceUri: { + serializedName: "asrServiceUri", + readOnly: true, + type: { + name: "String" + } + }, + rcmServiceUri: { + serializedName: "rcmServiceUri", + readOnly: true, + type: { + name: "String" + } + }, + gatewayServiceUri: { + serializedName: "gatewayServiceUri", + readOnly: true, + type: { + name: "String" + } + }, + sourceGatewayServiceId: { + serializedName: "sourceGatewayServiceId", + readOnly: true, + type: { + name: "String" + } + }, + targetGatewayServiceId: { + serializedName: "targetGatewayServiceId", + readOnly: true, + type: { + name: "String" + } + }, + sourceStorageContainerName: { + serializedName: "sourceStorageContainerName", + readOnly: true, + type: { + name: "String" + } + }, + targetStorageContainerName: { + serializedName: "targetStorageContainerName", + readOnly: true, + type: { + name: "String" + } + }, + resourceLocation: { + serializedName: "resourceLocation", + readOnly: true, + type: { + name: "String" + } + }, + subscriptionId: { + serializedName: "subscriptionId", + readOnly: true, + type: { + name: "String" + } + }, + resourceGroup: { + serializedName: "resourceGroup", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const VMwareToAzStackHCIReplicationExtensionModelCustomProperties: coreClient.CompositeMapper = { + serializedName: "VMwareToAzStackHCI", + type: { + name: "Composite", + className: "VMwareToAzStackHCIReplicationExtensionModelCustomProperties", + uberParent: "ReplicationExtensionModelCustomProperties", + polymorphicDiscriminator: + ReplicationExtensionModelCustomProperties.type.polymorphicDiscriminator, + modelProperties: { + ...ReplicationExtensionModelCustomProperties.type.modelProperties, + vmwareFabricArmId: { + constraints: { + MinLength: 1 + }, + serializedName: "vmwareFabricArmId", + required: true, + type: { + name: "String" + } + }, + vmwareSiteId: { + serializedName: "vmwareSiteId", + readOnly: true, + type: { + name: "String" + } + }, + azStackHciFabricArmId: { + constraints: { + MinLength: 1 + }, + serializedName: "azStackHciFabricArmId", + required: true, + type: { + name: "String" + } + }, + azStackHciSiteId: { + serializedName: "azStackHciSiteId", + readOnly: true, + type: { + name: "String" + } + }, + storageAccountId: { + serializedName: "storageAccountId", + type: { + name: "String" + } + }, + storageAccountSasSecretName: { + serializedName: "storageAccountSasSecretName", + type: { + name: "String" + } + }, + asrServiceUri: { + serializedName: "asrServiceUri", + readOnly: true, + type: { + name: "String" + } + }, + rcmServiceUri: { + serializedName: "rcmServiceUri", + readOnly: true, + type: { + name: "String" + } + }, + gatewayServiceUri: { + serializedName: "gatewayServiceUri", + readOnly: true, + type: { + name: "String" + } + }, + sourceGatewayServiceId: { + serializedName: "sourceGatewayServiceId", + readOnly: true, + type: { + name: "String" + } + }, + targetGatewayServiceId: { + serializedName: "targetGatewayServiceId", + readOnly: true, + type: { + name: "String" + } + }, + sourceStorageContainerName: { + serializedName: "sourceStorageContainerName", + readOnly: true, + type: { + name: "String" + } + }, + targetStorageContainerName: { + serializedName: "targetStorageContainerName", + readOnly: true, + type: { + name: "String" + } + }, + resourceLocation: { + serializedName: "resourceLocation", + readOnly: true, + type: { + name: "String" + } + }, + subscriptionId: { + serializedName: "subscriptionId", + readOnly: true, + type: { + name: "String" + } + }, + resourceGroup: { + serializedName: "resourceGroup", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const FailoverWorkflowModelCustomProperties: coreClient.CompositeMapper = { + serializedName: "FailoverWorkflowDetails", + type: { + name: "Composite", + className: "FailoverWorkflowModelCustomProperties", + uberParent: "WorkflowModelCustomProperties", + polymorphicDiscriminator: + WorkflowModelCustomProperties.type.polymorphicDiscriminator, + modelProperties: { + ...WorkflowModelCustomProperties.type.modelProperties, + protectedItemDetails: { + serializedName: "protectedItemDetails", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FailoverProtectedItemProperties" + } + } + } + } + } + } +}; + +export const TestFailoverCleanupWorkflowModelCustomProperties: coreClient.CompositeMapper = { + serializedName: "TestFailoverCleanupWorkflowDetails", + type: { + name: "Composite", + className: "TestFailoverCleanupWorkflowModelCustomProperties", + uberParent: "WorkflowModelCustomProperties", + polymorphicDiscriminator: + WorkflowModelCustomProperties.type.polymorphicDiscriminator, + modelProperties: { + ...WorkflowModelCustomProperties.type.modelProperties, + comments: { + serializedName: "comments", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const TestFailoverWorkflowModelCustomProperties: coreClient.CompositeMapper = { + serializedName: "TestFailoverWorkflowDetails", + type: { + name: "Composite", + className: "TestFailoverWorkflowModelCustomProperties", + uberParent: "WorkflowModelCustomProperties", + polymorphicDiscriminator: + WorkflowModelCustomProperties.type.polymorphicDiscriminator, + modelProperties: { + ...WorkflowModelCustomProperties.type.modelProperties, + protectedItemDetails: { + serializedName: "protectedItemDetails", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FailoverProtectedItemProperties" + } + } + } + } + } + } +}; + +export const DraDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DraDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const FabricUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FabricUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const FabricDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FabricDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const PolicyDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PolicyDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ProtectedItemDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProtectedItemDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ProtectedItemPlannedFailoverHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProtectedItemPlannedFailoverHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ReplicationExtensionDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReplicationExtensionDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VaultUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VaultUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VaultDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VaultDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export let discriminators = { + DraModelCustomProperties: DraModelCustomProperties, + EventModelCustomProperties: EventModelCustomProperties, + FabricModelCustomProperties: FabricModelCustomProperties, + PolicyModelCustomProperties: PolicyModelCustomProperties, + ProtectedItemModelCustomProperties: ProtectedItemModelCustomProperties, + PlannedFailoverModelCustomProperties: PlannedFailoverModelCustomProperties, + RecoveryPointModelCustomProperties: RecoveryPointModelCustomProperties, + ReplicationExtensionModelCustomProperties: ReplicationExtensionModelCustomProperties, + WorkflowModelCustomProperties: WorkflowModelCustomProperties, + "DraModelCustomProperties.VMware": VMwareDraModelCustomProperties, + "EventModelCustomProperties.HyperVToAzStackHCI": HyperVToAzStackHCIEventModelCustomProperties, + "FabricModelCustomProperties.AzStackHCI": AzStackHCIFabricModelCustomProperties, + "FabricModelCustomProperties.HyperVMigrate": HyperVMigrateFabricModelCustomProperties, + "FabricModelCustomProperties.VMwareMigrate": VMwareMigrateFabricModelCustomProperties, + "PolicyModelCustomProperties.HyperVToAzStackHCI": HyperVToAzStackHCIPolicyModelCustomProperties, + "PolicyModelCustomProperties.VMwareToAzStackHCI": VMwareToAzStackHCIPolicyModelCustomProperties, + "ProtectedItemModelCustomProperties.HyperVToAzStackHCI": HyperVToAzStackHCIProtectedItemModelCustomProperties, + "ProtectedItemModelCustomProperties.VMwareToAzStackHCI": VMwareToAzStackHCIProtectedItemModelCustomProperties, + "PlannedFailoverModelCustomProperties.HyperVToAzStackHCI": HyperVToAzStackHCIPlannedFailoverModelCustomProperties, + "PlannedFailoverModelCustomProperties.VMwareToAzStackHCI": VMwareToAzStackHCIPlannedFailoverModelCustomProperties, + "RecoveryPointModelCustomProperties.HyperVToAzStackHCI": HyperVToAzStackHCIRecoveryPointModelCustomProperties, + "ReplicationExtensionModelCustomProperties.HyperVToAzStackHCI": HyperVToAzStackHCIReplicationExtensionModelCustomProperties, + "ReplicationExtensionModelCustomProperties.VMwareToAzStackHCI": VMwareToAzStackHCIReplicationExtensionModelCustomProperties, + "WorkflowModelCustomProperties.FailoverWorkflowDetails": FailoverWorkflowModelCustomProperties, + "WorkflowModelCustomProperties.TestFailoverCleanupWorkflowDetails": TestFailoverCleanupWorkflowModelCustomProperties, + "WorkflowModelCustomProperties.TestFailoverWorkflowDetails": TestFailoverWorkflowModelCustomProperties +}; diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/models/parameters.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/models/parameters.ts new file mode 100644 index 000000000000..1e27cc946e50 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/models/parameters.ts @@ -0,0 +1,382 @@ +/* + * 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 { + OperationParameter, + OperationURLParameter, + OperationQueryParameter +} from "@azure/core-client"; +import { + DraModel as DraModelMapper, + EmailConfigurationModel as EmailConfigurationModelMapper, + FabricModel as FabricModelMapper, + FabricModelUpdate as FabricModelUpdateMapper, + PolicyModel as PolicyModelMapper, + ProtectedItemModel as ProtectedItemModelMapper, + PlannedFailoverModel as PlannedFailoverModelMapper, + ReplicationExtensionModel as ReplicationExtensionModelMapper, + CheckNameAvailabilityModel as CheckNameAvailabilityModelMapper, + DeploymentPreflightModel as DeploymentPreflightModelMapper, + VaultModel as VaultModelMapper, + VaultModelUpdate as VaultModelUpdateMapper +} from "../models/mappers"; + +export const accept: OperationParameter = { + parameterPath: "accept", + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Accept", + type: { + name: "String" + } + } +}; + +export const $host: OperationURLParameter = { + parameterPath: "$host", + mapper: { + serializedName: "$host", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + serializedName: "subscriptionId", + required: true, + type: { + name: "Uuid" + } + } +}; + +export const resourceGroupName: OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + constraints: { + MaxLength: 90, + MinLength: 1 + }, + serializedName: "resourceGroupName", + required: true, + type: { + name: "String" + } + } +}; + +export const fabricName: OperationURLParameter = { + parameterPath: "fabricName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9]*$") + }, + serializedName: "fabricName", + required: true, + type: { + name: "String" + } + } +}; + +export const fabricAgentName: OperationURLParameter = { + parameterPath: "fabricAgentName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9]*$") + }, + serializedName: "fabricAgentName", + required: true, + type: { + name: "String" + } + } +}; + +export const apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2021-02-16-preview", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", + type: { + name: "String" + } + } +}; + +export const body: OperationParameter = { + parameterPath: ["options", "body"], + mapper: DraModelMapper +}; + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", + mapper: { + serializedName: "nextLink", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const operationId: OperationURLParameter = { + parameterPath: "operationId", + mapper: { + constraints: { + MinLength: 1 + }, + serializedName: "operationId", + required: true, + type: { + name: "String" + } + } +}; + +export const vaultName: OperationURLParameter = { + parameterPath: "vaultName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9]*$") + }, + serializedName: "vaultName", + required: true, + type: { + name: "String" + } + } +}; + +export const emailConfigurationName: OperationURLParameter = { + parameterPath: "emailConfigurationName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9]*$") + }, + serializedName: "emailConfigurationName", + required: true, + type: { + name: "String" + } + } +}; + +export const body1: OperationParameter = { + parameterPath: ["options", "body"], + mapper: EmailConfigurationModelMapper +}; + +export const eventName: OperationURLParameter = { + parameterPath: "eventName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9]*$") + }, + serializedName: "eventName", + required: true, + type: { + name: "String" + } + } +}; + +export const filter: OperationQueryParameter = { + parameterPath: ["options", "filter"], + mapper: { + serializedName: "$filter", + type: { + name: "String" + } + } +}; + +export const continuationToken: OperationQueryParameter = { + parameterPath: ["options", "continuationToken"], + mapper: { + serializedName: "continuationToken", + type: { + name: "String" + } + } +}; + +export const body2: OperationParameter = { + parameterPath: ["options", "body"], + mapper: FabricModelMapper +}; + +export const body3: OperationParameter = { + parameterPath: ["options", "body"], + mapper: FabricModelUpdateMapper +}; + +export const policyName: OperationURLParameter = { + parameterPath: "policyName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9]*$") + }, + serializedName: "policyName", + required: true, + type: { + name: "String" + } + } +}; + +export const body4: OperationParameter = { + parameterPath: ["options", "body"], + mapper: PolicyModelMapper +}; + +export const protectedItemName: OperationURLParameter = { + parameterPath: "protectedItemName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9]*$") + }, + serializedName: "protectedItemName", + required: true, + type: { + name: "String" + } + } +}; + +export const body5: OperationParameter = { + parameterPath: ["options", "body"], + mapper: ProtectedItemModelMapper +}; + +export const forceDelete: OperationQueryParameter = { + parameterPath: ["options", "forceDelete"], + mapper: { + serializedName: "forceDelete", + type: { + name: "Boolean" + } + } +}; + +export const body6: OperationParameter = { + parameterPath: ["options", "body"], + mapper: PlannedFailoverModelMapper +}; + +export const recoveryPointName: OperationURLParameter = { + parameterPath: "recoveryPointName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9]*$") + }, + serializedName: "recoveryPointName", + required: true, + type: { + name: "String" + } + } +}; + +export const replicationExtensionName: OperationURLParameter = { + parameterPath: "replicationExtensionName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9]*$") + }, + serializedName: "replicationExtensionName", + required: true, + type: { + name: "String" + } + } +}; + +export const body7: OperationParameter = { + parameterPath: ["options", "body"], + mapper: ReplicationExtensionModelMapper +}; + +export const body8: OperationParameter = { + parameterPath: ["options", "body"], + mapper: CheckNameAvailabilityModelMapper +}; + +export const location: OperationURLParameter = { + parameterPath: "location", + mapper: { + constraints: { + MinLength: 1 + }, + serializedName: "location", + required: true, + type: { + name: "String" + } + } +}; + +export const body9: OperationParameter = { + parameterPath: ["options", "body"], + mapper: DeploymentPreflightModelMapper +}; + +export const deploymentId: OperationURLParameter = { + parameterPath: "deploymentId", + mapper: { + serializedName: "deploymentId", + required: true, + type: { + name: "String" + } + } +}; + +export const body10: OperationParameter = { + parameterPath: ["options", "body"], + mapper: VaultModelMapper +}; + +export const body11: OperationParameter = { + parameterPath: ["options", "body"], + mapper: VaultModelUpdateMapper +}; + +export const jobName: OperationURLParameter = { + parameterPath: "jobName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9]*$") + }, + serializedName: "jobName", + required: true, + type: { + name: "String" + } + } +}; diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/dra.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/dra.ts new file mode 100644 index 000000000000..46f26e25717b --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/dra.ts @@ -0,0 +1,500 @@ +/* + * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Dra } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureSiteRecoveryManagementServiceAPI } from "../azureSiteRecoveryManagementServiceAPI"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + DraModel, + DraListNextOptionalParams, + DraListOptionalParams, + DraListResponse, + DraGetOptionalParams, + DraGetResponse, + DraCreateOptionalParams, + DraCreateResponse, + DraDeleteOptionalParams, + DraDeleteResponse, + DraListNextResponse +} from "../models"; + +/// +/** Class containing Dra operations. */ +export class DraImpl implements Dra { + private readonly client: AzureSiteRecoveryManagementServiceAPI; + + /** + * Initialize a new instance of the class Dra class. + * @param client Reference to the service client + */ + constructor(client: AzureSiteRecoveryManagementServiceAPI) { + this.client = client; + } + + /** + * Gets the list of fabric agents in the given fabric. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + fabricName: string, + options?: DraListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, fabricName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + fabricName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + fabricName: string, + options?: DraListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: DraListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, fabricName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + fabricName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + fabricName: string, + options?: DraListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + fabricName, + options + )) { + yield* page; + } + } + + /** + * Gets the details of the fabric agent. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param fabricAgentName The fabric agent (Dra) name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + fabricName: string, + fabricAgentName: string, + options?: DraGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, fabricName, fabricAgentName, options }, + getOperationSpec + ); + } + + /** + * Creates the fabric agent. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param fabricAgentName The fabric agent (Dra) name. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + fabricName: string, + fabricAgentName: string, + options?: DraCreateOptionalParams + ): Promise< + SimplePollerLike, DraCreateResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, fabricName, fabricAgentName, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + DraCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Creates the fabric agent. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param fabricAgentName The fabric agent (Dra) name. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + fabricName: string, + fabricAgentName: string, + options?: DraCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + fabricName, + fabricAgentName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes the fabric agent. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param fabricAgentName The fabric agent (Dra) name. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + fabricName: string, + fabricAgentName: string, + options?: DraDeleteOptionalParams + ): Promise< + SimplePollerLike, DraDeleteResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, fabricName, fabricAgentName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + DraDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes the fabric agent. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param fabricAgentName The fabric agent (Dra) name. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + fabricName: string, + fabricAgentName: string, + options?: DraDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + fabricName, + fabricAgentName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets the list of fabric agents in the given fabric. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + fabricName: string, + options?: DraListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, fabricName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + fabricName: string, + nextLink: string, + options?: DraListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, fabricName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DraModel + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.fabricName, + Parameters.fabricAgentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DraModel + }, + 201: { + bodyMapper: Mappers.DraModel + }, + 202: { + bodyMapper: Mappers.DraModel + }, + 204: { + bodyMapper: Mappers.DraModel + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.fabricName, + Parameters.fabricAgentName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.DraDeleteHeaders + }, + 201: { + headersMapper: Mappers.DraDeleteHeaders + }, + 202: { + headersMapper: Mappers.DraDeleteHeaders + }, + 204: { + headersMapper: Mappers.DraDeleteHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.fabricName, + Parameters.fabricAgentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DraModelCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.fabricName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DraModelCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.fabricName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/draOperationStatus.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/draOperationStatus.ts new file mode 100644 index 000000000000..7d8092a6e15d --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/draOperationStatus.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. + */ + +import { DraOperationStatus } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureSiteRecoveryManagementServiceAPI } from "../azureSiteRecoveryManagementServiceAPI"; +import { + DraOperationStatusGetOptionalParams, + DraOperationStatusGetResponse +} from "../models"; + +/** Class containing DraOperationStatus operations. */ +export class DraOperationStatusImpl implements DraOperationStatus { + private readonly client: AzureSiteRecoveryManagementServiceAPI; + + /** + * Initialize a new instance of the class DraOperationStatus class. + * @param client Reference to the service client + */ + constructor(client: AzureSiteRecoveryManagementServiceAPI) { + this.client = client; + } + + /** + * Tracks the results of an asynchronous operation on the fabric agent. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param fabricAgentName The fabric agent (Dra) name. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + fabricName: string, + fabricAgentName: string, + operationId: string, + options?: DraOperationStatusGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, fabricName, fabricAgentName, operationId, options }, + getOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName}/operations/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.fabricName, + Parameters.fabricAgentName, + Parameters.operationId + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/emailConfiguration.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/emailConfiguration.ts new file mode 100644 index 000000000000..bed0c560ef29 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/emailConfiguration.ts @@ -0,0 +1,287 @@ +/* + * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { EmailConfiguration } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureSiteRecoveryManagementServiceAPI } from "../azureSiteRecoveryManagementServiceAPI"; +import { + EmailConfigurationModel, + EmailConfigurationListNextOptionalParams, + EmailConfigurationListOptionalParams, + EmailConfigurationListResponse, + EmailConfigurationGetOptionalParams, + EmailConfigurationGetResponse, + EmailConfigurationCreateOptionalParams, + EmailConfigurationCreateResponse, + EmailConfigurationListNextResponse +} from "../models"; + +/// +/** Class containing EmailConfiguration operations. */ +export class EmailConfigurationImpl implements EmailConfiguration { + private readonly client: AzureSiteRecoveryManagementServiceAPI; + + /** + * Initialize a new instance of the class EmailConfiguration class. + * @param client Reference to the service client + */ + constructor(client: AzureSiteRecoveryManagementServiceAPI) { + this.client = client; + } + + /** + * Gets the list of alert configuration settings for the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + vaultName: string, + options?: EmailConfigurationListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, vaultName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + vaultName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + vaultName: string, + options?: EmailConfigurationListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: EmailConfigurationListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, vaultName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + vaultName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + vaultName: string, + options?: EmailConfigurationListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + vaultName, + options + )) { + yield* page; + } + } + + /** + * Gets the details of the alert configuration setting. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param emailConfigurationName The email configuration name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vaultName: string, + emailConfigurationName: string, + options?: EmailConfigurationGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, emailConfigurationName, options }, + getOperationSpec + ); + } + + /** + * Creates an alert configuration setting for the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param emailConfigurationName The email configuration name. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + vaultName: string, + emailConfigurationName: string, + options?: EmailConfigurationCreateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, emailConfigurationName, options }, + createOperationSpec + ); + } + + /** + * Gets the list of alert configuration settings for the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + vaultName: string, + options?: EmailConfigurationListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + vaultName: string, + nextLink: string, + options?: EmailConfigurationListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.EmailConfigurationModel + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName, + Parameters.emailConfigurationName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.EmailConfigurationModel + }, + 201: { + bodyMapper: Mappers.EmailConfigurationModel + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName, + Parameters.emailConfigurationName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.EmailConfigurationModelCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.EmailConfigurationModelCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.vaultName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/event.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/event.ts new file mode 100644 index 000000000000..df7bd967ab71 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/event.ts @@ -0,0 +1,242 @@ +/* + * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Event } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureSiteRecoveryManagementServiceAPI } from "../azureSiteRecoveryManagementServiceAPI"; +import { + EventModel, + EventListNextOptionalParams, + EventListOptionalParams, + EventListResponse, + EventGetOptionalParams, + EventGetResponse, + EventListNextResponse +} from "../models"; + +/// +/** Class containing Event operations. */ +export class EventImpl implements Event { + private readonly client: AzureSiteRecoveryManagementServiceAPI; + + /** + * Initialize a new instance of the class Event class. + * @param client Reference to the service client + */ + constructor(client: AzureSiteRecoveryManagementServiceAPI) { + this.client = client; + } + + /** + * Gets the list of events in the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + vaultName: string, + options?: EventListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, vaultName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + vaultName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + vaultName: string, + options?: EventListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: EventListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, vaultName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + vaultName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + vaultName: string, + options?: EventListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + vaultName, + options + )) { + yield* page; + } + } + + /** + * Gets the details of the event. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param eventName The event name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vaultName: string, + eventName: string, + options?: EventGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, eventName, options }, + getOperationSpec + ); + } + + /** + * Gets the list of events in the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + vaultName: string, + options?: EventListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + vaultName: string, + nextLink: string, + options?: EventListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/events/{eventName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.EventModel + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName, + Parameters.eventName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/events", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.EventModelCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.continuationToken + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.EventModelCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.vaultName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/fabric.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/fabric.ts new file mode 100644 index 000000000000..1275447104de --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/fabric.ts @@ -0,0 +1,710 @@ +/* + * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Fabric } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureSiteRecoveryManagementServiceAPI } from "../azureSiteRecoveryManagementServiceAPI"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + FabricModel, + FabricListBySubscriptionNextOptionalParams, + FabricListBySubscriptionOptionalParams, + FabricListBySubscriptionResponse, + FabricListNextOptionalParams, + FabricListOptionalParams, + FabricListResponse, + FabricGetOptionalParams, + FabricGetResponse, + FabricCreateOptionalParams, + FabricCreateResponse, + FabricUpdateOptionalParams, + FabricUpdateResponse, + FabricDeleteOptionalParams, + FabricDeleteResponse, + FabricListBySubscriptionNextResponse, + FabricListNextResponse +} from "../models"; + +/// +/** Class containing Fabric operations. */ +export class FabricImpl implements Fabric { + private readonly client: AzureSiteRecoveryManagementServiceAPI; + + /** + * Initialize a new instance of the class Fabric class. + * @param client Reference to the service client + */ + constructor(client: AzureSiteRecoveryManagementServiceAPI) { + this.client = client; + } + + /** + * Gets the list of fabrics in the given subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: FabricListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: FabricListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: FabricListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: FabricListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Gets the list of fabrics in the given subscription and resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + options?: FabricListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(resourceGroupName, options, settings); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + options?: FabricListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: FabricListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + options?: FabricListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceGroupName, options)) { + yield* page; + } + } + + /** + * Gets the details of the fabric. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + fabricName: string, + options?: FabricGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, fabricName, options }, + getOperationSpec + ); + } + + /** + * Creates the fabric. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + fabricName: string, + options?: FabricCreateOptionalParams + ): Promise< + SimplePollerLike, FabricCreateResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, fabricName, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + FabricCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Creates the fabric. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + fabricName: string, + options?: FabricCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + fabricName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Performs update on the fabric. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + fabricName: string, + options?: FabricUpdateOptionalParams + ): Promise< + SimplePollerLike, FabricUpdateResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, fabricName, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + FabricUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Performs update on the fabric. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + fabricName: string, + options?: FabricUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + fabricName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Removes the fabric. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + fabricName: string, + options?: FabricDeleteOptionalParams + ): Promise< + SimplePollerLike, FabricDeleteResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, fabricName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + FabricDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Removes the fabric. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + fabricName: string, + options?: FabricDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + fabricName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets the list of fabrics in the given subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: FabricListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * Gets the list of fabrics in the given subscription and resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + options?: FabricListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: FabricListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + nextLink: string, + options?: FabricListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FabricModel + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.fabricName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.FabricModel + }, + 201: { + bodyMapper: Mappers.FabricModel + }, + 202: { + bodyMapper: Mappers.FabricModel + }, + 204: { + bodyMapper: Mappers.FabricModel + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.fabricName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.FabricModel + }, + 201: { + bodyMapper: Mappers.FabricModel + }, + 202: { + bodyMapper: Mappers.FabricModel + }, + 204: { + bodyMapper: Mappers.FabricModel + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body3, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.fabricName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.FabricDeleteHeaders + }, + 201: { + headersMapper: Mappers.FabricDeleteHeaders + }, + 202: { + headersMapper: Mappers.FabricDeleteHeaders + }, + 204: { + headersMapper: Mappers.FabricDeleteHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.fabricName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/replicationFabrics", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FabricModelCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.continuationToken], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FabricModelCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.continuationToken], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FabricModelCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FabricModelCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/fabricOperationsStatus.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/fabricOperationsStatus.ts new file mode 100644 index 000000000000..91744aa55130 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/fabricOperationsStatus.ts @@ -0,0 +1,75 @@ +/* + * 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 { FabricOperationsStatus } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureSiteRecoveryManagementServiceAPI } from "../azureSiteRecoveryManagementServiceAPI"; +import { + FabricOperationsStatusGetOptionalParams, + FabricOperationsStatusGetResponse +} from "../models"; + +/** Class containing FabricOperationsStatus operations. */ +export class FabricOperationsStatusImpl implements FabricOperationsStatus { + private readonly client: AzureSiteRecoveryManagementServiceAPI; + + /** + * Initialize a new instance of the class FabricOperationsStatus class. + * @param client Reference to the service client + */ + constructor(client: AzureSiteRecoveryManagementServiceAPI) { + this.client = client; + } + + /** + * Tracks the results of an asynchronous operation on the fabric. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + fabricName: string, + operationId: string, + options?: FabricOperationsStatusGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, fabricName, operationId, options }, + getOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/operations/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.fabricName, + Parameters.operationId + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/index.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/index.ts new file mode 100644 index 000000000000..d9ab1044f87d --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/index.ts @@ -0,0 +1,26 @@ +/* + * 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 "./dra"; +export * from "./draOperationStatus"; +export * from "./emailConfiguration"; +export * from "./event"; +export * from "./fabric"; +export * from "./fabricOperationsStatus"; +export * from "./policy"; +export * from "./policyOperationStatus"; +export * from "./protectedItem"; +export * from "./protectedItemOperationStatus"; +export * from "./recoveryPoints"; +export * from "./replicationExtension"; +export * from "./replicationExtensionOperationStatus"; +export * from "./operations"; +export * from "./vault"; +export * from "./vaultOperationStatus"; +export * from "./workflow"; +export * from "./workflowOperationStatus"; diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/operations.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/operations.ts new file mode 100644 index 000000000000..d639a2c8b286 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/operations.ts @@ -0,0 +1,149 @@ +/* + * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Operations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureSiteRecoveryManagementServiceAPI } from "../azureSiteRecoveryManagementServiceAPI"; +import { + Operation, + OperationsListNextOptionalParams, + OperationsListOptionalParams, + OperationsListResponse, + OperationsListNextResponse +} from "../models"; + +/// +/** Class containing Operations operations. */ +export class OperationsImpl implements Operations { + private readonly client: AzureSiteRecoveryManagementServiceAPI; + + /** + * Initialize a new instance of the class Operations class. + * @param client Reference to the service client + */ + constructor(client: AzureSiteRecoveryManagementServiceAPI) { + this.client = client; + } + + /** + * Gets the operations. + * @param options The options parameters. + */ + public list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(options, settings); + } + }; + } + + private async *listPagingPage( + options?: OperationsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: OperationsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Gets the operations. + * @param options The options parameters. + */ + private _list( + options?: OperationsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: OperationsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.DataReplication/operations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [Parameters.$host, Parameters.nextLink], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/policy.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/policy.ts new file mode 100644 index 000000000000..b01dcecfc377 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/policy.ts @@ -0,0 +1,500 @@ +/* + * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Policy } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureSiteRecoveryManagementServiceAPI } from "../azureSiteRecoveryManagementServiceAPI"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + PolicyModel, + PolicyListNextOptionalParams, + PolicyListOptionalParams, + PolicyListResponse, + PolicyGetOptionalParams, + PolicyGetResponse, + PolicyCreateOptionalParams, + PolicyCreateResponse, + PolicyDeleteOptionalParams, + PolicyDeleteResponse, + PolicyListNextResponse +} from "../models"; + +/// +/** Class containing Policy operations. */ +export class PolicyImpl implements Policy { + private readonly client: AzureSiteRecoveryManagementServiceAPI; + + /** + * Initialize a new instance of the class Policy class. + * @param client Reference to the service client + */ + constructor(client: AzureSiteRecoveryManagementServiceAPI) { + this.client = client; + } + + /** + * Gets the list of policies in the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + vaultName: string, + options?: PolicyListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, vaultName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + vaultName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + vaultName: string, + options?: PolicyListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: PolicyListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, vaultName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + vaultName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + vaultName: string, + options?: PolicyListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + vaultName, + options + )) { + yield* page; + } + } + + /** + * Gets the details of the policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param policyName The policy name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vaultName: string, + policyName: string, + options?: PolicyGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, policyName, options }, + getOperationSpec + ); + } + + /** + * Creates the policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param policyName The policy name. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + vaultName: string, + policyName: string, + options?: PolicyCreateOptionalParams + ): Promise< + SimplePollerLike, PolicyCreateResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vaultName, policyName, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + PolicyCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Creates the policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param policyName The policy name. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + vaultName: string, + policyName: string, + options?: PolicyCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + vaultName, + policyName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Removes the policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param policyName The policy name. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + vaultName: string, + policyName: string, + options?: PolicyDeleteOptionalParams + ): Promise< + SimplePollerLike, PolicyDeleteResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vaultName, policyName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + PolicyDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Removes the policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param policyName The policy name. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + vaultName: string, + policyName: string, + options?: PolicyDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + vaultName, + policyName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets the list of policies in the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + vaultName: string, + options?: PolicyListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + vaultName: string, + nextLink: string, + options?: PolicyListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyModel + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName, + Parameters.policyName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PolicyModel + }, + 201: { + bodyMapper: Mappers.PolicyModel + }, + 202: { + bodyMapper: Mappers.PolicyModel + }, + 204: { + bodyMapper: Mappers.PolicyModel + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body4, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName, + Parameters.policyName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.PolicyDeleteHeaders + }, + 201: { + headersMapper: Mappers.PolicyDeleteHeaders + }, + 202: { + headersMapper: Mappers.PolicyDeleteHeaders + }, + 204: { + headersMapper: Mappers.PolicyDeleteHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName, + Parameters.policyName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyModelCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyModelCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.vaultName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/policyOperationStatus.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/policyOperationStatus.ts new file mode 100644 index 000000000000..898d0a6af373 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/policyOperationStatus.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. + */ + +import { PolicyOperationStatus } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureSiteRecoveryManagementServiceAPI } from "../azureSiteRecoveryManagementServiceAPI"; +import { + PolicyOperationStatusGetOptionalParams, + PolicyOperationStatusGetResponse +} from "../models"; + +/** Class containing PolicyOperationStatus operations. */ +export class PolicyOperationStatusImpl implements PolicyOperationStatus { + private readonly client: AzureSiteRecoveryManagementServiceAPI; + + /** + * Initialize a new instance of the class PolicyOperationStatus class. + * @param client Reference to the service client + */ + constructor(client: AzureSiteRecoveryManagementServiceAPI) { + this.client = client; + } + + /** + * Tracks the results of an asynchronous operation on the policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param policyName The policy name. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vaultName: string, + policyName: string, + operationId: string, + options?: PolicyOperationStatusGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, policyName, operationId, options }, + getOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName}/operations/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.operationId, + Parameters.vaultName, + Parameters.policyName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/protectedItem.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/protectedItem.ts new file mode 100644 index 000000000000..c439e2935308 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/protectedItem.ts @@ -0,0 +1,638 @@ +/* + * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ProtectedItem } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureSiteRecoveryManagementServiceAPI } from "../azureSiteRecoveryManagementServiceAPI"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + ProtectedItemModel, + ProtectedItemListNextOptionalParams, + ProtectedItemListOptionalParams, + ProtectedItemListResponse, + ProtectedItemGetOptionalParams, + ProtectedItemGetResponse, + ProtectedItemCreateOptionalParams, + ProtectedItemCreateResponse, + ProtectedItemDeleteOptionalParams, + ProtectedItemDeleteResponse, + ProtectedItemPlannedFailoverOptionalParams, + ProtectedItemPlannedFailoverResponse, + ProtectedItemListNextResponse +} from "../models"; + +/// +/** Class containing ProtectedItem operations. */ +export class ProtectedItemImpl implements ProtectedItem { + private readonly client: AzureSiteRecoveryManagementServiceAPI; + + /** + * Initialize a new instance of the class ProtectedItem class. + * @param client Reference to the service client + */ + constructor(client: AzureSiteRecoveryManagementServiceAPI) { + this.client = client; + } + + /** + * Gets the list of protected items in the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + vaultName: string, + options?: ProtectedItemListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, vaultName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + vaultName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + vaultName: string, + options?: ProtectedItemListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ProtectedItemListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, vaultName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + vaultName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + vaultName: string, + options?: ProtectedItemListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + vaultName, + options + )) { + yield* page; + } + } + + /** + * Gets the details of the protected item. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param protectedItemName The protected item name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vaultName: string, + protectedItemName: string, + options?: ProtectedItemGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, protectedItemName, options }, + getOperationSpec + ); + } + + /** + * Creates the protected item. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param protectedItemName The protected item name. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + vaultName: string, + protectedItemName: string, + options?: ProtectedItemCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ProtectedItemCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vaultName, protectedItemName, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + ProtectedItemCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Creates the protected item. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param protectedItemName The protected item name. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + vaultName: string, + protectedItemName: string, + options?: ProtectedItemCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + vaultName, + protectedItemName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Removes the protected item. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param protectedItemName The protected item name. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + vaultName: string, + protectedItemName: string, + options?: ProtectedItemDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ProtectedItemDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vaultName, protectedItemName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + ProtectedItemDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Removes the protected item. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param protectedItemName The protected item name. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + vaultName: string, + protectedItemName: string, + options?: ProtectedItemDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + vaultName, + protectedItemName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets the list of protected items in the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + vaultName: string, + options?: ProtectedItemListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, options }, + listOperationSpec + ); + } + + /** + * Performs the planned failover on the protected item. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param protectedItemName The protected item name. + * @param options The options parameters. + */ + async beginPlannedFailover( + resourceGroupName: string, + vaultName: string, + protectedItemName: string, + options?: ProtectedItemPlannedFailoverOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ProtectedItemPlannedFailoverResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vaultName, protectedItemName, options }, + spec: plannedFailoverOperationSpec + }); + const poller = await createHttpPoller< + ProtectedItemPlannedFailoverResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Performs the planned failover on the protected item. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param protectedItemName The protected item name. + * @param options The options parameters. + */ + async beginPlannedFailoverAndWait( + resourceGroupName: string, + vaultName: string, + protectedItemName: string, + options?: ProtectedItemPlannedFailoverOptionalParams + ): Promise { + const poller = await this.beginPlannedFailover( + resourceGroupName, + vaultName, + protectedItemName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + vaultName: string, + nextLink: string, + options?: ProtectedItemListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ProtectedItemModel + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName, + Parameters.protectedItemName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ProtectedItemModel + }, + 201: { + bodyMapper: Mappers.ProtectedItemModel + }, + 202: { + bodyMapper: Mappers.ProtectedItemModel + }, + 204: { + bodyMapper: Mappers.ProtectedItemModel + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body5, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName, + Parameters.protectedItemName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.ProtectedItemDeleteHeaders + }, + 201: { + headersMapper: Mappers.ProtectedItemDeleteHeaders + }, + 202: { + headersMapper: Mappers.ProtectedItemDeleteHeaders + }, + 204: { + headersMapper: Mappers.ProtectedItemDeleteHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.forceDelete], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName, + Parameters.protectedItemName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ProtectedItemModelCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName + ], + headerParameters: [Parameters.accept], + serializer +}; +const plannedFailoverOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/plannedFailover", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PlannedFailoverModel + }, + 201: { + bodyMapper: Mappers.PlannedFailoverModel + }, + 202: { + bodyMapper: Mappers.PlannedFailoverModel + }, + 204: { + bodyMapper: Mappers.PlannedFailoverModel + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body6, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName, + Parameters.protectedItemName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ProtectedItemModelCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.vaultName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/protectedItemOperationStatus.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/protectedItemOperationStatus.ts new file mode 100644 index 000000000000..252d99a129d7 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/protectedItemOperationStatus.ts @@ -0,0 +1,79 @@ +/* + * 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 { ProtectedItemOperationStatus } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureSiteRecoveryManagementServiceAPI } from "../azureSiteRecoveryManagementServiceAPI"; +import { + ProtectedItemOperationStatusGetOptionalParams, + ProtectedItemOperationStatusGetResponse +} from "../models"; + +/** Class containing ProtectedItemOperationStatus operations. */ +export class ProtectedItemOperationStatusImpl + implements ProtectedItemOperationStatus { + private readonly client: AzureSiteRecoveryManagementServiceAPI; + + /** + * Initialize a new instance of the class ProtectedItemOperationStatus class. + * @param client Reference to the service client + */ + constructor(client: AzureSiteRecoveryManagementServiceAPI) { + this.client = client; + } + + /** + * Tracks the results of an asynchronous operation on the protected item. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param protectedItemName The protected item name. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vaultName: string, + protectedItemName: string, + operationId: string, + options?: ProtectedItemOperationStatusGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, protectedItemName, operationId, options }, + getOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/operations/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.operationId, + Parameters.vaultName, + Parameters.protectedItemName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/recoveryPoints.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/recoveryPoints.ts new file mode 100644 index 000000000000..c1610429d16f --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/recoveryPoints.ts @@ -0,0 +1,270 @@ +/* + * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { RecoveryPoints } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureSiteRecoveryManagementServiceAPI } from "../azureSiteRecoveryManagementServiceAPI"; +import { + RecoveryPointModel, + RecoveryPointsListNextOptionalParams, + RecoveryPointsListOptionalParams, + RecoveryPointsListResponse, + RecoveryPointsGetOptionalParams, + RecoveryPointsGetResponse, + RecoveryPointsListNextResponse +} from "../models"; + +/// +/** Class containing RecoveryPoints operations. */ +export class RecoveryPointsImpl implements RecoveryPoints { + private readonly client: AzureSiteRecoveryManagementServiceAPI; + + /** + * Initialize a new instance of the class RecoveryPoints class. + * @param client Reference to the service client + */ + constructor(client: AzureSiteRecoveryManagementServiceAPI) { + this.client = client; + } + + /** + * Gets the list of recovery points of the given protected item. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param protectedItemName The protected item name. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + vaultName: string, + protectedItemName: string, + options?: RecoveryPointsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + vaultName, + protectedItemName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + vaultName, + protectedItemName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + vaultName: string, + protectedItemName: string, + options?: RecoveryPointsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: RecoveryPointsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + vaultName, + protectedItemName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + vaultName, + protectedItemName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + vaultName: string, + protectedItemName: string, + options?: RecoveryPointsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + vaultName, + protectedItemName, + options + )) { + yield* page; + } + } + + /** + * Gets the details of the recovery point of a protected item. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param protectedItemName The protected item name. + * @param recoveryPointName The recovery point name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vaultName: string, + protectedItemName: string, + recoveryPointName: string, + options?: RecoveryPointsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + protectedItemName, + recoveryPointName, + options + }, + getOperationSpec + ); + } + + /** + * Gets the list of recovery points of the given protected item. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param protectedItemName The protected item name. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + vaultName: string, + protectedItemName: string, + options?: RecoveryPointsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, protectedItemName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param protectedItemName The protected item name. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + vaultName: string, + protectedItemName: string, + nextLink: string, + options?: RecoveryPointsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, protectedItemName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RecoveryPointModel + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName, + Parameters.protectedItemName, + Parameters.recoveryPointName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/recoveryPoints", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RecoveryPointModelCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName, + Parameters.protectedItemName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RecoveryPointModelCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.vaultName, + Parameters.protectedItemName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/replicationExtension.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/replicationExtension.ts new file mode 100644 index 000000000000..753bdcbd196e --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/replicationExtension.ts @@ -0,0 +1,506 @@ +/* + * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ReplicationExtension } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureSiteRecoveryManagementServiceAPI } from "../azureSiteRecoveryManagementServiceAPI"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + ReplicationExtensionModel, + ReplicationExtensionListNextOptionalParams, + ReplicationExtensionListOptionalParams, + ReplicationExtensionListResponse, + ReplicationExtensionGetOptionalParams, + ReplicationExtensionGetResponse, + ReplicationExtensionCreateOptionalParams, + ReplicationExtensionCreateResponse, + ReplicationExtensionDeleteOptionalParams, + ReplicationExtensionDeleteResponse, + ReplicationExtensionListNextResponse +} from "../models"; + +/// +/** Class containing ReplicationExtension operations. */ +export class ReplicationExtensionImpl implements ReplicationExtension { + private readonly client: AzureSiteRecoveryManagementServiceAPI; + + /** + * Initialize a new instance of the class ReplicationExtension class. + * @param client Reference to the service client + */ + constructor(client: AzureSiteRecoveryManagementServiceAPI) { + this.client = client; + } + + /** + * Gets the list of replication extensions in the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + vaultName: string, + options?: ReplicationExtensionListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, vaultName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + vaultName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + vaultName: string, + options?: ReplicationExtensionListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ReplicationExtensionListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, vaultName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + vaultName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + vaultName: string, + options?: ReplicationExtensionListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + vaultName, + options + )) { + yield* page; + } + } + + /** + * Gets the details of the replication extension. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param replicationExtensionName The replication extension name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vaultName: string, + replicationExtensionName: string, + options?: ReplicationExtensionGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, replicationExtensionName, options }, + getOperationSpec + ); + } + + /** + * Creates the replication extension in the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param replicationExtensionName The replication extension name. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + vaultName: string, + replicationExtensionName: string, + options?: ReplicationExtensionCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ReplicationExtensionCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vaultName, replicationExtensionName, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + ReplicationExtensionCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Creates the replication extension in the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param replicationExtensionName The replication extension name. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + vaultName: string, + replicationExtensionName: string, + options?: ReplicationExtensionCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + vaultName, + replicationExtensionName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes the replication extension in the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param replicationExtensionName The replication extension name. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + vaultName: string, + replicationExtensionName: string, + options?: ReplicationExtensionDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ReplicationExtensionDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vaultName, replicationExtensionName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + ReplicationExtensionDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes the replication extension in the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param replicationExtensionName The replication extension name. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + vaultName: string, + replicationExtensionName: string, + options?: ReplicationExtensionDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + vaultName, + replicationExtensionName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets the list of replication extensions in the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + vaultName: string, + options?: ReplicationExtensionListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + vaultName: string, + nextLink: string, + options?: ReplicationExtensionListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReplicationExtensionModel + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName, + Parameters.replicationExtensionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ReplicationExtensionModel + }, + 201: { + bodyMapper: Mappers.ReplicationExtensionModel + }, + 202: { + bodyMapper: Mappers.ReplicationExtensionModel + }, + 204: { + bodyMapper: Mappers.ReplicationExtensionModel + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body7, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName, + Parameters.replicationExtensionName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.ReplicationExtensionDeleteHeaders + }, + 201: { + headersMapper: Mappers.ReplicationExtensionDeleteHeaders + }, + 202: { + headersMapper: Mappers.ReplicationExtensionDeleteHeaders + }, + 204: { + headersMapper: Mappers.ReplicationExtensionDeleteHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName, + Parameters.replicationExtensionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReplicationExtensionModelCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReplicationExtensionModelCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.vaultName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/replicationExtensionOperationStatus.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/replicationExtensionOperationStatus.ts new file mode 100644 index 000000000000..810cdf05d0a4 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/replicationExtensionOperationStatus.ts @@ -0,0 +1,85 @@ +/* + * 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 { ReplicationExtensionOperationStatus } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureSiteRecoveryManagementServiceAPI } from "../azureSiteRecoveryManagementServiceAPI"; +import { + ReplicationExtensionOperationStatusGetOptionalParams, + ReplicationExtensionOperationStatusGetResponse +} from "../models"; + +/** Class containing ReplicationExtensionOperationStatus operations. */ +export class ReplicationExtensionOperationStatusImpl + implements ReplicationExtensionOperationStatus { + private readonly client: AzureSiteRecoveryManagementServiceAPI; + + /** + * Initialize a new instance of the class ReplicationExtensionOperationStatus class. + * @param client Reference to the service client + */ + constructor(client: AzureSiteRecoveryManagementServiceAPI) { + this.client = client; + } + + /** + * Tracks the results of an asynchronous operation on the replication extension. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param replicationExtensionName The replication extension name. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vaultName: string, + replicationExtensionName: string, + operationId: string, + options?: ReplicationExtensionOperationStatusGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + replicationExtensionName, + operationId, + options + }, + getOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName}/operations/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.operationId, + Parameters.vaultName, + Parameters.replicationExtensionName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/vault.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/vault.ts new file mode 100644 index 000000000000..70ee8db9bce7 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/vault.ts @@ -0,0 +1,710 @@ +/* + * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Vault } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureSiteRecoveryManagementServiceAPI } from "../azureSiteRecoveryManagementServiceAPI"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + VaultModel, + VaultListBySubscriptionNextOptionalParams, + VaultListBySubscriptionOptionalParams, + VaultListBySubscriptionResponse, + VaultListNextOptionalParams, + VaultListOptionalParams, + VaultListResponse, + VaultGetOptionalParams, + VaultGetResponse, + VaultCreateOptionalParams, + VaultCreateResponse, + VaultUpdateOptionalParams, + VaultUpdateResponse, + VaultDeleteOptionalParams, + VaultDeleteResponse, + VaultListBySubscriptionNextResponse, + VaultListNextResponse +} from "../models"; + +/// +/** Class containing Vault operations. */ +export class VaultImpl implements Vault { + private readonly client: AzureSiteRecoveryManagementServiceAPI; + + /** + * Initialize a new instance of the class Vault class. + * @param client Reference to the service client + */ + constructor(client: AzureSiteRecoveryManagementServiceAPI) { + this.client = client; + } + + /** + * Gets the list of vaults in the given subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: VaultListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: VaultListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: VaultListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: VaultListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Gets the list of vaults in the given subscription and resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + options?: VaultListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(resourceGroupName, options, settings); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + options?: VaultListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: VaultListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + options?: VaultListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceGroupName, options)) { + yield* page; + } + } + + /** + * Gets the details of the vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vaultName: string, + options?: VaultGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, options }, + getOperationSpec + ); + } + + /** + * Creates the vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + vaultName: string, + options?: VaultCreateOptionalParams + ): Promise< + SimplePollerLike, VaultCreateResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vaultName, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + VaultCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Creates the vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + vaultName: string, + options?: VaultCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + vaultName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Performs update on the vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + vaultName: string, + options?: VaultUpdateOptionalParams + ): Promise< + SimplePollerLike, VaultUpdateResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vaultName, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + VaultUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Performs update on the vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + vaultName: string, + options?: VaultUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + vaultName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Removes the vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + vaultName: string, + options?: VaultDeleteOptionalParams + ): Promise< + SimplePollerLike, VaultDeleteResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vaultName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + VaultDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Removes the vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + vaultName: string, + options?: VaultDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + vaultName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets the list of vaults in the given subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: VaultListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * Gets the list of vaults in the given subscription and resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + options?: VaultListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: VaultListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + nextLink: string, + options?: VaultListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VaultModel + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.VaultModel + }, + 201: { + bodyMapper: Mappers.VaultModel + }, + 202: { + bodyMapper: Mappers.VaultModel + }, + 204: { + bodyMapper: Mappers.VaultModel + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.VaultModel + }, + 201: { + bodyMapper: Mappers.VaultModel + }, + 202: { + bodyMapper: Mappers.VaultModel + }, + 204: { + bodyMapper: Mappers.VaultModel + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body11, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.VaultDeleteHeaders + }, + 201: { + headersMapper: Mappers.VaultDeleteHeaders + }, + 202: { + headersMapper: Mappers.VaultDeleteHeaders + }, + 204: { + headersMapper: Mappers.VaultDeleteHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/replicationVaults", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VaultModelCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.continuationToken], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VaultModelCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.continuationToken], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VaultModelCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VaultModelCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/vaultOperationStatus.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/vaultOperationStatus.ts new file mode 100644 index 000000000000..1733756acbc4 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/vaultOperationStatus.ts @@ -0,0 +1,75 @@ +/* + * 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 { VaultOperationStatus } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureSiteRecoveryManagementServiceAPI } from "../azureSiteRecoveryManagementServiceAPI"; +import { + VaultOperationStatusGetOptionalParams, + VaultOperationStatusGetResponse +} from "../models"; + +/** Class containing VaultOperationStatus operations. */ +export class VaultOperationStatusImpl implements VaultOperationStatus { + private readonly client: AzureSiteRecoveryManagementServiceAPI; + + /** + * Initialize a new instance of the class VaultOperationStatus class. + * @param client Reference to the service client + */ + constructor(client: AzureSiteRecoveryManagementServiceAPI) { + this.client = client; + } + + /** + * Tracks the results of an asynchronous operation on the vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vaultName: string, + operationId: string, + options?: VaultOperationStatusGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, operationId, options }, + getOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/operations/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.operationId, + Parameters.vaultName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/workflow.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/workflow.ts new file mode 100644 index 000000000000..6510cb8ba8bf --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/workflow.ts @@ -0,0 +1,242 @@ +/* + * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Workflow } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureSiteRecoveryManagementServiceAPI } from "../azureSiteRecoveryManagementServiceAPI"; +import { + WorkflowModel, + WorkflowListNextOptionalParams, + WorkflowListOptionalParams, + WorkflowListResponse, + WorkflowGetOptionalParams, + WorkflowGetResponse, + WorkflowListNextResponse +} from "../models"; + +/// +/** Class containing Workflow operations. */ +export class WorkflowImpl implements Workflow { + private readonly client: AzureSiteRecoveryManagementServiceAPI; + + /** + * Initialize a new instance of the class Workflow class. + * @param client Reference to the service client + */ + constructor(client: AzureSiteRecoveryManagementServiceAPI) { + this.client = client; + } + + /** + * Gets the list of jobs in the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + vaultName: string, + options?: WorkflowListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, vaultName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + vaultName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + vaultName: string, + options?: WorkflowListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: WorkflowListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, vaultName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + vaultName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + vaultName: string, + options?: WorkflowListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + vaultName, + options + )) { + yield* page; + } + } + + /** + * Gets the details of the job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param jobName The job (workflow) name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vaultName: string, + jobName: string, + options?: WorkflowGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, jobName, options }, + getOperationSpec + ); + } + + /** + * Gets the list of jobs in the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + vaultName: string, + options?: WorkflowListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + vaultName: string, + nextLink: string, + options?: WorkflowListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WorkflowModel + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName, + Parameters.jobName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WorkflowModelCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.continuationToken + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WorkflowModelCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.vaultName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/workflowOperationStatus.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/workflowOperationStatus.ts new file mode 100644 index 000000000000..a72b50d555af --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operations/workflowOperationStatus.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. + */ + +import { WorkflowOperationStatus } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureSiteRecoveryManagementServiceAPI } from "../azureSiteRecoveryManagementServiceAPI"; +import { + WorkflowOperationStatusGetOptionalParams, + WorkflowOperationStatusGetResponse +} from "../models"; + +/** Class containing WorkflowOperationStatus operations. */ +export class WorkflowOperationStatusImpl implements WorkflowOperationStatus { + private readonly client: AzureSiteRecoveryManagementServiceAPI; + + /** + * Initialize a new instance of the class WorkflowOperationStatus class. + * @param client Reference to the service client + */ + constructor(client: AzureSiteRecoveryManagementServiceAPI) { + this.client = client; + } + + /** + * Tracks the results of an asynchronous operation on the job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param jobName The job (workflow) name. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vaultName: string, + jobName: string, + operationId: string, + options?: WorkflowOperationStatusGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, jobName, operationId, options }, + getOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName}/operations/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.operationId, + Parameters.vaultName, + Parameters.jobName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/dra.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/dra.ts new file mode 100644 index 000000000000..95bbdbc9bcb5 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/dra.ts @@ -0,0 +1,105 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + DraModel, + DraListOptionalParams, + DraGetOptionalParams, + DraGetResponse, + DraCreateOptionalParams, + DraCreateResponse, + DraDeleteOptionalParams, + DraDeleteResponse +} from "../models"; + +/// +/** Interface representing a Dra. */ +export interface Dra { + /** + * Gets the list of fabric agents in the given fabric. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + fabricName: string, + options?: DraListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the details of the fabric agent. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param fabricAgentName The fabric agent (Dra) name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + fabricName: string, + fabricAgentName: string, + options?: DraGetOptionalParams + ): Promise; + /** + * Creates the fabric agent. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param fabricAgentName The fabric agent (Dra) name. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + fabricName: string, + fabricAgentName: string, + options?: DraCreateOptionalParams + ): Promise< + SimplePollerLike, DraCreateResponse> + >; + /** + * Creates the fabric agent. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param fabricAgentName The fabric agent (Dra) name. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + fabricName: string, + fabricAgentName: string, + options?: DraCreateOptionalParams + ): Promise; + /** + * Deletes the fabric agent. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param fabricAgentName The fabric agent (Dra) name. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + fabricName: string, + fabricAgentName: string, + options?: DraDeleteOptionalParams + ): Promise< + SimplePollerLike, DraDeleteResponse> + >; + /** + * Deletes the fabric agent. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param fabricAgentName The fabric agent (Dra) name. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + fabricName: string, + fabricAgentName: string, + options?: DraDeleteOptionalParams + ): Promise; +} diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/draOperationStatus.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/draOperationStatus.ts new file mode 100644 index 000000000000..92aa0400f6e5 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/draOperationStatus.ts @@ -0,0 +1,31 @@ +/* + * 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 { + DraOperationStatusGetOptionalParams, + DraOperationStatusGetResponse +} from "../models"; + +/** Interface representing a DraOperationStatus. */ +export interface DraOperationStatus { + /** + * Tracks the results of an asynchronous operation on the fabric agent. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param fabricAgentName The fabric agent (Dra) name. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + fabricName: string, + fabricAgentName: string, + operationId: string, + options?: DraOperationStatusGetOptionalParams + ): Promise; +} diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/emailConfiguration.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/emailConfiguration.ts new file mode 100644 index 000000000000..4aa5210bf59a --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/emailConfiguration.ts @@ -0,0 +1,59 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + EmailConfigurationModel, + EmailConfigurationListOptionalParams, + EmailConfigurationGetOptionalParams, + EmailConfigurationGetResponse, + EmailConfigurationCreateOptionalParams, + EmailConfigurationCreateResponse +} from "../models"; + +/// +/** Interface representing a EmailConfiguration. */ +export interface EmailConfiguration { + /** + * Gets the list of alert configuration settings for the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + vaultName: string, + options?: EmailConfigurationListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the details of the alert configuration setting. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param emailConfigurationName The email configuration name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vaultName: string, + emailConfigurationName: string, + options?: EmailConfigurationGetOptionalParams + ): Promise; + /** + * Creates an alert configuration setting for the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param emailConfigurationName The email configuration name. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + vaultName: string, + emailConfigurationName: string, + options?: EmailConfigurationCreateOptionalParams + ): Promise; +} diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/event.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/event.ts new file mode 100644 index 000000000000..8c68f53eba03 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/event.ts @@ -0,0 +1,44 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + EventModel, + EventListOptionalParams, + EventGetOptionalParams, + EventGetResponse +} from "../models"; + +/// +/** Interface representing a Event. */ +export interface Event { + /** + * Gets the list of events in the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + vaultName: string, + options?: EventListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the details of the event. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param eventName The event name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vaultName: string, + eventName: string, + options?: EventGetOptionalParams + ): Promise; +} diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/fabric.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/fabric.ts new file mode 100644 index 000000000000..70ea9147b988 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/fabric.ts @@ -0,0 +1,127 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + FabricModel, + FabricListBySubscriptionOptionalParams, + FabricListOptionalParams, + FabricGetOptionalParams, + FabricGetResponse, + FabricCreateOptionalParams, + FabricCreateResponse, + FabricUpdateOptionalParams, + FabricUpdateResponse, + FabricDeleteOptionalParams, + FabricDeleteResponse +} from "../models"; + +/// +/** Interface representing a Fabric. */ +export interface Fabric { + /** + * Gets the list of fabrics in the given subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: FabricListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the list of fabrics in the given subscription and resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + options?: FabricListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the details of the fabric. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + fabricName: string, + options?: FabricGetOptionalParams + ): Promise; + /** + * Creates the fabric. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + fabricName: string, + options?: FabricCreateOptionalParams + ): Promise< + SimplePollerLike, FabricCreateResponse> + >; + /** + * Creates the fabric. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + fabricName: string, + options?: FabricCreateOptionalParams + ): Promise; + /** + * Performs update on the fabric. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + fabricName: string, + options?: FabricUpdateOptionalParams + ): Promise< + SimplePollerLike, FabricUpdateResponse> + >; + /** + * Performs update on the fabric. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + fabricName: string, + options?: FabricUpdateOptionalParams + ): Promise; + /** + * Removes the fabric. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + fabricName: string, + options?: FabricDeleteOptionalParams + ): Promise< + SimplePollerLike, FabricDeleteResponse> + >; + /** + * Removes the fabric. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + fabricName: string, + options?: FabricDeleteOptionalParams + ): Promise; +} diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/fabricOperationsStatus.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/fabricOperationsStatus.ts new file mode 100644 index 000000000000..5c8a41cd44a1 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/fabricOperationsStatus.ts @@ -0,0 +1,29 @@ +/* + * 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 { + FabricOperationsStatusGetOptionalParams, + FabricOperationsStatusGetResponse +} from "../models"; + +/** Interface representing a FabricOperationsStatus. */ +export interface FabricOperationsStatus { + /** + * Tracks the results of an asynchronous operation on the fabric. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The fabric name. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + fabricName: string, + operationId: string, + options?: FabricOperationsStatusGetOptionalParams + ): Promise; +} diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/index.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/index.ts new file mode 100644 index 000000000000..d9ab1044f87d --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/index.ts @@ -0,0 +1,26 @@ +/* + * 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 "./dra"; +export * from "./draOperationStatus"; +export * from "./emailConfiguration"; +export * from "./event"; +export * from "./fabric"; +export * from "./fabricOperationsStatus"; +export * from "./policy"; +export * from "./policyOperationStatus"; +export * from "./protectedItem"; +export * from "./protectedItemOperationStatus"; +export * from "./recoveryPoints"; +export * from "./replicationExtension"; +export * from "./replicationExtensionOperationStatus"; +export * from "./operations"; +export * from "./vault"; +export * from "./vaultOperationStatus"; +export * from "./workflow"; +export * from "./workflowOperationStatus"; diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/operations.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/operations.ts new file mode 100644 index 000000000000..150691833d3c --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/operations.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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Operation, OperationsListOptionalParams } from "../models"; + +/// +/** Interface representing a Operations. */ +export interface Operations { + /** + * Gets the operations. + * @param options The options parameters. + */ + list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/policy.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/policy.ts new file mode 100644 index 000000000000..74290984c0bc --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/policy.ts @@ -0,0 +1,105 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + PolicyModel, + PolicyListOptionalParams, + PolicyGetOptionalParams, + PolicyGetResponse, + PolicyCreateOptionalParams, + PolicyCreateResponse, + PolicyDeleteOptionalParams, + PolicyDeleteResponse +} from "../models"; + +/// +/** Interface representing a Policy. */ +export interface Policy { + /** + * Gets the list of policies in the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + vaultName: string, + options?: PolicyListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the details of the policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param policyName The policy name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vaultName: string, + policyName: string, + options?: PolicyGetOptionalParams + ): Promise; + /** + * Creates the policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param policyName The policy name. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + vaultName: string, + policyName: string, + options?: PolicyCreateOptionalParams + ): Promise< + SimplePollerLike, PolicyCreateResponse> + >; + /** + * Creates the policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param policyName The policy name. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + vaultName: string, + policyName: string, + options?: PolicyCreateOptionalParams + ): Promise; + /** + * Removes the policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param policyName The policy name. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + vaultName: string, + policyName: string, + options?: PolicyDeleteOptionalParams + ): Promise< + SimplePollerLike, PolicyDeleteResponse> + >; + /** + * Removes the policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param policyName The policy name. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + vaultName: string, + policyName: string, + options?: PolicyDeleteOptionalParams + ): Promise; +} diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/policyOperationStatus.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/policyOperationStatus.ts new file mode 100644 index 000000000000..1e976cd100ca --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/policyOperationStatus.ts @@ -0,0 +1,31 @@ +/* + * 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 { + PolicyOperationStatusGetOptionalParams, + PolicyOperationStatusGetResponse +} from "../models"; + +/** Interface representing a PolicyOperationStatus. */ +export interface PolicyOperationStatus { + /** + * Tracks the results of an asynchronous operation on the policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param policyName The policy name. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vaultName: string, + policyName: string, + operationId: string, + options?: PolicyOperationStatusGetOptionalParams + ): Promise; +} diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/protectedItem.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/protectedItem.ts new file mode 100644 index 000000000000..a66caf3064ba --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/protectedItem.ts @@ -0,0 +1,144 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + ProtectedItemModel, + ProtectedItemListOptionalParams, + ProtectedItemGetOptionalParams, + ProtectedItemGetResponse, + ProtectedItemCreateOptionalParams, + ProtectedItemCreateResponse, + ProtectedItemDeleteOptionalParams, + ProtectedItemDeleteResponse, + ProtectedItemPlannedFailoverOptionalParams, + ProtectedItemPlannedFailoverResponse +} from "../models"; + +/// +/** Interface representing a ProtectedItem. */ +export interface ProtectedItem { + /** + * Gets the list of protected items in the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + vaultName: string, + options?: ProtectedItemListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the details of the protected item. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param protectedItemName The protected item name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vaultName: string, + protectedItemName: string, + options?: ProtectedItemGetOptionalParams + ): Promise; + /** + * Creates the protected item. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param protectedItemName The protected item name. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + vaultName: string, + protectedItemName: string, + options?: ProtectedItemCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ProtectedItemCreateResponse + > + >; + /** + * Creates the protected item. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param protectedItemName The protected item name. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + vaultName: string, + protectedItemName: string, + options?: ProtectedItemCreateOptionalParams + ): Promise; + /** + * Removes the protected item. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param protectedItemName The protected item name. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + vaultName: string, + protectedItemName: string, + options?: ProtectedItemDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ProtectedItemDeleteResponse + > + >; + /** + * Removes the protected item. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param protectedItemName The protected item name. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + vaultName: string, + protectedItemName: string, + options?: ProtectedItemDeleteOptionalParams + ): Promise; + /** + * Performs the planned failover on the protected item. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param protectedItemName The protected item name. + * @param options The options parameters. + */ + beginPlannedFailover( + resourceGroupName: string, + vaultName: string, + protectedItemName: string, + options?: ProtectedItemPlannedFailoverOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ProtectedItemPlannedFailoverResponse + > + >; + /** + * Performs the planned failover on the protected item. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param protectedItemName The protected item name. + * @param options The options parameters. + */ + beginPlannedFailoverAndWait( + resourceGroupName: string, + vaultName: string, + protectedItemName: string, + options?: ProtectedItemPlannedFailoverOptionalParams + ): Promise; +} diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/protectedItemOperationStatus.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/protectedItemOperationStatus.ts new file mode 100644 index 000000000000..ff1e7d3238f3 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/protectedItemOperationStatus.ts @@ -0,0 +1,31 @@ +/* + * 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 { + ProtectedItemOperationStatusGetOptionalParams, + ProtectedItemOperationStatusGetResponse +} from "../models"; + +/** Interface representing a ProtectedItemOperationStatus. */ +export interface ProtectedItemOperationStatus { + /** + * Tracks the results of an asynchronous operation on the protected item. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param protectedItemName The protected item name. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vaultName: string, + protectedItemName: string, + operationId: string, + options?: ProtectedItemOperationStatusGetOptionalParams + ): Promise; +} diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/recoveryPoints.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/recoveryPoints.ts new file mode 100644 index 000000000000..5d987cca20c3 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/recoveryPoints.ts @@ -0,0 +1,48 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + RecoveryPointModel, + RecoveryPointsListOptionalParams, + RecoveryPointsGetOptionalParams, + RecoveryPointsGetResponse +} from "../models"; + +/// +/** Interface representing a RecoveryPoints. */ +export interface RecoveryPoints { + /** + * Gets the list of recovery points of the given protected item. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param protectedItemName The protected item name. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + vaultName: string, + protectedItemName: string, + options?: RecoveryPointsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the details of the recovery point of a protected item. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param protectedItemName The protected item name. + * @param recoveryPointName The recovery point name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vaultName: string, + protectedItemName: string, + recoveryPointName: string, + options?: RecoveryPointsGetOptionalParams + ): Promise; +} diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/replicationExtension.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/replicationExtension.ts new file mode 100644 index 000000000000..4ed51a2e41d3 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/replicationExtension.ts @@ -0,0 +1,111 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + ReplicationExtensionModel, + ReplicationExtensionListOptionalParams, + ReplicationExtensionGetOptionalParams, + ReplicationExtensionGetResponse, + ReplicationExtensionCreateOptionalParams, + ReplicationExtensionCreateResponse, + ReplicationExtensionDeleteOptionalParams, + ReplicationExtensionDeleteResponse +} from "../models"; + +/// +/** Interface representing a ReplicationExtension. */ +export interface ReplicationExtension { + /** + * Gets the list of replication extensions in the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + vaultName: string, + options?: ReplicationExtensionListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the details of the replication extension. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param replicationExtensionName The replication extension name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vaultName: string, + replicationExtensionName: string, + options?: ReplicationExtensionGetOptionalParams + ): Promise; + /** + * Creates the replication extension in the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param replicationExtensionName The replication extension name. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + vaultName: string, + replicationExtensionName: string, + options?: ReplicationExtensionCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ReplicationExtensionCreateResponse + > + >; + /** + * Creates the replication extension in the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param replicationExtensionName The replication extension name. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + vaultName: string, + replicationExtensionName: string, + options?: ReplicationExtensionCreateOptionalParams + ): Promise; + /** + * Deletes the replication extension in the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param replicationExtensionName The replication extension name. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + vaultName: string, + replicationExtensionName: string, + options?: ReplicationExtensionDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ReplicationExtensionDeleteResponse + > + >; + /** + * Deletes the replication extension in the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param replicationExtensionName The replication extension name. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + vaultName: string, + replicationExtensionName: string, + options?: ReplicationExtensionDeleteOptionalParams + ): Promise; +} diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/replicationExtensionOperationStatus.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/replicationExtensionOperationStatus.ts new file mode 100644 index 000000000000..9944a94f1663 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/replicationExtensionOperationStatus.ts @@ -0,0 +1,31 @@ +/* + * 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 { + ReplicationExtensionOperationStatusGetOptionalParams, + ReplicationExtensionOperationStatusGetResponse +} from "../models"; + +/** Interface representing a ReplicationExtensionOperationStatus. */ +export interface ReplicationExtensionOperationStatus { + /** + * Tracks the results of an asynchronous operation on the replication extension. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param replicationExtensionName The replication extension name. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vaultName: string, + replicationExtensionName: string, + operationId: string, + options?: ReplicationExtensionOperationStatusGetOptionalParams + ): Promise; +} diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/vault.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/vault.ts new file mode 100644 index 000000000000..a77c4090c99d --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/vault.ts @@ -0,0 +1,127 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + VaultModel, + VaultListBySubscriptionOptionalParams, + VaultListOptionalParams, + VaultGetOptionalParams, + VaultGetResponse, + VaultCreateOptionalParams, + VaultCreateResponse, + VaultUpdateOptionalParams, + VaultUpdateResponse, + VaultDeleteOptionalParams, + VaultDeleteResponse +} from "../models"; + +/// +/** Interface representing a Vault. */ +export interface Vault { + /** + * Gets the list of vaults in the given subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: VaultListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the list of vaults in the given subscription and resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + options?: VaultListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the details of the vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vaultName: string, + options?: VaultGetOptionalParams + ): Promise; + /** + * Creates the vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + vaultName: string, + options?: VaultCreateOptionalParams + ): Promise< + SimplePollerLike, VaultCreateResponse> + >; + /** + * Creates the vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + vaultName: string, + options?: VaultCreateOptionalParams + ): Promise; + /** + * Performs update on the vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + vaultName: string, + options?: VaultUpdateOptionalParams + ): Promise< + SimplePollerLike, VaultUpdateResponse> + >; + /** + * Performs update on the vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + vaultName: string, + options?: VaultUpdateOptionalParams + ): Promise; + /** + * Removes the vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + vaultName: string, + options?: VaultDeleteOptionalParams + ): Promise< + SimplePollerLike, VaultDeleteResponse> + >; + /** + * Removes the vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + vaultName: string, + options?: VaultDeleteOptionalParams + ): Promise; +} diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/vaultOperationStatus.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/vaultOperationStatus.ts new file mode 100644 index 000000000000..e54183141810 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/vaultOperationStatus.ts @@ -0,0 +1,29 @@ +/* + * 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 { + VaultOperationStatusGetOptionalParams, + VaultOperationStatusGetResponse +} from "../models"; + +/** Interface representing a VaultOperationStatus. */ +export interface VaultOperationStatus { + /** + * Tracks the results of an asynchronous operation on the vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vaultName: string, + operationId: string, + options?: VaultOperationStatusGetOptionalParams + ): Promise; +} diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/workflow.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/workflow.ts new file mode 100644 index 000000000000..d325f436f268 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/workflow.ts @@ -0,0 +1,44 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + WorkflowModel, + WorkflowListOptionalParams, + WorkflowGetOptionalParams, + WorkflowGetResponse +} from "../models"; + +/// +/** Interface representing a Workflow. */ +export interface Workflow { + /** + * Gets the list of jobs in the given vault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + vaultName: string, + options?: WorkflowListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the details of the job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param jobName The job (workflow) name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vaultName: string, + jobName: string, + options?: WorkflowGetOptionalParams + ): Promise; +} diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/workflowOperationStatus.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/workflowOperationStatus.ts new file mode 100644 index 000000000000..1a62467d32ad --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/operationsInterfaces/workflowOperationStatus.ts @@ -0,0 +1,31 @@ +/* + * 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 { + WorkflowOperationStatusGetOptionalParams, + WorkflowOperationStatusGetResponse +} from "../models"; + +/** Interface representing a WorkflowOperationStatus. */ +export interface WorkflowOperationStatus { + /** + * Tracks the results of an asynchronous operation on the job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The vault name. + * @param jobName The job (workflow) name. + * @param operationId The ID of an ongoing async operation. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vaultName: string, + jobName: string, + operationId: string, + options?: WorkflowOperationStatusGetOptionalParams + ): Promise; +} diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/pagingHelper.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/pagingHelper.ts new file mode 100644 index 000000000000..269a2b9814b5 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/src/pagingHelper.ts @@ -0,0 +1,39 @@ +/* + * 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 interface PageInfo { + continuationToken?: string; +} + +const pageMap = new WeakMap(); + +/** + * Given the last `.value` produced by the `byPage` iterator, + * returns a continuation token that can be used to begin paging from + * that point later. + * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. + * @returns The continuation token that can be passed into byPage() during future calls. + */ +export function getContinuationToken(page: unknown): string | undefined { + if (typeof page !== "object" || page === null) { + return undefined; + } + return pageMap.get(page)?.continuationToken; +} + +export function setContinuationToken( + page: unknown, + continuationToken: string | undefined +): void { + if (typeof page !== "object" || page === null || !continuationToken) { + return; + } + const pageInfo = pageMap.get(page) ?? {}; + pageInfo.continuationToken = continuationToken; + pageMap.set(page, pageInfo); +} diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/test/sampleTest.ts b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/tsconfig.json b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/tsconfig.json new file mode 100644 index 000000000000..3e6ae96443f3 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "module": "es6", + "moduleResolution": "node", + "strict": true, + "target": "es6", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": [ + "es6", + "dom" + ], + "declaration": true, + "outDir": "./dist-esm", + "importHelpers": true + }, + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/sdk/recoveryservicesdatareplication/ci.mgmt.yml b/sdk/recoveryservicesdatareplication/ci.mgmt.yml new file mode 100644 index 000000000000..393ec8ef9f60 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/ci.mgmt.yml @@ -0,0 +1,38 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - feature/* + - release/* + - hotfix/* + exclude: + - feature/v4 + paths: + include: + - sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication + - sdk/recoveryservicesdatareplication/ci.mgmt.yml + +pr: + branches: + include: + - main + - feature/* + - release/* + - hotfix/* + exclude: + - feature/v4 + paths: + include: + - sdk/recoveryservicesdatareplication/arm-recoveryservicesdatareplication + - sdk/recoveryservicesdatareplication/ci.mgmt.yml + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: recoveryservicesdatareplication + Artifacts: + - name: azure-arm-recoveryservicesdatareplication + safeName: azurearmrecoveryservicesdatareplication + \ No newline at end of file