From f3694c08314083c5a667daf241cee12bc3ec4d0b Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 18 Oct 2023 19:40:15 +0000 Subject: [PATCH] CodeGen from PR 26109 in Azure/azure-rest-api-specs Merge 980fb6fb08b4d5f6e9fbb98fce0bfa51df3583d9 into 4c38cb9966cd6afbb03c7e9b14997720a728baee --- common/config/rush/pnpm-lock.yaml | 178 +- sdk/scvmm/arm-scvmm/CHANGELOG.md | 36 +- sdk/scvmm/arm-scvmm/README.md | 2 +- sdk/scvmm/arm-scvmm/_meta.json | 10 +- sdk/scvmm/arm-scvmm/package.json | 43 +- sdk/scvmm/arm-scvmm/review/arm-scvmm.api.md | 812 ++++-- sdk/scvmm/arm-scvmm/rollup.config.js | 122 + sdk/scvmm/arm-scvmm/src/lroImpl.ts | 54 +- sdk/scvmm/arm-scvmm/src/models/index.ts | 1759 +++++++----- sdk/scvmm/arm-scvmm/src/models/mappers.ts | 2413 ++++++++++------- sdk/scvmm/arm-scvmm/src/models/parameters.ts | 153 +- .../src/operations/availabilitySets.ts | 179 +- sdk/scvmm/arm-scvmm/src/operations/clouds.ts | 174 +- sdk/scvmm/arm-scvmm/src/operations/index.ts | 4 +- .../src/operations/inventoryItems.ts | 47 +- .../arm-scvmm/src/operations/operations.ts | 12 +- .../src/operations/vMInstanceGuestAgents.ts | 357 +++ ...alMachineInstanceHybridIdentityMetadata.ts | 204 ++ .../src/operations/virtualMachineInstances.ts | 1237 +++++++++ .../src/operations/virtualMachineTemplates.ts | 129 +- .../src/operations/virtualMachines.ts | 1354 --------- .../src/operations/virtualNetworks.ts | 127 +- .../arm-scvmm/src/operations/vmmServers.ts | 131 +- .../operationsInterfaces/availabilitySets.ts | 64 +- .../src/operationsInterfaces/clouds.ts | 59 +- .../src/operationsInterfaces/index.ts | 4 +- .../operationsInterfaces/inventoryItems.ts | 20 +- .../src/operationsInterfaces/operations.ts | 7 +- .../vMInstanceGuestAgents.ts | 79 + ...alMachineInstanceHybridIdentityMetadata.ts | 40 + .../virtualMachineInstances.ts | 286 ++ .../virtualMachineTemplates.ts | 36 +- .../operationsInterfaces/virtualMachines.ts | 277 -- .../operationsInterfaces/virtualNetworks.ts | 36 +- .../src/operationsInterfaces/vmmServers.ts | 40 +- sdk/scvmm/arm-scvmm/src/scvmm.ts | 49 +- sdk/scvmm/arm-scvmm/tsconfig.json | 10 +- 37 files changed, 6365 insertions(+), 4179 deletions(-) create mode 100644 sdk/scvmm/arm-scvmm/rollup.config.js create mode 100644 sdk/scvmm/arm-scvmm/src/operations/vMInstanceGuestAgents.ts create mode 100644 sdk/scvmm/arm-scvmm/src/operations/virtualMachineInstanceHybridIdentityMetadata.ts create mode 100644 sdk/scvmm/arm-scvmm/src/operations/virtualMachineInstances.ts delete mode 100644 sdk/scvmm/arm-scvmm/src/operations/virtualMachines.ts create mode 100644 sdk/scvmm/arm-scvmm/src/operationsInterfaces/vMInstanceGuestAgents.ts create mode 100644 sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualMachineInstanceHybridIdentityMetadata.ts create mode 100644 sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualMachineInstances.ts delete mode 100644 sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualMachines.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 84379969daa2..e732e3e3ac49 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2252,6 +2252,24 @@ packages: - supports-color dev: false + /@rollup/plugin-commonjs@24.1.0(rollup@2.79.1): + resolution: {integrity: sha512-eSL45hjhCWI0jCCXcNtLVqM5N1JlBGvlFfY0m6oOYnLCJ6N0qEXoZql4sY2MOUArzhH4SA/qBpTxvvZp2Sc+DQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.68.0||^3.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.0.5(rollup@2.79.1) + commondir: 1.0.1 + estree-walker: 2.0.2 + glob: 8.1.0 + is-reference: 1.2.1 + magic-string: 0.27.0 + rollup: 2.79.1 + dev: false + /@rollup/plugin-commonjs@25.0.7(rollup@3.29.4): resolution: {integrity: sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==} engines: {node: '>=14.0.0'} @@ -2285,6 +2303,19 @@ packages: rollup: 3.29.4 dev: false + /@rollup/plugin-json@6.0.1(rollup@2.79.1): + resolution: {integrity: sha512-RgVfl5hWMkxN1h/uZj8FVESvPuBJ/uf6ly6GTj0GONnkfoBN5KC0MSz+PN2OLDgYXMhtG0mWpTrkiOjoxAIevw==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.0.5(rollup@2.79.1) + rollup: 2.79.1 + dev: false + /@rollup/plugin-json@6.0.1(rollup@3.29.4): resolution: {integrity: sha512-RgVfl5hWMkxN1h/uZj8FVESvPuBJ/uf6ly6GTj0GONnkfoBN5KC0MSz+PN2OLDgYXMhtG0mWpTrkiOjoxAIevw==} engines: {node: '>=14.0.0'} @@ -2298,6 +2329,20 @@ packages: rollup: 3.29.4 dev: false + /@rollup/plugin-multi-entry@6.0.1(rollup@2.79.1): + resolution: {integrity: sha512-AXm6toPyTSfbYZWghQGbom1Uh7dHXlrGa+HoiYNhQtDUE3Q7LqoUYdVQx9E1579QWS1uOiu+cZRSE4okO7ySgw==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/plugin-virtual': 3.0.2(rollup@2.79.1) + matched: 5.0.1 + rollup: 2.79.1 + dev: false + /@rollup/plugin-multi-entry@6.0.1(rollup@3.29.4): resolution: {integrity: sha512-AXm6toPyTSfbYZWghQGbom1Uh7dHXlrGa+HoiYNhQtDUE3Q7LqoUYdVQx9E1579QWS1uOiu+cZRSE4okO7ySgw==} engines: {node: '>=14.0.0'} @@ -2312,6 +2357,21 @@ packages: rollup: 3.29.4 dev: false + /@rollup/plugin-node-resolve@13.3.0(rollup@2.79.1): + resolution: {integrity: sha512-Lus8rbUo1eEcnS4yTFKLZrVumLPY+YayBdWXgFSHYhTT2iJbMhoaaBL3xl5NCdeRytErGr8tZ0L71BMRmnlwSw==} + engines: {node: '>= 10.0.0'} + peerDependencies: + rollup: ^2.42.0 + dependencies: + '@rollup/pluginutils': 3.1.0(rollup@2.79.1) + '@types/resolve': 1.17.1 + deepmerge: 4.3.1 + is-builtin-module: 3.2.1 + is-module: 1.0.0 + resolve: 1.22.8 + rollup: 2.79.1 + dev: false + /@rollup/plugin-node-resolve@15.2.3(rollup@3.29.4): resolution: {integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==} engines: {node: '>=14.0.0'} @@ -2330,6 +2390,18 @@ packages: rollup: 3.29.4 dev: false + /@rollup/plugin-virtual@3.0.2(rollup@2.79.1): + resolution: {integrity: sha512-10monEYsBp3scM4/ND4LNH5Rxvh3e/cVeL3jWTgZ2SrQ+BmUoQcopVQvnaMcOnykb1VkxUFuDAN+0FnpTFRy2A==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + rollup: 2.79.1 + dev: false + /@rollup/plugin-virtual@3.0.2(rollup@3.29.4): resolution: {integrity: sha512-10monEYsBp3scM4/ND4LNH5Rxvh3e/cVeL3jWTgZ2SrQ+BmUoQcopVQvnaMcOnykb1VkxUFuDAN+0FnpTFRy2A==} engines: {node: '>=14.0.0'} @@ -2342,6 +2414,33 @@ packages: rollup: 3.29.4 dev: false + /@rollup/pluginutils@3.1.0(rollup@2.79.1): + resolution: {integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==} + engines: {node: '>= 8.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0 + dependencies: + '@types/estree': 0.0.39 + estree-walker: 1.0.1 + picomatch: 2.3.1 + rollup: 2.79.1 + dev: false + + /@rollup/pluginutils@5.0.5(rollup@2.79.1): + resolution: {integrity: sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@types/estree': 1.0.3 + estree-walker: 2.0.2 + picomatch: 2.3.1 + rollup: 2.79.1 + dev: false + /@rollup/pluginutils@5.0.5(rollup@3.29.4): resolution: {integrity: sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==} engines: {node: '>=14.0.0'} @@ -2527,6 +2626,10 @@ packages: '@types/json-schema': 7.0.13 dev: false + /@types/estree@0.0.39: + resolution: {integrity: sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==} + dev: false + /@types/estree@1.0.3: resolution: {integrity: sha512-CS2rOaoQ/eAgAfcTfq6amKG7bsN+EMcgGY4FAFQdvSj2y1ixvOZTUA9mOtCai7E1SYu283XNw7urKK30nP3wkQ==} dev: false @@ -2698,6 +2801,12 @@ packages: resolution: {integrity: sha512-xrO9OoVPqFuYyR/loIHjnbvvyRZREYKLjxV4+dY6v3FQR3stQ9ZxIGkaclF7YhI9hfjpuTbu14hZEy94qKLtOA==} dev: false + /@types/resolve@1.17.1: + resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} + dependencies: + '@types/node': 16.18.58 + dev: false + /@types/resolve@1.20.2: resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} dev: false @@ -3192,6 +3301,12 @@ packages: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} dev: false + /atob@2.1.2: + resolution: {integrity: sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==} + engines: {node: '>= 4.5.0'} + hasBin: true + dev: false + /autorest@3.6.3: resolution: {integrity: sha512-j/Axwk9bniifTNtBLYVxfQZGQIGPKljFaCQCBWOiybVar2j3tkHP1btiC4a/t9pAJXY6IaFgWctoPM3G/Puhyg==} engines: {node: '>=12.0.0'} @@ -3846,6 +3961,11 @@ packages: engines: {node: '>=10'} dev: false + /decode-uri-component@0.2.2: + resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==} + engines: {node: '>=0.10'} + dev: false + /decompress-response@6.0.0: resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} engines: {node: '>=10'} @@ -4056,7 +4176,7 @@ packages: dependencies: semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.3.0-dev.20231017 + typescript: 5.3.0-dev.20231018 dev: false /eastasianwidth@0.2.0: @@ -4500,6 +4620,10 @@ packages: engines: {node: '>=4.0'} dev: false + /estree-walker@1.0.1: + resolution: {integrity: sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==} + dev: false + /estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} dev: false @@ -7692,6 +7816,22 @@ packages: rollup: 3.29.4 dev: false + /rollup-plugin-sourcemaps@0.6.3(@types/node@16.18.58)(rollup@2.79.1): + resolution: {integrity: sha512-paFu+nT1xvuO1tPFYXGe+XnQvg4Hjqv/eIhG8i5EspfYYPBKL57X7iVbfv55aNVASg3dzWvES9dmWsL2KhfByw==} + engines: {node: '>=10.0.0'} + peerDependencies: + '@types/node': '>=10.0.0' + rollup: '>=0.31.2' + peerDependenciesMeta: + '@types/node': + optional: true + dependencies: + '@rollup/pluginutils': 3.1.0(rollup@2.79.1) + '@types/node': 16.18.58 + rollup: 2.79.1 + source-map-resolve: 0.6.0 + dev: false + /rollup-plugin-visualizer@5.9.2(rollup@3.29.4): resolution: {integrity: sha512-waHktD5mlWrYFrhOLbti4YgQCn1uR24nYsNuXxg7LkPH8KdTXVWR9DNY1WU0QqokyMixVXJS4J04HNrVTMP01A==} engines: {node: '>=14'} @@ -7709,6 +7849,14 @@ packages: yargs: 17.7.2 dev: false + /rollup@2.79.1: + resolution: {integrity: sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==} + engines: {node: '>=10.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.3 + dev: false + /rollup@3.29.4: resolution: {integrity: sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} @@ -7982,6 +8130,14 @@ packages: - utf-8-validate dev: false + /source-map-resolve@0.6.0: + resolution: {integrity: sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==} + deprecated: See https://github.com/lydell/source-map-resolve#deprecated + dependencies: + atob: 2.1.2 + decode-uri-component: 0.2.2 + dev: false + /source-map-support@0.5.21: resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} dependencies: @@ -8535,8 +8691,8 @@ packages: hasBin: true dev: false - /typescript@5.3.0-dev.20231017: - resolution: {integrity: sha512-Gb9CxdHEnJBcghPIdgmYT+j30pAGX44Uvwc22Z9WoWMollP+5jf6VqUdmiF+PXjarjFWuo6HbQAnWoH9zWQwdQ==} + /typescript@5.3.0-dev.20231018: + resolution: {integrity: sha512-qBPaVi+ntB9Ys4T3uP1ZYCtxFWIV/1ieooBDhFEd8nw4IqAoB/Us7XobF3xb756bnX8cS/zIt9fgukde4MG4bA==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -13869,19 +14025,27 @@ packages: dev: false file:projects/arm-scvmm.tgz: - resolution: {integrity: sha512-KqgyEky72HZFbipKsBtEPRDBl77nuJuSPs6ZcGtAKGF2E6UXJEaot5egy/1+VnXSrjsX5AoMba83wnVjxwkAow==, tarball: file:projects/arm-scvmm.tgz} + resolution: {integrity: sha512-7U7jOTYPpfwtyTDqSMGZ9XY/TcgdEL2kTc+l6b7tkrKPTvlMNoFg61Gh2o8PGm06Wd+foc20/Nbcg6zFs2aoNg==, tarball: file:projects/arm-scvmm.tgz} name: '@rush-temp/arm-scvmm' version: 0.0.0 dependencies: '@microsoft/api-extractor': 7.38.0(@types/node@16.18.58) + '@rollup/plugin-commonjs': 24.1.0(rollup@2.79.1) + '@rollup/plugin-json': 6.0.1(rollup@2.79.1) + '@rollup/plugin-multi-entry': 6.0.1(rollup@2.79.1) + '@rollup/plugin-node-resolve': 13.3.0(rollup@2.79.1) '@types/chai': 4.3.9 + '@types/mocha': 10.0.2 '@types/node': 16.18.58 chai: 4.3.10 cross-env: 7.0.3 - dotenv: 8.6.0 - mkdirp: 1.0.4 + dotenv: 16.3.1 + esm: 3.2.25 + mkdirp: 2.1.6 mocha: 10.2.0 - rimraf: 3.0.2 + rimraf: 5.0.5 + rollup: 2.79.1 + rollup-plugin-sourcemaps: 0.6.3(@types/node@16.18.58)(rollup@2.79.1) ts-node: 10.9.1(@types/node@16.18.58)(typescript@5.0.4) tslib: 2.6.2 typescript: 5.0.4 diff --git a/sdk/scvmm/arm-scvmm/CHANGELOG.md b/sdk/scvmm/arm-scvmm/CHANGELOG.md index be26e351a81f..90f231d1021d 100644 --- a/sdk/scvmm/arm-scvmm/CHANGELOG.md +++ b/sdk/scvmm/arm-scvmm/CHANGELOG.md @@ -1,37 +1,5 @@ # Release History - -## 1.0.0-beta.4 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 1.0.0-beta.3 (2023-02-01) - -**Features** - - - Exposes `getContinuationToken` helper function to extract continuation token - -**Bugs Fixed** - - - A series of small bug fixs relevant to authentication and apiVersion policy - -## 1.0.0-beta.2 (2022-07-14) - -**Features** - - - Added Interface CloudInventoryItem - - Added Interface InventoryItem - - Added Interface ProxyResource - - Added Interface VirtualMachineInventoryItem - - Added Interface VirtualMachineTemplateInventoryItem - - Added Interface VirtualNetworkInventoryItem - -## 1.0.0-beta.1 (2022-04-27) +## 1.0.0 (2023-10-18) -The package of @azure/arm-scvmm is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ). +The package of @azure/arm-scvmm 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/scvmm/arm-scvmm/README.md b/sdk/scvmm/arm-scvmm/README.md index 13e0ff2843c0..c8d7c0e054c4 100644 --- a/sdk/scvmm/arm-scvmm/README.md +++ b/sdk/scvmm/arm-scvmm/README.md @@ -6,7 +6,7 @@ The Microsoft.ScVmm Rest API spec. [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/scvmm/arm-scvmm) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-scvmm) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-scvmm?view=azure-node-preview) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-scvmm) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/scvmm/arm-scvmm/_meta.json b/sdk/scvmm/arm-scvmm/_meta.json index a8ce742afb9d..b1f2791b450e 100644 --- a/sdk/scvmm/arm-scvmm/_meta.json +++ b/sdk/scvmm/arm-scvmm/_meta.json @@ -1,8 +1,8 @@ { - "commit": "96c6e14d4dfd2aef59a69a43185308567fec8c07", - "readme": "specification\\scvmm\\resource-manager\\readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=F:\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\scvmm\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.7 --generate-sample=true", + "commit": "dcbfbdc745942d2e93bf1bf0bdaae1890e1631cf", + "readme": "specification/scvmm/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/scvmm/resource-manager/readme.md --use=@autorest/typescript@^6.0.11", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.6.0", - "use": "@autorest/typescript@6.0.0-rc.7" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.2", + "use": "@autorest/typescript@^6.0.11" } \ No newline at end of file diff --git a/sdk/scvmm/arm-scvmm/package.json b/sdk/scvmm/arm-scvmm/package.json index 162b36f0d045..cd1f274a9dde 100644 --- a/sdk/scvmm/arm-scvmm/package.json +++ b/sdk/scvmm/arm-scvmm/package.json @@ -3,17 +3,17 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for Scvmm.", - "version": "1.0.0-beta.4", + "version": "1.0.0", "engines": { "node": ">=16.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.4", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.6.1", + "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.8.0", + "@azure/core-rest-pipeline": "^1.12.0", "tslib": "^2.2.0" }, "keywords": [ @@ -29,21 +29,29 @@ "types": "./types/arm-scvmm.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.31.1", - "mkdirp": "^1.0.4", + "@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": "^8.2.0", + "rimraf": "^5.0.0", + "dotenv": "^16.0.0", "@azure/identity": "^3.3.0", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", "mocha": "^10.0.0", + "@types/mocha": "^10.0.0", + "esm": "^3.2.18", "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", "@types/node": "^16.0.0", - "@azure/dev-tool": "^1.0.0", - "ts-node": "^10.0.0" + "ts-node": "^10.0.0", + "@azure/dev-tool": "^1.0.0" }, "repository": { "type": "git", @@ -64,20 +72,21 @@ "src/**/*.ts", "README.md", "LICENSE", + "rollup.config.js", "tsconfig.json", "review/*", "CHANGELOG.md", "types/*" ], "scripts": { - "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && mkdirp ./review && npm run extract-api", + "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", + "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", "build:browser": "echo skipped", "build:test": "echo skipped", @@ -105,13 +114,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/scvmm/arm-scvmm", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-scvmm?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/scvmm/arm-scvmm" +} \ No newline at end of file diff --git a/sdk/scvmm/arm-scvmm/review/arm-scvmm.api.md b/sdk/scvmm/arm-scvmm/review/arm-scvmm.api.md index a14a01ba4da8..7f0e17c539d5 100644 --- a/sdk/scvmm/arm-scvmm/review/arm-scvmm.api.md +++ b/sdk/scvmm/arm-scvmm/review/arm-scvmm.api.md @@ -6,26 +6,21 @@ 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 { PollerLike } from '@azure/core-lro'; -import { PollOperationState } from '@azure/core-lro'; +import { SimplePollerLike } from '@azure/core-lro'; + +// @public +export type ActionType = string; // @public export type AllocationMethod = string; // @public -export interface AvailabilitySet { +export interface AvailabilitySet extends TrackedResource { availabilitySetName?: string; - extendedLocation?: ExtendedLocation; - readonly id?: string; - location?: string; - readonly name?: string; - readonly provisioningState?: string; - readonly systemData?: SystemData; - tags?: { - [propertyName: string]: string; - }; - readonly type?: string; + extendedLocation: ExtendedLocation; + readonly provisioningState?: ProvisioningState; vmmServerId?: string; } @@ -37,19 +32,19 @@ export interface AvailabilitySetListItem { // @public export interface AvailabilitySetListResult { - nextLink?: string; + readonly nextLink?: string; value?: AvailabilitySet[]; } // @public export interface AvailabilitySets { - beginCreateOrUpdate(resourceGroupName: string, availabilitySetName: string, body: AvailabilitySet, options?: AvailabilitySetsCreateOrUpdateOptionalParams): Promise, AvailabilitySetsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, availabilitySetName: string, body: AvailabilitySet, options?: AvailabilitySetsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, availabilitySetName: string, options?: AvailabilitySetsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, availabilitySetName: string, options?: AvailabilitySetsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, availabilitySetName: string, body: ResourcePatch, options?: AvailabilitySetsUpdateOptionalParams): Promise, AvailabilitySetsUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, availabilitySetName: string, body: ResourcePatch, options?: AvailabilitySetsUpdateOptionalParams): Promise; - get(resourceGroupName: string, availabilitySetName: string, options?: AvailabilitySetsGetOptionalParams): Promise; + beginCreateOrUpdate(resourceGroupName: string, availabilitySetResourceName: string, body: AvailabilitySet, options?: AvailabilitySetsCreateOrUpdateOptionalParams): Promise, AvailabilitySetsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, availabilitySetResourceName: string, body: AvailabilitySet, options?: AvailabilitySetsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, availabilitySetResourceName: string, options?: AvailabilitySetsDeleteOptionalParams): Promise, AvailabilitySetsDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, availabilitySetResourceName: string, options?: AvailabilitySetsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, availabilitySetResourceName: string, body: ResourcePatch, options?: AvailabilitySetsUpdateOptionalParams): Promise, AvailabilitySetsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, availabilitySetResourceName: string, body: ResourcePatch, options?: AvailabilitySetsUpdateOptionalParams): Promise; + get(resourceGroupName: string, availabilitySetResourceName: string, options?: AvailabilitySetsGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: AvailabilitySetsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; listBySubscription(options?: AvailabilitySetsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; } @@ -71,15 +66,20 @@ export type AvailabilitySetsCreateOrUpdateResponse = AvailabilitySet; // @public export interface AvailabilitySetsDeleteHeaders { azureAsyncOperation?: string; + // (undocumented) + location?: string; } // @public export interface AvailabilitySetsDeleteOptionalParams extends coreClient.OperationOptions { - force?: boolean; + force?: Force; resumeFrom?: string; updateIntervalInMs?: number; } +// @public +export type AvailabilitySetsDeleteResponse = AvailabilitySetsDeleteHeaders; + // @public export interface AvailabilitySetsGetOptionalParams extends coreClient.OperationOptions { } @@ -115,6 +115,12 @@ export interface AvailabilitySetsListBySubscriptionOptionalParams extends coreCl // @public export type AvailabilitySetsListBySubscriptionResponse = AvailabilitySetListResult; +// @public +export interface AvailabilitySetsUpdateHeaders { + // (undocumented) + location?: string; +} + // @public export interface AvailabilitySetsUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -133,21 +139,13 @@ export interface Checkpoint { } // @public -export interface Cloud { +export interface Cloud extends TrackedResource { readonly cloudCapacity?: CloudCapacity; readonly cloudName?: string; extendedLocation: ExtendedLocation; - readonly id?: string; inventoryItemId?: string; - location: string; - readonly name?: string; - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; readonly storageQoSPolicies?: StorageQoSPolicy[]; - readonly systemData?: SystemData; - tags?: { - [propertyName: string]: string; - }; - readonly type?: string; uuid?: string; vmmServerId?: string; } @@ -166,19 +164,19 @@ export interface CloudInventoryItem extends InventoryItemProperties { // @public export interface CloudListResult { - nextLink?: string; + readonly nextLink?: string; value?: Cloud[]; } // @public export interface Clouds { - beginCreateOrUpdate(resourceGroupName: string, cloudName: string, body: Cloud, options?: CloudsCreateOrUpdateOptionalParams): Promise, CloudsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, cloudName: string, body: Cloud, options?: CloudsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, cloudName: string, options?: CloudsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, cloudName: string, options?: CloudsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, cloudName: string, body: ResourcePatch, options?: CloudsUpdateOptionalParams): Promise, CloudsUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, cloudName: string, body: ResourcePatch, options?: CloudsUpdateOptionalParams): Promise; - get(resourceGroupName: string, cloudName: string, options?: CloudsGetOptionalParams): Promise; + beginCreateOrUpdate(resourceGroupName: string, cloudResourceName: string, body: Cloud, options?: CloudsCreateOrUpdateOptionalParams): Promise, CloudsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, cloudResourceName: string, body: Cloud, options?: CloudsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, cloudResourceName: string, options?: CloudsDeleteOptionalParams): Promise, CloudsDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, cloudResourceName: string, options?: CloudsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, cloudResourceName: string, body: ResourcePatch, options?: CloudsUpdateOptionalParams): Promise, CloudsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, cloudResourceName: string, body: ResourcePatch, options?: CloudsUpdateOptionalParams): Promise; + get(resourceGroupName: string, cloudResourceName: string, options?: CloudsGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: CloudsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; listBySubscription(options?: CloudsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; } @@ -192,13 +190,22 @@ export interface CloudsCreateOrUpdateOptionalParams extends coreClient.Operation // @public export type CloudsCreateOrUpdateResponse = Cloud; +// @public +export interface CloudsDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface CloudsDeleteOptionalParams extends coreClient.OperationOptions { - force?: boolean; + force?: Force; resumeFrom?: string; updateIntervalInMs?: number; } +// @public +export type CloudsDeleteResponse = CloudsDeleteHeaders; + // @public export interface CloudsGetOptionalParams extends coreClient.OperationOptions { } @@ -234,6 +241,12 @@ export interface CloudsListBySubscriptionOptionalParams extends coreClient.Opera // @public export type CloudsListBySubscriptionResponse = CloudListResult; +// @public +export interface CloudsUpdateHeaders { + // (undocumented) + location?: string; +} + // @public export interface CloudsUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -249,19 +262,30 @@ export type CreatedByType = string; // @public export type CreateDiffDisk = string; +// @public +export type DeleteFromHost = string; + // @public export type DynamicMemoryEnabled = string; // @public -export interface ErrorDefinition { +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} + +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; readonly code?: string; - readonly details?: ErrorDefinition[]; + readonly details?: ErrorDetail[]; readonly message?: string; + readonly target?: string; } // @public export interface ErrorResponse { - error?: ErrorDefinition; + error?: ErrorDetail; } // @public @@ -270,16 +294,42 @@ export interface ExtendedLocation { type?: string; } +// @public +export type Force = string; + // @public export function getContinuationToken(page: unknown): string | undefined; +// @public +export interface GuestAgent extends ProxyResource { + credentials?: GuestCredential; + readonly customResourceName?: string; + httpProxyConfig?: HttpProxyConfiguration; + provisioningAction?: ProvisioningAction; + readonly provisioningState?: ProvisioningState; + readonly status?: string; + readonly uuid?: string; +} + +// @public +export interface GuestAgentList { + readonly nextLink?: string; + value: GuestAgent[]; +} + +// @public +export interface GuestCredential { + password: string; + username: string; +} + // @public export interface HardwareProfile { cpuCount?: number; dynamicMemoryEnabled?: DynamicMemoryEnabled; dynamicMemoryMaxMB?: number; dynamicMemoryMinMB?: number; - isHighlyAvailable?: string; + readonly isHighlyAvailable?: IsHighlyAvailable; limitCpuForMigration?: LimitCpuForMigration; memoryMB?: number; } @@ -294,14 +344,48 @@ export interface HardwareProfileUpdate { memoryMB?: number; } +// @public +export interface HttpProxyConfiguration { + httpsProxy?: string; +} + +// @public +export interface Identity { + readonly principalId?: string; + readonly tenantId?: string; + type: IdentityType; +} + +// @public +export type IdentityType = string; + +// @public +export interface InfrastructureProfile { + biosGuid?: string; + checkpoints?: Checkpoint[]; + checkpointType?: string; + cloudId?: string; + generation?: number; + inventoryItemId?: string; + readonly lastRestoredVMCheckpoint?: Checkpoint; + templateId?: string; + uuid?: string; + vmmServerId?: string; + vmName?: string; +} + +// @public +export interface InfrastructureProfileUpdate { + checkpointType?: string; +} + // @public export interface InventoryItem extends ProxyResource { readonly inventoryItemName?: string; inventoryType: InventoryType; kind?: string; readonly managedResourceId?: string; - readonly provisioningState?: string; - readonly systemData?: SystemData; + readonly provisioningState?: ProvisioningState; readonly uuid?: string; } @@ -316,7 +400,7 @@ export interface InventoryItemProperties { readonly inventoryItemName?: string; inventoryType: "Cloud" | "VirtualNetwork" | "VirtualMachineTemplate" | "VirtualMachine"; readonly managedResourceId?: string; - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; readonly uuid?: string; } @@ -325,9 +409,9 @@ export type InventoryItemPropertiesUnion = InventoryItemProperties | CloudInvent // @public export interface InventoryItems { - create(resourceGroupName: string, vmmServerName: string, inventoryItemName: string, options?: InventoryItemsCreateOptionalParams): Promise; - delete(resourceGroupName: string, vmmServerName: string, inventoryItemName: string, options?: InventoryItemsDeleteOptionalParams): Promise; - get(resourceGroupName: string, vmmServerName: string, inventoryItemName: string, options?: InventoryItemsGetOptionalParams): Promise; + create(resourceGroupName: string, vmmServerName: string, inventoryItemResourceName: string, options?: InventoryItemsCreateOptionalParams): Promise; + delete(resourceGroupName: string, vmmServerName: string, inventoryItemResourceName: string, options?: InventoryItemsDeleteOptionalParams): Promise; + get(resourceGroupName: string, vmmServerName: string, inventoryItemResourceName: string, options?: InventoryItemsGetOptionalParams): Promise; listByVMMServer(resourceGroupName: string, vmmServerName: string, options?: InventoryItemsListByVMMServerOptionalParams): PagedAsyncIterableIterator; } @@ -352,7 +436,7 @@ export type InventoryItemsGetResponse = InventoryItem; // @public export interface InventoryItemsList { - nextLink?: string; + readonly nextLink?: string; value: InventoryItem[]; } @@ -376,6 +460,14 @@ export type InventoryType = string; // @public export type IsCustomizable = string; +// @public +export type IsHighlyAvailable = string; + +// @public +export enum KnownActionType { + Internal = "Internal" +} + // @public export enum KnownAllocationMethod { Dynamic = "Dynamic", @@ -396,12 +488,30 @@ export enum KnownCreateDiffDisk { True = "true" } +// @public +export enum KnownDeleteFromHost { + False = "false", + True = "true" +} + // @public export enum KnownDynamicMemoryEnabled { False = "false", True = "true" } +// @public +export enum KnownForce { + False = "false", + True = "true" +} + +// @public +export enum KnownIdentityType { + None = "None", + SystemAssigned = "SystemAssigned" +} + // @public export enum KnownInventoryType { Cloud = "Cloud", @@ -416,12 +526,25 @@ export enum KnownIsCustomizable { True = "true" } +// @public +export enum KnownIsHighlyAvailable { + False = "false", + True = "true" +} + // @public export enum KnownLimitCpuForMigration { False = "false", True = "true" } +// @public +export enum KnownOrigin { + System = "system", + User = "user", + UserSystem = "user,system" +} + // @public export enum KnownOsType { Linux = "Linux", @@ -429,11 +552,36 @@ export enum KnownOsType { Windows = "Windows" } +// @public +export enum KnownProvisioningAction { + Install = "install", + Repair = "repair", + Uninstall = "uninstall" +} + +// @public +export enum KnownProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Created = "Created", + Deleting = "Deleting", + Failed = "Failed", + Provisioning = "Provisioning", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownSkipShutdown { + False = "false", + True = "true" +} + // @public export type LimitCpuForMigration = string; // @public -export interface NetworkInterfaces { +export interface NetworkInterface { readonly displayName?: string; readonly ipv4Addresses?: string[]; ipv4AddressType?: AllocationMethod; @@ -448,7 +596,7 @@ export interface NetworkInterfaces { } // @public -export interface NetworkInterfacesUpdate { +export interface NetworkInterfaceUpdate { ipv4AddressType?: AllocationMethod; ipv6AddressType?: AllocationMethod; macAddress?: string; @@ -460,17 +608,40 @@ export interface NetworkInterfacesUpdate { // @public export interface NetworkProfile { - networkInterfaces?: NetworkInterfaces[]; + networkInterfaces?: NetworkInterface[]; } // @public export interface NetworkProfileUpdate { - networkInterfaces?: NetworkInterfacesUpdate[]; + networkInterfaces?: NetworkInterfaceUpdate[]; +} + +// @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 Operations { - list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; } // @public @@ -478,26 +649,36 @@ export interface OperationsListNextOptionalParams extends coreClient.OperationOp } // @public -export type OperationsListNextResponse = ResourceProviderOperationList; +export type OperationsListNextResponse = OperationListResult; // @public export interface OperationsListOptionalParams extends coreClient.OperationOptions { } // @public -export type OperationsListResponse = ResourceProviderOperationList; +export type OperationsListResponse = OperationListResult; // @public -export interface OsProfile { +export type Origin = string; + +// @public +export interface OsProfileForVMInstance { adminPassword?: string; computerName?: string; - readonly osName?: string; + readonly osSku?: string; readonly osType?: OsType; + readonly osVersion?: string; } // @public export type OsType = string; +// @public +export type ProvisioningAction = string; + +// @public +export type ProvisioningState = string; + // @public export interface ProxyResource extends Resource { } @@ -506,6 +687,7 @@ export interface ProxyResource extends Resource { export interface Resource { readonly id?: string; readonly name?: string; + readonly systemData?: SystemData; readonly type?: string; } @@ -516,32 +698,12 @@ export interface ResourcePatch { }; } -// @public -export interface ResourceProviderOperation { - display?: ResourceProviderOperationDisplay; - isDataAction?: string; - name?: string; -} - -// @public -export interface ResourceProviderOperationDisplay { - description?: string; - operation?: string; - provider?: string; - resource?: string; -} - -// @public -export interface ResourceProviderOperationList { - nextLink?: string; - value?: ResourceProviderOperation[]; -} - // @public (undocumented) export class Scvmm extends coreClient.ServiceClient { // (undocumented) $host: string; constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ScvmmOptionalParams); + constructor(credentials: coreAuth.TokenCredential, options?: ScvmmOptionalParams); // (undocumented) apiVersion: string; // (undocumented) @@ -553,14 +715,18 @@ export class Scvmm extends coreClient.ServiceClient { // (undocumented) operations: Operations; // (undocumented) - subscriptionId: string; + subscriptionId?: string; + // (undocumented) + virtualMachineInstanceHybridIdentityMetadata: VirtualMachineInstanceHybridIdentityMetadata; // (undocumented) - virtualMachines: VirtualMachines; + virtualMachineInstances: VirtualMachineInstances; // (undocumented) virtualMachineTemplates: VirtualMachineTemplates; // (undocumented) virtualNetworks: VirtualNetworks; // (undocumented) + vMInstanceGuestAgents: VMInstanceGuestAgents; + // (undocumented) vmmServers: VmmServers; } @@ -571,9 +737,12 @@ export interface ScvmmOptionalParams extends coreClient.ServiceClientOptions { endpoint?: string; } +// @public +export type SkipShutdown = string; + // @public export interface StopVirtualMachineOptions { - skipShutdown?: boolean; + skipShutdown?: SkipShutdown; } // @public @@ -612,6 +781,14 @@ export interface SystemData { lastModifiedByType?: CreatedByType; } +// @public +export interface TrackedResource extends Resource { + location: string; + tags?: { + [propertyName: string]: string; + }; +} + // @public export interface VirtualDisk { bus?: number; @@ -643,194 +820,273 @@ export interface VirtualDiskUpdate { } // @public -export interface VirtualMachine { +export interface VirtualMachineCreateCheckpoint { + description?: string; + name?: string; +} + +// @public +export interface VirtualMachineDeleteCheckpoint { + id?: string; +} + +// @public +export interface VirtualMachineInstance extends ProxyResource { availabilitySets?: AvailabilitySetListItem[]; - checkpoints?: Checkpoint[]; - checkpointType?: string; - cloudId?: string; extendedLocation: ExtendedLocation; - generation?: number; hardwareProfile?: HardwareProfile; - readonly id?: string; - inventoryItemId?: string; - location: string; - readonly name?: string; + infrastructureProfile?: InfrastructureProfile; networkProfile?: NetworkProfile; - osProfile?: OsProfile; + osProfile?: OsProfileForVMInstance; readonly powerState?: string; - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; storageProfile?: StorageProfile; - readonly systemData?: SystemData; - tags?: { - [propertyName: string]: string; - }; - templateId?: string; - readonly type?: string; - uuid?: string; - vmmServerId?: string; - vmName?: string; } // @public -export interface VirtualMachineCreateCheckpoint { - description?: string; - name?: string; +export interface VirtualMachineInstanceHybridIdentityMetadata { + get(resourceUri: string, options?: VirtualMachineInstanceHybridIdentityMetadataGetOptionalParams): Promise; + list(resourceUri: string, options?: VirtualMachineInstanceHybridIdentityMetadataListOptionalParams): PagedAsyncIterableIterator; } // @public -export interface VirtualMachineDeleteCheckpoint { - id?: string; +export interface VirtualMachineInstanceHybridIdentityMetadataGetOptionalParams extends coreClient.OperationOptions { } // @public -export interface VirtualMachineInventoryItem extends InventoryItemProperties { - cloud?: InventoryItemDetails; - inventoryType: "VirtualMachine"; - ipAddresses?: string[]; - readonly osName?: string; - readonly osType?: OsType; - readonly powerState?: string; +export type VirtualMachineInstanceHybridIdentityMetadataGetResponse = VmInstanceHybridIdentityMetadata; + +// @public +export interface VirtualMachineInstanceHybridIdentityMetadataListNextOptionalParams extends coreClient.OperationOptions { } // @public -export interface VirtualMachineListResult { - nextLink?: string; - value?: VirtualMachine[]; +export type VirtualMachineInstanceHybridIdentityMetadataListNextResponse = VmInstanceHybridIdentityMetadataList; + +// @public +export interface VirtualMachineInstanceHybridIdentityMetadataListOptionalParams extends coreClient.OperationOptions { } // @public -export interface VirtualMachineRestoreCheckpoint { - id?: string; +export type VirtualMachineInstanceHybridIdentityMetadataListResponse = VmInstanceHybridIdentityMetadataList; + +// @public +export interface VirtualMachineInstanceListResult { + readonly nextLink?: string; + value?: VirtualMachineInstance[]; +} + +// @public +export interface VirtualMachineInstances { + beginCreateCheckpoint(resourceUri: string, options?: VirtualMachineInstancesCreateCheckpointOptionalParams): Promise, VirtualMachineInstancesCreateCheckpointResponse>>; + beginCreateCheckpointAndWait(resourceUri: string, options?: VirtualMachineInstancesCreateCheckpointOptionalParams): Promise; + beginCreateOrUpdate(resourceUri: string, options?: VirtualMachineInstancesCreateOrUpdateOptionalParams): Promise, VirtualMachineInstancesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceUri: string, options?: VirtualMachineInstancesCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceUri: string, options?: VirtualMachineInstancesDeleteOptionalParams): Promise, VirtualMachineInstancesDeleteResponse>>; + beginDeleteAndWait(resourceUri: string, options?: VirtualMachineInstancesDeleteOptionalParams): Promise; + beginDeleteCheckpoint(resourceUri: string, options?: VirtualMachineInstancesDeleteCheckpointOptionalParams): Promise, VirtualMachineInstancesDeleteCheckpointResponse>>; + beginDeleteCheckpointAndWait(resourceUri: string, options?: VirtualMachineInstancesDeleteCheckpointOptionalParams): Promise; + beginRestart(resourceUri: string, options?: VirtualMachineInstancesRestartOptionalParams): Promise, VirtualMachineInstancesRestartResponse>>; + beginRestartAndWait(resourceUri: string, options?: VirtualMachineInstancesRestartOptionalParams): Promise; + beginRestoreCheckpoint(resourceUri: string, options?: VirtualMachineInstancesRestoreCheckpointOptionalParams): Promise, VirtualMachineInstancesRestoreCheckpointResponse>>; + beginRestoreCheckpointAndWait(resourceUri: string, options?: VirtualMachineInstancesRestoreCheckpointOptionalParams): Promise; + beginStart(resourceUri: string, options?: VirtualMachineInstancesStartOptionalParams): Promise, VirtualMachineInstancesStartResponse>>; + beginStartAndWait(resourceUri: string, options?: VirtualMachineInstancesStartOptionalParams): Promise; + beginStop(resourceUri: string, options?: VirtualMachineInstancesStopOptionalParams): Promise, VirtualMachineInstancesStopResponse>>; + beginStopAndWait(resourceUri: string, options?: VirtualMachineInstancesStopOptionalParams): Promise; + beginUpdate(resourceUri: string, options?: VirtualMachineInstancesUpdateOptionalParams): Promise, VirtualMachineInstancesUpdateResponse>>; + beginUpdateAndWait(resourceUri: string, options?: VirtualMachineInstancesUpdateOptionalParams): Promise; + get(resourceUri: string, options?: VirtualMachineInstancesGetOptionalParams): Promise; + list(resourceUri: string, options?: VirtualMachineInstancesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface VirtualMachineInstancesCreateCheckpointHeaders { + // (undocumented) + location?: string; } // @public -export interface VirtualMachines { - beginCreateCheckpoint(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesCreateCheckpointOptionalParams): Promise, void>>; - beginCreateCheckpointAndWait(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesCreateCheckpointOptionalParams): Promise; - beginCreateOrUpdate(resourceGroupName: string, virtualMachineName: string, body: VirtualMachine, options?: VirtualMachinesCreateOrUpdateOptionalParams): Promise, VirtualMachinesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, virtualMachineName: string, body: VirtualMachine, options?: VirtualMachinesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesDeleteOptionalParams): Promise; - beginDeleteCheckpoint(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesDeleteCheckpointOptionalParams): Promise, void>>; - beginDeleteCheckpointAndWait(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesDeleteCheckpointOptionalParams): Promise; - beginRestart(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesRestartOptionalParams): Promise, void>>; - beginRestartAndWait(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesRestartOptionalParams): Promise; - beginRestoreCheckpoint(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesRestoreCheckpointOptionalParams): Promise, void>>; - beginRestoreCheckpointAndWait(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesRestoreCheckpointOptionalParams): Promise; - beginStart(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesStartOptionalParams): Promise, void>>; - beginStartAndWait(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesStartOptionalParams): Promise; - beginStop(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesStopOptionalParams): Promise, void>>; - beginStopAndWait(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesStopOptionalParams): Promise; - beginUpdate(resourceGroupName: string, virtualMachineName: string, body: VirtualMachineUpdate, options?: VirtualMachinesUpdateOptionalParams): Promise, VirtualMachinesUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, virtualMachineName: string, body: VirtualMachineUpdate, options?: VirtualMachinesUpdateOptionalParams): Promise; - get(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: VirtualMachinesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: VirtualMachinesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface VirtualMachinesCreateCheckpointOptionalParams extends coreClient.OperationOptions { +export interface VirtualMachineInstancesCreateCheckpointOptionalParams extends coreClient.OperationOptions { body?: VirtualMachineCreateCheckpoint; resumeFrom?: string; updateIntervalInMs?: number; } // @public -export interface VirtualMachinesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export type VirtualMachineInstancesCreateCheckpointResponse = VirtualMachineInstancesCreateCheckpointHeaders; + +// @public +export interface VirtualMachineInstancesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + body?: VirtualMachineInstance; resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type VirtualMachinesCreateOrUpdateResponse = VirtualMachine; +export type VirtualMachineInstancesCreateOrUpdateResponse = VirtualMachineInstance; // @public -export interface VirtualMachinesDeleteCheckpointOptionalParams extends coreClient.OperationOptions { - body?: VirtualMachineDeleteCheckpoint; - resumeFrom?: string; - updateIntervalInMs?: number; +export interface VirtualMachineInstancesDeleteCheckpointHeaders { + // (undocumented) + location?: string; } // @public -export interface VirtualMachinesDeleteOptionalParams extends coreClient.OperationOptions { - force?: boolean; +export interface VirtualMachineInstancesDeleteCheckpointOptionalParams extends coreClient.OperationOptions { + body?: VirtualMachineDeleteCheckpoint; resumeFrom?: string; - retain?: boolean; updateIntervalInMs?: number; } // @public -export interface VirtualMachinesGetOptionalParams extends coreClient.OperationOptions { -} +export type VirtualMachineInstancesDeleteCheckpointResponse = VirtualMachineInstancesDeleteCheckpointHeaders; // @public -export type VirtualMachinesGetResponse = VirtualMachine; +export interface VirtualMachineInstancesDeleteHeaders { + // (undocumented) + location?: string; +} // @public -export interface VirtualMachinesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +export interface VirtualMachineInstancesDeleteOptionalParams extends coreClient.OperationOptions { + deleteFromHost?: DeleteFromHost; + force?: Force; + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export type VirtualMachinesListByResourceGroupNextResponse = VirtualMachineListResult; +export type VirtualMachineInstancesDeleteResponse = VirtualMachineInstancesDeleteHeaders; // @public -export interface VirtualMachinesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface VirtualMachineInstancesGetOptionalParams extends coreClient.OperationOptions { } // @public -export type VirtualMachinesListByResourceGroupResponse = VirtualMachineListResult; +export type VirtualMachineInstancesGetResponse = VirtualMachineInstance; // @public -export interface VirtualMachinesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +export interface VirtualMachineInstancesListNextOptionalParams extends coreClient.OperationOptions { } // @public -export type VirtualMachinesListBySubscriptionNextResponse = VirtualMachineListResult; +export type VirtualMachineInstancesListNextResponse = VirtualMachineInstanceListResult; // @public -export interface VirtualMachinesListBySubscriptionOptionalParams extends coreClient.OperationOptions { +export interface VirtualMachineInstancesListOptionalParams extends coreClient.OperationOptions { } // @public -export type VirtualMachinesListBySubscriptionResponse = VirtualMachineListResult; +export type VirtualMachineInstancesListResponse = VirtualMachineInstanceListResult; // @public -export interface VirtualMachinesRestartOptionalParams extends coreClient.OperationOptions { +export interface VirtualMachineInstancesRestartHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface VirtualMachineInstancesRestartOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } // @public -export interface VirtualMachinesRestoreCheckpointOptionalParams extends coreClient.OperationOptions { +export type VirtualMachineInstancesRestartResponse = VirtualMachineInstancesRestartHeaders; + +// @public +export interface VirtualMachineInstancesRestoreCheckpointHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface VirtualMachineInstancesRestoreCheckpointOptionalParams extends coreClient.OperationOptions { body?: VirtualMachineRestoreCheckpoint; resumeFrom?: string; updateIntervalInMs?: number; } // @public -export interface VirtualMachinesStartOptionalParams extends coreClient.OperationOptions { +export type VirtualMachineInstancesRestoreCheckpointResponse = VirtualMachineInstancesRestoreCheckpointHeaders; + +// @public +export interface VirtualMachineInstancesStartHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface VirtualMachineInstancesStartOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } // @public -export interface VirtualMachinesStopOptionalParams extends coreClient.OperationOptions { +export type VirtualMachineInstancesStartResponse = VirtualMachineInstancesStartHeaders; + +// @public +export interface VirtualMachineInstancesStopHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface VirtualMachineInstancesStopOptionalParams extends coreClient.OperationOptions { body?: StopVirtualMachineOptions; resumeFrom?: string; updateIntervalInMs?: number; } // @public -export interface VirtualMachinesUpdateOptionalParams extends coreClient.OperationOptions { +export type VirtualMachineInstancesStopResponse = VirtualMachineInstancesStopHeaders; + +// @public +export interface VirtualMachineInstancesUpdateHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface VirtualMachineInstancesUpdateOptionalParams extends coreClient.OperationOptions { + body?: VirtualMachineInstanceUpdate; resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type VirtualMachinesUpdateResponse = VirtualMachine; +export type VirtualMachineInstancesUpdateResponse = VirtualMachineInstance; + +// @public +export interface VirtualMachineInstanceUpdate { + availabilitySets?: AvailabilitySetListItem[]; + hardwareProfile?: HardwareProfileUpdate; + infrastructureProfile?: InfrastructureProfileUpdate; + networkProfile?: NetworkProfileUpdate; + storageProfile?: StorageProfileUpdate; +} + +// @public +export interface VirtualMachineInventoryItem extends InventoryItemProperties { + readonly biosGuid?: string; + cloud?: InventoryItemDetails; + inventoryType: "VirtualMachine"; + ipAddresses?: string[]; + readonly managedMachineResourceId?: string; + readonly osName?: string; + readonly osType?: OsType; + readonly osVersion?: string; + readonly powerState?: string; +} + +// @public +export interface VirtualMachineRestoreCheckpoint { + id?: string; +} // @public -export interface VirtualMachineTemplate { +export interface VirtualMachineTemplate extends TrackedResource { readonly computerName?: string; readonly cpuCount?: number; readonly disks?: VirtualDisk[]; @@ -839,23 +1095,15 @@ export interface VirtualMachineTemplate { readonly dynamicMemoryMinMB?: number; extendedLocation: ExtendedLocation; readonly generation?: number; - readonly id?: string; inventoryItemId?: string; readonly isCustomizable?: IsCustomizable; - readonly isHighlyAvailable?: string; + readonly isHighlyAvailable?: IsHighlyAvailable; readonly limitCpuForMigration?: LimitCpuForMigration; - location: string; readonly memoryMB?: number; - readonly name?: string; - readonly networkInterfaces?: NetworkInterfaces[]; + readonly networkInterfaces?: NetworkInterface[]; readonly osName?: string; readonly osType?: OsType; - readonly provisioningState?: string; - readonly systemData?: SystemData; - tags?: { - [propertyName: string]: string; - }; - readonly type?: string; + readonly provisioningState?: ProvisioningState; uuid?: string; vmmServerId?: string; } @@ -871,17 +1119,17 @@ export interface VirtualMachineTemplateInventoryItem extends InventoryItemProper // @public export interface VirtualMachineTemplateListResult { - nextLink?: string; + readonly nextLink?: string; value?: VirtualMachineTemplate[]; } // @public export interface VirtualMachineTemplates { - beginCreateOrUpdate(resourceGroupName: string, virtualMachineTemplateName: string, body: VirtualMachineTemplate, options?: VirtualMachineTemplatesCreateOrUpdateOptionalParams): Promise, VirtualMachineTemplatesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, virtualMachineTemplateName: string, body: VirtualMachineTemplate, options?: VirtualMachineTemplatesCreateOrUpdateOptionalParams): Promise, VirtualMachineTemplatesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, virtualMachineTemplateName: string, body: VirtualMachineTemplate, options?: VirtualMachineTemplatesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, virtualMachineTemplateName: string, body: ResourcePatch, options?: VirtualMachineTemplatesUpdateOptionalParams): Promise, VirtualMachineTemplatesUpdateResponse>>; + beginDelete(resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesDeleteOptionalParams): Promise, VirtualMachineTemplatesDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, virtualMachineTemplateName: string, body: ResourcePatch, options?: VirtualMachineTemplatesUpdateOptionalParams): Promise, VirtualMachineTemplatesUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, virtualMachineTemplateName: string, body: ResourcePatch, options?: VirtualMachineTemplatesUpdateOptionalParams): Promise; get(resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: VirtualMachineTemplatesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; @@ -897,13 +1145,22 @@ export interface VirtualMachineTemplatesCreateOrUpdateOptionalParams extends cor // @public export type VirtualMachineTemplatesCreateOrUpdateResponse = VirtualMachineTemplate; +// @public +export interface VirtualMachineTemplatesDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface VirtualMachineTemplatesDeleteOptionalParams extends coreClient.OperationOptions { - force?: boolean; + force?: Force; resumeFrom?: string; updateIntervalInMs?: number; } +// @public +export type VirtualMachineTemplatesDeleteResponse = VirtualMachineTemplatesDeleteHeaders; + // @public export interface VirtualMachineTemplatesGetOptionalParams extends coreClient.OperationOptions { } @@ -939,6 +1196,12 @@ export interface VirtualMachineTemplatesListBySubscriptionOptionalParams extends // @public export type VirtualMachineTemplatesListBySubscriptionResponse = VirtualMachineTemplateListResult; +// @public +export interface VirtualMachineTemplatesUpdateHeaders { + // (undocumented) + location?: string; +} + // @public export interface VirtualMachineTemplatesUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -949,35 +1212,11 @@ export interface VirtualMachineTemplatesUpdateOptionalParams extends coreClient. export type VirtualMachineTemplatesUpdateResponse = VirtualMachineTemplate; // @public -export interface VirtualMachineUpdate { - properties?: VirtualMachineUpdateProperties; - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export interface VirtualMachineUpdateProperties { - availabilitySets?: AvailabilitySetListItem[]; - hardwareProfile?: HardwareProfileUpdate; - networkProfile?: NetworkProfileUpdate; - storageProfile?: StorageProfileUpdate; -} - -// @public -export interface VirtualNetwork { +export interface VirtualNetwork extends TrackedResource { extendedLocation: ExtendedLocation; - readonly id?: string; inventoryItemId?: string; - location: string; - readonly name?: string; readonly networkName?: string; - readonly provisioningState?: string; - readonly systemData?: SystemData; - tags?: { - [propertyName: string]: string; - }; - readonly type?: string; + readonly provisioningState?: ProvisioningState; uuid?: string; vmmServerId?: string; } @@ -989,17 +1228,17 @@ export interface VirtualNetworkInventoryItem extends InventoryItemProperties { // @public export interface VirtualNetworkListResult { - nextLink?: string; + readonly nextLink?: string; value?: VirtualNetwork[]; } // @public export interface VirtualNetworks { - beginCreateOrUpdate(resourceGroupName: string, virtualNetworkName: string, body: VirtualNetwork, options?: VirtualNetworksCreateOrUpdateOptionalParams): Promise, VirtualNetworksCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, virtualNetworkName: string, body: VirtualNetwork, options?: VirtualNetworksCreateOrUpdateOptionalParams): Promise, VirtualNetworksCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, virtualNetworkName: string, body: VirtualNetwork, options?: VirtualNetworksCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, virtualNetworkName: string, body: ResourcePatch, options?: VirtualNetworksUpdateOptionalParams): Promise, VirtualNetworksUpdateResponse>>; + beginDelete(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams): Promise, VirtualNetworksDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, virtualNetworkName: string, body: ResourcePatch, options?: VirtualNetworksUpdateOptionalParams): Promise, VirtualNetworksUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, virtualNetworkName: string, body: ResourcePatch, options?: VirtualNetworksUpdateOptionalParams): Promise; get(resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: VirtualNetworksListByResourceGroupOptionalParams): PagedAsyncIterableIterator; @@ -1015,13 +1254,22 @@ export interface VirtualNetworksCreateOrUpdateOptionalParams extends coreClient. // @public export type VirtualNetworksCreateOrUpdateResponse = VirtualNetwork; +// @public +export interface VirtualNetworksDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface VirtualNetworksDeleteOptionalParams extends coreClient.OperationOptions { - force?: boolean; + force?: Force; resumeFrom?: string; updateIntervalInMs?: number; } +// @public +export type VirtualNetworksDeleteResponse = VirtualNetworksDeleteHeaders; + // @public export interface VirtualNetworksGetOptionalParams extends coreClient.OperationOptions { } @@ -1057,6 +1305,12 @@ export interface VirtualNetworksListBySubscriptionOptionalParams extends coreCli // @public export type VirtualNetworksListBySubscriptionResponse = VirtualNetworkListResult; +// @public +export interface VirtualNetworksUpdateHeaders { + // (undocumented) + location?: string; +} + // @public export interface VirtualNetworksUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1067,45 +1321,94 @@ export interface VirtualNetworksUpdateOptionalParams extends coreClient.Operatio export type VirtualNetworksUpdateResponse = VirtualNetwork; // @public -export interface VMMServer { +export interface VMInstanceGuestAgents { + beginCreate(resourceUri: string, options?: VMInstanceGuestAgentsCreateOptionalParams): Promise, VMInstanceGuestAgentsCreateResponse>>; + beginCreateAndWait(resourceUri: string, options?: VMInstanceGuestAgentsCreateOptionalParams): Promise; + delete(resourceUri: string, options?: VMInstanceGuestAgentsDeleteOptionalParams): Promise; + get(resourceUri: string, options?: VMInstanceGuestAgentsGetOptionalParams): Promise; + list(resourceUri: string, options?: VMInstanceGuestAgentsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface VMInstanceGuestAgentsCreateOptionalParams extends coreClient.OperationOptions { + body?: GuestAgent; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VMInstanceGuestAgentsCreateResponse = GuestAgent; + +// @public +export interface VMInstanceGuestAgentsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface VMInstanceGuestAgentsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VMInstanceGuestAgentsGetResponse = GuestAgent; + +// @public +export interface VMInstanceGuestAgentsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VMInstanceGuestAgentsListNextResponse = GuestAgentList; + +// @public +export interface VMInstanceGuestAgentsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VMInstanceGuestAgentsListResponse = GuestAgentList; + +// @public +export interface VmInstanceHybridIdentityMetadata extends ProxyResource { + readonly provisioningState?: ProvisioningState; + publicKey?: string; + resourceUid?: string; +} + +// @public +export interface VmInstanceHybridIdentityMetadataList { + readonly nextLink?: string; + value: VmInstanceHybridIdentityMetadata[]; +} + +// @public +export interface VMMCredential { + password?: string; + username?: string; +} + +// @public +export interface VMMServer extends TrackedResource { readonly connectionStatus?: string; - credentials?: VMMServerPropertiesCredentials; + credentials?: VMMCredential; readonly errorMessage?: string; extendedLocation: ExtendedLocation; fqdn: string; - readonly id?: string; - location: string; - readonly name?: string; port?: number; - readonly provisioningState?: string; - readonly systemData?: SystemData; - tags?: { - [propertyName: string]: string; - }; - readonly type?: string; + readonly provisioningState?: ProvisioningState; readonly uuid?: string; readonly version?: string; } // @public export interface VMMServerListResult { - nextLink?: string; + readonly nextLink?: string; value?: VMMServer[]; } -// @public -export interface VMMServerPropertiesCredentials { - password?: string; - username?: string; -} - // @public export interface VmmServers { - beginCreateOrUpdate(resourceGroupName: string, vmmServerName: string, body: VMMServer, options?: VmmServersCreateOrUpdateOptionalParams): Promise, VmmServersCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, vmmServerName: string, body: VMMServer, options?: VmmServersCreateOrUpdateOptionalParams): Promise, VmmServersCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, vmmServerName: string, body: VMMServer, options?: VmmServersCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, vmmServerName: string, options?: VmmServersDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, vmmServerName: string, options?: VmmServersDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, vmmServerName: string, body: ResourcePatch, options?: VmmServersUpdateOptionalParams): Promise, VmmServersUpdateResponse>>; + beginDelete(resourceGroupName: string, vmmServerName: string, options?: VmmServersDeleteOptionalParams): Promise, VmmServersDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, vmmServerName: string, options?: VmmServersDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, vmmServerName: string, body: ResourcePatch, options?: VmmServersUpdateOptionalParams): Promise, VmmServersUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, vmmServerName: string, body: ResourcePatch, options?: VmmServersUpdateOptionalParams): Promise; get(resourceGroupName: string, vmmServerName: string, options?: VmmServersGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: VmmServersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; @@ -1121,13 +1424,22 @@ export interface VmmServersCreateOrUpdateOptionalParams extends coreClient.Opera // @public export type VmmServersCreateOrUpdateResponse = VMMServer; +// @public +export interface VmmServersDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface VmmServersDeleteOptionalParams extends coreClient.OperationOptions { - force?: boolean; + force?: Force; resumeFrom?: string; updateIntervalInMs?: number; } +// @public +export type VmmServersDeleteResponse = VmmServersDeleteHeaders; + // @public export interface VmmServersGetOptionalParams extends coreClient.OperationOptions { } @@ -1163,6 +1475,12 @@ export interface VmmServersListBySubscriptionOptionalParams extends coreClient.O // @public export type VmmServersListBySubscriptionResponse = VMMServerListResult; +// @public +export interface VmmServersUpdateHeaders { + // (undocumented) + location?: string; +} + // @public export interface VmmServersUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; diff --git a/sdk/scvmm/arm-scvmm/rollup.config.js b/sdk/scvmm/arm-scvmm/rollup.config.js new file mode 100644 index 000000000000..3f89d7309da5 --- /dev/null +++ b/sdk/scvmm/arm-scvmm/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/scvmm/arm-scvmm/src/lroImpl.ts b/sdk/scvmm/arm-scvmm/src/lroImpl.ts index 518d5f053b4e..dd803cd5e28c 100644 --- a/sdk/scvmm/arm-scvmm/src/lroImpl.ts +++ b/sdk/scvmm/arm-scvmm/src/lroImpl.ts @@ -6,29 +6,37 @@ * 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 class LroImpl implements LongRunningOperation { - constructor( - private sendOperationFn: (args: any, spec: any) => Promise>, - private args: Record, - private spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record, - public requestPath: string = spec.path!, - public requestMethod: string = spec.httpMethod - ) {} - public async sendInitialRequest(): Promise> { - return this.sendOperationFn(this.args, this.spec); - } - public async sendPollRequest(path: string): Promise> { - const { requestBody, ...restSpec } = this.spec; - return this.sendOperationFn(this.args, { - ...restSpec, - path, - httpMethod: "GET" - }); - } +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/scvmm/arm-scvmm/src/models/index.ts b/sdk/scvmm/arm-scvmm/src/models/index.ts index c1048aaf1ee8..4bfe210ee961 100644 --- a/sdk/scvmm/arm-scvmm/src/models/index.ts +++ b/sdk/scvmm/arm-scvmm/src/models/index.ts @@ -15,73 +15,44 @@ export type InventoryItemPropertiesUnion = | VirtualMachineTemplateInventoryItem | VirtualMachineInventoryItem; -/** The VmmServers resource definition. */ -export interface VMMServer { +/** Credentials to connect to VMMServer. */ +export interface VMMCredential { + /** Username to use to connect to VMMServer. */ + username?: string; + /** Password to use to connect to VMMServer. */ + password?: string; +} + +/** The extended location. */ +export interface ExtendedLocation { + /** The extended location type. */ + type?: string; + /** The extended location name. */ + name?: string; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { /** - * Resource Id + * Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; /** - * Resource Name + * The name of the resource * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; /** - * Resource Type + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; - /** Gets or sets the location. */ - location: string; - /** Resource tags */ - tags?: { [propertyName: string]: string }; /** - * The system data. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; - /** The extended location. */ - extendedLocation: ExtendedLocation; - /** Credentials to connect to VMMServer. */ - credentials?: VMMServerPropertiesCredentials; - /** Fqdn is the hostname/ip of the vmmServer. */ - fqdn: string; - /** Port is the port on which the vmmServer is listening. */ - port?: number; - /** - * Gets or sets the connection status to the vmmServer. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly connectionStatus?: string; - /** - * Gets or sets any error message if connection to vmmServer is having any issue. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly errorMessage?: string; - /** - * Unique ID of vmmServer. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly uuid?: string; - /** - * Version is the version of the vmmSever. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly version?: string; - /** - * Gets or sets the provisioning state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; -} - -/** Credentials to connect to VMMServer. */ -export interface VMMServerPropertiesCredentials { - /** Username to use to connect to VMMServer. */ - username?: string; - /** Credentials to use to connect to VMMServer. */ - password?: string; } /** Metadata pertaining to creation and last modification of the resource. */ @@ -100,37 +71,53 @@ export interface SystemData { lastModifiedAt?: Date; } -/** The extended location. */ -export interface ExtendedLocation { - /** The extended location type. */ - type?: string; - /** The extended location name. */ - name?: string; -} - -/** Error response. */ +/** 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 details. */ - error?: ErrorDefinition; + /** The error object. */ + error?: ErrorDetail; } -/** Error definition. */ -export interface ErrorDefinition { +/** The error detail. */ +export interface ErrorDetail { /** - * Service specific error code which serves as the substatus for the HTTP error code. + * The error code. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly code?: string; /** - * Description of the error. + * The error message. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly message?: string; /** - * Internal error details. + * The error target. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly details?: ErrorDefinition[]; + 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; } /** Object containing tags updates for patch operations. */ @@ -143,94 +130,75 @@ export interface ResourcePatch { export interface VMMServerListResult { /** List of VmmServers. */ value?: VMMServer[]; - /** Url to follow for getting next page of resources. */ - nextLink?: string; -} - -/** Results of the request to list operations. */ -export interface ResourceProviderOperationList { - /** List of Operations. */ - value?: ResourceProviderOperation[]; - /** Url to follow for getting next page of resources. */ - nextLink?: string; + /** + * Url to follow for getting next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } -/** Results of the request to list operations. */ -export interface ResourceProviderOperation { - /** Indicates whether the operation applies to data-plane. */ - isDataAction?: string; - /** Operation name, in format of {provider}/{resource}/{operation}. */ - name?: string; - /** Display metadata associated with the operation. */ - display?: ResourceProviderOperationDisplay; -} - -/** Display metadata associated with the operation. */ -export interface ResourceProviderOperationDisplay { - /** The resource provider. */ - provider?: string; - /** Resource on which the operation is performed. */ - resource?: string; - /** Type of operation: read, write, delete, etc. */ - operation?: string; - /** Description of this operation. */ - description?: 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; } -/** The Clouds resource definition. */ -export interface Cloud { +/** Details of a REST API operation, returned from the Resource Provider Operations API */ +export interface Operation { /** - * Resource Id + * 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 id?: string; + readonly name?: string; /** - * Resource Name + * 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 name?: string; + readonly isDataAction?: boolean; + /** Localized display information for this particular operation. */ + display?: OperationDisplay; /** - * Resource Type + * 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 type?: string; - /** Gets or sets the location. */ - location: string; - /** Resource tags */ - tags?: { [propertyName: string]: string }; + readonly origin?: Origin; /** - * The system data. + * 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 systemData?: SystemData; - /** The extended location. */ - extendedLocation: ExtendedLocation; - /** Gets or sets the inventory Item ID for the resource. */ - inventoryItemId?: string; - /** Unique ID of the cloud. */ - uuid?: string; - /** ARM Id of the vmmServer resource in which this resource resides. */ - vmmServerId?: string; + readonly actionType?: ActionType; +} + +/** Localized display information for this particular operation. */ +export interface OperationDisplay { /** - * Name of the cloud in VMMServer. + * 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 cloudName?: string; + readonly provider?: string; /** - * Capacity of the cloud. + * 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 cloudCapacity?: CloudCapacity; + readonly resource?: string; /** - * List of QoS policies available for the cloud. + * 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 storageQoSPolicies?: StorageQoSPolicy[]; + readonly operation?: string; /** - * Gets or sets the provisioning state. + * 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 provisioningState?: string; + readonly description?: string; } /** Cloud Capacity model */ @@ -263,142 +231,175 @@ export interface StorageQoSPolicy { export interface CloudListResult { /** List of Clouds. */ value?: Cloud[]; - /** Url to follow for getting next page of resources. */ - nextLink?: string; + /** + * Url to follow for getting next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } -/** The VirtualNetworks resource definition. */ -export interface VirtualNetwork { +/** List of VirtualNetworks. */ +export interface VirtualNetworkListResult { + /** List of VirtualNetworks. */ + value?: VirtualNetwork[]; /** - * Resource Id + * Url to follow for getting next page of resources. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly nextLink?: string; +} + +/** Network Interface model */ +export interface NetworkInterface { + /** Gets or sets the name of the network interface. */ + name?: string; /** - * Resource Name + * Gets the display name of the network interface as shown in the vmmServer. This is the fallback label for a NIC when the name is not set. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly displayName?: string; /** - * Resource Type + * Gets the nic ipv4 addresses. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; - /** Gets or sets the location. */ - location: string; - /** Resource tags */ - tags?: { [propertyName: string]: string }; + readonly ipv4Addresses?: string[]; /** - * The system data. + * Gets the nic ipv6 addresses. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; - /** The extended location. */ - extendedLocation: ExtendedLocation; - /** Gets or sets the inventory Item ID for the resource. */ - inventoryItemId?: string; - /** Unique ID of the virtual network. */ - uuid?: string; - /** ARM Id of the vmmServer resource in which this resource resides. */ - vmmServerId?: string; + readonly ipv6Addresses?: string[]; + /** Gets or sets the nic MAC address. */ + macAddress?: string; + /** Gets or sets the ARM Id of the Microsoft.ScVmm/virtualNetwork resource to connect the nic. */ + virtualNetworkId?: string; /** - * Name of the virtual network in vmmServer. + * Gets the name of the virtual network in vmmServer that the nic is connected to. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly networkName?: string; + /** Gets or sets the ipv4 address type. */ + ipv4AddressType?: AllocationMethod; + /** Gets or sets the ipv6 address type. */ + ipv6AddressType?: AllocationMethod; + /** Gets or sets the mac address type. */ + macAddressType?: AllocationMethod; + /** Gets or sets the nic id. */ + nicId?: string; +} + +/** Virtual disk model */ +export interface VirtualDisk { + /** Gets or sets the name of the disk. */ + name?: string; + /** + * Gets the display name of the virtual disk as shown in the vmmServer. This is the fallback label for a disk when the name is not set. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly displayName?: string; + /** Gets or sets the disk id. */ + diskId?: string; + /** Gets or sets the disk total size. */ + diskSizeGB?: number; /** - * Gets or sets the provisioning state. + * Gets the max disk size. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly maxDiskSizeGB?: number; + /** Gets or sets the disk bus. */ + bus?: number; + /** Gets or sets the disk lun. */ + lun?: number; + /** Gets or sets the disk bus type. */ + busType?: string; + /** Gets or sets the disk vhd type. */ + vhdType?: string; + /** + * Gets the disk volume type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly volumeType?: string; + /** + * Gets the disk vhd format type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly vhdFormatType?: string; + /** Gets or sets the disk id in the template. */ + templateDiskId?: string; + /** The QoS policy for the disk. */ + storageQoSPolicy?: StorageQoSPolicyDetails; + /** Gets or sets a value indicating diff disk. */ + createDiffDisk?: CreateDiffDisk; } -/** List of VirtualNetworks. */ -export interface VirtualNetworkListResult { - /** List of VirtualNetworks. */ - value?: VirtualNetwork[]; - /** Url to follow for getting next page of resources. */ - nextLink?: string; +/** The StorageQoSPolicyDetails definition. */ +export interface StorageQoSPolicyDetails { + /** The name of the policy. */ + name?: string; + /** The ID of the QoS policy. */ + id?: string; } -/** The VirtualMachines resource definition. */ -export interface VirtualMachine { +/** List of VirtualMachineTemplates. */ +export interface VirtualMachineTemplateListResult { + /** List of VirtualMachineTemplates. */ + value?: VirtualMachineTemplate[]; /** - * Resource Id + * Url to follow for getting next page of resources. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly nextLink?: string; +} + +/** List of AvailabilitySets. */ +export interface AvailabilitySetListResult { + /** List of AvailabilitySets. */ + value?: AvailabilitySet[]; /** - * Resource Name + * Url to follow for getting next page of resources. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly nextLink?: string; +} + +/** Defines the resource properties. */ +export interface InventoryItemProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + inventoryType: + | "Cloud" + | "VirtualNetwork" + | "VirtualMachineTemplate" + | "VirtualMachine"; /** - * Resource Type + * Gets the tracked resource id corresponding to the inventory resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; - /** Gets or sets the location. */ - location: string; - /** Resource tags */ - tags?: { [propertyName: string]: string }; + readonly managedResourceId?: string; /** - * The system data. + * Gets the UUID (which is assigned by VMM) for the inventory item. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; - /** The extended location. */ - extendedLocation: ExtendedLocation; - /** Gets or sets the inventory Item ID for the resource. */ - inventoryItemId?: string; - /** ARM Id of the vmmServer resource in which this resource resides. */ - vmmServerId?: string; - /** ARM Id of the cloud resource to use for deploying the vm. */ - cloudId?: string; - /** ARM Id of the template resource to use for deploying the vm. */ - templateId?: string; - /** Type of checkpoint supported for the vm. */ - checkpointType?: string; - /** Checkpoints in the vm. */ - checkpoints?: Checkpoint[]; - /** Availability Sets in vm. */ - availabilitySets?: AvailabilitySetListItem[]; - /** OS properties. */ - osProfile?: OsProfile; - /** Hardware properties. */ - hardwareProfile?: HardwareProfile; - /** Network properties. */ - networkProfile?: NetworkProfile; - /** Storage properties. */ - storageProfile?: StorageProfile; - /** VMName is the name of VM on the SCVMM server. */ - vmName?: string; - /** Unique ID of the virtual machine. */ - uuid?: string; - /** Gets or sets the generation for the vm. */ - generation?: number; + readonly uuid?: string; /** - * Gets the power state of the virtual machine. + * Gets the Managed Object name in VMM for the inventory item. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly powerState?: string; + readonly inventoryItemName?: string; /** - * Gets or sets the provisioning state. + * Provisioning state of the resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; } -/** Defines the resource properties. */ -export interface Checkpoint { - /** Gets ID of parent of the checkpoint. */ - parentCheckpointID?: string; - /** Gets ID of the checkpoint. */ - checkpointID?: string; - /** Gets name of the checkpoint. */ - name?: string; - /** Gets description of the checkpoint. */ - description?: string; +/** List of InventoryItems. */ +export interface InventoryItemsList { + /** + * Url to follow for getting next page of InventoryItems. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; + /** Array of InventoryItems */ + value: InventoryItem[]; } /** Availability Set model */ @@ -410,21 +411,26 @@ export interface AvailabilitySetListItem { } /** Defines the resource properties. */ -export interface OsProfile { +export interface OsProfileForVMInstance { /** Admin password of the virtual machine. */ adminPassword?: string; /** Gets or sets computer name. */ computerName?: string; /** - * Gets or sets the type of the os. + * Gets the type of the os. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly osType?: OsType; /** - * Gets or sets os name. + * Gets os sku. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osName?: string; + readonly osSku?: string; + /** + * Gets os version. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly osVersion?: string; } /** Defines the resource properties. */ @@ -441,52 +447,17 @@ export interface HardwareProfile { dynamicMemoryMaxMB?: number; /** Gets or sets the min dynamic memory for the vm. */ dynamicMemoryMinMB?: number; - /** Gets highly available property. */ - isHighlyAvailable?: string; + /** + * Gets highly available property. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isHighlyAvailable?: IsHighlyAvailable; } /** Defines the resource properties. */ export interface NetworkProfile { /** Gets or sets the list of network interfaces associated with the virtual machine. */ - networkInterfaces?: NetworkInterfaces[]; -} - -/** Network Interface model */ -export interface NetworkInterfaces { - /** Gets or sets the name of the network interface. */ - name?: string; - /** - * Gets the display name of the network interface as shown in the vmmServer. This is the fallback label for a NIC when the name is not set. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly displayName?: string; - /** - * Gets or sets the nic ipv4 addresses. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ipv4Addresses?: string[]; - /** - * Gets or sets the nic ipv6 addresses. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ipv6Addresses?: string[]; - /** Gets or sets the nic MAC address. */ - macAddress?: string; - /** Gets or sets the ARM Id of the Microsoft.ScVmm/virtualNetwork resource to connect the nic. */ - virtualNetworkId?: string; - /** - * Gets or sets the name of the virtual network in vmmServer that the nic is connected to. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly networkName?: string; - /** Gets or sets the ipv4 address type. */ - ipv4AddressType?: AllocationMethod; - /** Gets or sets the ipv6 address type. */ - ipv6AddressType?: AllocationMethod; - /** Gets or sets the mac address type. */ - macAddressType?: AllocationMethod; - /** Gets or sets the nic id. */ - nicId?: string; + networkInterfaces?: NetworkInterface[]; } /** Defines the resource properties. */ @@ -495,68 +466,49 @@ export interface StorageProfile { disks?: VirtualDisk[]; } -/** Virtual disk model */ -export interface VirtualDisk { - /** Gets or sets the name of the disk. */ - name?: string; - /** - * Gets the display name of the virtual disk as shown in the vmmServer. This is the fallback label for a disk when the name is not set. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly displayName?: string; - /** Gets or sets the disk id. */ - diskId?: string; - /** Gets or sets the disk total size. */ - diskSizeGB?: number; - /** - * Gets or sets the max disk size. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly maxDiskSizeGB?: number; - /** Gets or sets the disk bus. */ - bus?: number; - /** Gets or sets the disk lun. */ - lun?: number; - /** Gets or sets the disk bus type. */ - busType?: string; - /** Gets or sets the disk vhd type. */ - vhdType?: string; - /** - * Gets or sets the disk volume type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly volumeType?: string; +/** Specifies the vmmServer infrastructure specific settings for the virtual machine instance. */ +export interface InfrastructureProfile { + /** Gets or sets the inventory Item ID for the resource. */ + inventoryItemId?: string; + /** ARM Id of the vmmServer resource in which this resource resides. */ + vmmServerId?: string; + /** ARM Id of the cloud resource to use for deploying the vm. */ + cloudId?: string; + /** ARM Id of the template resource to use for deploying the vm. */ + templateId?: string; + /** VMName is the name of VM on the SCVMM server. */ + vmName?: string; + /** Unique ID of the virtual machine. */ + uuid?: string; /** - * Gets the disk vhd format type. + * Last restored checkpoint in the vm. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly vhdFormatType?: string; - /** Gets or sets the disk id in the template. */ - templateDiskId?: string; - /** The QoS policy for the disk. */ - storageQoSPolicy?: StorageQoSPolicyDetails; - /** Gets or sets a value indicating diff disk. */ - createDiffDisk?: CreateDiffDisk; -} - -/** The StorageQoSPolicyDetails definition. */ -export interface StorageQoSPolicyDetails { - /** The name of the policy. */ - name?: string; - /** The ID of the QoS policy. */ - id?: string; -} - -/** Defines the virtualMachineUpdate. */ -export interface VirtualMachineUpdate { - /** Defines the resource properties. */ - properties?: VirtualMachineUpdateProperties; - /** Gets or sets the Resource tags. */ - tags?: { [propertyName: string]: string }; + readonly lastRestoredVMCheckpoint?: Checkpoint; + /** Checkpoints in the vm. */ + checkpoints?: Checkpoint[]; + /** Type of checkpoint supported for the vm. */ + checkpointType?: string; + /** Gets or sets the generation for the vm. */ + generation?: number; + /** Gets or sets the bios guid for the vm. */ + biosGuid?: string; } /** Defines the resource properties. */ -export interface VirtualMachineUpdateProperties { +export interface Checkpoint { + /** Gets ID of parent of the checkpoint. */ + parentCheckpointID?: string; + /** Gets ID of the checkpoint. */ + checkpointID?: string; + /** Gets name of the checkpoint. */ + name?: string; + /** Gets description of the checkpoint. */ + description?: string; +} + +/** Defines the virtualMachineInstanceUpdate. */ +export interface VirtualMachineInstanceUpdate { /** Defines the resource properties. */ hardwareProfile?: HardwareProfileUpdate; /** Defines the resource properties. */ @@ -565,6 +517,8 @@ export interface VirtualMachineUpdateProperties { networkProfile?: NetworkProfileUpdate; /** Availability Sets in vm. */ availabilitySets?: AvailabilitySetListItem[]; + /** Gets the infrastructure profile. */ + infrastructureProfile?: InfrastructureProfileUpdate; } /** Defines the resource properties. */ @@ -612,11 +566,11 @@ export interface VirtualDiskUpdate { /** Defines the resource properties. */ export interface NetworkProfileUpdate { /** Gets or sets the list of network interfaces associated with the virtual machine. */ - networkInterfaces?: NetworkInterfacesUpdate[]; + networkInterfaces?: NetworkInterfaceUpdate[]; } /** Network Interface model */ -export interface NetworkInterfacesUpdate { +export interface NetworkInterfaceUpdate { /** Gets or sets the name of the network interface. */ name?: string; /** Gets or sets the nic MAC address. */ @@ -633,10 +587,38 @@ export interface NetworkInterfacesUpdate { nicId?: string; } +/** Specifies the vmmServer infrastructure specific settings for the virtual machine instance for update. */ +export interface InfrastructureProfileUpdate { + /** Type of checkpoint supported for the vm. */ + checkpointType?: string; +} + +/** List of VirtualMachineInstances. */ +export interface VirtualMachineInstanceListResult { + /** Array of VirtualMachineInstances. */ + value?: VirtualMachineInstance[]; + /** + * Url to follow for getting next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + /** Defines the stop action properties. */ export interface StopVirtualMachineOptions { /** Gets or sets a value indicating whether to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Defaults to false. */ - skipShutdown?: boolean; + skipShutdown?: SkipShutdown; +} + +/** List of HybridIdentityMetadata. */ +export interface VmInstanceHybridIdentityMetadataList { + /** + * Url to follow for getting next page of HybridIdentityMetadata. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; + /** Array of HybridIdentityMetadata */ + value: VmInstanceHybridIdentityMetadata[]; } /** Defines the create checkpoint action properties. */ @@ -659,319 +641,340 @@ export interface VirtualMachineRestoreCheckpoint { id?: string; } -/** List of VirtualMachines. */ -export interface VirtualMachineListResult { - /** List of VirtualMachines. */ - value?: VirtualMachine[]; - /** Url to follow for getting next page of resources. */ - nextLink?: string; +/** Username / Password Credentials to connect to guest. */ +export interface GuestCredential { + /** Gets or sets username to connect with the guest. */ + username: string; + /** Gets or sets the password to connect with the guest. */ + password: string; } -/** The VirtualMachineTemplates resource definition. */ -export interface VirtualMachineTemplate { +/** HTTP Proxy configuration for the VM. */ +export interface HttpProxyConfiguration { + /** Gets or sets httpsProxy url. */ + httpsProxy?: string; +} + +/** List of GuestAgent. */ +export interface GuestAgentList { /** - * Resource Id + * Url to follow for getting next page of GuestAgent. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly nextLink?: string; + /** Array of GuestAgent */ + value: GuestAgent[]; +} + +/** Defines the resource properties. */ +export interface InventoryItemDetails { + /** Gets or sets the inventory Item ID for the resource. */ + inventoryItemId?: string; + /** Gets or sets the Managed Object name in VMM for the resource. */ + inventoryItemName?: string; +} + +/** Managed service identity. */ +export interface Identity { /** - * Resource Name + * The principal id of managed service identity. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly principalId?: string; /** - * Resource Type + * The tenant of managed service identity. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; - /** Gets or sets the location. */ - location: string; - /** Resource tags */ + readonly tenantId?: string; + /** The type of managed service identity. */ + type: IdentityType; +} + +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export interface TrackedResource extends Resource { + /** Resource tags. */ tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives */ + location: string; +} + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface ProxyResource extends Resource {} + +/** The Cloud inventory item. */ +export interface CloudInventoryItem extends InventoryItemProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + inventoryType: "Cloud"; +} + +/** The Virtual network inventory item. */ +export interface VirtualNetworkInventoryItem extends InventoryItemProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + inventoryType: "VirtualNetwork"; +} + +/** The Virtual machine template inventory item. */ +export interface VirtualMachineTemplateInventoryItem + extends InventoryItemProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + inventoryType: "VirtualMachineTemplate"; /** - * The system data. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** The extended location. */ - extendedLocation: ExtendedLocation; - /** Gets or sets the inventory Item ID for the resource. */ - inventoryItemId?: string; - /** Unique ID of the virtual machine template. */ - uuid?: string; - /** ARM Id of the vmmServer resource in which this resource resides. */ - vmmServerId?: string; - /** - * Gets or sets the type of the os. + * Gets the desired number of vCPUs for the vm. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osType?: OsType; + readonly cpuCount?: number; /** - * Gets or sets os name. + * MemoryMB is the desired size of a virtual machine's memory, in MB. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osName?: string; + readonly memoryMB?: number; /** - * Gets or sets computer name. + * Gets the type of the os. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly computerName?: string; + readonly osType?: OsType; /** - * MemoryMB is the desired size of a virtual machine's memory, in MB. + * Gets os name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly memoryMB?: number; + readonly osName?: string; +} + +/** The Virtual machine inventory item. */ +export interface VirtualMachineInventoryItem extends InventoryItemProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + inventoryType: "VirtualMachine"; /** - * Gets or sets the desired number of vCPUs for the vm. + * Gets the type of the os. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly cpuCount?: number; + readonly osType?: OsType; /** - * Gets or sets a value indicating whether to enable processor compatibility mode for live migration of VMs. + * Gets os name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly limitCpuForMigration?: LimitCpuForMigration; + readonly osName?: string; /** - * Gets or sets a value indicating whether to enable dynamic memory or not. + * Gets os version. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly dynamicMemoryEnabled?: DynamicMemoryEnabled; + readonly osVersion?: string; /** - * Gets or sets a value indicating whether the vm template is customizable or not. + * Gets the power state of the virtual machine. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly isCustomizable?: IsCustomizable; + readonly powerState?: string; + /** Gets or sets the nic ip addresses. */ + ipAddresses?: string[]; + /** Cloud inventory resource details where the VM is present. */ + cloud?: InventoryItemDetails; /** - * Gets or sets the max dynamic memory for the vm. + * Gets the bios guid. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly dynamicMemoryMaxMB?: number; + readonly biosGuid?: string; /** - * Gets or sets the min dynamic memory for the vm. + * Gets the tracked resource id corresponding to the inventory resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly dynamicMemoryMinMB?: number; + readonly managedMachineResourceId?: string; +} + +/** The VmmServers resource definition. */ +export interface VMMServer extends TrackedResource { + /** The extended location. */ + extendedLocation: ExtendedLocation; + /** Credentials to connect to VMMServer. */ + credentials?: VMMCredential; + /** Fqdn is the hostname/ip of the vmmServer. */ + fqdn: string; + /** Port is the port on which the vmmServer is listening. */ + port?: number; /** - * Gets highly available property. + * Gets the connection status to the vmmServer. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly isHighlyAvailable?: string; + readonly connectionStatus?: string; /** - * Gets or sets the generation for the vm. + * Gets any error message if connection to vmmServer is having any issue. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly generation?: number; + readonly errorMessage?: string; /** - * Gets or sets the network interfaces of the template. + * Unique ID of vmmServer. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly networkInterfaces?: NetworkInterfaces[]; + readonly uuid?: string; /** - * Gets or sets the disks of the template. + * Version is the version of the vmmSever. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly disks?: VirtualDisk[]; + readonly version?: string; /** - * Gets or sets the provisioning state. + * Provisioning state of the resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; -} - -/** List of VirtualMachineTemplates. */ -export interface VirtualMachineTemplateListResult { - /** List of VirtualMachineTemplates. */ - value?: VirtualMachineTemplate[]; - /** Url to follow for getting next page of resources. */ - nextLink?: string; + readonly provisioningState?: ProvisioningState; } -/** The AvailabilitySets resource definition. */ -export interface AvailabilitySet { +/** The Clouds resource definition. */ +export interface Cloud extends TrackedResource { + /** The extended location. */ + extendedLocation: ExtendedLocation; + /** Gets or sets the inventory Item ID for the resource. */ + inventoryItemId?: string; + /** Unique ID of the cloud. */ + uuid?: string; + /** ARM Id of the vmmServer resource in which this resource resides. */ + vmmServerId?: string; /** - * Resource Id + * Name of the cloud in VMMServer. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly cloudName?: string; /** - * Resource Name + * Capacity of the cloud. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly cloudCapacity?: CloudCapacity; /** - * Resource Type + * List of QoS policies available for the cloud. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; - /** Gets or sets the location. */ - location?: string; - /** Resource tags */ - tags?: { [propertyName: string]: string }; + readonly storageQoSPolicies?: StorageQoSPolicy[]; /** - * The system data. + * Provisioning state of the resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; + readonly provisioningState?: ProvisioningState; +} + +/** The VirtualNetworks resource definition. */ +export interface VirtualNetwork extends TrackedResource { /** The extended location. */ - extendedLocation?: ExtendedLocation; - /** Name of the availability set. */ - availabilitySetName?: string; + extendedLocation: ExtendedLocation; + /** Gets or sets the inventory Item ID for the resource. */ + inventoryItemId?: string; + /** Unique ID of the virtual network. */ + uuid?: string; /** ARM Id of the vmmServer resource in which this resource resides. */ vmmServerId?: string; /** - * Gets or sets the provisioning state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; -} - -/** List of AvailabilitySets. */ -export interface AvailabilitySetListResult { - /** List of AvailabilitySets. */ - value?: AvailabilitySet[]; - /** Url to follow for getting next page of resources. */ - nextLink?: string; -} - -/** Defines the resource properties. */ -export interface InventoryItemProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - inventoryType: - | "Cloud" - | "VirtualNetwork" - | "VirtualMachineTemplate" - | "VirtualMachine"; - /** - * Gets the tracked resource id corresponding to the inventory resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly managedResourceId?: string; - /** - * Gets the UUID (which is assigned by VMM) for the inventory item. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly uuid?: string; - /** - * Gets the Managed Object name in VMM for the inventory item. + * Name of the virtual network in vmmServer. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly inventoryItemName?: string; + readonly networkName?: string; /** - * Gets the provisioning state. + * Provisioning state of the resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; } -/** Common fields that are returned in the response for all Azure Resource Manager resources */ -export interface Resource { +/** The VirtualMachineTemplates resource definition. */ +export interface VirtualMachineTemplate extends TrackedResource { + /** The extended location. */ + extendedLocation: ExtendedLocation; + /** Gets or sets the inventory Item ID for the resource. */ + inventoryItemId?: string; + /** Unique ID of the virtual machine template. */ + uuid?: string; + /** ARM Id of the vmmServer resource in which this resource resides. */ + vmmServerId?: string; /** - * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * Gets the type of the os. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly osType?: OsType; /** - * The name of the resource + * Gets os name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly osName?: string; /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * Gets computer name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; -} - -/** List of InventoryItems. */ -export interface InventoryItemsList { - /** Url to follow for getting next page of InventoryItems. */ - nextLink?: string; - /** Array of InventoryItems */ - value: InventoryItem[]; -} - -/** Defines the resource properties. */ -export interface InventoryItemDetails { - /** Gets or sets the inventory Item ID for the resource. */ - inventoryItemId?: string; - /** Gets or sets the Managed Object name in VMM for the resource. */ - inventoryItemName?: string; -} - -/** The Cloud inventory item. */ -export interface CloudInventoryItem extends InventoryItemProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - inventoryType: "Cloud"; -} - -/** The Virtual network inventory item. */ -export interface VirtualNetworkInventoryItem extends InventoryItemProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - inventoryType: "VirtualNetwork"; -} - -/** The Virtual machine template inventory item. */ -export interface VirtualMachineTemplateInventoryItem - extends InventoryItemProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - inventoryType: "VirtualMachineTemplate"; + readonly computerName?: string; + /** + * MemoryMB is the desired size of a virtual machine's memory, in MB. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly memoryMB?: number; /** - * Gets or sets the desired number of vCPUs for the vm. + * Gets the desired number of vCPUs for the vm. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly cpuCount?: number; /** - * MemoryMB is the desired size of a virtual machine's memory, in MB. + * Gets a value indicating whether to enable processor compatibility mode for live migration of VMs. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly memoryMB?: number; + readonly limitCpuForMigration?: LimitCpuForMigration; /** - * Gets or sets the type of the os. + * Gets a value indicating whether to enable dynamic memory or not. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osType?: OsType; + readonly dynamicMemoryEnabled?: DynamicMemoryEnabled; /** - * Gets or sets os name. + * Gets a value indicating whether the vm template is customizable or not. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osName?: string; -} - -/** The Virtual machine inventory item. */ -export interface VirtualMachineInventoryItem extends InventoryItemProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - inventoryType: "VirtualMachine"; + readonly isCustomizable?: IsCustomizable; /** - * Gets or sets the type of the os. + * Gets the max dynamic memory for the vm. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osType?: OsType; + readonly dynamicMemoryMaxMB?: number; /** - * Gets or sets os name. + * Gets the min dynamic memory for the vm. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osName?: string; + readonly dynamicMemoryMinMB?: number; /** - * Gets the power state of the virtual machine. + * Gets highly available property. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly powerState?: string; - /** Gets or sets the nic ip addresses. */ - ipAddresses?: string[]; - /** Cloud inventory resource details where the VM is present. */ - cloud?: InventoryItemDetails; + readonly isHighlyAvailable?: IsHighlyAvailable; + /** + * Gets the generation for the vm. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly generation?: number; + /** + * Gets the network interfaces of the template. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly networkInterfaces?: NetworkInterface[]; + /** + * Gets the disks of the template. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly disks?: VirtualDisk[]; + /** + * Provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; } -/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export interface ProxyResource extends Resource {} - -/** Defines the inventory item. */ -export interface InventoryItem extends ProxyResource { +/** The AvailabilitySets resource definition. */ +export interface AvailabilitySet extends TrackedResource { + /** The extended location. */ + extendedLocation: ExtendedLocation; + /** Name of the availability set. */ + availabilitySetName?: string; + /** ARM Id of the vmmServer resource in which this resource resides. */ + vmmServerId?: string; /** - * The system data. + * Provisioning state of the resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; + readonly provisioningState?: ProvisioningState; +} + +/** Defines the inventory item. */ +export interface InventoryItem extends ProxyResource { /** Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value. */ kind?: string; /** They inventory type. */ @@ -992,10 +995,121 @@ export interface InventoryItem extends ProxyResource { */ readonly inventoryItemName?: string; /** - * Gets the provisioning state. + * Provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** Define the virtualMachineInstance. */ +export interface VirtualMachineInstance extends ProxyResource { + /** Gets or sets the extended location. */ + extendedLocation: ExtendedLocation; + /** Availability Sets in vm. */ + availabilitySets?: AvailabilitySetListItem[]; + /** OS properties. */ + osProfile?: OsProfileForVMInstance; + /** Hardware properties. */ + hardwareProfile?: HardwareProfile; + /** Network properties. */ + networkProfile?: NetworkProfile; + /** Storage properties. */ + storageProfile?: StorageProfile; + /** Gets the infrastructure profile. */ + infrastructureProfile?: InfrastructureProfile; + /** + * Gets the power state of the virtual machine. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly powerState?: string; + /** + * Provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** Defines the HybridIdentityMetadata. */ +export interface VmInstanceHybridIdentityMetadata extends ProxyResource { + /** The unique identifier for the resource. */ + resourceUid?: string; + /** Gets or sets the Public Key. */ + publicKey?: string; + /** + * Provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** Defines the GuestAgent. */ +export interface GuestAgent extends ProxyResource { + /** + * Gets a unique identifier for this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly uuid?: string; + /** Username / Password Credentials to provision guest agent. */ + credentials?: GuestCredential; + /** HTTP Proxy configuration for the VM. */ + httpProxyConfig?: HttpProxyConfiguration; + /** Gets or sets the guest agent provisioning action. */ + provisioningAction?: ProvisioningAction; + /** + * Gets the guest agent status. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: string; + /** + * Gets the name of the corresponding resource in Kubernetes. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly customResourceName?: string; + /** + * Provisioning state of the resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly provisioningState?: ProvisioningState; +} + +/** Defines headers for VmmServers_delete operation. */ +export interface VmmServersDeleteHeaders { + location?: string; +} + +/** Defines headers for VmmServers_update operation. */ +export interface VmmServersUpdateHeaders { + location?: string; +} + +/** Defines headers for Clouds_delete operation. */ +export interface CloudsDeleteHeaders { + location?: string; +} + +/** Defines headers for Clouds_update operation. */ +export interface CloudsUpdateHeaders { + location?: string; +} + +/** Defines headers for VirtualNetworks_delete operation. */ +export interface VirtualNetworksDeleteHeaders { + location?: string; +} + +/** Defines headers for VirtualNetworks_update operation. */ +export interface VirtualNetworksUpdateHeaders { + location?: string; +} + +/** Defines headers for VirtualMachineTemplates_delete operation. */ +export interface VirtualMachineTemplatesDeleteHeaders { + location?: string; +} + +/** Defines headers for VirtualMachineTemplates_update operation. */ +export interface VirtualMachineTemplatesUpdateHeaders { + location?: string; } /** Defines headers for AvailabilitySets_createOrUpdate operation. */ @@ -1008,8 +1122,90 @@ export interface AvailabilitySetsCreateOrUpdateHeaders { export interface AvailabilitySetsDeleteHeaders { /** Tracking URL for long running operation. */ azureAsyncOperation?: string; + location?: string; +} + +/** Defines headers for AvailabilitySets_update operation. */ +export interface AvailabilitySetsUpdateHeaders { + location?: string; +} + +/** Defines headers for VirtualMachineInstances_update operation. */ +export interface VirtualMachineInstancesUpdateHeaders { + location?: string; +} + +/** Defines headers for VirtualMachineInstances_delete operation. */ +export interface VirtualMachineInstancesDeleteHeaders { + location?: string; +} + +/** Defines headers for VirtualMachineInstances_stop operation. */ +export interface VirtualMachineInstancesStopHeaders { + location?: string; +} + +/** Defines headers for VirtualMachineInstances_start operation. */ +export interface VirtualMachineInstancesStartHeaders { + location?: string; +} + +/** Defines headers for VirtualMachineInstances_restart operation. */ +export interface VirtualMachineInstancesRestartHeaders { + location?: string; +} + +/** Defines headers for VirtualMachineInstances_createCheckpoint operation. */ +export interface VirtualMachineInstancesCreateCheckpointHeaders { + location?: string; } +/** Defines headers for VirtualMachineInstances_deleteCheckpoint operation. */ +export interface VirtualMachineInstancesDeleteCheckpointHeaders { + location?: string; +} + +/** Defines headers for VirtualMachineInstances_restoreCheckpoint operation. */ +export interface VirtualMachineInstancesRestoreCheckpointHeaders { + location?: string; +} + +/** Known values of {@link ProvisioningState} that the service accepts. */ +export enum KnownProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled", + /** Provisioning */ + Provisioning = "Provisioning", + /** Updating */ + Updating = "Updating", + /** Deleting */ + Deleting = "Deleting", + /** Accepted */ + Accepted = "Accepted", + /** Created */ + Created = "Created" +} + +/** + * 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 + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **Provisioning** \ + * **Updating** \ + * **Deleting** \ + * **Accepted** \ + * **Created** + */ +export type ProvisioningState = string; + /** Known values of {@link CreatedByType} that the service accepts. */ export enum KnownCreatedByType { /** User */ @@ -1034,6 +1230,60 @@ export enum KnownCreatedByType { */ export type CreatedByType = string; +/** Known values of {@link Force} that the service accepts. */ +export enum KnownForce { + /** False */ + False = "false", + /** True */ + True = "true" +} + +/** + * Defines values for Force. \ + * {@link KnownForce} can be used interchangeably with Force, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **false** \ + * **true** + */ +export type Force = 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 OsType} that the service accepts. */ export enum KnownOsType { /** Windows */ @@ -1091,6 +1341,42 @@ export enum KnownDynamicMemoryEnabled { */ export type DynamicMemoryEnabled = string; +/** Known values of {@link IsCustomizable} that the service accepts. */ +export enum KnownIsCustomizable { + /** False */ + False = "false", + /** True */ + True = "true" +} + +/** + * Defines values for IsCustomizable. \ + * {@link KnownIsCustomizable} can be used interchangeably with IsCustomizable, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **false** \ + * **true** + */ +export type IsCustomizable = string; + +/** Known values of {@link IsHighlyAvailable} that the service accepts. */ +export enum KnownIsHighlyAvailable { + /** False */ + False = "false", + /** True */ + True = "true" +} + +/** + * Defines values for IsHighlyAvailable. \ + * {@link KnownIsHighlyAvailable} can be used interchangeably with IsHighlyAvailable, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **false** \ + * **true** + */ +export type IsHighlyAvailable = string; + /** Known values of {@link AllocationMethod} that the service accepts. */ export enum KnownAllocationMethod { /** Dynamic */ @@ -1118,17 +1404,59 @@ export enum KnownCreateDiffDisk { } /** - * Defines values for CreateDiffDisk. \ - * {@link KnownCreateDiffDisk} can be used interchangeably with CreateDiffDisk, + * Defines values for CreateDiffDisk. \ + * {@link KnownCreateDiffDisk} can be used interchangeably with CreateDiffDisk, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **false** \ + * **true** + */ +export type CreateDiffDisk = string; + +/** Known values of {@link InventoryType} that the service accepts. */ +export enum KnownInventoryType { + /** Cloud */ + Cloud = "Cloud", + /** VirtualNetwork */ + VirtualNetwork = "VirtualNetwork", + /** VirtualMachineTemplate */ + VirtualMachineTemplate = "VirtualMachineTemplate", + /** VirtualMachine */ + VirtualMachine = "VirtualMachine" +} + +/** + * Defines values for InventoryType. \ + * {@link KnownInventoryType} can be used interchangeably with InventoryType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Cloud** \ + * **VirtualNetwork** \ + * **VirtualMachineTemplate** \ + * **VirtualMachine** + */ +export type InventoryType = string; + +/** Known values of {@link DeleteFromHost} that the service accepts. */ +export enum KnownDeleteFromHost { + /** False */ + False = "false", + /** True */ + True = "true" +} + +/** + * Defines values for DeleteFromHost. \ + * {@link KnownDeleteFromHost} can be used interchangeably with DeleteFromHost, * this enum contains the known values that the service supports. * ### Known values supported by the service * **false** \ * **true** */ -export type CreateDiffDisk = string; +export type DeleteFromHost = string; -/** Known values of {@link IsCustomizable} that the service accepts. */ -export enum KnownIsCustomizable { +/** Known values of {@link SkipShutdown} that the service accepts. */ +export enum KnownSkipShutdown { /** False */ False = "false", /** True */ @@ -1136,38 +1464,53 @@ export enum KnownIsCustomizable { } /** - * Defines values for IsCustomizable. \ - * {@link KnownIsCustomizable} can be used interchangeably with IsCustomizable, + * Defines values for SkipShutdown. \ + * {@link KnownSkipShutdown} can be used interchangeably with SkipShutdown, * this enum contains the known values that the service supports. * ### Known values supported by the service * **false** \ * **true** */ -export type IsCustomizable = string; +export type SkipShutdown = string; -/** Known values of {@link InventoryType} that the service accepts. */ -export enum KnownInventoryType { - /** Cloud */ - Cloud = "Cloud", - /** VirtualNetwork */ - VirtualNetwork = "VirtualNetwork", - /** VirtualMachineTemplate */ - VirtualMachineTemplate = "VirtualMachineTemplate", - /** VirtualMachine */ - VirtualMachine = "VirtualMachine" +/** Known values of {@link ProvisioningAction} that the service accepts. */ +export enum KnownProvisioningAction { + /** Install */ + Install = "install", + /** Uninstall */ + Uninstall = "uninstall", + /** Repair */ + Repair = "repair" } /** - * Defines values for InventoryType. \ - * {@link KnownInventoryType} can be used interchangeably with InventoryType, + * Defines values for ProvisioningAction. \ + * {@link KnownProvisioningAction} can be used interchangeably with ProvisioningAction, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Cloud** \ - * **VirtualNetwork** \ - * **VirtualMachineTemplate** \ - * **VirtualMachine** + * **install** \ + * **uninstall** \ + * **repair** */ -export type InventoryType = string; +export type ProvisioningAction = string; + +/** Known values of {@link IdentityType} that the service accepts. */ +export enum KnownIdentityType { + /** None */ + None = "None", + /** SystemAssigned */ + SystemAssigned = "SystemAssigned" +} + +/** + * Defines values for IdentityType. \ + * {@link KnownIdentityType} can be used interchangeably with IdentityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **SystemAssigned** + */ +export type IdentityType = string; /** Optional parameters. */ export interface VmmServersGetOptionalParams @@ -1192,13 +1535,16 @@ export type VmmServersCreateOrUpdateResponse = VMMServer; export interface VmmServersDeleteOptionalParams extends coreClient.OperationOptions { /** Forces the resource to be deleted from azure. The corresponding CR would be attempted to be deleted too. */ - force?: boolean; + force?: Force; /** 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 VmmServersDeleteResponse = VmmServersDeleteHeaders; + /** Optional parameters. */ export interface VmmServersUpdateOptionalParams extends coreClient.OperationOptions { @@ -1244,14 +1590,14 @@ export interface OperationsListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ -export type OperationsListResponse = ResourceProviderOperationList; +export type OperationsListResponse = OperationListResult; /** Optional parameters. */ export interface OperationsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type OperationsListNextResponse = ResourceProviderOperationList; +export type OperationsListNextResponse = OperationListResult; /** Optional parameters. */ export interface CloudsGetOptionalParams extends coreClient.OperationOptions {} @@ -1275,13 +1621,16 @@ export type CloudsCreateOrUpdateResponse = Cloud; export interface CloudsDeleteOptionalParams extends coreClient.OperationOptions { /** Forces the resource to be deleted from azure. The corresponding CR would be attempted to be deleted too. */ - force?: boolean; + force?: Force; /** 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 CloudsDeleteResponse = CloudsDeleteHeaders; + /** Optional parameters. */ export interface CloudsUpdateOptionalParams extends coreClient.OperationOptions { @@ -1345,13 +1694,16 @@ export type VirtualNetworksCreateOrUpdateResponse = VirtualNetwork; export interface VirtualNetworksDeleteOptionalParams extends coreClient.OperationOptions { /** Forces the resource to be deleted from azure. The corresponding CR would be attempted to be deleted too. */ - force?: boolean; + force?: Force; /** 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 VirtualNetworksDeleteResponse = VirtualNetworksDeleteHeaders; + /** Optional parameters. */ export interface VirtualNetworksUpdateOptionalParams extends coreClient.OperationOptions { @@ -1393,14 +1745,14 @@ export interface VirtualNetworksListBySubscriptionNextOptionalParams export type VirtualNetworksListBySubscriptionNextResponse = VirtualNetworkListResult; /** Optional parameters. */ -export interface VirtualMachinesGetOptionalParams +export interface VirtualMachineTemplatesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type VirtualMachinesGetResponse = VirtualMachine; +export type VirtualMachineTemplatesGetResponse = VirtualMachineTemplate; /** Optional parameters. */ -export interface VirtualMachinesCreateOrUpdateOptionalParams +export interface VirtualMachineTemplatesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1409,23 +1761,24 @@ export interface VirtualMachinesCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type VirtualMachinesCreateOrUpdateResponse = VirtualMachine; +export type VirtualMachineTemplatesCreateOrUpdateResponse = VirtualMachineTemplate; /** Optional parameters. */ -export interface VirtualMachinesDeleteOptionalParams +export interface VirtualMachineTemplatesDeleteOptionalParams extends coreClient.OperationOptions { /** Forces the resource to be deleted from azure. The corresponding CR would be attempted to be deleted too. */ - force?: boolean; - /** Whether to just disable the VM from azure and retain the VM in the VMM. */ - retain?: boolean; + force?: Force; /** 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 VirtualMachineTemplatesDeleteResponse = VirtualMachineTemplatesDeleteHeaders; + /** Optional parameters. */ -export interface VirtualMachinesUpdateOptionalParams +export interface VirtualMachineTemplatesUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1434,108 +1787,156 @@ export interface VirtualMachinesUpdateOptionalParams } /** Contains response data for the update operation. */ -export type VirtualMachinesUpdateResponse = VirtualMachine; +export type VirtualMachineTemplatesUpdateResponse = VirtualMachineTemplate; /** Optional parameters. */ -export interface VirtualMachinesStopOptionalParams - extends coreClient.OperationOptions { - /** Virtualmachine stop action payload. */ - body?: StopVirtualMachineOptions; - /** 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; -} +export interface VirtualMachineTemplatesListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type VirtualMachineTemplatesListByResourceGroupResponse = VirtualMachineTemplateListResult; /** Optional parameters. */ -export interface VirtualMachinesStartOptionalParams - 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; -} +export interface VirtualMachineTemplatesListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type VirtualMachineTemplatesListBySubscriptionResponse = VirtualMachineTemplateListResult; /** Optional parameters. */ -export interface VirtualMachinesRestartOptionalParams - 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; -} +export interface VirtualMachineTemplatesListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type VirtualMachineTemplatesListByResourceGroupNextResponse = VirtualMachineTemplateListResult; + +/** Optional parameters. */ +export interface VirtualMachineTemplatesListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type VirtualMachineTemplatesListBySubscriptionNextResponse = VirtualMachineTemplateListResult; + +/** Optional parameters. */ +export interface AvailabilitySetsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type AvailabilitySetsGetResponse = AvailabilitySet; /** Optional parameters. */ -export interface VirtualMachinesCreateCheckpointOptionalParams +export interface AvailabilitySetsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - /** Virtualmachine create checkpoint action payload. */ - body?: VirtualMachineCreateCheckpoint; /** 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 createOrUpdate operation. */ +export type AvailabilitySetsCreateOrUpdateResponse = AvailabilitySet; + /** Optional parameters. */ -export interface VirtualMachinesDeleteCheckpointOptionalParams +export interface AvailabilitySetsDeleteOptionalParams extends coreClient.OperationOptions { - /** Virtualmachine delete checkpoint action payload. */ - body?: VirtualMachineDeleteCheckpoint; + /** Forces the resource to be deleted from azure. The corresponding CR would be attempted to be deleted too. */ + force?: Force; /** 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 AvailabilitySetsDeleteResponse = AvailabilitySetsDeleteHeaders; + /** Optional parameters. */ -export interface VirtualMachinesRestoreCheckpointOptionalParams +export interface AvailabilitySetsUpdateOptionalParams extends coreClient.OperationOptions { - /** Virtualmachine restore checkpoint action payload. */ - body?: VirtualMachineRestoreCheckpoint; /** 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 AvailabilitySetsUpdateResponse = AvailabilitySet; + /** Optional parameters. */ -export interface VirtualMachinesListByResourceGroupOptionalParams +export interface AvailabilitySetsListByResourceGroupOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroup operation. */ -export type VirtualMachinesListByResourceGroupResponse = VirtualMachineListResult; +export type AvailabilitySetsListByResourceGroupResponse = AvailabilitySetListResult; /** Optional parameters. */ -export interface VirtualMachinesListBySubscriptionOptionalParams +export interface AvailabilitySetsListBySubscriptionOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listBySubscription operation. */ -export type VirtualMachinesListBySubscriptionResponse = VirtualMachineListResult; +export type AvailabilitySetsListBySubscriptionResponse = AvailabilitySetListResult; /** Optional parameters. */ -export interface VirtualMachinesListByResourceGroupNextOptionalParams +export interface AvailabilitySetsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroupNext operation. */ -export type VirtualMachinesListByResourceGroupNextResponse = VirtualMachineListResult; +export type AvailabilitySetsListByResourceGroupNextResponse = AvailabilitySetListResult; /** Optional parameters. */ -export interface VirtualMachinesListBySubscriptionNextOptionalParams +export interface AvailabilitySetsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listBySubscriptionNext operation. */ -export type VirtualMachinesListBySubscriptionNextResponse = VirtualMachineListResult; +export type AvailabilitySetsListBySubscriptionNextResponse = AvailabilitySetListResult; /** Optional parameters. */ -export interface VirtualMachineTemplatesGetOptionalParams +export interface InventoryItemsCreateOptionalParams + extends coreClient.OperationOptions { + /** Request payload. */ + body?: InventoryItem; +} + +/** Contains response data for the create operation. */ +export type InventoryItemsCreateResponse = InventoryItem; + +/** Optional parameters. */ +export interface InventoryItemsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type VirtualMachineTemplatesGetResponse = VirtualMachineTemplate; +export type InventoryItemsGetResponse = InventoryItem; /** Optional parameters. */ -export interface VirtualMachineTemplatesCreateOrUpdateOptionalParams +export interface InventoryItemsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface InventoryItemsListByVMMServerOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByVMMServer operation. */ +export type InventoryItemsListByVMMServerResponse = InventoryItemsList; + +/** Optional parameters. */ +export interface InventoryItemsListByVMMServerNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByVMMServerNext operation. */ +export type InventoryItemsListByVMMServerNextResponse = InventoryItemsList; + +/** Optional parameters. */ +export interface VirtualMachineInstancesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type VirtualMachineInstancesGetResponse = VirtualMachineInstance; + +/** Optional parameters. */ +export interface VirtualMachineInstancesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + /** Request payload. */ + body?: VirtualMachineInstance; /** 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. */ @@ -1543,163 +1944,191 @@ export interface VirtualMachineTemplatesCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type VirtualMachineTemplatesCreateOrUpdateResponse = VirtualMachineTemplate; +export type VirtualMachineInstancesCreateOrUpdateResponse = VirtualMachineInstance; /** Optional parameters. */ -export interface VirtualMachineTemplatesDeleteOptionalParams +export interface VirtualMachineInstancesUpdateOptionalParams extends coreClient.OperationOptions { - /** Forces the resource to be deleted from azure. The corresponding CR would be attempted to be deleted too. */ - force?: boolean; + /** Resource properties to update. */ + body?: VirtualMachineInstanceUpdate; /** 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 VirtualMachineInstancesUpdateResponse = VirtualMachineInstance; + /** Optional parameters. */ -export interface VirtualMachineTemplatesUpdateOptionalParams +export interface VirtualMachineInstancesDeleteOptionalParams extends coreClient.OperationOptions { + /** Whether force delete was specified. */ + force?: Force; + /** Whether to disable the VM from azure and also delete it from VMM. */ + deleteFromHost?: DeleteFromHost; /** 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 VirtualMachineTemplatesUpdateResponse = VirtualMachineTemplate; - -/** Optional parameters. */ -export interface VirtualMachineTemplatesListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type VirtualMachineTemplatesListByResourceGroupResponse = VirtualMachineTemplateListResult; +/** Contains response data for the delete operation. */ +export type VirtualMachineInstancesDeleteResponse = VirtualMachineInstancesDeleteHeaders; /** Optional parameters. */ -export interface VirtualMachineTemplatesListBySubscriptionOptionalParams +export interface VirtualMachineInstancesListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listBySubscription operation. */ -export type VirtualMachineTemplatesListBySubscriptionResponse = VirtualMachineTemplateListResult; +/** Contains response data for the list operation. */ +export type VirtualMachineInstancesListResponse = VirtualMachineInstanceListResult; /** Optional parameters. */ -export interface VirtualMachineTemplatesListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} +export interface VirtualMachineInstancesStopOptionalParams + extends coreClient.OperationOptions { + /** Virtualmachine stop action payload. */ + body?: StopVirtualMachineOptions; + /** 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 listByResourceGroupNext operation. */ -export type VirtualMachineTemplatesListByResourceGroupNextResponse = VirtualMachineTemplateListResult; +/** Contains response data for the stop operation. */ +export type VirtualMachineInstancesStopResponse = VirtualMachineInstancesStopHeaders; /** Optional parameters. */ -export interface VirtualMachineTemplatesListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} +export interface VirtualMachineInstancesStartOptionalParams + 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 listBySubscriptionNext operation. */ -export type VirtualMachineTemplatesListBySubscriptionNextResponse = VirtualMachineTemplateListResult; +/** Contains response data for the start operation. */ +export type VirtualMachineInstancesStartResponse = VirtualMachineInstancesStartHeaders; /** Optional parameters. */ -export interface AvailabilitySetsGetOptionalParams - extends coreClient.OperationOptions {} +export interface VirtualMachineInstancesRestartOptionalParams + 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 get operation. */ -export type AvailabilitySetsGetResponse = AvailabilitySet; +/** Contains response data for the restart operation. */ +export type VirtualMachineInstancesRestartResponse = VirtualMachineInstancesRestartHeaders; /** Optional parameters. */ -export interface AvailabilitySetsCreateOrUpdateOptionalParams +export interface VirtualMachineInstancesCreateCheckpointOptionalParams extends coreClient.OperationOptions { + /** Virtualmachine create checkpoint action payload. */ + body?: VirtualMachineCreateCheckpoint; /** 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 createOrUpdate operation. */ -export type AvailabilitySetsCreateOrUpdateResponse = AvailabilitySet; +/** Contains response data for the createCheckpoint operation. */ +export type VirtualMachineInstancesCreateCheckpointResponse = VirtualMachineInstancesCreateCheckpointHeaders; /** Optional parameters. */ -export interface AvailabilitySetsDeleteOptionalParams +export interface VirtualMachineInstancesDeleteCheckpointOptionalParams extends coreClient.OperationOptions { - /** Forces the resource to be deleted from azure. The corresponding CR would be attempted to be deleted too. */ - force?: boolean; + /** Virtualmachine delete checkpoint action payload. */ + body?: VirtualMachineDeleteCheckpoint; /** 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 deleteCheckpoint operation. */ +export type VirtualMachineInstancesDeleteCheckpointResponse = VirtualMachineInstancesDeleteCheckpointHeaders; + /** Optional parameters. */ -export interface AvailabilitySetsUpdateOptionalParams +export interface VirtualMachineInstancesRestoreCheckpointOptionalParams extends coreClient.OperationOptions { + /** Virtualmachine restore checkpoint action payload. */ + body?: VirtualMachineRestoreCheckpoint; /** 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 AvailabilitySetsUpdateResponse = AvailabilitySet; +/** Contains response data for the restoreCheckpoint operation. */ +export type VirtualMachineInstancesRestoreCheckpointResponse = VirtualMachineInstancesRestoreCheckpointHeaders; /** Optional parameters. */ -export interface AvailabilitySetsListByResourceGroupOptionalParams +export interface VirtualMachineInstancesListNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroup operation. */ -export type AvailabilitySetsListByResourceGroupResponse = AvailabilitySetListResult; +/** Contains response data for the listNext operation. */ +export type VirtualMachineInstancesListNextResponse = VirtualMachineInstanceListResult; /** Optional parameters. */ -export interface AvailabilitySetsListBySubscriptionOptionalParams +export interface VirtualMachineInstanceHybridIdentityMetadataGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listBySubscription operation. */ -export type AvailabilitySetsListBySubscriptionResponse = AvailabilitySetListResult; +/** Contains response data for the get operation. */ +export type VirtualMachineInstanceHybridIdentityMetadataGetResponse = VmInstanceHybridIdentityMetadata; /** Optional parameters. */ -export interface AvailabilitySetsListByResourceGroupNextOptionalParams +export interface VirtualMachineInstanceHybridIdentityMetadataListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroupNext operation. */ -export type AvailabilitySetsListByResourceGroupNextResponse = AvailabilitySetListResult; +/** Contains response data for the list operation. */ +export type VirtualMachineInstanceHybridIdentityMetadataListResponse = VmInstanceHybridIdentityMetadataList; /** Optional parameters. */ -export interface AvailabilitySetsListBySubscriptionNextOptionalParams +export interface VirtualMachineInstanceHybridIdentityMetadataListNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listBySubscriptionNext operation. */ -export type AvailabilitySetsListBySubscriptionNextResponse = AvailabilitySetListResult; +/** Contains response data for the listNext operation. */ +export type VirtualMachineInstanceHybridIdentityMetadataListNextResponse = VmInstanceHybridIdentityMetadataList; /** Optional parameters. */ -export interface InventoryItemsCreateOptionalParams +export interface VMInstanceGuestAgentsCreateOptionalParams extends coreClient.OperationOptions { /** Request payload. */ - body?: InventoryItem; + body?: GuestAgent; + /** 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 InventoryItemsCreateResponse = InventoryItem; +export type VMInstanceGuestAgentsCreateResponse = GuestAgent; /** Optional parameters. */ -export interface InventoryItemsGetOptionalParams +export interface VMInstanceGuestAgentsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type InventoryItemsGetResponse = InventoryItem; +export type VMInstanceGuestAgentsGetResponse = GuestAgent; /** Optional parameters. */ -export interface InventoryItemsDeleteOptionalParams +export interface VMInstanceGuestAgentsDeleteOptionalParams extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface InventoryItemsListByVMMServerOptionalParams +export interface VMInstanceGuestAgentsListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByVMMServer operation. */ -export type InventoryItemsListByVMMServerResponse = InventoryItemsList; +/** Contains response data for the list operation. */ +export type VMInstanceGuestAgentsListResponse = GuestAgentList; /** Optional parameters. */ -export interface InventoryItemsListByVMMServerNextOptionalParams +export interface VMInstanceGuestAgentsListNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByVMMServerNext operation. */ -export type InventoryItemsListByVMMServerNextResponse = InventoryItemsList; +/** Contains response data for the listNext operation. */ +export type VMInstanceGuestAgentsListNextResponse = GuestAgentList; /** Optional parameters. */ export interface ScvmmOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/scvmm/arm-scvmm/src/models/mappers.ts b/sdk/scvmm/arm-scvmm/src/models/mappers.ts index 8559a0836bd0..cea4d5b62ca7 100644 --- a/sdk/scvmm/arm-scvmm/src/models/mappers.ts +++ b/sdk/scvmm/arm-scvmm/src/models/mappers.ts @@ -8,141 +8,79 @@ import * as coreClient from "@azure/core-client"; -export const VMMServer: coreClient.CompositeMapper = { +export const VMMCredential: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VMMServer", + className: "VMMCredential", modelProperties: { - id: { - serializedName: "id", - readOnly: true, + username: { + serializedName: "username", type: { name: "String" } }, - name: { - serializedName: "name", - readOnly: true, + password: { + serializedName: "password", type: { name: "String" } - }, + } + } + } +}; + +export const ExtendedLocation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExtendedLocation", + modelProperties: { type: { serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - location: { - serializedName: "location", - required: true, - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation" - } - }, - credentials: { - serializedName: "properties.credentials", - type: { - name: "Composite", - className: "VMMServerPropertiesCredentials" - } - }, - fqdn: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.fqdn", - required: true, - type: { - name: "String" - } - }, - port: { - constraints: { - InclusiveMaximum: 65535, - InclusiveMinimum: 1 - }, - serializedName: "properties.port", - type: { - name: "Number" - } - }, - connectionStatus: { - serializedName: "properties.connectionStatus", - readOnly: true, type: { name: "String" } }, - errorMessage: { - serializedName: "properties.errorMessage", - readOnly: true, + name: { + serializedName: "name", type: { name: "String" } - }, - uuid: { - serializedName: "properties.uuid", + } + } + } +}; + +export const Resource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", readOnly: true, type: { name: "String" } }, - version: { - serializedName: "properties.version", + name: { + serializedName: "name", readOnly: true, type: { name: "String" } }, - provisioningState: { - serializedName: "properties.provisioningState", + type: { + serializedName: "type", readOnly: true, type: { name: "String" } - } - } - } -}; - -export const VMMServerPropertiesCredentials: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VMMServerPropertiesCredentials", - modelProperties: { - username: { - serializedName: "username", - type: { - name: "String" - } }, - password: { - serializedName: "password", + systemData: { + serializedName: "systemData", type: { - name: "String" + name: "Composite", + className: "SystemData" } } } @@ -194,27 +132,6 @@ export const SystemData: coreClient.CompositeMapper = { } }; -export const ExtendedLocation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExtendedLocation", - modelProperties: { - type: { - serializedName: "type", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - export const ErrorResponse: coreClient.CompositeMapper = { type: { name: "Composite", @@ -224,17 +141,17 @@ export const ErrorResponse: coreClient.CompositeMapper = { serializedName: "error", type: { name: "Composite", - className: "ErrorDefinition" + className: "ErrorDetail" } } } } }; -export const ErrorDefinition: coreClient.CompositeMapper = { +export const ErrorDetail: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorDefinition", + className: "ErrorDetail", modelProperties: { code: { serializedName: "code", @@ -250,6 +167,13 @@ export const ErrorDefinition: coreClient.CompositeMapper = { name: "String" } }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, details: { serializedName: "details", readOnly: true, @@ -258,7 +182,20 @@ export const ErrorDefinition: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ErrorDefinition" + className: "ErrorDetail" + } + } + } + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" } } } @@ -267,6 +204,30 @@ export const ErrorDefinition: coreClient.CompositeMapper = { } }; +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 ResourcePatch: coreClient.CompositeMapper = { type: { name: "Composite", @@ -302,6 +263,7 @@ export const VMMServerListResult: coreClient.CompositeMapper = { }, nextLink: { serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -310,25 +272,27 @@ export const VMMServerListResult: coreClient.CompositeMapper = { } }; -export const ResourceProviderOperationList: coreClient.CompositeMapper = { +export const OperationListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceProviderOperationList", + className: "OperationListResult", modelProperties: { value: { serializedName: "value", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "ResourceProviderOperation" + className: "Operation" } } } }, nextLink: { serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -337,59 +301,79 @@ export const ResourceProviderOperationList: coreClient.CompositeMapper = { } }; -export const ResourceProviderOperation: coreClient.CompositeMapper = { +export const Operation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceProviderOperation", + className: "Operation", modelProperties: { - isDataAction: { - serializedName: "isDataAction", + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - name: { - serializedName: "name", + isDataAction: { + serializedName: "isDataAction", + readOnly: true, type: { - name: "String" + name: "Boolean" } }, display: { serializedName: "display", type: { name: "Composite", - className: "ResourceProviderOperationDisplay" + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", + readOnly: true, + type: { + name: "String" + } + }, + actionType: { + serializedName: "actionType", + readOnly: true, + type: { + name: "String" } } } } }; -export const ResourceProviderOperationDisplay: coreClient.CompositeMapper = { +export const OperationDisplay: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceProviderOperationDisplay", + 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" } @@ -398,159 +382,46 @@ export const ResourceProviderOperationDisplay: coreClient.CompositeMapper = { } }; -export const Cloud: coreClient.CompositeMapper = { +export const CloudCapacity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Cloud", + className: "CloudCapacity", modelProperties: { - id: { - serializedName: "id", - readOnly: true, + cpuCount: { + serializedName: "cpuCount", type: { - name: "String" + name: "Number" + } + }, + memoryMB: { + serializedName: "memoryMB", + type: { + name: "Number" } }, + vmCount: { + serializedName: "vmCount", + type: { + name: "Number" + } + } + } + } +}; + +export const StorageQoSPolicy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageQoSPolicy", + modelProperties: { name: { serializedName: "name", - readOnly: true, type: { name: "String" } }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - location: { - serializedName: "location", - required: true, - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation" - } - }, - inventoryItemId: { - serializedName: "properties.inventoryItemId", - type: { - name: "String" - } - }, - uuid: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.uuid", - type: { - name: "String" - } - }, - vmmServerId: { - serializedName: "properties.vmmServerId", - type: { - name: "String" - } - }, - cloudName: { - serializedName: "properties.cloudName", - readOnly: true, - type: { - name: "String" - } - }, - cloudCapacity: { - serializedName: "properties.cloudCapacity", - type: { - name: "Composite", - className: "CloudCapacity" - } - }, - storageQoSPolicies: { - serializedName: "properties.storageQoSPolicies", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StorageQoSPolicy" - } - } - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const CloudCapacity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudCapacity", - modelProperties: { - cpuCount: { - serializedName: "cpuCount", - type: { - name: "Number" - } - }, - memoryMB: { - serializedName: "memoryMB", - type: { - name: "Number" - } - }, - vmCount: { - serializedName: "vmCount", - type: { - name: "Number" - } - } - } - } -}; - -export const StorageQoSPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageQoSPolicy", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - id: { - serializedName: "id", + id: { + serializedName: "id", type: { name: "String" } @@ -602,6 +473,7 @@ export const CloudListResult: coreClient.CompositeMapper = { }, nextLink: { serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -610,91 +482,115 @@ export const CloudListResult: coreClient.CompositeMapper = { } }; -export const VirtualNetwork: coreClient.CompositeMapper = { +export const VirtualNetworkListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualNetwork", + className: "VirtualNetworkListResult", modelProperties: { - id: { - serializedName: "id", + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualNetwork" + } + } + } + }, + nextLink: { + serializedName: "nextLink", readOnly: true, type: { name: "String" } - }, + } + } + } +}; + +export const NetworkInterface: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkInterface", + modelProperties: { name: { serializedName: "name", - readOnly: true, type: { name: "String" } }, - type: { - serializedName: "type", + displayName: { + serializedName: "displayName", readOnly: true, type: { name: "String" } }, - location: { - serializedName: "location", - required: true, + ipv4Addresses: { + serializedName: "ipv4Addresses", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - tags: { - serializedName: "tags", + ipv6Addresses: { + serializedName: "ipv6Addresses", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - systemData: { - serializedName: "systemData", + macAddress: { + serializedName: "macAddress", type: { - name: "Composite", - className: "SystemData" + name: "String" } }, - extendedLocation: { - serializedName: "extendedLocation", + virtualNetworkId: { + serializedName: "virtualNetworkId", type: { - name: "Composite", - className: "ExtendedLocation" + name: "String" } }, - inventoryItemId: { - serializedName: "properties.inventoryItemId", + networkName: { + serializedName: "networkName", + readOnly: true, type: { name: "String" } }, - uuid: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.uuid", + ipv4AddressType: { + serializedName: "ipv4AddressType", type: { name: "String" } }, - vmmServerId: { - serializedName: "properties.vmmServerId", + ipv6AddressType: { + serializedName: "ipv6AddressType", type: { name: "String" } }, - networkName: { - serializedName: "properties.networkName", - readOnly: true, + macAddressType: { + serializedName: "macAddressType", type: { name: "String" } }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + nicId: { + serializedName: "nicId", type: { name: "String" } @@ -703,199 +599,221 @@ export const VirtualNetwork: coreClient.CompositeMapper = { } }; -export const VirtualNetworkListResult: coreClient.CompositeMapper = { +export const VirtualDisk: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualNetworkListResult", + className: "VirtualDisk", modelProperties: { - value: { - serializedName: "value", + name: { + serializedName: "name", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualNetwork" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + displayName: { + serializedName: "displayName", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const VirtualMachine: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachine", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, + }, + diskId: { + serializedName: "diskId", type: { name: "String" } }, - name: { - serializedName: "name", - readOnly: true, + diskSizeGB: { + serializedName: "diskSizeGB", type: { - name: "String" + name: "Number" } }, - type: { - serializedName: "type", + maxDiskSizeGB: { + serializedName: "maxDiskSizeGB", readOnly: true, type: { - name: "String" + name: "Number" } }, - location: { - serializedName: "location", - required: true, + bus: { + serializedName: "bus", type: { - name: "String" + name: "Number" } }, - tags: { - serializedName: "tags", + lun: { + serializedName: "lun", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Number" } }, - systemData: { - serializedName: "systemData", + busType: { + serializedName: "busType", type: { - name: "Composite", - className: "SystemData" + name: "String" } }, - extendedLocation: { - serializedName: "extendedLocation", + vhdType: { + serializedName: "vhdType", type: { - name: "Composite", - className: "ExtendedLocation" + name: "String" } }, - inventoryItemId: { - serializedName: "properties.inventoryItemId", + volumeType: { + serializedName: "volumeType", + readOnly: true, type: { name: "String" } }, - vmmServerId: { - serializedName: "properties.vmmServerId", + vhdFormatType: { + serializedName: "vhdFormatType", + readOnly: true, type: { name: "String" } }, - cloudId: { - serializedName: "properties.cloudId", + templateDiskId: { + serializedName: "templateDiskId", type: { name: "String" } }, - templateId: { - serializedName: "properties.templateId", + storageQoSPolicy: { + serializedName: "storageQoSPolicy", type: { - name: "String" + name: "Composite", + className: "StorageQoSPolicyDetails" } }, - checkpointType: { - serializedName: "properties.checkpointType", + createDiffDisk: { + serializedName: "createDiffDisk", + type: { + name: "String" + } + } + } + } +}; + +export const StorageQoSPolicyDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageQoSPolicyDetails", + modelProperties: { + name: { + serializedName: "name", type: { name: "String" } }, - checkpoints: { - serializedName: "properties.checkpoints", + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineTemplateListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineTemplateListResult", + modelProperties: { + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Checkpoint" + className: "VirtualMachineTemplate" } } } }, - availabilitySets: { - serializedName: "properties.availabilitySets", + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const AvailabilitySetListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AvailabilitySetListResult", + modelProperties: { + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "AvailabilitySetListItem" + className: "AvailabilitySet" } } } }, - osProfile: { - serializedName: "properties.osProfile", - type: { - name: "Composite", - className: "OsProfile" - } - }, - hardwareProfile: { - serializedName: "properties.hardwareProfile", - type: { - name: "Composite", - className: "HardwareProfile" - } - }, - networkProfile: { - serializedName: "properties.networkProfile", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "Composite", - className: "NetworkProfile" + name: "String" } - }, - storageProfile: { - serializedName: "properties.storageProfile", + } + } + } +}; + +export const InventoryItemProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InventoryItemProperties", + uberParent: "InventoryItemProperties", + polymorphicDiscriminator: { + serializedName: "inventoryType", + clientName: "inventoryType" + }, + modelProperties: { + inventoryType: { + serializedName: "inventoryType", + required: true, type: { - name: "Composite", - className: "StorageProfile" + name: "String" } }, - vmName: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.vmName", + managedResourceId: { + serializedName: "managedResourceId", + readOnly: true, type: { name: "String" } }, uuid: { - serializedName: "properties.uuid", + serializedName: "uuid", + readOnly: true, type: { name: "String" } }, - generation: { - serializedName: "properties.generation", - type: { - name: "Number" - } - }, - powerState: { - serializedName: "properties.powerState", + inventoryItemName: { + serializedName: "inventoryItemName", readOnly: true, type: { name: "String" } }, provisioningState: { - serializedName: "properties.provisioningState", + serializedName: "provisioningState", readOnly: true, type: { name: "String" @@ -905,33 +823,29 @@ export const VirtualMachine: coreClient.CompositeMapper = { } }; -export const Checkpoint: coreClient.CompositeMapper = { +export const InventoryItemsList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Checkpoint", + className: "InventoryItemsList", modelProperties: { - parentCheckpointID: { - serializedName: "parentCheckpointID", - type: { - name: "String" - } - }, - checkpointID: { - serializedName: "checkpointID", - type: { - name: "String" - } - }, - name: { - serializedName: "name", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } }, - description: { - serializedName: "description", + value: { + serializedName: "value", + required: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InventoryItem" + } + } } } } @@ -959,10 +873,10 @@ export const AvailabilitySetListItem: coreClient.CompositeMapper = { } }; -export const OsProfile: coreClient.CompositeMapper = { +export const OsProfileForVMInstance: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OsProfile", + className: "OsProfileForVMInstance", modelProperties: { adminPassword: { serializedName: "adminPassword", @@ -983,8 +897,15 @@ export const OsProfile: coreClient.CompositeMapper = { name: "String" } }, - osName: { - serializedName: "osName", + osSku: { + serializedName: "osSku", + readOnly: true, + type: { + name: "String" + } + }, + osVersion: { + serializedName: "osVersion", readOnly: true, type: { name: "String" @@ -1037,6 +958,7 @@ export const HardwareProfile: coreClient.CompositeMapper = { }, isHighlyAvailable: { serializedName: "isHighlyAvailable", + readOnly: true, type: { name: "String" } @@ -1057,7 +979,7 @@ export const NetworkProfile: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "NetworkInterfaces" + className: "NetworkInterface" } } } @@ -1066,206 +988,104 @@ export const NetworkProfile: coreClient.CompositeMapper = { } }; -export const NetworkInterfaces: coreClient.CompositeMapper = { +export const StorageProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "NetworkInterfaces", + className: "StorageProfile", modelProperties: { - name: { - serializedName: "name", + disks: { + serializedName: "disks", type: { - name: "String" - } - }, - displayName: { - serializedName: "displayName", - readOnly: true, - type: { - name: "String" - } - }, - ipv4Addresses: { - serializedName: "ipv4Addresses", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - ipv6Addresses: { - serializedName: "ipv6Addresses", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - macAddress: { - serializedName: "macAddress", - type: { - name: "String" - } - }, - virtualNetworkId: { - serializedName: "virtualNetworkId", - type: { - name: "String" - } - }, - networkName: { - serializedName: "networkName", - readOnly: true, - type: { - name: "String" - } - }, - ipv4AddressType: { - serializedName: "ipv4AddressType", - type: { - name: "String" - } - }, - ipv6AddressType: { - serializedName: "ipv6AddressType", - type: { - name: "String" - } - }, - macAddressType: { - serializedName: "macAddressType", - type: { - name: "String" - } - }, - nicId: { - serializedName: "nicId", - type: { - name: "String" - } - } - } - } -}; - -export const StorageProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageProfile", - modelProperties: { - disks: { - serializedName: "disks", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualDisk" - } - } + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualDisk" + } + } } } } } }; -export const VirtualDisk: coreClient.CompositeMapper = { +export const InfrastructureProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualDisk", + className: "InfrastructureProfile", modelProperties: { - name: { - serializedName: "name", + inventoryItemId: { + serializedName: "inventoryItemId", type: { name: "String" } }, - displayName: { - serializedName: "displayName", - readOnly: true, + vmmServerId: { + serializedName: "vmmServerId", type: { name: "String" } }, - diskId: { - serializedName: "diskId", + cloudId: { + serializedName: "cloudId", type: { name: "String" } }, - diskSizeGB: { - serializedName: "diskSizeGB", - type: { - name: "Number" - } - }, - maxDiskSizeGB: { - serializedName: "maxDiskSizeGB", - readOnly: true, - type: { - name: "Number" - } - }, - bus: { - serializedName: "bus", - type: { - name: "Number" - } - }, - lun: { - serializedName: "lun", + templateId: { + serializedName: "templateId", type: { - name: "Number" + name: "String" } }, - busType: { - serializedName: "busType", + vmName: { + constraints: { + MinLength: 1 + }, + serializedName: "vmName", type: { name: "String" } }, - vhdType: { - serializedName: "vhdType", + uuid: { + serializedName: "uuid", type: { name: "String" } }, - volumeType: { - serializedName: "volumeType", - readOnly: true, + lastRestoredVMCheckpoint: { + serializedName: "lastRestoredVMCheckpoint", type: { - name: "String" + name: "Composite", + className: "Checkpoint" } }, - vhdFormatType: { - serializedName: "vhdFormatType", - readOnly: true, + checkpoints: { + serializedName: "checkpoints", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Checkpoint" + } + } } }, - templateDiskId: { - serializedName: "templateDiskId", + checkpointType: { + serializedName: "checkpointType", type: { name: "String" } }, - storageQoSPolicy: { - serializedName: "storageQoSPolicy", + generation: { + serializedName: "generation", type: { - name: "Composite", - className: "StorageQoSPolicyDetails" + name: "Number" } }, - createDiffDisk: { - serializedName: "createDiffDisk", + biosGuid: { + serializedName: "biosGuid", type: { name: "String" } @@ -1274,78 +1094,67 @@ export const VirtualDisk: coreClient.CompositeMapper = { } }; -export const StorageQoSPolicyDetails: coreClient.CompositeMapper = { +export const Checkpoint: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StorageQoSPolicyDetails", + className: "Checkpoint", modelProperties: { - name: { - serializedName: "name", + parentCheckpointID: { + serializedName: "parentCheckpointID", type: { name: "String" } }, - id: { - serializedName: "id", + checkpointID: { + serializedName: "checkpointID", type: { name: "String" } - } - } - } -}; - -export const VirtualMachineUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineUpdate", - modelProperties: { - properties: { - serializedName: "properties", + }, + name: { + serializedName: "name", type: { - name: "Composite", - className: "VirtualMachineUpdateProperties" + name: "String" } }, - tags: { - serializedName: "tags", + description: { + serializedName: "description", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } } } } }; -export const VirtualMachineUpdateProperties: coreClient.CompositeMapper = { +export const VirtualMachineInstanceUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineUpdateProperties", + className: "VirtualMachineInstanceUpdate", modelProperties: { hardwareProfile: { - serializedName: "hardwareProfile", + serializedName: "properties.hardwareProfile", type: { name: "Composite", className: "HardwareProfileUpdate" } }, storageProfile: { - serializedName: "storageProfile", + serializedName: "properties.storageProfile", type: { name: "Composite", className: "StorageProfileUpdate" } }, networkProfile: { - serializedName: "networkProfile", + serializedName: "properties.networkProfile", type: { name: "Composite", className: "NetworkProfileUpdate" } }, availabilitySets: { - serializedName: "availabilitySets", + serializedName: "properties.availabilitySets", type: { name: "Sequence", element: { @@ -1355,6 +1164,13 @@ export const VirtualMachineUpdateProperties: coreClient.CompositeMapper = { } } } + }, + infrastructureProfile: { + serializedName: "properties.infrastructureProfile", + type: { + name: "Composite", + className: "InfrastructureProfileUpdate" + } } } } @@ -1437,117 +1253,631 @@ export const VirtualDiskUpdate: coreClient.CompositeMapper = { name: "String" } }, - diskId: { - serializedName: "diskId", + diskId: { + serializedName: "diskId", + type: { + name: "String" + } + }, + diskSizeGB: { + serializedName: "diskSizeGB", + type: { + name: "Number" + } + }, + bus: { + serializedName: "bus", + type: { + name: "Number" + } + }, + lun: { + serializedName: "lun", + type: { + name: "Number" + } + }, + busType: { + serializedName: "busType", + type: { + name: "String" + } + }, + vhdType: { + serializedName: "vhdType", + type: { + name: "String" + } + }, + storageQoSPolicy: { + serializedName: "storageQoSPolicy", + type: { + name: "Composite", + className: "StorageQoSPolicyDetails" + } + } + } + } +}; + +export const NetworkProfileUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkProfileUpdate", + modelProperties: { + networkInterfaces: { + serializedName: "networkInterfaces", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkInterfaceUpdate" + } + } + } + } + } + } +}; + +export const NetworkInterfaceUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkInterfaceUpdate", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + macAddress: { + serializedName: "macAddress", + type: { + name: "String" + } + }, + virtualNetworkId: { + serializedName: "virtualNetworkId", + type: { + name: "String" + } + }, + ipv4AddressType: { + serializedName: "ipv4AddressType", + type: { + name: "String" + } + }, + ipv6AddressType: { + serializedName: "ipv6AddressType", + type: { + name: "String" + } + }, + macAddressType: { + serializedName: "macAddressType", + type: { + name: "String" + } + }, + nicId: { + serializedName: "nicId", + type: { + name: "String" + } + } + } + } +}; + +export const InfrastructureProfileUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InfrastructureProfileUpdate", + modelProperties: { + checkpointType: { + serializedName: "checkpointType", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineInstanceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstanceListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineInstance" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const StopVirtualMachineOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StopVirtualMachineOptions", + modelProperties: { + skipShutdown: { + defaultValue: "false", + serializedName: "skipShutdown", + type: { + name: "String" + } + } + } + } +}; + +export const VmInstanceHybridIdentityMetadataList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VmInstanceHybridIdentityMetadataList", + modelProperties: { + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + }, + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VmInstanceHybridIdentityMetadata" + } + } + } + } + } + } +}; + +export const VirtualMachineCreateCheckpoint: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineCreateCheckpoint", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineDeleteCheckpoint: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineDeleteCheckpoint", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineRestoreCheckpoint: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineRestoreCheckpoint", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const GuestCredential: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GuestCredential", + modelProperties: { + username: { + serializedName: "username", + required: true, + type: { + name: "String" + } + }, + password: { + serializedName: "password", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const HttpProxyConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HttpProxyConfiguration", + modelProperties: { + httpsProxy: { + serializedName: "httpsProxy", + type: { + name: "String" + } + } + } + } +}; + +export const GuestAgentList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GuestAgentList", + modelProperties: { + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + }, + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GuestAgent" + } + } + } + } + } + } +}; + +export const InventoryItemDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InventoryItemDetails", + modelProperties: { + inventoryItemId: { + serializedName: "inventoryItemId", + type: { + name: "String" + } + }, + inventoryItemName: { + serializedName: "inventoryItemName", + type: { + name: "String" + } + } + } + } +}; + +export const Identity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Identity", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "String" + } + }, + tenantId: { + serializedName: "tenantId", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const TrackedResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const CloudInventoryItem: coreClient.CompositeMapper = { + serializedName: "Cloud", + type: { + name: "Composite", + className: "CloudInventoryItem", + uberParent: "InventoryItemProperties", + polymorphicDiscriminator: + InventoryItemProperties.type.polymorphicDiscriminator, + modelProperties: { + ...InventoryItemProperties.type.modelProperties + } + } +}; + +export const VirtualNetworkInventoryItem: coreClient.CompositeMapper = { + serializedName: "VirtualNetwork", + type: { + name: "Composite", + className: "VirtualNetworkInventoryItem", + uberParent: "InventoryItemProperties", + polymorphicDiscriminator: + InventoryItemProperties.type.polymorphicDiscriminator, + modelProperties: { + ...InventoryItemProperties.type.modelProperties + } + } +}; + +export const VirtualMachineTemplateInventoryItem: coreClient.CompositeMapper = { + serializedName: "VirtualMachineTemplate", + type: { + name: "Composite", + className: "VirtualMachineTemplateInventoryItem", + uberParent: "InventoryItemProperties", + polymorphicDiscriminator: + InventoryItemProperties.type.polymorphicDiscriminator, + modelProperties: { + ...InventoryItemProperties.type.modelProperties, + cpuCount: { + serializedName: "cpuCount", + readOnly: true, + type: { + name: "Number" + } + }, + memoryMB: { + serializedName: "memoryMB", + readOnly: true, + type: { + name: "Number" + } + }, + osType: { + serializedName: "osType", + readOnly: true, + type: { + name: "String" + } + }, + osName: { + serializedName: "osName", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineInventoryItem: coreClient.CompositeMapper = { + serializedName: "VirtualMachine", + type: { + name: "Composite", + className: "VirtualMachineInventoryItem", + uberParent: "InventoryItemProperties", + polymorphicDiscriminator: + InventoryItemProperties.type.polymorphicDiscriminator, + modelProperties: { + ...InventoryItemProperties.type.modelProperties, + osType: { + serializedName: "osType", + readOnly: true, + type: { + name: "String" + } + }, + osName: { + serializedName: "osName", + readOnly: true, type: { name: "String" } }, - diskSizeGB: { - serializedName: "diskSizeGB", + osVersion: { + serializedName: "osVersion", + readOnly: true, type: { - name: "Number" + name: "String" } }, - bus: { - serializedName: "bus", + powerState: { + serializedName: "powerState", + readOnly: true, type: { - name: "Number" + name: "String" } }, - lun: { - serializedName: "lun", + ipAddresses: { + serializedName: "ipAddresses", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - busType: { - serializedName: "busType", + cloud: { + serializedName: "cloud", type: { - name: "String" + name: "Composite", + className: "InventoryItemDetails" } }, - vhdType: { - serializedName: "vhdType", + biosGuid: { + serializedName: "biosGuid", + readOnly: true, type: { name: "String" } }, - storageQoSPolicy: { - serializedName: "storageQoSPolicy", + managedMachineResourceId: { + serializedName: "managedMachineResourceId", + readOnly: true, type: { - name: "Composite", - className: "StorageQoSPolicyDetails" + name: "String" } } } } }; -export const NetworkProfileUpdate: coreClient.CompositeMapper = { +export const VMMServer: coreClient.CompositeMapper = { type: { name: "Composite", - className: "NetworkProfileUpdate", + className: "VMMServer", modelProperties: { - networkInterfaces: { - serializedName: "networkInterfaces", + ...TrackedResource.type.modelProperties, + extendedLocation: { + serializedName: "extendedLocation", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkInterfacesUpdate" - } - } + name: "Composite", + className: "ExtendedLocation" } - } - } - } -}; - -export const NetworkInterfacesUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkInterfacesUpdate", - modelProperties: { - name: { - serializedName: "name", + }, + credentials: { + serializedName: "properties.credentials", type: { - name: "String" + name: "Composite", + className: "VMMCredential" } }, - macAddress: { - serializedName: "macAddress", + fqdn: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.fqdn", + required: true, type: { name: "String" } }, - virtualNetworkId: { - serializedName: "virtualNetworkId", + port: { + constraints: { + InclusiveMaximum: 65535, + InclusiveMinimum: 1 + }, + serializedName: "properties.port", + type: { + name: "Number" + } + }, + connectionStatus: { + serializedName: "properties.connectionStatus", + readOnly: true, type: { name: "String" } }, - ipv4AddressType: { - serializedName: "ipv4AddressType", + errorMessage: { + serializedName: "properties.errorMessage", + readOnly: true, type: { name: "String" } }, - ipv6AddressType: { - serializedName: "ipv6AddressType", + uuid: { + serializedName: "properties.uuid", + readOnly: true, type: { name: "String" } }, - macAddressType: { - serializedName: "macAddressType", + version: { + serializedName: "properties.version", + readOnly: true, type: { name: "String" } }, - nicId: { - serializedName: "nicId", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } @@ -1556,92 +1886,70 @@ export const NetworkInterfacesUpdate: coreClient.CompositeMapper = { } }; -export const StopVirtualMachineOptions: coreClient.CompositeMapper = { +export const Cloud: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StopVirtualMachineOptions", + className: "Cloud", modelProperties: { - skipShutdown: { - defaultValue: false, - serializedName: "skipShutdown", + ...TrackedResource.type.modelProperties, + extendedLocation: { + serializedName: "extendedLocation", type: { - name: "Boolean" + name: "Composite", + className: "ExtendedLocation" } - } - } - } -}; - -export const VirtualMachineCreateCheckpoint: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineCreateCheckpoint", - modelProperties: { - name: { - serializedName: "name", + }, + inventoryItemId: { + serializedName: "properties.inventoryItemId", type: { name: "String" } }, - description: { - serializedName: "description", + uuid: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.uuid", type: { name: "String" } - } - } - } -}; - -export const VirtualMachineDeleteCheckpoint: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineDeleteCheckpoint", - modelProperties: { - id: { - serializedName: "id", + }, + vmmServerId: { + serializedName: "properties.vmmServerId", type: { name: "String" } - } - } - } -}; - -export const VirtualMachineRestoreCheckpoint: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineRestoreCheckpoint", - modelProperties: { - id: { - serializedName: "id", + }, + cloudName: { + serializedName: "properties.cloudName", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const VirtualMachineListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineListResult", - modelProperties: { - value: { - serializedName: "value", + }, + cloudCapacity: { + serializedName: "properties.cloudCapacity", + type: { + name: "Composite", + className: "CloudCapacity" + } + }, + storageQoSPolicies: { + serializedName: "properties.storageQoSPolicies", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "VirtualMachine" + className: "StorageQoSPolicy" } } } }, - nextLink: { - serializedName: "nextLink", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } @@ -1650,53 +1958,64 @@ export const VirtualMachineListResult: coreClient.CompositeMapper = { } }; -export const VirtualMachineTemplate: coreClient.CompositeMapper = { +export const VirtualNetwork: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineTemplate", + className: "VirtualNetwork", modelProperties: { - id: { - serializedName: "id", - readOnly: true, + ...TrackedResource.type.modelProperties, + extendedLocation: { + serializedName: "extendedLocation", type: { - name: "String" + name: "Composite", + className: "ExtendedLocation" } }, - name: { - serializedName: "name", - readOnly: true, + inventoryItemId: { + serializedName: "properties.inventoryItemId", type: { name: "String" } }, - type: { - serializedName: "type", - readOnly: true, + uuid: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.uuid", type: { name: "String" } }, - location: { - serializedName: "location", - required: true, + vmmServerId: { + serializedName: "properties.vmmServerId", type: { name: "String" } }, - tags: { - serializedName: "tags", + networkName: { + serializedName: "properties.networkName", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" } - }, + } + } + } +}; + +export const VirtualMachineTemplate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineTemplate", + modelProperties: { + ...TrackedResource.type.modelProperties, extendedLocation: { serializedName: "extendedLocation", type: { @@ -1817,7 +2136,7 @@ export const VirtualMachineTemplate: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "NetworkInterfaces" + className: "NetworkInterface" } } } @@ -1846,25 +2165,37 @@ export const VirtualMachineTemplate: coreClient.CompositeMapper = { } }; -export const VirtualMachineTemplateListResult: coreClient.CompositeMapper = { +export const AvailabilitySet: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineTemplateListResult", + className: "AvailabilitySet", modelProperties: { - value: { - serializedName: "value", + ...TrackedResource.type.modelProperties, + extendedLocation: { + serializedName: "extendedLocation", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineTemplate" - } - } + name: "Composite", + className: "ExtendedLocation" } }, - nextLink: { - serializedName: "nextLink", + availabilitySetName: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.availabilitySetName", + type: { + name: "String" + } + }, + vmmServerId: { + serializedName: "properties.vmmServerId", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } @@ -1873,70 +2204,120 @@ export const VirtualMachineTemplateListResult: coreClient.CompositeMapper = { } }; -export const AvailabilitySet: coreClient.CompositeMapper = { +export const InventoryItem: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AvailabilitySet", + className: "InventoryItem", modelProperties: { - id: { - serializedName: "id", + ...ProxyResource.type.modelProperties, + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + inventoryType: { + serializedName: "properties.inventoryType", + required: true, + type: { + name: "String" + } + }, + managedResourceId: { + serializedName: "properties.managedResourceId", readOnly: true, type: { name: "String" } }, - name: { - serializedName: "name", + uuid: { + serializedName: "properties.uuid", readOnly: true, type: { name: "String" } }, - type: { - serializedName: "type", + inventoryItemName: { + serializedName: "properties.inventoryItemName", readOnly: true, type: { name: "String" } }, - location: { - serializedName: "location", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } + } + } + } +}; + +export const VirtualMachineInstance: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstance", + modelProperties: { + ...ProxyResource.type.modelProperties, + extendedLocation: { + serializedName: "extendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation" + } }, - tags: { - serializedName: "tags", + availabilitySets: { + serializedName: "properties.availabilitySets", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AvailabilitySetListItem" + } + } } }, - systemData: { - serializedName: "systemData", + osProfile: { + serializedName: "properties.osProfile", type: { name: "Composite", - className: "SystemData" + className: "OsProfileForVMInstance" } }, - extendedLocation: { - serializedName: "extendedLocation", + hardwareProfile: { + serializedName: "properties.hardwareProfile", type: { name: "Composite", - className: "ExtendedLocation" + className: "HardwareProfile" } }, - availabilitySetName: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.availabilitySetName", + networkProfile: { + serializedName: "properties.networkProfile", type: { - name: "String" + name: "Composite", + className: "NetworkProfile" } }, - vmmServerId: { - serializedName: "properties.vmmServerId", + storageProfile: { + serializedName: "properties.storageProfile", + type: { + name: "Composite", + className: "StorageProfile" + } + }, + infrastructureProfile: { + serializedName: "properties.infrastructureProfile", + type: { + name: "Composite", + className: "InfrastructureProfile" + } + }, + powerState: { + serializedName: "properties.powerState", + readOnly: true, type: { name: "String" } @@ -1952,25 +2333,27 @@ export const AvailabilitySet: coreClient.CompositeMapper = { } }; -export const AvailabilitySetListResult: coreClient.CompositeMapper = { +export const VmInstanceHybridIdentityMetadata: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AvailabilitySetListResult", + className: "VmInstanceHybridIdentityMetadata", modelProperties: { - value: { - serializedName: "value", + ...ProxyResource.type.modelProperties, + resourceUid: { + serializedName: "properties.resourceUid", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AvailabilitySet" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + publicKey: { + serializedName: "properties.publicKey", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } @@ -1979,46 +2362,55 @@ export const AvailabilitySetListResult: coreClient.CompositeMapper = { } }; -export const InventoryItemProperties: coreClient.CompositeMapper = { +export const GuestAgent: coreClient.CompositeMapper = { type: { name: "Composite", - className: "InventoryItemProperties", - uberParent: "InventoryItemProperties", - polymorphicDiscriminator: { - serializedName: "inventoryType", - clientName: "inventoryType" - }, + className: "GuestAgent", modelProperties: { - inventoryType: { - serializedName: "inventoryType", - required: true, + ...ProxyResource.type.modelProperties, + uuid: { + serializedName: "properties.uuid", + readOnly: true, type: { name: "String" } }, - managedResourceId: { - serializedName: "managedResourceId", - readOnly: true, + credentials: { + serializedName: "properties.credentials", + type: { + name: "Composite", + className: "GuestCredential" + } + }, + httpProxyConfig: { + serializedName: "properties.httpProxyConfig", + type: { + name: "Composite", + className: "HttpProxyConfiguration" + } + }, + provisioningAction: { + serializedName: "properties.provisioningAction", type: { name: "String" } }, - uuid: { - serializedName: "uuid", + status: { + serializedName: "properties.status", readOnly: true, type: { name: "String" } }, - inventoryItemName: { - serializedName: "inventoryItemName", + customResourceName: { + serializedName: "properties.customResourceName", readOnly: true, type: { name: "String" } }, provisioningState: { - serializedName: "provisioningState", + serializedName: "properties.provisioningState", readOnly: true, type: { name: "String" @@ -2028,28 +2420,73 @@ export const InventoryItemProperties: coreClient.CompositeMapper = { } }; -export const Resource: coreClient.CompositeMapper = { +export const VmmServersDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VmmServersDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VmmServersUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VmmServersUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const CloudsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CloudsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const CloudsUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CloudsUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualNetworksDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Resource", + className: "VirtualNetworksDeleteHeaders", modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, + location: { + serializedName: "location", type: { name: "String" } @@ -2058,47 +2495,28 @@ export const Resource: coreClient.CompositeMapper = { } }; -export const InventoryItemsList: coreClient.CompositeMapper = { +export const VirtualNetworksUpdateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "InventoryItemsList", + className: "VirtualNetworksUpdateHeaders", modelProperties: { - nextLink: { - serializedName: "nextLink", + location: { + serializedName: "location", type: { name: "String" } - }, - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InventoryItem" - } - } - } } } } }; -export const InventoryItemDetails: coreClient.CompositeMapper = { +export const VirtualMachineTemplatesDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "InventoryItemDetails", + className: "VirtualMachineTemplatesDeleteHeaders", modelProperties: { - inventoryItemId: { - serializedName: "inventoryItemId", - type: { - name: "String" - } - }, - inventoryItemName: { - serializedName: "inventoryItemName", + location: { + serializedName: "location", type: { name: "String" } @@ -2107,68 +2525,49 @@ export const InventoryItemDetails: coreClient.CompositeMapper = { } }; -export const CloudInventoryItem: coreClient.CompositeMapper = { - serializedName: "Cloud", +export const VirtualMachineTemplatesUpdateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CloudInventoryItem", - uberParent: "InventoryItemProperties", - polymorphicDiscriminator: - InventoryItemProperties.type.polymorphicDiscriminator, + className: "VirtualMachineTemplatesUpdateHeaders", modelProperties: { - ...InventoryItemProperties.type.modelProperties + location: { + serializedName: "location", + type: { + name: "String" + } + } } } }; -export const VirtualNetworkInventoryItem: coreClient.CompositeMapper = { - serializedName: "VirtualNetwork", +export const AvailabilitySetsCreateOrUpdateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualNetworkInventoryItem", - uberParent: "InventoryItemProperties", - polymorphicDiscriminator: - InventoryItemProperties.type.polymorphicDiscriminator, + className: "AvailabilitySetsCreateOrUpdateHeaders", modelProperties: { - ...InventoryItemProperties.type.modelProperties + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } } } }; -export const VirtualMachineTemplateInventoryItem: coreClient.CompositeMapper = { - serializedName: "VirtualMachineTemplate", +export const AvailabilitySetsDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineTemplateInventoryItem", - uberParent: "InventoryItemProperties", - polymorphicDiscriminator: - InventoryItemProperties.type.polymorphicDiscriminator, + className: "AvailabilitySetsDeleteHeaders", modelProperties: { - ...InventoryItemProperties.type.modelProperties, - cpuCount: { - serializedName: "cpuCount", - readOnly: true, - type: { - name: "Number" - } - }, - memoryMB: { - serializedName: "memoryMB", - readOnly: true, - type: { - name: "Number" - } - }, - osType: { - serializedName: "osType", - readOnly: true, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", type: { name: "String" } }, - osName: { - serializedName: "osName", - readOnly: true, + location: { + serializedName: "location", type: { name: "String" } @@ -2177,119 +2576,103 @@ export const VirtualMachineTemplateInventoryItem: coreClient.CompositeMapper = { } }; -export const VirtualMachineInventoryItem: coreClient.CompositeMapper = { - serializedName: "VirtualMachine", +export const AvailabilitySetsUpdateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineInventoryItem", - uberParent: "InventoryItemProperties", - polymorphicDiscriminator: - InventoryItemProperties.type.polymorphicDiscriminator, + className: "AvailabilitySetsUpdateHeaders", modelProperties: { - ...InventoryItemProperties.type.modelProperties, - osType: { - serializedName: "osType", - readOnly: true, - type: { - name: "String" - } - }, - osName: { - serializedName: "osName", - readOnly: true, - type: { - name: "String" - } - }, - powerState: { - serializedName: "powerState", - readOnly: true, + location: { + serializedName: "location", type: { name: "String" } - }, - ipAddresses: { - serializedName: "ipAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - cloud: { - serializedName: "cloud", - type: { - name: "Composite", - className: "InventoryItemDetails" - } } } } }; -export const ProxyResource: coreClient.CompositeMapper = { +export const VirtualMachineInstancesUpdateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProxyResource", + className: "VirtualMachineInstancesUpdateHeaders", modelProperties: { - ...Resource.type.modelProperties + location: { + serializedName: "location", + type: { + name: "String" + } + } } } }; -export const InventoryItem: coreClient.CompositeMapper = { +export const VirtualMachineInstancesDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "InventoryItem", + className: "VirtualMachineInstancesDeleteHeaders", modelProperties: { - ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, - kind: { - serializedName: "kind", - type: { - name: "String" - } - }, - inventoryType: { - serializedName: "properties.inventoryType", - required: true, + location: { + serializedName: "location", type: { name: "String" } - }, - managedResourceId: { - serializedName: "properties.managedResourceId", - readOnly: true, + } + } + } +}; + +export const VirtualMachineInstancesStopHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancesStopHeaders", + modelProperties: { + location: { + serializedName: "location", type: { name: "String" } - }, - uuid: { - serializedName: "properties.uuid", - readOnly: true, + } + } + } +}; + +export const VirtualMachineInstancesStartHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancesStartHeaders", + modelProperties: { + location: { + serializedName: "location", type: { name: "String" } - }, - inventoryItemName: { - serializedName: "properties.inventoryItemName", - readOnly: true, + } + } + } +}; + +export const VirtualMachineInstancesRestartHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancesRestartHeaders", + modelProperties: { + location: { + serializedName: "location", type: { name: "String" } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + } + } + } +}; + +export const VirtualMachineInstancesCreateCheckpointHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstancesCreateCheckpointHeaders", + modelProperties: { + location: { + serializedName: "location", type: { name: "String" } @@ -2298,13 +2681,13 @@ export const InventoryItem: coreClient.CompositeMapper = { } }; -export const AvailabilitySetsCreateOrUpdateHeaders: coreClient.CompositeMapper = { +export const VirtualMachineInstancesDeleteCheckpointHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AvailabilitySetsCreateOrUpdateHeaders", + className: "VirtualMachineInstancesDeleteCheckpointHeaders", modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", + location: { + serializedName: "location", type: { name: "String" } @@ -2313,13 +2696,13 @@ export const AvailabilitySetsCreateOrUpdateHeaders: coreClient.CompositeMapper = } }; -export const AvailabilitySetsDeleteHeaders: coreClient.CompositeMapper = { +export const VirtualMachineInstancesRestoreCheckpointHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AvailabilitySetsDeleteHeaders", + className: "VirtualMachineInstancesRestoreCheckpointHeaders", modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", + location: { + serializedName: "location", type: { name: "String" } diff --git a/sdk/scvmm/arm-scvmm/src/models/parameters.ts b/sdk/scvmm/arm-scvmm/src/models/parameters.ts index a57120bc1956..deacbd9467b1 100644 --- a/sdk/scvmm/arm-scvmm/src/models/parameters.ts +++ b/sdk/scvmm/arm-scvmm/src/models/parameters.ts @@ -16,15 +16,16 @@ import { ResourcePatch as ResourcePatchMapper, Cloud as CloudMapper, VirtualNetwork as VirtualNetworkMapper, - VirtualMachine as VirtualMachineMapper, - VirtualMachineUpdate as VirtualMachineUpdateMapper, + VirtualMachineTemplate as VirtualMachineTemplateMapper, + AvailabilitySet as AvailabilitySetMapper, + InventoryItem as InventoryItemMapper, + VirtualMachineInstance as VirtualMachineInstanceMapper, + VirtualMachineInstanceUpdate as VirtualMachineInstanceUpdateMapper, StopVirtualMachineOptions as StopVirtualMachineOptionsMapper, VirtualMachineCreateCheckpoint as VirtualMachineCreateCheckpointMapper, VirtualMachineDeleteCheckpoint as VirtualMachineDeleteCheckpointMapper, VirtualMachineRestoreCheckpoint as VirtualMachineRestoreCheckpointMapper, - VirtualMachineTemplate as VirtualMachineTemplateMapper, - AvailabilitySet as AvailabilitySetMapper, - InventoryItem as InventoryItemMapper + GuestAgent as GuestAgentMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -57,7 +58,7 @@ export const subscriptionId: OperationURLParameter = { serializedName: "subscriptionId", required: true, type: { - name: "String" + name: "Uuid" } } }; @@ -65,6 +66,10 @@ export const subscriptionId: OperationURLParameter = { export const resourceGroupName: OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { + constraints: { + MaxLength: 90, + MinLength: 1 + }, serializedName: "resourceGroupName", required: true, type: { @@ -76,6 +81,11 @@ export const resourceGroupName: OperationURLParameter = { export const vmmServerName: OperationURLParameter = { parameterPath: "vmmServerName", mapper: { + constraints: { + Pattern: new RegExp("[a-zA-Z0-9-_\\.]"), + MaxLength: 54, + MinLength: 1 + }, serializedName: "vmmServerName", required: true, type: { @@ -87,7 +97,7 @@ export const vmmServerName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2020-06-05-preview", + defaultValue: "2023-10-07", isConstant: true, serializedName: "api-version", type: { @@ -118,7 +128,7 @@ export const force: OperationQueryParameter = { mapper: { serializedName: "force", type: { - name: "Boolean" + name: "String" } } }; @@ -140,10 +150,15 @@ export const nextLink: OperationURLParameter = { skipEncoding: true }; -export const cloudName: OperationURLParameter = { - parameterPath: "cloudName", +export const cloudResourceName: OperationURLParameter = { + parameterPath: "cloudResourceName", mapper: { - serializedName: "cloudName", + constraints: { + Pattern: new RegExp("[a-zA-Z0-9-_\\.]"), + MaxLength: 54, + MinLength: 1 + }, + serializedName: "cloudResourceName", required: true, type: { name: "String" @@ -159,6 +174,11 @@ export const body2: OperationParameter = { export const virtualNetworkName: OperationURLParameter = { parameterPath: "virtualNetworkName", mapper: { + constraints: { + Pattern: new RegExp("[a-zA-Z0-9-_\\.]"), + MaxLength: 54, + MinLength: 1 + }, serializedName: "virtualNetworkName", required: true, type: { @@ -172,10 +192,15 @@ export const body3: OperationParameter = { mapper: VirtualNetworkMapper }; -export const virtualMachineName: OperationURLParameter = { - parameterPath: "virtualMachineName", +export const virtualMachineTemplateName: OperationURLParameter = { + parameterPath: "virtualMachineTemplateName", mapper: { - serializedName: "virtualMachineName", + constraints: { + Pattern: new RegExp("[a-zA-Z0-9-_\\.]"), + MaxLength: 54, + MinLength: 1 + }, + serializedName: "virtualMachineTemplateName", required: true, type: { name: "String" @@ -185,88 +210,104 @@ export const virtualMachineName: OperationURLParameter = { export const body4: OperationParameter = { parameterPath: "body", - mapper: VirtualMachineMapper + mapper: VirtualMachineTemplateMapper }; -export const retain: OperationQueryParameter = { - parameterPath: ["options", "retain"], +export const availabilitySetResourceName: OperationURLParameter = { + parameterPath: "availabilitySetResourceName", mapper: { - serializedName: "retain", + constraints: { + Pattern: new RegExp("[a-zA-Z0-9-_\\.]"), + MaxLength: 54, + MinLength: 1 + }, + serializedName: "availabilitySetResourceName", + required: true, type: { - name: "Boolean" + name: "String" } } }; export const body5: OperationParameter = { parameterPath: "body", - mapper: VirtualMachineUpdateMapper + mapper: AvailabilitySetMapper }; export const body6: OperationParameter = { parameterPath: ["options", "body"], - mapper: StopVirtualMachineOptionsMapper + mapper: InventoryItemMapper }; -export const body7: OperationParameter = { - parameterPath: ["options", "body"], - mapper: VirtualMachineCreateCheckpointMapper +export const inventoryItemResourceName: OperationURLParameter = { + parameterPath: "inventoryItemResourceName", + mapper: { + constraints: { + Pattern: new RegExp( + "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" + ) + }, + serializedName: "inventoryItemResourceName", + required: true, + type: { + name: "String" + } + } }; -export const body8: OperationParameter = { +export const resourceUri: OperationURLParameter = { + parameterPath: "resourceUri", + mapper: { + serializedName: "resourceUri", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const body7: OperationParameter = { parameterPath: ["options", "body"], - mapper: VirtualMachineDeleteCheckpointMapper + mapper: VirtualMachineInstanceMapper }; -export const body9: OperationParameter = { +export const body8: OperationParameter = { parameterPath: ["options", "body"], - mapper: VirtualMachineRestoreCheckpointMapper + mapper: VirtualMachineInstanceUpdateMapper }; -export const virtualMachineTemplateName: OperationURLParameter = { - parameterPath: "virtualMachineTemplateName", +export const deleteFromHost: OperationQueryParameter = { + parameterPath: ["options", "deleteFromHost"], mapper: { - serializedName: "virtualMachineTemplateName", - required: true, + serializedName: "deleteFromHost", type: { name: "String" } } }; -export const body10: OperationParameter = { - parameterPath: "body", - mapper: VirtualMachineTemplateMapper +export const body9: OperationParameter = { + parameterPath: ["options", "body"], + mapper: StopVirtualMachineOptionsMapper }; -export const availabilitySetName: OperationURLParameter = { - parameterPath: "availabilitySetName", - mapper: { - serializedName: "availabilitySetName", - required: true, - type: { - name: "String" - } - } +export const body10: OperationParameter = { + parameterPath: ["options", "body"], + mapper: VirtualMachineCreateCheckpointMapper }; export const body11: OperationParameter = { - parameterPath: "body", - mapper: AvailabilitySetMapper + parameterPath: ["options", "body"], + mapper: VirtualMachineDeleteCheckpointMapper }; export const body12: OperationParameter = { parameterPath: ["options", "body"], - mapper: InventoryItemMapper + mapper: VirtualMachineRestoreCheckpointMapper }; -export const inventoryItemName: OperationURLParameter = { - parameterPath: "inventoryItemName", - mapper: { - serializedName: "inventoryItemName", - required: true, - type: { - name: "String" - } - } +export const body13: OperationParameter = { + parameterPath: ["options", "body"], + mapper: GuestAgentMapper }; diff --git a/sdk/scvmm/arm-scvmm/src/operations/availabilitySets.ts b/sdk/scvmm/arm-scvmm/src/operations/availabilitySets.ts index 3988ccabbd8a..9f94a08e0667 100644 --- a/sdk/scvmm/arm-scvmm/src/operations/availabilitySets.ts +++ b/sdk/scvmm/arm-scvmm/src/operations/availabilitySets.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { Scvmm } from "../scvmm"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { AvailabilitySet, AvailabilitySetsListByResourceGroupNextOptionalParams, @@ -28,6 +32,7 @@ import { AvailabilitySetsCreateOrUpdateOptionalParams, AvailabilitySetsCreateOrUpdateResponse, AvailabilitySetsDeleteOptionalParams, + AvailabilitySetsDeleteResponse, ResourcePatch, AvailabilitySetsUpdateOptionalParams, AvailabilitySetsUpdateResponse, @@ -50,7 +55,7 @@ export class AvailabilitySetsImpl implements AvailabilitySets { /** * List of AvailabilitySets in a resource group. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ public listByResourceGroup( @@ -173,36 +178,36 @@ export class AvailabilitySetsImpl implements AvailabilitySets { /** * Implements AvailabilitySet GET method. - * @param resourceGroupName The name of the resource group. - * @param availabilitySetName Name of the AvailabilitySet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. * @param options The options parameters. */ get( resourceGroupName: string, - availabilitySetName: string, + availabilitySetResourceName: string, options?: AvailabilitySetsGetOptionalParams ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, availabilitySetName, options }, + { resourceGroupName, availabilitySetResourceName, options }, getOperationSpec ); } /** * Onboards the ScVmm availability set as an Azure resource. - * @param resourceGroupName The name of the resource group. - * @param availabilitySetName Name of the AvailabilitySet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. * @param body Request payload. * @param options The options parameters. */ async beginCreateOrUpdate( resourceGroupName: string, - availabilitySetName: string, + availabilitySetResourceName: string, body: AvailabilitySet, options?: AvailabilitySetsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AvailabilitySetsCreateOrUpdateResponse > > { @@ -212,7 +217,7 @@ export class AvailabilitySetsImpl implements AvailabilitySets { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -245,15 +250,18 @@ export class AvailabilitySetsImpl implements AvailabilitySets { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, availabilitySetName, body, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, availabilitySetResourceName, body, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + AvailabilitySetsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -261,20 +269,20 @@ export class AvailabilitySetsImpl implements AvailabilitySets { /** * Onboards the ScVmm availability set as an Azure resource. - * @param resourceGroupName The name of the resource group. - * @param availabilitySetName Name of the AvailabilitySet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. * @param body Request payload. * @param options The options parameters. */ async beginCreateOrUpdateAndWait( resourceGroupName: string, - availabilitySetName: string, + availabilitySetResourceName: string, body: AvailabilitySet, options?: AvailabilitySetsCreateOrUpdateOptionalParams ): Promise { const poller = await this.beginCreateOrUpdate( resourceGroupName, - availabilitySetName, + availabilitySetResourceName, body, options ); @@ -283,22 +291,27 @@ export class AvailabilitySetsImpl implements AvailabilitySets { /** * Deregisters the ScVmm availability set from Azure. - * @param resourceGroupName The name of the resource group. - * @param availabilitySetName Name of the AvailabilitySet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. * @param options The options parameters. */ async beginDelete( resourceGroupName: string, - availabilitySetName: string, + availabilitySetResourceName: string, options?: AvailabilitySetsDeleteOptionalParams - ): Promise, void>> { + ): Promise< + SimplePollerLike< + OperationState, + AvailabilitySetsDeleteResponse + > + > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -331,13 +344,16 @@ export class AvailabilitySetsImpl implements AvailabilitySets { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, availabilitySetName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, availabilitySetResourceName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + AvailabilitySetsDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -346,18 +362,18 @@ export class AvailabilitySetsImpl implements AvailabilitySets { /** * Deregisters the ScVmm availability set from Azure. - * @param resourceGroupName The name of the resource group. - * @param availabilitySetName Name of the AvailabilitySet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. * @param options The options parameters. */ async beginDeleteAndWait( resourceGroupName: string, - availabilitySetName: string, + availabilitySetResourceName: string, options?: AvailabilitySetsDeleteOptionalParams - ): Promise { + ): Promise { const poller = await this.beginDelete( resourceGroupName, - availabilitySetName, + availabilitySetResourceName, options ); return poller.pollUntilDone(); @@ -365,19 +381,19 @@ export class AvailabilitySetsImpl implements AvailabilitySets { /** * Updates the AvailabilitySets resource. - * @param resourceGroupName The name of the resource group. - * @param availabilitySetName Name of the AvailabilitySet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. * @param body AvailabilitySets patch payload. * @param options The options parameters. */ async beginUpdate( resourceGroupName: string, - availabilitySetName: string, + availabilitySetResourceName: string, body: ResourcePatch, options?: AvailabilitySetsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AvailabilitySetsUpdateResponse > > { @@ -387,7 +403,7 @@ export class AvailabilitySetsImpl implements AvailabilitySets { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -420,15 +436,18 @@ export class AvailabilitySetsImpl implements AvailabilitySets { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, availabilitySetName, body, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, availabilitySetResourceName, body, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + AvailabilitySetsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -436,20 +455,20 @@ export class AvailabilitySetsImpl implements AvailabilitySets { /** * Updates the AvailabilitySets resource. - * @param resourceGroupName The name of the resource group. - * @param availabilitySetName Name of the AvailabilitySet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. * @param body AvailabilitySets patch payload. * @param options The options parameters. */ async beginUpdateAndWait( resourceGroupName: string, - availabilitySetName: string, + availabilitySetResourceName: string, body: ResourcePatch, options?: AvailabilitySetsUpdateOptionalParams ): Promise { const poller = await this.beginUpdate( resourceGroupName, - availabilitySetName, + availabilitySetResourceName, body, options ); @@ -458,7 +477,7 @@ export class AvailabilitySetsImpl implements AvailabilitySets { /** * List of AvailabilitySets in a resource group. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ private _listByResourceGroup( @@ -486,7 +505,7 @@ export class AvailabilitySetsImpl implements AvailabilitySets { /** * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. * @param options The options parameters. */ @@ -521,7 +540,7 @@ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}", httpMethod: "GET", responses: { 200: { @@ -536,14 +555,14 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.availabilitySetName + Parameters.availabilitySetResourceName ], headerParameters: [Parameters.accept], serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}", httpMethod: "PUT", responses: { 200: { @@ -562,13 +581,13 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body11, + requestBody: Parameters.body5, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.availabilitySetName + Parameters.availabilitySetResourceName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -576,13 +595,21 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }; const deleteOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}", httpMethod: "DELETE", responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, + 200: { + headersMapper: Mappers.AvailabilitySetsDeleteHeaders + }, + 201: { + headersMapper: Mappers.AvailabilitySetsDeleteHeaders + }, + 202: { + headersMapper: Mappers.AvailabilitySetsDeleteHeaders + }, + 204: { + headersMapper: Mappers.AvailabilitySetsDeleteHeaders + }, default: { bodyMapper: Mappers.ErrorResponse } @@ -592,14 +619,14 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.availabilitySetName + Parameters.availabilitySetResourceName ], headerParameters: [Parameters.accept], serializer }; const updateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}", httpMethod: "PATCH", responses: { 200: { @@ -624,7 +651,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.availabilitySetName + Parameters.availabilitySetResourceName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", diff --git a/sdk/scvmm/arm-scvmm/src/operations/clouds.ts b/sdk/scvmm/arm-scvmm/src/operations/clouds.ts index 4ce03251c1a2..081a0cfd036b 100644 --- a/sdk/scvmm/arm-scvmm/src/operations/clouds.ts +++ b/sdk/scvmm/arm-scvmm/src/operations/clouds.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { Scvmm } from "../scvmm"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Cloud, CloudsListByResourceGroupNextOptionalParams, @@ -28,6 +32,7 @@ import { CloudsCreateOrUpdateOptionalParams, CloudsCreateOrUpdateResponse, CloudsDeleteOptionalParams, + CloudsDeleteResponse, ResourcePatch, CloudsUpdateOptionalParams, CloudsUpdateResponse, @@ -50,7 +55,7 @@ export class CloudsImpl implements Clouds { /** * List of Clouds in a resource group. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ public listByResourceGroup( @@ -173,36 +178,36 @@ export class CloudsImpl implements Clouds { /** * Implements Cloud GET method. - * @param resourceGroupName The name of the resource group. - * @param cloudName Name of the Cloud. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. * @param options The options parameters. */ get( resourceGroupName: string, - cloudName: string, + cloudResourceName: string, options?: CloudsGetOptionalParams ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, cloudName, options }, + { resourceGroupName, cloudResourceName, options }, getOperationSpec ); } /** * Onboards the ScVmm fabric cloud as an Azure cloud resource. - * @param resourceGroupName The name of the resource group. - * @param cloudName Name of the Cloud. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. * @param body Request payload. * @param options The options parameters. */ async beginCreateOrUpdate( resourceGroupName: string, - cloudName: string, + cloudResourceName: string, body: Cloud, options?: CloudsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CloudsCreateOrUpdateResponse > > { @@ -212,7 +217,7 @@ export class CloudsImpl implements Clouds { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -245,15 +250,18 @@ export class CloudsImpl implements Clouds { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, cloudName, body, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, cloudResourceName, body, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + CloudsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -261,20 +269,20 @@ export class CloudsImpl implements Clouds { /** * Onboards the ScVmm fabric cloud as an Azure cloud resource. - * @param resourceGroupName The name of the resource group. - * @param cloudName Name of the Cloud. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. * @param body Request payload. * @param options The options parameters. */ async beginCreateOrUpdateAndWait( resourceGroupName: string, - cloudName: string, + cloudResourceName: string, body: Cloud, options?: CloudsCreateOrUpdateOptionalParams ): Promise { const poller = await this.beginCreateOrUpdate( resourceGroupName, - cloudName, + cloudResourceName, body, options ); @@ -283,22 +291,24 @@ export class CloudsImpl implements Clouds { /** * Deregisters the ScVmm fabric cloud from Azure. - * @param resourceGroupName The name of the resource group. - * @param cloudName Name of the Cloud. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. * @param options The options parameters. */ async beginDelete( resourceGroupName: string, - cloudName: string, + cloudResourceName: string, options?: CloudsDeleteOptionalParams - ): Promise, void>> { + ): Promise< + SimplePollerLike, CloudsDeleteResponse> + > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -331,15 +341,18 @@ export class CloudsImpl implements Clouds { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, cloudName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, cloudResourceName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + CloudsDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -347,18 +360,18 @@ export class CloudsImpl implements Clouds { /** * Deregisters the ScVmm fabric cloud from Azure. - * @param resourceGroupName The name of the resource group. - * @param cloudName Name of the Cloud. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. * @param options The options parameters. */ async beginDeleteAndWait( resourceGroupName: string, - cloudName: string, + cloudResourceName: string, options?: CloudsDeleteOptionalParams - ): Promise { + ): Promise { const poller = await this.beginDelete( resourceGroupName, - cloudName, + cloudResourceName, options ); return poller.pollUntilDone(); @@ -366,18 +379,18 @@ export class CloudsImpl implements Clouds { /** * Updates the Clouds resource. - * @param resourceGroupName The name of the resource group. - * @param cloudName Name of the Cloud. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. * @param body Clouds patch payload. * @param options The options parameters. */ async beginUpdate( resourceGroupName: string, - cloudName: string, + cloudResourceName: string, body: ResourcePatch, options?: CloudsUpdateOptionalParams ): Promise< - PollerLike, CloudsUpdateResponse> + SimplePollerLike, CloudsUpdateResponse> > { const directSendOperation = async ( args: coreClient.OperationArguments, @@ -385,7 +398,7 @@ export class CloudsImpl implements Clouds { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -418,15 +431,18 @@ export class CloudsImpl implements Clouds { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, cloudName, body, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, cloudResourceName, body, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + CloudsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -434,20 +450,20 @@ export class CloudsImpl implements Clouds { /** * Updates the Clouds resource. - * @param resourceGroupName The name of the resource group. - * @param cloudName Name of the Cloud. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. * @param body Clouds patch payload. * @param options The options parameters. */ async beginUpdateAndWait( resourceGroupName: string, - cloudName: string, + cloudResourceName: string, body: ResourcePatch, options?: CloudsUpdateOptionalParams ): Promise { const poller = await this.beginUpdate( resourceGroupName, - cloudName, + cloudResourceName, body, options ); @@ -456,7 +472,7 @@ export class CloudsImpl implements Clouds { /** * List of Clouds in a resource group. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ private _listByResourceGroup( @@ -484,7 +500,7 @@ export class CloudsImpl implements Clouds { /** * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. * @param options The options parameters. */ @@ -519,7 +535,7 @@ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}", httpMethod: "GET", responses: { 200: { @@ -534,14 +550,14 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.cloudName + Parameters.cloudResourceName ], headerParameters: [Parameters.accept], serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}", httpMethod: "PUT", responses: { 200: { @@ -566,7 +582,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.cloudName + Parameters.cloudResourceName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -574,13 +590,21 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }; const deleteOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}", httpMethod: "DELETE", responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, + 200: { + headersMapper: Mappers.CloudsDeleteHeaders + }, + 201: { + headersMapper: Mappers.CloudsDeleteHeaders + }, + 202: { + headersMapper: Mappers.CloudsDeleteHeaders + }, + 204: { + headersMapper: Mappers.CloudsDeleteHeaders + }, default: { bodyMapper: Mappers.ErrorResponse } @@ -590,14 +614,14 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.cloudName + Parameters.cloudResourceName ], headerParameters: [Parameters.accept], serializer }; const updateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}", httpMethod: "PATCH", responses: { 200: { @@ -622,7 +646,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.cloudName + Parameters.cloudResourceName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", diff --git a/sdk/scvmm/arm-scvmm/src/operations/index.ts b/sdk/scvmm/arm-scvmm/src/operations/index.ts index 85877bfdbd34..6b119a55247e 100644 --- a/sdk/scvmm/arm-scvmm/src/operations/index.ts +++ b/sdk/scvmm/arm-scvmm/src/operations/index.ts @@ -10,7 +10,9 @@ export * from "./vmmServers"; export * from "./operations"; export * from "./clouds"; export * from "./virtualNetworks"; -export * from "./virtualMachines"; export * from "./virtualMachineTemplates"; export * from "./availabilitySets"; export * from "./inventoryItems"; +export * from "./virtualMachineInstances"; +export * from "./virtualMachineInstanceHybridIdentityMetadata"; +export * from "./vMInstanceGuestAgents"; diff --git a/sdk/scvmm/arm-scvmm/src/operations/inventoryItems.ts b/sdk/scvmm/arm-scvmm/src/operations/inventoryItems.ts index bf666b668039..c4c903be0b16 100644 --- a/sdk/scvmm/arm-scvmm/src/operations/inventoryItems.ts +++ b/sdk/scvmm/arm-scvmm/src/operations/inventoryItems.ts @@ -41,7 +41,7 @@ export class InventoryItemsImpl implements InventoryItems { /** * Returns the list of inventoryItems in the given VMMServer. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VMMServer. * @param options The options parameters. */ @@ -125,64 +125,64 @@ export class InventoryItemsImpl implements InventoryItems { /** * Create Or Update InventoryItem. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VMMServer. - * @param inventoryItemName Name of the inventoryItem. + * @param inventoryItemResourceName Name of the inventoryItem. * @param options The options parameters. */ create( resourceGroupName: string, vmmServerName: string, - inventoryItemName: string, + inventoryItemResourceName: string, options?: InventoryItemsCreateOptionalParams ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, vmmServerName, inventoryItemName, options }, + { resourceGroupName, vmmServerName, inventoryItemResourceName, options }, createOperationSpec ); } /** * Shows an inventory item. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VMMServer. - * @param inventoryItemName Name of the inventoryItem. + * @param inventoryItemResourceName Name of the inventoryItem. * @param options The options parameters. */ get( resourceGroupName: string, vmmServerName: string, - inventoryItemName: string, + inventoryItemResourceName: string, options?: InventoryItemsGetOptionalParams ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, vmmServerName, inventoryItemName, options }, + { resourceGroupName, vmmServerName, inventoryItemResourceName, options }, getOperationSpec ); } /** * Deletes an inventoryItem. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VMMServer. - * @param inventoryItemName Name of the inventoryItem. + * @param inventoryItemResourceName Name of the inventoryItem. * @param options The options parameters. */ delete( resourceGroupName: string, vmmServerName: string, - inventoryItemName: string, + inventoryItemResourceName: string, options?: InventoryItemsDeleteOptionalParams ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, vmmServerName, inventoryItemName, options }, + { resourceGroupName, vmmServerName, inventoryItemResourceName, options }, deleteOperationSpec ); } /** * Returns the list of inventoryItems in the given VMMServer. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VMMServer. * @param options The options parameters. */ @@ -199,7 +199,7 @@ export class InventoryItemsImpl implements InventoryItems { /** * ListByVMMServerNext - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VMMServer. * @param nextLink The nextLink from the previous successful call to the ListByVMMServer method. * @param options The options parameters. @@ -221,24 +221,27 @@ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const createOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}", httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.InventoryItem }, + 201: { + bodyMapper: Mappers.InventoryItem + }, default: { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body12, + requestBody: Parameters.body6, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.vmmServerName, - Parameters.inventoryItemName + Parameters.inventoryItemResourceName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -246,7 +249,7 @@ const createOperationSpec: coreClient.OperationSpec = { }; const getOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}", httpMethod: "GET", responses: { 200: { @@ -262,14 +265,14 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.vmmServerName, - Parameters.inventoryItemName + Parameters.inventoryItemResourceName ], headerParameters: [Parameters.accept], serializer }; const deleteOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}", httpMethod: "DELETE", responses: { 200: {}, @@ -284,7 +287,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.vmmServerName, - Parameters.inventoryItemName + Parameters.inventoryItemResourceName ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/scvmm/arm-scvmm/src/operations/operations.ts b/sdk/scvmm/arm-scvmm/src/operations/operations.ts index cae5eca8111b..945f5aa41538 100644 --- a/sdk/scvmm/arm-scvmm/src/operations/operations.ts +++ b/sdk/scvmm/arm-scvmm/src/operations/operations.ts @@ -14,7 +14,7 @@ import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { Scvmm } from "../scvmm"; import { - ResourceProviderOperation, + Operation, OperationsListNextOptionalParams, OperationsListOptionalParams, OperationsListResponse, @@ -40,7 +40,7 @@ export class OperationsImpl implements Operations { */ public list( options?: OperationsListOptionalParams - ): PagedAsyncIterableIterator { + ): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { next() { @@ -61,7 +61,7 @@ export class OperationsImpl implements Operations { private async *listPagingPage( options?: OperationsListOptionalParams, settings?: PageSettings - ): AsyncIterableIterator { + ): AsyncIterableIterator { let result: OperationsListResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { @@ -82,7 +82,7 @@ export class OperationsImpl implements Operations { private async *listPagingAll( options?: OperationsListOptionalParams - ): AsyncIterableIterator { + ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; } @@ -121,7 +121,7 @@ const listOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ResourceProviderOperationList + bodyMapper: Mappers.OperationListResult }, default: { bodyMapper: Mappers.ErrorResponse @@ -137,7 +137,7 @@ const listNextOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ResourceProviderOperationList + bodyMapper: Mappers.OperationListResult }, default: { bodyMapper: Mappers.ErrorResponse diff --git a/sdk/scvmm/arm-scvmm/src/operations/vMInstanceGuestAgents.ts b/sdk/scvmm/arm-scvmm/src/operations/vMInstanceGuestAgents.ts new file mode 100644 index 000000000000..35ab450da0a9 --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/operations/vMInstanceGuestAgents.ts @@ -0,0 +1,357 @@ +/* + * 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 { VMInstanceGuestAgents } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { Scvmm } from "../scvmm"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + GuestAgent, + VMInstanceGuestAgentsListNextOptionalParams, + VMInstanceGuestAgentsListOptionalParams, + VMInstanceGuestAgentsListResponse, + VMInstanceGuestAgentsCreateOptionalParams, + VMInstanceGuestAgentsCreateResponse, + VMInstanceGuestAgentsGetOptionalParams, + VMInstanceGuestAgentsGetResponse, + VMInstanceGuestAgentsDeleteOptionalParams, + VMInstanceGuestAgentsListNextResponse +} from "../models"; + +/// +/** Class containing VMInstanceGuestAgents operations. */ +export class VMInstanceGuestAgentsImpl implements VMInstanceGuestAgents { + private readonly client: Scvmm; + + /** + * Initialize a new instance of the class VMInstanceGuestAgents class. + * @param client Reference to the service client + */ + constructor(client: Scvmm) { + this.client = client; + } + + /** + * Returns the list of GuestAgent of the given vm. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + public list( + resourceUri: string, + options?: VMInstanceGuestAgentsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceUri, 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(resourceUri, options, settings); + } + }; + } + + private async *listPagingPage( + resourceUri: string, + options?: VMInstanceGuestAgentsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: VMInstanceGuestAgentsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceUri, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(resourceUri, continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceUri: string, + options?: VMInstanceGuestAgentsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceUri, options)) { + yield* page; + } + } + + /** + * Create Or Update GuestAgent. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginCreate( + resourceUri: string, + options?: VMInstanceGuestAgentsCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VMInstanceGuestAgentsCreateResponse + > + > { + 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: { resourceUri, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + VMInstanceGuestAgentsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create Or Update GuestAgent. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceUri: string, + options?: VMInstanceGuestAgentsCreateOptionalParams + ): Promise { + const poller = await this.beginCreate(resourceUri, options); + return poller.pollUntilDone(); + } + + /** + * Implements GuestAgent GET method. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + get( + resourceUri: string, + options?: VMInstanceGuestAgentsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, options }, + getOperationSpec + ); + } + + /** + * Implements GuestAgent DELETE method. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + delete( + resourceUri: string, + options?: VMInstanceGuestAgentsDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, options }, + deleteOperationSpec + ); + } + + /** + * Returns the list of GuestAgent of the given vm. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + private _list( + resourceUri: string, + options?: VMInstanceGuestAgentsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceUri: string, + nextLink: string, + options?: VMInstanceGuestAgentsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.GuestAgent + }, + 201: { + bodyMapper: Mappers.GuestAgent + }, + 202: { + bodyMapper: Mappers.GuestAgent + }, + 204: { + bodyMapper: Mappers.GuestAgent + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body13, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GuestAgent + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GuestAgentList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GuestAgentList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.resourceUri + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/scvmm/arm-scvmm/src/operations/virtualMachineInstanceHybridIdentityMetadata.ts b/sdk/scvmm/arm-scvmm/src/operations/virtualMachineInstanceHybridIdentityMetadata.ts new file mode 100644 index 000000000000..abdb4bd0eb6e --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/operations/virtualMachineInstanceHybridIdentityMetadata.ts @@ -0,0 +1,204 @@ +/* + * 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 { VirtualMachineInstanceHybridIdentityMetadata } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { Scvmm } from "../scvmm"; +import { + VmInstanceHybridIdentityMetadata, + VirtualMachineInstanceHybridIdentityMetadataListNextOptionalParams, + VirtualMachineInstanceHybridIdentityMetadataListOptionalParams, + VirtualMachineInstanceHybridIdentityMetadataListResponse, + VirtualMachineInstanceHybridIdentityMetadataGetOptionalParams, + VirtualMachineInstanceHybridIdentityMetadataGetResponse, + VirtualMachineInstanceHybridIdentityMetadataListNextResponse +} from "../models"; + +/// +/** Class containing VirtualMachineInstanceHybridIdentityMetadata operations. */ +export class VirtualMachineInstanceHybridIdentityMetadataImpl + implements VirtualMachineInstanceHybridIdentityMetadata { + private readonly client: Scvmm; + + /** + * Initialize a new instance of the class VirtualMachineInstanceHybridIdentityMetadata class. + * @param client Reference to the service client + */ + constructor(client: Scvmm) { + this.client = client; + } + + /** + * Returns the list of HybridIdentityMetadata of the given vm. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + public list( + resourceUri: string, + options?: VirtualMachineInstanceHybridIdentityMetadataListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceUri, 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(resourceUri, options, settings); + } + }; + } + + private async *listPagingPage( + resourceUri: string, + options?: VirtualMachineInstanceHybridIdentityMetadataListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: VirtualMachineInstanceHybridIdentityMetadataListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceUri, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(resourceUri, continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceUri: string, + options?: VirtualMachineInstanceHybridIdentityMetadataListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceUri, options)) { + yield* page; + } + } + + /** + * Implements HybridIdentityMetadata GET method. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + get( + resourceUri: string, + options?: VirtualMachineInstanceHybridIdentityMetadataGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, options }, + getOperationSpec + ); + } + + /** + * Returns the list of HybridIdentityMetadata of the given vm. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + private _list( + resourceUri: string, + options?: VirtualMachineInstanceHybridIdentityMetadataListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceUri: string, + nextLink: string, + options?: VirtualMachineInstanceHybridIdentityMetadataListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/hybridIdentityMetadata/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VmInstanceHybridIdentityMetadata + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/hybridIdentityMetadata", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VmInstanceHybridIdentityMetadataList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VmInstanceHybridIdentityMetadataList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.resourceUri + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/scvmm/arm-scvmm/src/operations/virtualMachineInstances.ts b/sdk/scvmm/arm-scvmm/src/operations/virtualMachineInstances.ts new file mode 100644 index 000000000000..9231e4d99448 --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/operations/virtualMachineInstances.ts @@ -0,0 +1,1237 @@ +/* + * 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 { VirtualMachineInstances } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { Scvmm } from "../scvmm"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + VirtualMachineInstance, + VirtualMachineInstancesListNextOptionalParams, + VirtualMachineInstancesListOptionalParams, + VirtualMachineInstancesListResponse, + VirtualMachineInstancesGetOptionalParams, + VirtualMachineInstancesGetResponse, + VirtualMachineInstancesCreateOrUpdateOptionalParams, + VirtualMachineInstancesCreateOrUpdateResponse, + VirtualMachineInstancesUpdateOptionalParams, + VirtualMachineInstancesUpdateResponse, + VirtualMachineInstancesDeleteOptionalParams, + VirtualMachineInstancesDeleteResponse, + VirtualMachineInstancesStopOptionalParams, + VirtualMachineInstancesStopResponse, + VirtualMachineInstancesStartOptionalParams, + VirtualMachineInstancesStartResponse, + VirtualMachineInstancesRestartOptionalParams, + VirtualMachineInstancesRestartResponse, + VirtualMachineInstancesCreateCheckpointOptionalParams, + VirtualMachineInstancesCreateCheckpointResponse, + VirtualMachineInstancesDeleteCheckpointOptionalParams, + VirtualMachineInstancesDeleteCheckpointResponse, + VirtualMachineInstancesRestoreCheckpointOptionalParams, + VirtualMachineInstancesRestoreCheckpointResponse, + VirtualMachineInstancesListNextResponse +} from "../models"; + +/// +/** Class containing VirtualMachineInstances operations. */ +export class VirtualMachineInstancesImpl implements VirtualMachineInstances { + private readonly client: Scvmm; + + /** + * Initialize a new instance of the class VirtualMachineInstances class. + * @param client Reference to the service client + */ + constructor(client: Scvmm) { + this.client = client; + } + + /** + * Lists all of the virtual machine instances within the specified parent resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + public list( + resourceUri: string, + options?: VirtualMachineInstancesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceUri, 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(resourceUri, options, settings); + } + }; + } + + private async *listPagingPage( + resourceUri: string, + options?: VirtualMachineInstancesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: VirtualMachineInstancesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceUri, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(resourceUri, continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceUri: string, + options?: VirtualMachineInstancesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceUri, options)) { + yield* page; + } + } + + /** + * Retrieves information about a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + get( + resourceUri: string, + options?: VirtualMachineInstancesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, options }, + getOperationSpec + ); + } + + /** + * The operation to create or update a virtual machine instance. Please note some properties can be set + * only during virtual machine instance creation. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceUri: string, + options?: VirtualMachineInstancesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesCreateOrUpdateResponse + > + > { + 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: { resourceUri, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineInstancesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to create or update a virtual machine instance. Please note some properties can be set + * only during virtual machine instance creation. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceUri: string, + options?: VirtualMachineInstancesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate(resourceUri, options); + return poller.pollUntilDone(); + } + + /** + * The operation to update a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginUpdate( + resourceUri: string, + options?: VirtualMachineInstancesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesUpdateResponse + > + > { + 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: { resourceUri, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineInstancesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to update a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceUri: string, + options?: VirtualMachineInstancesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate(resourceUri, options); + return poller.pollUntilDone(); + } + + /** + * The operation to delete a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginDelete( + resourceUri: string, + options?: VirtualMachineInstancesDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesDeleteResponse + > + > { + 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: { resourceUri, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineInstancesDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * The operation to delete a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceUri: string, + options?: VirtualMachineInstancesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete(resourceUri, options); + return poller.pollUntilDone(); + } + + /** + * Lists all of the virtual machine instances within the specified parent resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + private _list( + resourceUri: string, + options?: VirtualMachineInstancesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, options }, + listOperationSpec + ); + } + + /** + * The operation to power off (stop) a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginStop( + resourceUri: string, + options?: VirtualMachineInstancesStopOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesStopResponse + > + > { + 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: { resourceUri, options }, + spec: stopOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineInstancesStopResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * The operation to power off (stop) a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginStopAndWait( + resourceUri: string, + options?: VirtualMachineInstancesStopOptionalParams + ): Promise { + const poller = await this.beginStop(resourceUri, options); + return poller.pollUntilDone(); + } + + /** + * The operation to start a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginStart( + resourceUri: string, + options?: VirtualMachineInstancesStartOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesStartResponse + > + > { + 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: { resourceUri, options }, + spec: startOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineInstancesStartResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * The operation to start a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginStartAndWait( + resourceUri: string, + options?: VirtualMachineInstancesStartOptionalParams + ): Promise { + const poller = await this.beginStart(resourceUri, options); + return poller.pollUntilDone(); + } + + /** + * The operation to restart a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginRestart( + resourceUri: string, + options?: VirtualMachineInstancesRestartOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesRestartResponse + > + > { + 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: { resourceUri, options }, + spec: restartOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineInstancesRestartResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * The operation to restart a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginRestartAndWait( + resourceUri: string, + options?: VirtualMachineInstancesRestartOptionalParams + ): Promise { + const poller = await this.beginRestart(resourceUri, options); + return poller.pollUntilDone(); + } + + /** + * Creates a checkpoint in virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginCreateCheckpoint( + resourceUri: string, + options?: VirtualMachineInstancesCreateCheckpointOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesCreateCheckpointResponse + > + > { + 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: { resourceUri, options }, + spec: createCheckpointOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineInstancesCreateCheckpointResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Creates a checkpoint in virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginCreateCheckpointAndWait( + resourceUri: string, + options?: VirtualMachineInstancesCreateCheckpointOptionalParams + ): Promise { + const poller = await this.beginCreateCheckpoint(resourceUri, options); + return poller.pollUntilDone(); + } + + /** + * Deletes a checkpoint in virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginDeleteCheckpoint( + resourceUri: string, + options?: VirtualMachineInstancesDeleteCheckpointOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesDeleteCheckpointResponse + > + > { + 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: { resourceUri, options }, + spec: deleteCheckpointOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineInstancesDeleteCheckpointResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Deletes a checkpoint in virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginDeleteCheckpointAndWait( + resourceUri: string, + options?: VirtualMachineInstancesDeleteCheckpointOptionalParams + ): Promise { + const poller = await this.beginDeleteCheckpoint(resourceUri, options); + return poller.pollUntilDone(); + } + + /** + * Restores to a checkpoint in virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginRestoreCheckpoint( + resourceUri: string, + options?: VirtualMachineInstancesRestoreCheckpointOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesRestoreCheckpointResponse + > + > { + 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: { resourceUri, options }, + spec: restoreCheckpointOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineInstancesRestoreCheckpointResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Restores to a checkpoint in virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + async beginRestoreCheckpointAndWait( + resourceUri: string, + options?: VirtualMachineInstancesRestoreCheckpointOptionalParams + ): Promise { + const poller = await this.beginRestoreCheckpoint(resourceUri, options); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceUri: string, + nextLink: string, + options?: VirtualMachineInstancesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 201: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 202: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 204: { + bodyMapper: Mappers.VirtualMachineInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body7, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 201: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 202: { + bodyMapper: Mappers.VirtualMachineInstance + }, + 204: { + bodyMapper: Mappers.VirtualMachineInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body8, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.VirtualMachineInstancesDeleteHeaders + }, + 201: { + headersMapper: Mappers.VirtualMachineInstancesDeleteHeaders + }, + 202: { + headersMapper: Mappers.VirtualMachineInstancesDeleteHeaders + }, + 204: { + headersMapper: Mappers.VirtualMachineInstancesDeleteHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.force, + Parameters.deleteFromHost + ], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineInstanceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const stopOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/stop", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.VirtualMachineInstancesStopHeaders + }, + 201: { + headersMapper: Mappers.VirtualMachineInstancesStopHeaders + }, + 202: { + headersMapper: Mappers.VirtualMachineInstancesStopHeaders + }, + 204: { + headersMapper: Mappers.VirtualMachineInstancesStopHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body9, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const startOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/start", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.VirtualMachineInstancesStartHeaders + }, + 201: { + headersMapper: Mappers.VirtualMachineInstancesStartHeaders + }, + 202: { + headersMapper: Mappers.VirtualMachineInstancesStartHeaders + }, + 204: { + headersMapper: Mappers.VirtualMachineInstancesStartHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const restartOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restart", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.VirtualMachineInstancesRestartHeaders + }, + 201: { + headersMapper: Mappers.VirtualMachineInstancesRestartHeaders + }, + 202: { + headersMapper: Mappers.VirtualMachineInstancesRestartHeaders + }, + 204: { + headersMapper: Mappers.VirtualMachineInstancesRestartHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer +}; +const createCheckpointOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/createCheckpoint", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.VirtualMachineInstancesCreateCheckpointHeaders + }, + 201: { + headersMapper: Mappers.VirtualMachineInstancesCreateCheckpointHeaders + }, + 202: { + headersMapper: Mappers.VirtualMachineInstancesCreateCheckpointHeaders + }, + 204: { + headersMapper: Mappers.VirtualMachineInstancesCreateCheckpointHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body10, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteCheckpointOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/deleteCheckpoint", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.VirtualMachineInstancesDeleteCheckpointHeaders + }, + 201: { + headersMapper: Mappers.VirtualMachineInstancesDeleteCheckpointHeaders + }, + 202: { + headersMapper: Mappers.VirtualMachineInstancesDeleteCheckpointHeaders + }, + 204: { + headersMapper: Mappers.VirtualMachineInstancesDeleteCheckpointHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body11, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const restoreCheckpointOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restoreCheckpoint", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.VirtualMachineInstancesRestoreCheckpointHeaders + }, + 201: { + headersMapper: Mappers.VirtualMachineInstancesRestoreCheckpointHeaders + }, + 202: { + headersMapper: Mappers.VirtualMachineInstancesRestoreCheckpointHeaders + }, + 204: { + headersMapper: Mappers.VirtualMachineInstancesRestoreCheckpointHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body12, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineInstanceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.resourceUri + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/scvmm/arm-scvmm/src/operations/virtualMachineTemplates.ts b/sdk/scvmm/arm-scvmm/src/operations/virtualMachineTemplates.ts index df380a6ebf72..ab0d7e72811d 100644 --- a/sdk/scvmm/arm-scvmm/src/operations/virtualMachineTemplates.ts +++ b/sdk/scvmm/arm-scvmm/src/operations/virtualMachineTemplates.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { Scvmm } from "../scvmm"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { VirtualMachineTemplate, VirtualMachineTemplatesListByResourceGroupNextOptionalParams, @@ -28,6 +32,7 @@ import { VirtualMachineTemplatesCreateOrUpdateOptionalParams, VirtualMachineTemplatesCreateOrUpdateResponse, VirtualMachineTemplatesDeleteOptionalParams, + VirtualMachineTemplatesDeleteResponse, ResourcePatch, VirtualMachineTemplatesUpdateOptionalParams, VirtualMachineTemplatesUpdateResponse, @@ -50,7 +55,7 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { /** * List of VirtualMachineTemplates in a resource group. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ public listByResourceGroup( @@ -173,7 +178,7 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { /** * Implements VirtualMachineTemplate GET method. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. * @param options The options parameters. */ @@ -190,7 +195,7 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { /** * Onboards the ScVmm VM Template as an Azure VM Template resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. * @param body Request payload. * @param options The options parameters. @@ -201,8 +206,8 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { body: VirtualMachineTemplate, options?: VirtualMachineTemplatesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineTemplatesCreateOrUpdateResponse > > { @@ -212,7 +217,7 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -245,15 +250,18 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, virtualMachineTemplateName, body, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, virtualMachineTemplateName, body, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineTemplatesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -261,7 +269,7 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { /** * Onboards the ScVmm VM Template as an Azure VM Template resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. * @param body Request payload. * @param options The options parameters. @@ -283,7 +291,7 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { /** * Deregisters the ScVmm VM Template from Azure. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. * @param options The options parameters. */ @@ -291,14 +299,19 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesDeleteOptionalParams - ): Promise, void>> { + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineTemplatesDeleteResponse + > + > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -331,15 +344,18 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, virtualMachineTemplateName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, virtualMachineTemplateName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineTemplatesDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -347,7 +363,7 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { /** * Deregisters the ScVmm VM Template from Azure. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. * @param options The options parameters. */ @@ -355,7 +371,7 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesDeleteOptionalParams - ): Promise { + ): Promise { const poller = await this.beginDelete( resourceGroupName, virtualMachineTemplateName, @@ -366,7 +382,7 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { /** * Updates the VirtualMachineTemplate resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. * @param body VirtualMachineTemplates patch details. * @param options The options parameters. @@ -377,8 +393,8 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { body: ResourcePatch, options?: VirtualMachineTemplatesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineTemplatesUpdateResponse > > { @@ -388,7 +404,7 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -421,15 +437,18 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, virtualMachineTemplateName, body, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, virtualMachineTemplateName, body, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + VirtualMachineTemplatesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -437,7 +456,7 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { /** * Updates the VirtualMachineTemplate resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. * @param body VirtualMachineTemplates patch details. * @param options The options parameters. @@ -459,7 +478,7 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { /** * List of VirtualMachineTemplates in a resource group. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ private _listByResourceGroup( @@ -487,7 +506,7 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates { /** * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. * @param options The options parameters. */ @@ -563,7 +582,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.body10, + requestBody: Parameters.body4, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -580,10 +599,18 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}", httpMethod: "DELETE", responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, + 200: { + headersMapper: Mappers.VirtualMachineTemplatesDeleteHeaders + }, + 201: { + headersMapper: Mappers.VirtualMachineTemplatesDeleteHeaders + }, + 202: { + headersMapper: Mappers.VirtualMachineTemplatesDeleteHeaders + }, + 204: { + headersMapper: Mappers.VirtualMachineTemplatesDeleteHeaders + }, default: { bodyMapper: Mappers.ErrorResponse } diff --git a/sdk/scvmm/arm-scvmm/src/operations/virtualMachines.ts b/sdk/scvmm/arm-scvmm/src/operations/virtualMachines.ts deleted file mode 100644 index 51d9e7e1f301..000000000000 --- a/sdk/scvmm/arm-scvmm/src/operations/virtualMachines.ts +++ /dev/null @@ -1,1354 +0,0 @@ -/* - * 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 { VirtualMachines } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { Scvmm } from "../scvmm"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; -import { - VirtualMachine, - VirtualMachinesListByResourceGroupNextOptionalParams, - VirtualMachinesListByResourceGroupOptionalParams, - VirtualMachinesListByResourceGroupResponse, - VirtualMachinesListBySubscriptionNextOptionalParams, - VirtualMachinesListBySubscriptionOptionalParams, - VirtualMachinesListBySubscriptionResponse, - VirtualMachinesGetOptionalParams, - VirtualMachinesGetResponse, - VirtualMachinesCreateOrUpdateOptionalParams, - VirtualMachinesCreateOrUpdateResponse, - VirtualMachinesDeleteOptionalParams, - VirtualMachineUpdate, - VirtualMachinesUpdateOptionalParams, - VirtualMachinesUpdateResponse, - VirtualMachinesStopOptionalParams, - VirtualMachinesStartOptionalParams, - VirtualMachinesRestartOptionalParams, - VirtualMachinesCreateCheckpointOptionalParams, - VirtualMachinesDeleteCheckpointOptionalParams, - VirtualMachinesRestoreCheckpointOptionalParams, - VirtualMachinesListByResourceGroupNextResponse, - VirtualMachinesListBySubscriptionNextResponse -} from "../models"; - -/// -/** Class containing VirtualMachines operations. */ -export class VirtualMachinesImpl implements VirtualMachines { - private readonly client: Scvmm; - - /** - * Initialize a new instance of the class VirtualMachines class. - * @param client Reference to the service client - */ - constructor(client: Scvmm) { - this.client = client; - } - - /** - * List of VirtualMachines in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: VirtualMachinesListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(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.listByResourceGroupPagingPage( - resourceGroupName, - options, - settings - ); - } - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: VirtualMachinesListByResourceGroupOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: VirtualMachinesListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: VirtualMachinesListByResourceGroupOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options - )) { - yield* page; - } - } - - /** - * List of VirtualMachines in a subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: VirtualMachinesListBySubscriptionOptionalParams - ): 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?: VirtualMachinesListBySubscriptionOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: VirtualMachinesListBySubscriptionResponse; - 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?: VirtualMachinesListBySubscriptionOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Implements VirtualMachine GET method. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineName, options }, - getOperationSpec - ); - } - - /** - * Creates Or Updates virtual machines deployed on scvmm fabric. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param body Request payload. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - virtualMachineName: string, - body: VirtualMachine, - options?: VirtualMachinesCreateOrUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - VirtualMachinesCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = 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 = new LroImpl( - sendOperation, - { resourceGroupName, virtualMachineName, body, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * Creates Or Updates virtual machines deployed on scvmm fabric. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param body Request payload. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualMachineName: string, - body: VirtualMachine, - options?: VirtualMachinesCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - virtualMachineName, - body, - options - ); - return poller.pollUntilDone(); - } - - /** - * Deletes a VirtualMachine deployed on ScVmm fabric. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesDeleteOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = 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 = new LroImpl( - sendOperation, - { resourceGroupName, virtualMachineName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a VirtualMachine deployed on ScVmm fabric. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesDeleteOptionalParams - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - virtualMachineName, - options - ); - return poller.pollUntilDone(); - } - - /** - * Updates the VirtualMachines resource. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param body VirtualMachines patch payload. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - virtualMachineName: string, - body: VirtualMachineUpdate, - options?: VirtualMachinesUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - VirtualMachinesUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = 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 = new LroImpl( - sendOperation, - { resourceGroupName, virtualMachineName, body, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * Updates the VirtualMachines resource. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param body VirtualMachines patch payload. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - virtualMachineName: string, - body: VirtualMachineUpdate, - options?: VirtualMachinesUpdateOptionalParams - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - virtualMachineName, - body, - options - ); - return poller.pollUntilDone(); - } - - /** - * Stop virtual machine. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - async beginStop( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesStopOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = 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 = new LroImpl( - sendOperation, - { resourceGroupName, virtualMachineName, options }, - stopOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * Stop virtual machine. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - async beginStopAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesStopOptionalParams - ): Promise { - const poller = await this.beginStop( - resourceGroupName, - virtualMachineName, - options - ); - return poller.pollUntilDone(); - } - - /** - * Start virtual machine. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - async beginStart( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesStartOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = 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 = new LroImpl( - sendOperation, - { resourceGroupName, virtualMachineName, options }, - startOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * Start virtual machine. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - async beginStartAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesStartOptionalParams - ): Promise { - const poller = await this.beginStart( - resourceGroupName, - virtualMachineName, - options - ); - return poller.pollUntilDone(); - } - - /** - * Restart virtual machine. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - async beginRestart( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesRestartOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = 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 = new LroImpl( - sendOperation, - { resourceGroupName, virtualMachineName, options }, - restartOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * Restart virtual machine. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - async beginRestartAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesRestartOptionalParams - ): Promise { - const poller = await this.beginRestart( - resourceGroupName, - virtualMachineName, - options - ); - return poller.pollUntilDone(); - } - - /** - * Creates a checkpoint in virtual machine. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - async beginCreateCheckpoint( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesCreateCheckpointOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = 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 = new LroImpl( - sendOperation, - { resourceGroupName, virtualMachineName, options }, - createCheckpointOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * Creates a checkpoint in virtual machine. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - async beginCreateCheckpointAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesCreateCheckpointOptionalParams - ): Promise { - const poller = await this.beginCreateCheckpoint( - resourceGroupName, - virtualMachineName, - options - ); - return poller.pollUntilDone(); - } - - /** - * Deletes a checkpoint in virtual machine. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - async beginDeleteCheckpoint( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesDeleteCheckpointOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = 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 = new LroImpl( - sendOperation, - { resourceGroupName, virtualMachineName, options }, - deleteCheckpointOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a checkpoint in virtual machine. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - async beginDeleteCheckpointAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesDeleteCheckpointOptionalParams - ): Promise { - const poller = await this.beginDeleteCheckpoint( - resourceGroupName, - virtualMachineName, - options - ); - return poller.pollUntilDone(); - } - - /** - * Restores to a checkpoint in virtual machine. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - async beginRestoreCheckpoint( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesRestoreCheckpointOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = 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 = new LroImpl( - sendOperation, - { resourceGroupName, virtualMachineName, options }, - restoreCheckpointOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * Restores to a checkpoint in virtual machine. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - async beginRestoreCheckpointAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesRestoreCheckpointOptionalParams - ): Promise { - const poller = await this.beginRestoreCheckpoint( - resourceGroupName, - virtualMachineName, - options - ); - return poller.pollUntilDone(); - } - - /** - * List of VirtualMachines in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: VirtualMachinesListByResourceGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec - ); - } - - /** - * List of VirtualMachines in a subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: VirtualMachinesListBySubscriptionOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: VirtualMachinesListByResourceGroupNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec - ); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: VirtualMachinesListBySubscriptionNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachines/{virtualMachineName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachine - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachines/{virtualMachineName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachine - }, - 201: { - bodyMapper: Mappers.VirtualMachine - }, - 202: { - bodyMapper: Mappers.VirtualMachine - }, - 204: { - bodyMapper: Mappers.VirtualMachine - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.body4, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachines/{virtualMachineName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.force, Parameters.retain], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept], - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachines/{virtualMachineName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachine - }, - 201: { - bodyMapper: Mappers.VirtualMachine - }, - 202: { - bodyMapper: Mappers.VirtualMachine - }, - 204: { - bodyMapper: Mappers.VirtualMachine - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.body5, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const stopOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachines/{virtualMachineName}/stop", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.body6, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const startOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachines/{virtualMachineName}/start", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept], - serializer -}; -const restartOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachines/{virtualMachineName}/restart", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createCheckpointOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachines/{virtualMachineName}/createCheckpoint", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.body7, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteCheckpointOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachines/{virtualMachineName}/deleteCheckpoint", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.body8, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const restoreCheckpointOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachines/{virtualMachineName}/restoreCheckpoint", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.body9, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachines", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/virtualMachines", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/scvmm/arm-scvmm/src/operations/virtualNetworks.ts b/sdk/scvmm/arm-scvmm/src/operations/virtualNetworks.ts index 8cf52cd549ce..60b7f9bd6d94 100644 --- a/sdk/scvmm/arm-scvmm/src/operations/virtualNetworks.ts +++ b/sdk/scvmm/arm-scvmm/src/operations/virtualNetworks.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { Scvmm } from "../scvmm"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { VirtualNetwork, VirtualNetworksListByResourceGroupNextOptionalParams, @@ -28,6 +32,7 @@ import { VirtualNetworksCreateOrUpdateOptionalParams, VirtualNetworksCreateOrUpdateResponse, VirtualNetworksDeleteOptionalParams, + VirtualNetworksDeleteResponse, ResourcePatch, VirtualNetworksUpdateOptionalParams, VirtualNetworksUpdateResponse, @@ -50,7 +55,7 @@ export class VirtualNetworksImpl implements VirtualNetworks { /** * List of VirtualNetworks in a resource group. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ public listByResourceGroup( @@ -173,7 +178,7 @@ export class VirtualNetworksImpl implements VirtualNetworks { /** * Implements VirtualNetwork GET method. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. * @param options The options parameters. */ @@ -190,7 +195,7 @@ export class VirtualNetworksImpl implements VirtualNetworks { /** * Onboards the ScVmm virtual network as an Azure virtual network resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. * @param body Request payload. * @param options The options parameters. @@ -201,8 +206,8 @@ export class VirtualNetworksImpl implements VirtualNetworks { body: VirtualNetwork, options?: VirtualNetworksCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualNetworksCreateOrUpdateResponse > > { @@ -212,7 +217,7 @@ export class VirtualNetworksImpl implements VirtualNetworks { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -245,15 +250,18 @@ export class VirtualNetworksImpl implements VirtualNetworks { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, virtualNetworkName, body, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, virtualNetworkName, body, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + VirtualNetworksCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -261,7 +269,7 @@ export class VirtualNetworksImpl implements VirtualNetworks { /** * Onboards the ScVmm virtual network as an Azure virtual network resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. * @param body Request payload. * @param options The options parameters. @@ -283,7 +291,7 @@ export class VirtualNetworksImpl implements VirtualNetworks { /** * Deregisters the ScVmm virtual network from Azure. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. * @param options The options parameters. */ @@ -291,14 +299,19 @@ export class VirtualNetworksImpl implements VirtualNetworks { resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams - ): Promise, void>> { + ): Promise< + SimplePollerLike< + OperationState, + VirtualNetworksDeleteResponse + > + > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -331,15 +344,18 @@ export class VirtualNetworksImpl implements VirtualNetworks { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, virtualNetworkName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, virtualNetworkName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + VirtualNetworksDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -347,7 +363,7 @@ export class VirtualNetworksImpl implements VirtualNetworks { /** * Deregisters the ScVmm virtual network from Azure. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. * @param options The options parameters. */ @@ -355,7 +371,7 @@ export class VirtualNetworksImpl implements VirtualNetworks { resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams - ): Promise { + ): Promise { const poller = await this.beginDelete( resourceGroupName, virtualNetworkName, @@ -366,7 +382,7 @@ export class VirtualNetworksImpl implements VirtualNetworks { /** * Updates the VirtualNetworks resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. * @param body VirtualNetworks patch payload. * @param options The options parameters. @@ -377,8 +393,8 @@ export class VirtualNetworksImpl implements VirtualNetworks { body: ResourcePatch, options?: VirtualNetworksUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualNetworksUpdateResponse > > { @@ -388,7 +404,7 @@ export class VirtualNetworksImpl implements VirtualNetworks { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -421,15 +437,18 @@ export class VirtualNetworksImpl implements VirtualNetworks { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, virtualNetworkName, body, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, virtualNetworkName, body, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + VirtualNetworksUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -437,7 +456,7 @@ export class VirtualNetworksImpl implements VirtualNetworks { /** * Updates the VirtualNetworks resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. * @param body VirtualNetworks patch payload. * @param options The options parameters. @@ -459,7 +478,7 @@ export class VirtualNetworksImpl implements VirtualNetworks { /** * List of VirtualNetworks in a resource group. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ private _listByResourceGroup( @@ -487,7 +506,7 @@ export class VirtualNetworksImpl implements VirtualNetworks { /** * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. * @param options The options parameters. */ @@ -580,10 +599,18 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}", httpMethod: "DELETE", responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, + 200: { + headersMapper: Mappers.VirtualNetworksDeleteHeaders + }, + 201: { + headersMapper: Mappers.VirtualNetworksDeleteHeaders + }, + 202: { + headersMapper: Mappers.VirtualNetworksDeleteHeaders + }, + 204: { + headersMapper: Mappers.VirtualNetworksDeleteHeaders + }, default: { bodyMapper: Mappers.ErrorResponse } diff --git a/sdk/scvmm/arm-scvmm/src/operations/vmmServers.ts b/sdk/scvmm/arm-scvmm/src/operations/vmmServers.ts index 3160a8fb33b5..71d082d98dd5 100644 --- a/sdk/scvmm/arm-scvmm/src/operations/vmmServers.ts +++ b/sdk/scvmm/arm-scvmm/src/operations/vmmServers.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { Scvmm } from "../scvmm"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { VMMServer, VmmServersListByResourceGroupNextOptionalParams, @@ -28,6 +32,7 @@ import { VmmServersCreateOrUpdateOptionalParams, VmmServersCreateOrUpdateResponse, VmmServersDeleteOptionalParams, + VmmServersDeleteResponse, ResourcePatch, VmmServersUpdateOptionalParams, VmmServersUpdateResponse, @@ -50,7 +55,7 @@ export class VmmServersImpl implements VmmServers { /** * List of VmmServers in a resource group. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ public listByResourceGroup( @@ -173,7 +178,7 @@ export class VmmServersImpl implements VmmServers { /** * Implements VMMServer GET method. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VMMServer. * @param options The options parameters. */ @@ -190,7 +195,7 @@ export class VmmServersImpl implements VmmServers { /** * Onboards the SCVMM fabric as an Azure VmmServer resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VMMServer. * @param body Request payload. * @param options The options parameters. @@ -201,8 +206,8 @@ export class VmmServersImpl implements VmmServers { body: VMMServer, options?: VmmServersCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VmmServersCreateOrUpdateResponse > > { @@ -212,7 +217,7 @@ export class VmmServersImpl implements VmmServers { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -245,15 +250,18 @@ export class VmmServersImpl implements VmmServers { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmmServerName, body, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmmServerName, body, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + VmmServersCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -261,7 +269,7 @@ export class VmmServersImpl implements VmmServers { /** * Onboards the SCVMM fabric as an Azure VmmServer resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VMMServer. * @param body Request payload. * @param options The options parameters. @@ -282,8 +290,8 @@ export class VmmServersImpl implements VmmServers { } /** - * Deboards the SCVMM fabric from Azure. - * @param resourceGroupName The name of the resource group. + * Removes the SCVMM fabric from Azure. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VMMServer. * @param options The options parameters. */ @@ -291,14 +299,19 @@ export class VmmServersImpl implements VmmServers { resourceGroupName: string, vmmServerName: string, options?: VmmServersDeleteOptionalParams - ): Promise, void>> { + ): Promise< + SimplePollerLike< + OperationState, + VmmServersDeleteResponse + > + > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -331,23 +344,26 @@ export class VmmServersImpl implements VmmServers { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmmServerName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmmServerName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + VmmServersDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; } /** - * Deboards the SCVMM fabric from Azure. - * @param resourceGroupName The name of the resource group. + * Removes the SCVMM fabric from Azure. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VMMServer. * @param options The options parameters. */ @@ -355,7 +371,7 @@ export class VmmServersImpl implements VmmServers { resourceGroupName: string, vmmServerName: string, options?: VmmServersDeleteOptionalParams - ): Promise { + ): Promise { const poller = await this.beginDelete( resourceGroupName, vmmServerName, @@ -366,7 +382,7 @@ export class VmmServersImpl implements VmmServers { /** * Updates the VmmServers resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VMMServer. * @param body VmmServers patch payload. * @param options The options parameters. @@ -377,8 +393,8 @@ export class VmmServersImpl implements VmmServers { body: ResourcePatch, options?: VmmServersUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VmmServersUpdateResponse > > { @@ -388,7 +404,7 @@ export class VmmServersImpl implements VmmServers { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -421,15 +437,18 @@ export class VmmServersImpl implements VmmServers { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, vmmServerName, body, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, vmmServerName, body, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + VmmServersUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -437,7 +456,7 @@ export class VmmServersImpl implements VmmServers { /** * Updates the VmmServers resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VMMServer. * @param body VmmServers patch payload. * @param options The options parameters. @@ -459,7 +478,7 @@ export class VmmServersImpl implements VmmServers { /** * List of VmmServers in a resource group. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ private _listByResourceGroup( @@ -487,7 +506,7 @@ export class VmmServersImpl implements VmmServers { /** * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. * @param options The options parameters. */ @@ -580,10 +599,18 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}", httpMethod: "DELETE", responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, + 200: { + headersMapper: Mappers.VmmServersDeleteHeaders + }, + 201: { + headersMapper: Mappers.VmmServersDeleteHeaders + }, + 202: { + headersMapper: Mappers.VmmServersDeleteHeaders + }, + 204: { + headersMapper: Mappers.VmmServersDeleteHeaders + }, default: { bodyMapper: Mappers.ErrorResponse } diff --git a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/availabilitySets.ts b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/availabilitySets.ts index 9a6c9e182719..90be5026ec2b 100644 --- a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/availabilitySets.ts +++ b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/availabilitySets.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { AvailabilitySet, AvailabilitySetsListByResourceGroupOptionalParams, @@ -17,6 +17,7 @@ import { AvailabilitySetsCreateOrUpdateOptionalParams, AvailabilitySetsCreateOrUpdateResponse, AvailabilitySetsDeleteOptionalParams, + AvailabilitySetsDeleteResponse, ResourcePatch, AvailabilitySetsUpdateOptionalParams, AvailabilitySetsUpdateResponse @@ -27,7 +28,7 @@ import { export interface AvailabilitySets { /** * List of AvailabilitySets in a resource group. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ listByResourceGroup( @@ -43,96 +44,101 @@ export interface AvailabilitySets { ): PagedAsyncIterableIterator; /** * Implements AvailabilitySet GET method. - * @param resourceGroupName The name of the resource group. - * @param availabilitySetName Name of the AvailabilitySet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. * @param options The options parameters. */ get( resourceGroupName: string, - availabilitySetName: string, + availabilitySetResourceName: string, options?: AvailabilitySetsGetOptionalParams ): Promise; /** * Onboards the ScVmm availability set as an Azure resource. - * @param resourceGroupName The name of the resource group. - * @param availabilitySetName Name of the AvailabilitySet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. * @param body Request payload. * @param options The options parameters. */ beginCreateOrUpdate( resourceGroupName: string, - availabilitySetName: string, + availabilitySetResourceName: string, body: AvailabilitySet, options?: AvailabilitySetsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AvailabilitySetsCreateOrUpdateResponse > >; /** * Onboards the ScVmm availability set as an Azure resource. - * @param resourceGroupName The name of the resource group. - * @param availabilitySetName Name of the AvailabilitySet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. * @param body Request payload. * @param options The options parameters. */ beginCreateOrUpdateAndWait( resourceGroupName: string, - availabilitySetName: string, + availabilitySetResourceName: string, body: AvailabilitySet, options?: AvailabilitySetsCreateOrUpdateOptionalParams ): Promise; /** * Deregisters the ScVmm availability set from Azure. - * @param resourceGroupName The name of the resource group. - * @param availabilitySetName Name of the AvailabilitySet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. * @param options The options parameters. */ beginDelete( resourceGroupName: string, - availabilitySetName: string, + availabilitySetResourceName: string, options?: AvailabilitySetsDeleteOptionalParams - ): Promise, void>>; + ): Promise< + SimplePollerLike< + OperationState, + AvailabilitySetsDeleteResponse + > + >; /** * Deregisters the ScVmm availability set from Azure. - * @param resourceGroupName The name of the resource group. - * @param availabilitySetName Name of the AvailabilitySet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. * @param options The options parameters. */ beginDeleteAndWait( resourceGroupName: string, - availabilitySetName: string, + availabilitySetResourceName: string, options?: AvailabilitySetsDeleteOptionalParams - ): Promise; + ): Promise; /** * Updates the AvailabilitySets resource. - * @param resourceGroupName The name of the resource group. - * @param availabilitySetName Name of the AvailabilitySet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. * @param body AvailabilitySets patch payload. * @param options The options parameters. */ beginUpdate( resourceGroupName: string, - availabilitySetName: string, + availabilitySetResourceName: string, body: ResourcePatch, options?: AvailabilitySetsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AvailabilitySetsUpdateResponse > >; /** * Updates the AvailabilitySets resource. - * @param resourceGroupName The name of the resource group. - * @param availabilitySetName Name of the AvailabilitySet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. * @param body AvailabilitySets patch payload. * @param options The options parameters. */ beginUpdateAndWait( resourceGroupName: string, - availabilitySetName: string, + availabilitySetResourceName: string, body: ResourcePatch, options?: AvailabilitySetsUpdateOptionalParams ): Promise; diff --git a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/clouds.ts b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/clouds.ts index c9751cfd5f68..2b68c7120655 100644 --- a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/clouds.ts +++ b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/clouds.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Cloud, CloudsListByResourceGroupOptionalParams, @@ -17,6 +17,7 @@ import { CloudsCreateOrUpdateOptionalParams, CloudsCreateOrUpdateResponse, CloudsDeleteOptionalParams, + CloudsDeleteResponse, ResourcePatch, CloudsUpdateOptionalParams, CloudsUpdateResponse @@ -27,7 +28,7 @@ import { export interface Clouds { /** * List of Clouds in a resource group. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ listByResourceGroup( @@ -43,93 +44,95 @@ export interface Clouds { ): PagedAsyncIterableIterator; /** * Implements Cloud GET method. - * @param resourceGroupName The name of the resource group. - * @param cloudName Name of the Cloud. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. * @param options The options parameters. */ get( resourceGroupName: string, - cloudName: string, + cloudResourceName: string, options?: CloudsGetOptionalParams ): Promise; /** * Onboards the ScVmm fabric cloud as an Azure cloud resource. - * @param resourceGroupName The name of the resource group. - * @param cloudName Name of the Cloud. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. * @param body Request payload. * @param options The options parameters. */ beginCreateOrUpdate( resourceGroupName: string, - cloudName: string, + cloudResourceName: string, body: Cloud, options?: CloudsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CloudsCreateOrUpdateResponse > >; /** * Onboards the ScVmm fabric cloud as an Azure cloud resource. - * @param resourceGroupName The name of the resource group. - * @param cloudName Name of the Cloud. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. * @param body Request payload. * @param options The options parameters. */ beginCreateOrUpdateAndWait( resourceGroupName: string, - cloudName: string, + cloudResourceName: string, body: Cloud, options?: CloudsCreateOrUpdateOptionalParams ): Promise; /** * Deregisters the ScVmm fabric cloud from Azure. - * @param resourceGroupName The name of the resource group. - * @param cloudName Name of the Cloud. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. * @param options The options parameters. */ beginDelete( resourceGroupName: string, - cloudName: string, + cloudResourceName: string, options?: CloudsDeleteOptionalParams - ): Promise, void>>; + ): Promise< + SimplePollerLike, CloudsDeleteResponse> + >; /** * Deregisters the ScVmm fabric cloud from Azure. - * @param resourceGroupName The name of the resource group. - * @param cloudName Name of the Cloud. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. * @param options The options parameters. */ beginDeleteAndWait( resourceGroupName: string, - cloudName: string, + cloudResourceName: string, options?: CloudsDeleteOptionalParams - ): Promise; + ): Promise; /** * Updates the Clouds resource. - * @param resourceGroupName The name of the resource group. - * @param cloudName Name of the Cloud. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. * @param body Clouds patch payload. * @param options The options parameters. */ beginUpdate( resourceGroupName: string, - cloudName: string, + cloudResourceName: string, body: ResourcePatch, options?: CloudsUpdateOptionalParams ): Promise< - PollerLike, CloudsUpdateResponse> + SimplePollerLike, CloudsUpdateResponse> >; /** * Updates the Clouds resource. - * @param resourceGroupName The name of the resource group. - * @param cloudName Name of the Cloud. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. * @param body Clouds patch payload. * @param options The options parameters. */ beginUpdateAndWait( resourceGroupName: string, - cloudName: string, + cloudResourceName: string, body: ResourcePatch, options?: CloudsUpdateOptionalParams ): Promise; diff --git a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/index.ts b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/index.ts index 85877bfdbd34..6b119a55247e 100644 --- a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/index.ts +++ b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/index.ts @@ -10,7 +10,9 @@ export * from "./vmmServers"; export * from "./operations"; export * from "./clouds"; export * from "./virtualNetworks"; -export * from "./virtualMachines"; export * from "./virtualMachineTemplates"; export * from "./availabilitySets"; export * from "./inventoryItems"; +export * from "./virtualMachineInstances"; +export * from "./virtualMachineInstanceHybridIdentityMetadata"; +export * from "./vMInstanceGuestAgents"; diff --git a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/inventoryItems.ts b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/inventoryItems.ts index 9e521a5d37b2..cf45c00d12ce 100644 --- a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/inventoryItems.ts +++ b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/inventoryItems.ts @@ -22,7 +22,7 @@ import { export interface InventoryItems { /** * Returns the list of inventoryItems in the given VMMServer. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VMMServer. * @param options The options parameters. */ @@ -33,41 +33,41 @@ export interface InventoryItems { ): PagedAsyncIterableIterator; /** * Create Or Update InventoryItem. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VMMServer. - * @param inventoryItemName Name of the inventoryItem. + * @param inventoryItemResourceName Name of the inventoryItem. * @param options The options parameters. */ create( resourceGroupName: string, vmmServerName: string, - inventoryItemName: string, + inventoryItemResourceName: string, options?: InventoryItemsCreateOptionalParams ): Promise; /** * Shows an inventory item. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VMMServer. - * @param inventoryItemName Name of the inventoryItem. + * @param inventoryItemResourceName Name of the inventoryItem. * @param options The options parameters. */ get( resourceGroupName: string, vmmServerName: string, - inventoryItemName: string, + inventoryItemResourceName: string, options?: InventoryItemsGetOptionalParams ): Promise; /** * Deletes an inventoryItem. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VMMServer. - * @param inventoryItemName Name of the inventoryItem. + * @param inventoryItemResourceName Name of the inventoryItem. * @param options The options parameters. */ delete( resourceGroupName: string, vmmServerName: string, - inventoryItemName: string, + inventoryItemResourceName: string, options?: InventoryItemsDeleteOptionalParams ): Promise; } diff --git a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/operations.ts b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/operations.ts index d788a2db3af9..b0b35b8f194b 100644 --- a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/operations.ts +++ b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/operations.ts @@ -7,10 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ResourceProviderOperation, - OperationsListOptionalParams -} from "../models"; +import { Operation, OperationsListOptionalParams } from "../models"; /// /** Interface representing a Operations. */ @@ -21,5 +18,5 @@ export interface Operations { */ list( options?: OperationsListOptionalParams - ): PagedAsyncIterableIterator; + ): PagedAsyncIterableIterator; } diff --git a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/vMInstanceGuestAgents.ts b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/vMInstanceGuestAgents.ts new file mode 100644 index 000000000000..fc1ddaa77e00 --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/vMInstanceGuestAgents.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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + GuestAgent, + VMInstanceGuestAgentsListOptionalParams, + VMInstanceGuestAgentsCreateOptionalParams, + VMInstanceGuestAgentsCreateResponse, + VMInstanceGuestAgentsGetOptionalParams, + VMInstanceGuestAgentsGetResponse, + VMInstanceGuestAgentsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a VMInstanceGuestAgents. */ +export interface VMInstanceGuestAgents { + /** + * Returns the list of GuestAgent of the given vm. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + list( + resourceUri: string, + options?: VMInstanceGuestAgentsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create Or Update GuestAgent. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginCreate( + resourceUri: string, + options?: VMInstanceGuestAgentsCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VMInstanceGuestAgentsCreateResponse + > + >; + /** + * Create Or Update GuestAgent. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceUri: string, + options?: VMInstanceGuestAgentsCreateOptionalParams + ): Promise; + /** + * Implements GuestAgent GET method. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + get( + resourceUri: string, + options?: VMInstanceGuestAgentsGetOptionalParams + ): Promise; + /** + * Implements GuestAgent DELETE method. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + delete( + resourceUri: string, + options?: VMInstanceGuestAgentsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualMachineInstanceHybridIdentityMetadata.ts b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualMachineInstanceHybridIdentityMetadata.ts new file mode 100644 index 000000000000..21d130a9df47 --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualMachineInstanceHybridIdentityMetadata.ts @@ -0,0 +1,40 @@ +/* + * 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 { + VmInstanceHybridIdentityMetadata, + VirtualMachineInstanceHybridIdentityMetadataListOptionalParams, + VirtualMachineInstanceHybridIdentityMetadataGetOptionalParams, + VirtualMachineInstanceHybridIdentityMetadataGetResponse +} from "../models"; + +/// +/** Interface representing a VirtualMachineInstanceHybridIdentityMetadata. */ +export interface VirtualMachineInstanceHybridIdentityMetadata { + /** + * Returns the list of HybridIdentityMetadata of the given vm. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + list( + resourceUri: string, + options?: VirtualMachineInstanceHybridIdentityMetadataListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Implements HybridIdentityMetadata GET method. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + get( + resourceUri: string, + options?: VirtualMachineInstanceHybridIdentityMetadataGetOptionalParams + ): Promise; +} diff --git a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualMachineInstances.ts b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualMachineInstances.ts new file mode 100644 index 000000000000..c94bbcfa5e4e --- /dev/null +++ b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualMachineInstances.ts @@ -0,0 +1,286 @@ +/* + * 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 { + VirtualMachineInstance, + VirtualMachineInstancesListOptionalParams, + VirtualMachineInstancesGetOptionalParams, + VirtualMachineInstancesGetResponse, + VirtualMachineInstancesCreateOrUpdateOptionalParams, + VirtualMachineInstancesCreateOrUpdateResponse, + VirtualMachineInstancesUpdateOptionalParams, + VirtualMachineInstancesUpdateResponse, + VirtualMachineInstancesDeleteOptionalParams, + VirtualMachineInstancesDeleteResponse, + VirtualMachineInstancesStopOptionalParams, + VirtualMachineInstancesStopResponse, + VirtualMachineInstancesStartOptionalParams, + VirtualMachineInstancesStartResponse, + VirtualMachineInstancesRestartOptionalParams, + VirtualMachineInstancesRestartResponse, + VirtualMachineInstancesCreateCheckpointOptionalParams, + VirtualMachineInstancesCreateCheckpointResponse, + VirtualMachineInstancesDeleteCheckpointOptionalParams, + VirtualMachineInstancesDeleteCheckpointResponse, + VirtualMachineInstancesRestoreCheckpointOptionalParams, + VirtualMachineInstancesRestoreCheckpointResponse +} from "../models"; + +/// +/** Interface representing a VirtualMachineInstances. */ +export interface VirtualMachineInstances { + /** + * Lists all of the virtual machine instances within the specified parent resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + list( + resourceUri: string, + options?: VirtualMachineInstancesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Retrieves information about a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + get( + resourceUri: string, + options?: VirtualMachineInstancesGetOptionalParams + ): Promise; + /** + * The operation to create or update a virtual machine instance. Please note some properties can be set + * only during virtual machine instance creation. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceUri: string, + options?: VirtualMachineInstancesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesCreateOrUpdateResponse + > + >; + /** + * The operation to create or update a virtual machine instance. Please note some properties can be set + * only during virtual machine instance creation. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceUri: string, + options?: VirtualMachineInstancesCreateOrUpdateOptionalParams + ): Promise; + /** + * The operation to update a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginUpdate( + resourceUri: string, + options?: VirtualMachineInstancesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesUpdateResponse + > + >; + /** + * The operation to update a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceUri: string, + options?: VirtualMachineInstancesUpdateOptionalParams + ): Promise; + /** + * The operation to delete a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginDelete( + resourceUri: string, + options?: VirtualMachineInstancesDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesDeleteResponse + > + >; + /** + * The operation to delete a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceUri: string, + options?: VirtualMachineInstancesDeleteOptionalParams + ): Promise; + /** + * The operation to power off (stop) a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginStop( + resourceUri: string, + options?: VirtualMachineInstancesStopOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesStopResponse + > + >; + /** + * The operation to power off (stop) a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginStopAndWait( + resourceUri: string, + options?: VirtualMachineInstancesStopOptionalParams + ): Promise; + /** + * The operation to start a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginStart( + resourceUri: string, + options?: VirtualMachineInstancesStartOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesStartResponse + > + >; + /** + * The operation to start a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginStartAndWait( + resourceUri: string, + options?: VirtualMachineInstancesStartOptionalParams + ): Promise; + /** + * The operation to restart a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginRestart( + resourceUri: string, + options?: VirtualMachineInstancesRestartOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesRestartResponse + > + >; + /** + * The operation to restart a virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginRestartAndWait( + resourceUri: string, + options?: VirtualMachineInstancesRestartOptionalParams + ): Promise; + /** + * Creates a checkpoint in virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginCreateCheckpoint( + resourceUri: string, + options?: VirtualMachineInstancesCreateCheckpointOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesCreateCheckpointResponse + > + >; + /** + * Creates a checkpoint in virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginCreateCheckpointAndWait( + resourceUri: string, + options?: VirtualMachineInstancesCreateCheckpointOptionalParams + ): Promise; + /** + * Deletes a checkpoint in virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginDeleteCheckpoint( + resourceUri: string, + options?: VirtualMachineInstancesDeleteCheckpointOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesDeleteCheckpointResponse + > + >; + /** + * Deletes a checkpoint in virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginDeleteCheckpointAndWait( + resourceUri: string, + options?: VirtualMachineInstancesDeleteCheckpointOptionalParams + ): Promise; + /** + * Restores to a checkpoint in virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginRestoreCheckpoint( + resourceUri: string, + options?: VirtualMachineInstancesRestoreCheckpointOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineInstancesRestoreCheckpointResponse + > + >; + /** + * Restores to a checkpoint in virtual machine instance. + * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute + * machine resource to be extended. + * @param options The options parameters. + */ + beginRestoreCheckpointAndWait( + resourceUri: string, + options?: VirtualMachineInstancesRestoreCheckpointOptionalParams + ): Promise; +} diff --git a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualMachineTemplates.ts b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualMachineTemplates.ts index 7baf5609424f..afeec1edb484 100644 --- a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualMachineTemplates.ts +++ b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualMachineTemplates.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { VirtualMachineTemplate, VirtualMachineTemplatesListByResourceGroupOptionalParams, @@ -17,6 +17,7 @@ import { VirtualMachineTemplatesCreateOrUpdateOptionalParams, VirtualMachineTemplatesCreateOrUpdateResponse, VirtualMachineTemplatesDeleteOptionalParams, + VirtualMachineTemplatesDeleteResponse, ResourcePatch, VirtualMachineTemplatesUpdateOptionalParams, VirtualMachineTemplatesUpdateResponse @@ -27,7 +28,7 @@ import { export interface VirtualMachineTemplates { /** * List of VirtualMachineTemplates in a resource group. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ listByResourceGroup( @@ -43,7 +44,7 @@ export interface VirtualMachineTemplates { ): PagedAsyncIterableIterator; /** * Implements VirtualMachineTemplate GET method. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. * @param options The options parameters. */ @@ -54,7 +55,7 @@ export interface VirtualMachineTemplates { ): Promise; /** * Onboards the ScVmm VM Template as an Azure VM Template resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. * @param body Request payload. * @param options The options parameters. @@ -65,14 +66,14 @@ export interface VirtualMachineTemplates { body: VirtualMachineTemplate, options?: VirtualMachineTemplatesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineTemplatesCreateOrUpdateResponse > >; /** * Onboards the ScVmm VM Template as an Azure VM Template resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. * @param body Request payload. * @param options The options parameters. @@ -85,7 +86,7 @@ export interface VirtualMachineTemplates { ): Promise; /** * Deregisters the ScVmm VM Template from Azure. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. * @param options The options parameters. */ @@ -93,10 +94,15 @@ export interface VirtualMachineTemplates { resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesDeleteOptionalParams - ): Promise, void>>; + ): Promise< + SimplePollerLike< + OperationState, + VirtualMachineTemplatesDeleteResponse + > + >; /** * Deregisters the ScVmm VM Template from Azure. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. * @param options The options parameters. */ @@ -104,10 +110,10 @@ export interface VirtualMachineTemplates { resourceGroupName: string, virtualMachineTemplateName: string, options?: VirtualMachineTemplatesDeleteOptionalParams - ): Promise; + ): Promise; /** * Updates the VirtualMachineTemplate resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. * @param body VirtualMachineTemplates patch details. * @param options The options parameters. @@ -118,14 +124,14 @@ export interface VirtualMachineTemplates { body: ResourcePatch, options?: VirtualMachineTemplatesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualMachineTemplatesUpdateResponse > >; /** * Updates the VirtualMachineTemplate resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. * @param body VirtualMachineTemplates patch details. * @param options The options parameters. diff --git a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualMachines.ts b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualMachines.ts deleted file mode 100644 index a8591ec193ab..000000000000 --- a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualMachines.ts +++ /dev/null @@ -1,277 +0,0 @@ -/* - * 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 { PollerLike, PollOperationState } from "@azure/core-lro"; -import { - VirtualMachine, - VirtualMachinesListByResourceGroupOptionalParams, - VirtualMachinesListBySubscriptionOptionalParams, - VirtualMachinesGetOptionalParams, - VirtualMachinesGetResponse, - VirtualMachinesCreateOrUpdateOptionalParams, - VirtualMachinesCreateOrUpdateResponse, - VirtualMachinesDeleteOptionalParams, - VirtualMachineUpdate, - VirtualMachinesUpdateOptionalParams, - VirtualMachinesUpdateResponse, - VirtualMachinesStopOptionalParams, - VirtualMachinesStartOptionalParams, - VirtualMachinesRestartOptionalParams, - VirtualMachinesCreateCheckpointOptionalParams, - VirtualMachinesDeleteCheckpointOptionalParams, - VirtualMachinesRestoreCheckpointOptionalParams -} from "../models"; - -/// -/** Interface representing a VirtualMachines. */ -export interface VirtualMachines { - /** - * List of VirtualMachines in a resource group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: VirtualMachinesListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator; - /** - * List of VirtualMachines in a subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: VirtualMachinesListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator; - /** - * Implements VirtualMachine GET method. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesGetOptionalParams - ): Promise; - /** - * Creates Or Updates virtual machines deployed on scvmm fabric. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param body Request payload. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - virtualMachineName: string, - body: VirtualMachine, - options?: VirtualMachinesCreateOrUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - VirtualMachinesCreateOrUpdateResponse - > - >; - /** - * Creates Or Updates virtual machines deployed on scvmm fabric. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param body Request payload. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualMachineName: string, - body: VirtualMachine, - options?: VirtualMachinesCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes a VirtualMachine deployed on ScVmm fabric. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesDeleteOptionalParams - ): Promise, void>>; - /** - * Deletes a VirtualMachine deployed on ScVmm fabric. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesDeleteOptionalParams - ): Promise; - /** - * Updates the VirtualMachines resource. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param body VirtualMachines patch payload. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - virtualMachineName: string, - body: VirtualMachineUpdate, - options?: VirtualMachinesUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - VirtualMachinesUpdateResponse - > - >; - /** - * Updates the VirtualMachines resource. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param body VirtualMachines patch payload. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - virtualMachineName: string, - body: VirtualMachineUpdate, - options?: VirtualMachinesUpdateOptionalParams - ): Promise; - /** - * Stop virtual machine. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - beginStop( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesStopOptionalParams - ): Promise, void>>; - /** - * Stop virtual machine. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - beginStopAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesStopOptionalParams - ): Promise; - /** - * Start virtual machine. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - beginStart( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesStartOptionalParams - ): Promise, void>>; - /** - * Start virtual machine. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - beginStartAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesStartOptionalParams - ): Promise; - /** - * Restart virtual machine. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - beginRestart( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesRestartOptionalParams - ): Promise, void>>; - /** - * Restart virtual machine. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - beginRestartAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesRestartOptionalParams - ): Promise; - /** - * Creates a checkpoint in virtual machine. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - beginCreateCheckpoint( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesCreateCheckpointOptionalParams - ): Promise, void>>; - /** - * Creates a checkpoint in virtual machine. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - beginCreateCheckpointAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesCreateCheckpointOptionalParams - ): Promise; - /** - * Deletes a checkpoint in virtual machine. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - beginDeleteCheckpoint( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesDeleteCheckpointOptionalParams - ): Promise, void>>; - /** - * Deletes a checkpoint in virtual machine. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - beginDeleteCheckpointAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesDeleteCheckpointOptionalParams - ): Promise; - /** - * Restores to a checkpoint in virtual machine. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - beginRestoreCheckpoint( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesRestoreCheckpointOptionalParams - ): Promise, void>>; - /** - * Restores to a checkpoint in virtual machine. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineName Name of the VirtualMachine. - * @param options The options parameters. - */ - beginRestoreCheckpointAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesRestoreCheckpointOptionalParams - ): Promise; -} diff --git a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualNetworks.ts b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualNetworks.ts index 5707f9db2d0d..7e57dc04ca51 100644 --- a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualNetworks.ts +++ b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/virtualNetworks.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { VirtualNetwork, VirtualNetworksListByResourceGroupOptionalParams, @@ -17,6 +17,7 @@ import { VirtualNetworksCreateOrUpdateOptionalParams, VirtualNetworksCreateOrUpdateResponse, VirtualNetworksDeleteOptionalParams, + VirtualNetworksDeleteResponse, ResourcePatch, VirtualNetworksUpdateOptionalParams, VirtualNetworksUpdateResponse @@ -27,7 +28,7 @@ import { export interface VirtualNetworks { /** * List of VirtualNetworks in a resource group. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ listByResourceGroup( @@ -43,7 +44,7 @@ export interface VirtualNetworks { ): PagedAsyncIterableIterator; /** * Implements VirtualNetwork GET method. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. * @param options The options parameters. */ @@ -54,7 +55,7 @@ export interface VirtualNetworks { ): Promise; /** * Onboards the ScVmm virtual network as an Azure virtual network resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. * @param body Request payload. * @param options The options parameters. @@ -65,14 +66,14 @@ export interface VirtualNetworks { body: VirtualNetwork, options?: VirtualNetworksCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualNetworksCreateOrUpdateResponse > >; /** * Onboards the ScVmm virtual network as an Azure virtual network resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. * @param body Request payload. * @param options The options parameters. @@ -85,7 +86,7 @@ export interface VirtualNetworks { ): Promise; /** * Deregisters the ScVmm virtual network from Azure. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. * @param options The options parameters. */ @@ -93,10 +94,15 @@ export interface VirtualNetworks { resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams - ): Promise, void>>; + ): Promise< + SimplePollerLike< + OperationState, + VirtualNetworksDeleteResponse + > + >; /** * Deregisters the ScVmm virtual network from Azure. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. * @param options The options parameters. */ @@ -104,10 +110,10 @@ export interface VirtualNetworks { resourceGroupName: string, virtualNetworkName: string, options?: VirtualNetworksDeleteOptionalParams - ): Promise; + ): Promise; /** * Updates the VirtualNetworks resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. * @param body VirtualNetworks patch payload. * @param options The options parameters. @@ -118,14 +124,14 @@ export interface VirtualNetworks { body: ResourcePatch, options?: VirtualNetworksUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VirtualNetworksUpdateResponse > >; /** * Updates the VirtualNetworks resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. * @param body VirtualNetworks patch payload. * @param options The options parameters. diff --git a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/vmmServers.ts b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/vmmServers.ts index dbf8d961c08e..a1adbc246493 100644 --- a/sdk/scvmm/arm-scvmm/src/operationsInterfaces/vmmServers.ts +++ b/sdk/scvmm/arm-scvmm/src/operationsInterfaces/vmmServers.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { VMMServer, VmmServersListByResourceGroupOptionalParams, @@ -17,6 +17,7 @@ import { VmmServersCreateOrUpdateOptionalParams, VmmServersCreateOrUpdateResponse, VmmServersDeleteOptionalParams, + VmmServersDeleteResponse, ResourcePatch, VmmServersUpdateOptionalParams, VmmServersUpdateResponse @@ -27,7 +28,7 @@ import { export interface VmmServers { /** * List of VmmServers in a resource group. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ listByResourceGroup( @@ -43,7 +44,7 @@ export interface VmmServers { ): PagedAsyncIterableIterator; /** * Implements VMMServer GET method. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VMMServer. * @param options The options parameters. */ @@ -54,7 +55,7 @@ export interface VmmServers { ): Promise; /** * Onboards the SCVMM fabric as an Azure VmmServer resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VMMServer. * @param body Request payload. * @param options The options parameters. @@ -65,14 +66,14 @@ export interface VmmServers { body: VMMServer, options?: VmmServersCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VmmServersCreateOrUpdateResponse > >; /** * Onboards the SCVMM fabric as an Azure VmmServer resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VMMServer. * @param body Request payload. * @param options The options parameters. @@ -84,8 +85,8 @@ export interface VmmServers { options?: VmmServersCreateOrUpdateOptionalParams ): Promise; /** - * Deboards the SCVMM fabric from Azure. - * @param resourceGroupName The name of the resource group. + * Removes the SCVMM fabric from Azure. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VMMServer. * @param options The options parameters. */ @@ -93,10 +94,15 @@ export interface VmmServers { resourceGroupName: string, vmmServerName: string, options?: VmmServersDeleteOptionalParams - ): Promise, void>>; + ): Promise< + SimplePollerLike< + OperationState, + VmmServersDeleteResponse + > + >; /** - * Deboards the SCVMM fabric from Azure. - * @param resourceGroupName The name of the resource group. + * Removes the SCVMM fabric from Azure. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VMMServer. * @param options The options parameters. */ @@ -104,10 +110,10 @@ export interface VmmServers { resourceGroupName: string, vmmServerName: string, options?: VmmServersDeleteOptionalParams - ): Promise; + ): Promise; /** * Updates the VmmServers resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VMMServer. * @param body VmmServers patch payload. * @param options The options parameters. @@ -118,14 +124,14 @@ export interface VmmServers { body: ResourcePatch, options?: VmmServersUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, VmmServersUpdateResponse > >; /** * Updates the VmmServers resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VMMServer. * @param body VmmServers patch payload. * @param options The options parameters. diff --git a/sdk/scvmm/arm-scvmm/src/scvmm.ts b/sdk/scvmm/arm-scvmm/src/scvmm.ts index 21732f298429..cfb275a98374 100644 --- a/sdk/scvmm/arm-scvmm/src/scvmm.ts +++ b/sdk/scvmm/arm-scvmm/src/scvmm.ts @@ -19,45 +19,62 @@ import { OperationsImpl, CloudsImpl, VirtualNetworksImpl, - VirtualMachinesImpl, VirtualMachineTemplatesImpl, AvailabilitySetsImpl, - InventoryItemsImpl + InventoryItemsImpl, + VirtualMachineInstancesImpl, + VirtualMachineInstanceHybridIdentityMetadataImpl, + VMInstanceGuestAgentsImpl } from "./operations"; import { VmmServers, Operations, Clouds, VirtualNetworks, - VirtualMachines, VirtualMachineTemplates, AvailabilitySets, - InventoryItems + InventoryItems, + VirtualMachineInstances, + VirtualMachineInstanceHybridIdentityMetadata, + VMInstanceGuestAgents } from "./operationsInterfaces"; import { ScvmmOptionalParams } from "./models"; export class Scvmm extends coreClient.ServiceClient { $host: string; - subscriptionId: string; + subscriptionId?: string; apiVersion: string; /** * Initializes a new instance of the Scvmm class. * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId The Azure subscription ID. This is a GUID-formatted string (e.g. - * 00000000-0000-0000-0000-000000000000). + * @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?: ScvmmOptionalParams + ); + constructor( + credentials: coreAuth.TokenCredential, + options?: ScvmmOptionalParams + ); + constructor( + credentials: coreAuth.TokenCredential, + subscriptionIdOrOptions?: ScvmmOptionalParams | string, + options?: ScvmmOptionalParams ) { if (credentials === undefined) { throw new Error("'credentials' cannot be null"); } - if (subscriptionId === undefined) { - throw new Error("'subscriptionId' cannot be null"); + + let subscriptionId: string | undefined; + + if (typeof subscriptionIdOrOptions === "string") { + subscriptionId = subscriptionIdOrOptions; + } else if (typeof subscriptionIdOrOptions === "object") { + options = subscriptionIdOrOptions; } // Initializing default values for options @@ -69,7 +86,7 @@ export class Scvmm extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-scvmm/1.0.0-beta.4`; + const packageDetails = `azsdk-js-arm-scvmm/1.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -122,15 +139,19 @@ export class Scvmm extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2020-06-05-preview"; + this.apiVersion = options.apiVersion || "2023-10-07"; this.vmmServers = new VmmServersImpl(this); this.operations = new OperationsImpl(this); this.clouds = new CloudsImpl(this); this.virtualNetworks = new VirtualNetworksImpl(this); - this.virtualMachines = new VirtualMachinesImpl(this); this.virtualMachineTemplates = new VirtualMachineTemplatesImpl(this); this.availabilitySets = new AvailabilitySetsImpl(this); this.inventoryItems = new InventoryItemsImpl(this); + this.virtualMachineInstances = new VirtualMachineInstancesImpl(this); + this.virtualMachineInstanceHybridIdentityMetadata = new VirtualMachineInstanceHybridIdentityMetadataImpl( + this + ); + this.vMInstanceGuestAgents = new VMInstanceGuestAgentsImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -166,8 +187,10 @@ export class Scvmm extends coreClient.ServiceClient { operations: Operations; clouds: Clouds; virtualNetworks: VirtualNetworks; - virtualMachines: VirtualMachines; virtualMachineTemplates: VirtualMachineTemplates; availabilitySets: AvailabilitySets; inventoryItems: InventoryItems; + virtualMachineInstances: VirtualMachineInstances; + virtualMachineInstanceHybridIdentityMetadata: VirtualMachineInstanceHybridIdentityMetadata; + vMInstanceGuestAgents: VMInstanceGuestAgents; } diff --git a/sdk/scvmm/arm-scvmm/tsconfig.json b/sdk/scvmm/arm-scvmm/tsconfig.json index dcb6754c3ab3..3e6ae96443f3 100644 --- a/sdk/scvmm/arm-scvmm/tsconfig.json +++ b/sdk/scvmm/arm-scvmm/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-scvmm": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"