From d68ba462aa95c4c202bb22f09810ee3f1ffacf34 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 5 Jan 2022 13:06:33 +0000 Subject: [PATCH] CodeGen from PR 17000 in Azure/azure-rest-api-specs [Go] Track2 modify readme.go.md 9 (#17000) * [Go] Track2 modify readme.go.md 9 * fix --- common/config/rush/pnpm-lock.yaml | 131 +- rush.json | 5 + .../arm-hybridcompute/CHANGELOG.md | 11 + .../{LICENSE.txt => LICENSE} | 4 +- sdk/hybridcompute/arm-hybridcompute/README.md | 154 +- .../arm-hybridcompute/_meta.json | 7 + .../arm-hybridcompute/api-extractor.json | 18 + .../arm-hybridcompute/package.json | 95 +- .../review/arm-hybridcompute.api.md | 732 ++++++++ .../arm-hybridcompute/rollup.config.js | 211 ++- .../src/hybridComputeManagementClient.ts | 241 ++- .../hybridComputeManagementClientContext.ts | 69 - .../arm-hybridcompute/src/index.ts | 12 + .../arm-hybridcompute/src/lroImpl.ts | 34 + .../arm-hybridcompute/src/models/index.ts | 1537 ++++++++-------- .../src/models/machineExtensionsMappers.ts | 31 - .../src/models/machinesMappers.ts | 28 - .../arm-hybridcompute/src/models/mappers.ts | 1585 ++++++++++------- .../src/models/operationsMappers.ts | 14 - .../src/models/parameters.ts | 225 ++- .../arm-hybridcompute/src/operations/index.ts | 11 +- .../src/operations/machineExtensions.ts | 759 +++++--- .../src/operations/machines.ts | 465 ++--- .../src/operations/operations.ts | 108 +- .../operations/privateEndpointConnections.ts | 483 +++++ .../src/operations/privateLinkResources.ts | 233 +++ .../src/operations/privateLinkScopes.ts | 599 +++++++ .../src/operationsInterfaces/index.ts | 14 + .../operationsInterfaces/machineExtensions.ts | 147 ++ .../src/operationsInterfaces/machines.ts | 62 + .../src/operationsInterfaces/operations.ts | 22 + .../privateEndpointConnections.ts | 109 ++ .../privateLinkResources.ts | 44 + .../operationsInterfaces/privateLinkScopes.ts | 132 ++ .../arm-hybridcompute/test/sampleTest.ts | 48 + .../arm-hybridcompute/tsconfig.json | 6 +- sdk/hybridcompute/ci.yml | 29 + 37 files changed, 6078 insertions(+), 2337 deletions(-) create mode 100644 sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md rename sdk/hybridcompute/arm-hybridcompute/{LICENSE.txt => LICENSE} (96%) create mode 100644 sdk/hybridcompute/arm-hybridcompute/_meta.json create mode 100644 sdk/hybridcompute/arm-hybridcompute/api-extractor.json create mode 100644 sdk/hybridcompute/arm-hybridcompute/review/arm-hybridcompute.api.md delete mode 100644 sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClientContext.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/index.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/lroImpl.ts delete mode 100644 sdk/hybridcompute/arm-hybridcompute/src/models/machineExtensionsMappers.ts delete mode 100644 sdk/hybridcompute/arm-hybridcompute/src/models/machinesMappers.ts delete mode 100644 sdk/hybridcompute/arm-hybridcompute/src/models/operationsMappers.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operations/privateEndpointConnections.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkResources.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/index.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineExtensions.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machines.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/operations.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/privateEndpointConnections.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/privateLinkResources.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/privateLinkScopes.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/test/sampleTest.ts create mode 100644 sdk/hybridcompute/ci.yml diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 694e81b4a476..af0f5d823cd4 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -39,6 +39,7 @@ specifiers: '@rush-temp/arm-extendedlocation': file:./projects/arm-extendedlocation.tgz '@rush-temp/arm-features': file:./projects/arm-features.tgz '@rush-temp/arm-hdinsight': file:./projects/arm-hdinsight.tgz + '@rush-temp/arm-hybridcompute': file:./projects/arm-hybridcompute.tgz '@rush-temp/arm-iothub': file:./projects/arm-iothub.tgz '@rush-temp/arm-keyvault': file:./projects/arm-keyvault.tgz '@rush-temp/arm-links': file:./projects/arm-links.tgz @@ -220,6 +221,7 @@ dependencies: '@rush-temp/arm-extendedlocation': file:projects/arm-extendedlocation.tgz '@rush-temp/arm-features': file:projects/arm-features.tgz '@rush-temp/arm-hdinsight': file:projects/arm-hdinsight.tgz + '@rush-temp/arm-hybridcompute': file:projects/arm-hybridcompute.tgz '@rush-temp/arm-iothub': file:projects/arm-iothub.tgz '@rush-temp/arm-keyvault': file:projects/arm-keyvault.tgz '@rush-temp/arm-links': file:projects/arm-links.tgz @@ -6977,7 +6979,7 @@ packages: hasBin: true dev: false - /ts-node/10.4.0_276ff2ad8f60608417677a4691c0f835: + /ts-node/10.4.0_28670484a221c7e896c5d6b821a5cbb7: resolution: {integrity: sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A==} hasBin: true peerDependencies: @@ -7003,11 +7005,11 @@ packages: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.2.4 + typescript: 4.4.4 yn: 3.1.1 dev: false - /ts-node/10.4.0_54d7f9b57c83a5c5120be11b085b9de6: + /ts-node/10.4.0_f9f9f28f986ed7ad377c75abc9f416f4: resolution: {integrity: sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A==} hasBin: true peerDependencies: @@ -7033,7 +7035,7 @@ packages: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.4.4 + typescript: 4.2.4 yn: 3.1.1 dev: false @@ -7629,7 +7631,7 @@ packages: prettier: 2.5.1 rimraf: 3.0.2 rollup: 1.32.1 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -7857,7 +7859,7 @@ packages: rollup: 1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -7908,7 +7910,7 @@ packages: rollup: 1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -7965,7 +7967,7 @@ packages: rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.1_rollup@1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.5 @@ -8604,6 +8606,27 @@ packages: uglify-js: 3.14.5 dev: false + file:projects/arm-hybridcompute.tgz: + resolution: {integrity: sha512-9KOfIoHXDx5rbkE9D3x+2QhHw7v0qQ8dOqP/guYZXkBU8lpRIVaV6fQf9H1L5Mu9Wl6BdHFo7V0NOcsNP7Uz+g==, tarball: file:projects/arm-hybridcompute.tgz} + name: '@rush-temp/arm-hybridcompute' + version: 0.0.0 + dependencies: + '@microsoft/api-extractor': 7.19.2 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 + cross-env: 7.0.3 + mkdirp: 1.0.4 + mocha: 7.2.0 + rimraf: 3.0.2 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 + tslib: 2.3.1 + typescript: 4.2.4 + uglify-js: 3.14.5 + dev: false + file:projects/arm-iothub.tgz: resolution: {integrity: sha512-PzFOxAYNZCA5fFinZSNlhYM6Z5GYX/yJkJAKycsLISLkEDrj70v3ihSJqSoyI3o9y0oxM1GqeijIgfPgvj4zWg==, tarball: file:projects/arm-iothub.tgz} name: '@rush-temp/arm-iothub' @@ -9487,7 +9510,7 @@ packages: rollup: 1.32.1 safe-buffer: 5.2.1 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -9982,7 +10005,7 @@ packages: dev: false file:projects/core-amqp.tgz: - resolution: {integrity: sha512-jmyXvDp5FyZIlqp1zATESQp6qO2NqjKSfY5o9ojPsKN/g9WJ45RL4jfy+cD5u8C2t9jSDTsCoL+jbiLptpkDLA==, tarball: file:projects/core-amqp.tgz} + resolution: {integrity: sha512-nAZlMW/WFVSloK1iVzoSJNx9CHjvMl4/kJrnq1s5Okn96/AQX19SYkqfdvmew1Oy3bxfDC2g3n3e1CFLrlSyEg==, tarball: file:projects/core-amqp.tgz} name: '@rush-temp/core-amqp' version: 0.0.0 dependencies: @@ -10025,7 +10048,7 @@ packages: rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.1_rollup@1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 url: 0.11.0 @@ -10111,7 +10134,7 @@ packages: rimraf: 3.0.2 rollup: 1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -10342,7 +10365,7 @@ packages: shx: 0.3.3 sinon: 9.2.4 tough-cookie: 4.0.0 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 tunnel: 0.0.6 typescript: 4.2.4 @@ -10390,7 +10413,7 @@ packages: prettier: 2.5.1 rimraf: 3.0.2 rollup: 1.32.1 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.5 @@ -10657,7 +10680,7 @@ packages: sinon: 9.2.4 snap-shot-it: 7.9.6 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 universal-user-agent: 6.0.0 @@ -10714,7 +10737,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -10760,7 +10783,7 @@ packages: rollup: 1.32.1 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 - ts-node: 10.4.0_54d7f9b57c83a5c5120be11b085b9de6 + ts-node: 10.4.0_28670484a221c7e896c5d6b821a5cbb7 tslib: 2.3.1 typescript: 4.4.4 yaml: 1.10.2 @@ -10917,7 +10940,7 @@ packages: rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.1_rollup@1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -10979,7 +11002,7 @@ packages: rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -11034,7 +11057,7 @@ packages: prettier: 2.5.1 rimraf: 3.0.2 rollup: 1.32.1 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -11087,7 +11110,7 @@ packages: prettier: 2.5.1 rimraf: 3.0.2 rollup: 1.32.1 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -11289,7 +11312,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -11553,7 +11576,7 @@ packages: rimraf: 3.0.2 rollup: 1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11702,7 +11725,7 @@ packages: rimraf: 3.0.2 rollup: 1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11774,7 +11797,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11794,7 +11817,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11814,7 +11837,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11834,7 +11857,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -11873,7 +11896,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11894,7 +11917,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -11917,7 +11940,7 @@ packages: moment: 2.29.1 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -11937,7 +11960,7 @@ packages: eslint: 7.32.0 prettier: 1.19.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11957,7 +11980,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11978,7 +12001,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12000,7 +12023,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12021,7 +12044,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12041,7 +12064,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -12060,7 +12083,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -12081,7 +12104,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12104,7 +12127,7 @@ packages: node-fetch: 2.6.6 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12125,7 +12148,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12146,7 +12169,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12167,7 +12190,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12539,7 +12562,7 @@ packages: rimraf: 3.0.2 rollup: 1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -12608,7 +12631,7 @@ packages: rimraf: 3.0.2 rollup: 1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 ws: 8.3.0 @@ -12671,7 +12694,7 @@ packages: rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -12734,7 +12757,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -12797,7 +12820,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -12858,7 +12881,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -12916,7 +12939,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -12976,7 +12999,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -13028,7 +13051,7 @@ packages: rollup: 1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.5 @@ -13082,7 +13105,7 @@ packages: rollup: 1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.5 @@ -13135,7 +13158,7 @@ packages: rollup: 1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.5 diff --git a/rush.json b/rush.json index 66a9aa13703f..3eea05602690 100644 --- a/rush.json +++ b/rush.json @@ -1215,6 +1215,11 @@ "packageName": "@azure/arm-containerinstance", "projectFolder": "sdk/containerinstance/arm-containerinstance", "versionPolicyName": "management" + }, + { + "packageName": "@azure/arm-hybridcompute", + "projectFolder": "sdk/hybridcompute/arm-hybridcompute", + "versionPolicyName": "management" } ] } \ No newline at end of file diff --git a/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md b/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md new file mode 100644 index 000000000000..8ceb0549a4e7 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 3.0.0-beta.1 (2022-01-05) + +The package of @azure/arm-hybridcompute is using our next generation design principles since version 3.0.0-beta.1, which contains breaking changes. + +To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog). + +To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide). + +To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/hybridcompute/arm-hybridcompute/LICENSE.txt b/sdk/hybridcompute/arm-hybridcompute/LICENSE similarity index 96% rename from sdk/hybridcompute/arm-hybridcompute/LICENSE.txt rename to sdk/hybridcompute/arm-hybridcompute/LICENSE index ea8fb1516028..5d1d36e0af80 100644 --- a/sdk/hybridcompute/arm-hybridcompute/LICENSE.txt +++ b/sdk/hybridcompute/arm-hybridcompute/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2020 Microsoft +Copyright (c) 2022 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +SOFTWARE. \ No newline at end of file diff --git a/sdk/hybridcompute/arm-hybridcompute/README.md b/sdk/hybridcompute/arm-hybridcompute/README.md index 73bbc005d236..28cb5c7e62c4 100644 --- a/sdk/hybridcompute/arm-hybridcompute/README.md +++ b/sdk/hybridcompute/arm-hybridcompute/README.md @@ -1,114 +1,98 @@ -## Azure HybridComputeManagementClient SDK for JavaScript +# Azure HybridComputeManagement client library for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for HybridComputeManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure HybridComputeManagement client. + +The Hybrid Compute Management Client. + +[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hybridcompute/arm-hybridcompute) | +[Package (NPM)](https://www.npmjs.com/package/@azure/arm-hybridcompute) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-hybridcompute?view=azure-node-preview) | +[Samples](https://github.com/Azure-Samples/azure-samples-js-management) + +## Getting started ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites -You must have an [Azure subscription](https://azure.microsoft.com/free/). +- An [Azure subscription][azure_sub]. -### How to install +### Install the `@azure/arm-hybridcompute` package -To use this SDK in your project, you will need to install two packages. -- `@azure/arm-hybridcompute` that contains the client. -- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. +Install the Azure HybridComputeManagement client library for JavaScript with `npm`: -Install both packages using the below command: ```bash -npm install --save @azure/arm-hybridcompute @azure/identity +npm install @azure/arm-hybridcompute ``` -> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. -If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. +### Create and authenticate a `HybridComputeManagementClient` -### How to use +To create a client object to access the Azure HybridComputeManagement API, you will need the `endpoint` of your Azure HybridComputeManagement resource and a `credential`. The Azure HybridComputeManagement client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your Azure HybridComputeManagement resource in the [Azure Portal][azure_portal]. -- If you are writing a client side browser application, - - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. - - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. -- If you are writing a server side application, - - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) - - Complete the set up steps required by the credential if any. - - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. +You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token). -In the below samples, we pass the credential and the Azure subscription id to instantiate the client. -Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. +To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package: + +```bash +npm install @azure/identity +``` -#### nodejs - Authentication, client creation, and get machines as an example written in JavaScript. +You will also need to **register a new AAD application and grant access to Azure HybridComputeManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). +Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. -##### Sample code +For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). ```javascript -const { DefaultAzureCredential } = require("@azure/identity"); const { HybridComputeManagementClient } = require("@azure/arm-hybridcompute"); -const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; - -// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples -// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. -const creds = new DefaultAzureCredential(); -const client = new HybridComputeManagementClient(creds, subscriptionId); -const resourceGroupName = "testresourceGroupName"; -const name = "testname"; -const expand = "instanceView"; -client.machines.get(resourceGroupName, name, expand).then((result) => { - console.log("The result is:"); - console.log(result); -}).catch((err) => { - console.log("An error occurred:"); - console.error(err); -}); +const { DefaultAzureCredential } = require("@azure/identity"); +const subscriptionId = "00000000-0000-0000-0000-000000000000"; +const client = new HybridComputeManagementClient(new DefaultAzureCredential(), subscriptionId); ``` -#### browser - Authentication, client creation, and get machines as an example written in JavaScript. - -In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. - - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. - - Note down the client Id from the previous step and use it in the browser sample below. - -##### Sample code - -- index.html - -```html - - - - @azure/arm-hybridcompute sample - - - - - - - + +### JavaScript Bundle +To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). + +## Key concepts + +### HybridComputeManagementClient + +`HybridComputeManagementClient` is the primary interface for developers using the Azure HybridComputeManagement client library. Explore the methods on this client object to understand the different features of the Azure HybridComputeManagement service that you can access. + +## Troubleshooting + +### Logging + +Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: + +```javascript +const { setLogLevel } = require("@azure/logger"); +setLogLevel("info"); ``` +For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). + +## Next steps + +Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library. + +## Contributing + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. + ## Related projects -- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) +- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fhybridcompute%2Farm-hybridcompute%2FREADME.png) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/hybridcompute/arm-hybridcompute/README.png) +[azure_cli]: https://docs.microsoft.com/cli/azure +[azure_sub]: https://azure.microsoft.com/free/ +[azure_sub]: https://azure.microsoft.com/free/ +[azure_portal]: https://portal.azure.com +[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity +[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential diff --git a/sdk/hybridcompute/arm-hybridcompute/_meta.json b/sdk/hybridcompute/arm-hybridcompute/_meta.json new file mode 100644 index 000000000000..ec4170b732d3 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/_meta.json @@ -0,0 +1,7 @@ +{ + "commit": "2ab4371edba33c23e8d680ed2bf6f98705b5cadb", + "readme": "specification/hybridcompute/resource-manager/readme.md", + "autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/hybridcompute/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211130.1", + "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", + "use": "@autorest/typescript@6.0.0-alpha.16.20211130.1" +} \ No newline at end of file diff --git a/sdk/hybridcompute/arm-hybridcompute/api-extractor.json b/sdk/hybridcompute/arm-hybridcompute/api-extractor.json new file mode 100644 index 000000000000..f5ac173741f6 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/api-extractor.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "docModel": { "enabled": true }, + "apiReport": { "enabled": true, "reportFolder": "./review" }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "./types/arm-hybridcompute.d.ts" + }, + "messages": { + "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "extractorMessageReporting": { + "ae-missing-release-tag": { "logLevel": "none" }, + "ae-unresolved-link": { "logLevel": "none" } + } + } +} diff --git a/sdk/hybridcompute/arm-hybridcompute/package.json b/sdk/hybridcompute/arm-hybridcompute/package.json index 32ed68e5a6b0..0c17dac42ef4 100644 --- a/sdk/hybridcompute/arm-hybridcompute/package.json +++ b/sdk/hybridcompute/arm-hybridcompute/package.json @@ -1,58 +1,91 @@ { "name": "@azure/arm-hybridcompute", + "sdk-type": "mgmt", "author": "Microsoft Corporation", - "description": "HybridComputeManagementClient Library with typescript type definitions for node.js and browser.", - "version": "2.1.0", + "description": "A generated SDK for HybridComputeManagementClient.", + "version": "3.0.0-beta.1", + "engines": { "node": ">=12.0.0" }, "dependencies": { - "@azure/ms-rest-azure-js": "^2.1.0", - "@azure/ms-rest-js": "^2.2.0", - "@azure/core-auth": "^1.1.4", - "tslib": "^1.10.0" + "@azure/core-lro": "^2.2.0", + "@azure/abort-controller": "^1.0.0", + "@azure/core-paging": "^1.2.0", + "@azure/core-client": "^1.0.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-rest-pipeline": "^1.1.0", + "tslib": "^2.2.0" }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], + "keywords": ["node", "azure", "typescript", "browser", "isomorphic"], "license": "MIT", - "main": "./dist/arm-hybridcompute.js", - "module": "./esm/hybridComputeManagementClient.js", - "types": "./esm/hybridComputeManagementClient.d.ts", + "main": "./dist/index.js", + "module": "./dist-esm/src/index.js", + "types": "./types/arm-hybridcompute.d.ts", "devDependencies": { - "typescript": "^3.6.0", - "rollup": "^1.18.0", - "rollup-plugin-node-resolve": "^5.2.0", + "@microsoft/api-extractor": "^7.18.11", + "@rollup/plugin-commonjs": "11.0.2", + "@rollup/plugin-json": "^4.0.0", + "@rollup/plugin-multi-entry": "^3.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", + "mkdirp": "^1.0.4", + "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.6.0" + "typescript": "~4.2.0", + "uglify-js": "^3.4.9", + "rimraf": "^3.0.0", + "@azure/identity": "^2.0.1", + "@azure-tools/test-recorder": "^1.0.0", + "mocha": "^7.1.1", + "cross-env": "^7.0.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hybridcompute/arm-hybridcompute", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" }, - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, + "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", "dist/**/*.js.map", "dist/**/*.d.ts", "dist/**/*.d.ts.map", - "esm/**/*.js", - "esm/**/*.js.map", - "esm/**/*.d.ts", - "esm/**/*.d.ts.map", + "dist-esm/**/*.js", + "dist-esm/**/*.js.map", + "dist-esm/**/*.d.ts", + "dist-esm/**/*.d.ts.map", "src/**/*.ts", "README.md", + "LICENSE", "rollup.config.js", - "tsconfig.json" + "tsconfig.json", + "review/*", + "CHANGELOG.md", + "types/*" ], "scripts": { - "build": "tsc && rollup -c rollup.config.js && npm run minify", - "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-hybridcompute.js.map'\" -o ./dist/arm-hybridcompute.min.js ./dist/arm-hybridcompute.js", - "prepack": "npm install && npm run build" + "build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "api-extractor run --local", + "lint": "echo skipped", + "audit": "echo skipped", + "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "build:node": "echo skipped", + "build:browser": "echo skipped", + "build:test": "echo skipped", + "build:samples": "echo skipped.", + "check-format": "echo skipped", + "execute:samples": "echo skipped", + "format": "echo skipped", + "test": "npm run integration-test", + "test:node": "echo skipped", + "test:browser": "echo skipped", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:browser": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js", + "integration-test:browser": "echo skipped", + "docs": "echo skipped" }, "sideEffects": false, "autoPublish": true diff --git a/sdk/hybridcompute/arm-hybridcompute/review/arm-hybridcompute.api.md b/sdk/hybridcompute/arm-hybridcompute/review/arm-hybridcompute.api.md new file mode 100644 index 000000000000..30309689f8a0 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/review/arm-hybridcompute.api.md @@ -0,0 +1,732 @@ +## API Report File for "@azure/arm-hybridcompute" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import * as coreAuth from '@azure/core-auth'; +import * as coreClient from '@azure/core-client'; +import { PagedAsyncIterableIterator } from '@azure/core-paging'; +import { PollerLike } from '@azure/core-lro'; +import { PollOperationState } from '@azure/core-lro'; + +// @public (undocumented) +export interface ConnectionDetail { + readonly groupId?: string; + readonly id?: string; + readonly linkIdentifier?: string; + readonly memberName?: string; + readonly privateIpAddress?: string; +} + +// @public +export type CreatedByType = string; + +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} + +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface ErrorResponse { + error?: ErrorDetail; +} + +// @public +export interface ExtensionTargetProperties { + targetVersion?: string; +} + +// @public (undocumented) +export class HybridComputeManagementClient extends coreClient.ServiceClient { + // (undocumented) + $host: string; + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: HybridComputeManagementClientOptionalParams); + // (undocumented) + apiVersion: string; + beginUpgradeExtensions(resourceGroupName: string, machineName: string, extensionUpgradeParameters: MachineExtensionUpgrade, options?: UpgradeExtensionsOptionalParams): Promise, void>>; + beginUpgradeExtensionsAndWait(resourceGroupName: string, machineName: string, extensionUpgradeParameters: MachineExtensionUpgrade, options?: UpgradeExtensionsOptionalParams): Promise; + // (undocumented) + machineExtensions: MachineExtensions; + // (undocumented) + machines: Machines; + // (undocumented) + operations: Operations; + // (undocumented) + privateEndpointConnections: PrivateEndpointConnections; + // (undocumented) + privateLinkResources: PrivateLinkResources; + // (undocumented) + privateLinkScopes: PrivateLinkScopes; + // (undocumented) + subscriptionId: string; +} + +// @public +export interface HybridComputeManagementClientOptionalParams extends coreClient.ServiceClientOptions { + $host?: string; + apiVersion?: string; + endpoint?: string; +} + +// @public +export type HybridComputePrivateLinkScope = PrivateLinkScopesResource & { + properties?: HybridComputePrivateLinkScopeProperties; + readonly systemData?: SystemData; +}; + +// @public +export interface HybridComputePrivateLinkScopeListResult { + nextLink?: string; + value: HybridComputePrivateLinkScope[]; +} + +// @public +export interface HybridComputePrivateLinkScopeProperties { + readonly privateEndpointConnections?: PrivateEndpointConnectionDataModel[]; + readonly privateLinkScopeId?: string; + readonly provisioningState?: string; + publicNetworkAccess?: PublicNetworkAccessType; +} + +// @public +export interface Identity { + readonly principalId?: string; + readonly tenantId?: string; + type?: "SystemAssigned"; +} + +// @public +export type InstanceViewTypes = string; + +// @public +export enum KnownCreatedByType { + // (undocumented) + Application = "Application", + // (undocumented) + Key = "Key", + // (undocumented) + ManagedIdentity = "ManagedIdentity", + // (undocumented) + User = "User" +} + +// @public +export enum KnownInstanceViewTypes { + // (undocumented) + InstanceView = "instanceView" +} + +// @public +export enum KnownPublicNetworkAccessType { + Disabled = "Disabled", + Enabled = "Enabled" +} + +// @public +export enum KnownStatusLevelTypes { + // (undocumented) + Error = "Error", + // (undocumented) + Info = "Info", + // (undocumented) + Warning = "Warning" +} + +// @public +export enum KnownStatusTypes { + // (undocumented) + Connected = "Connected", + // (undocumented) + Disconnected = "Disconnected", + // (undocumented) + Error = "Error" +} + +// @public +export interface LocationData { + city?: string; + countryOrRegion?: string; + district?: string; + name: string; +} + +// @public +export type Machine = TrackedResource & { + properties?: MachineProperties; + identity?: Identity; + readonly systemData?: SystemData; +}; + +// @public +export type MachineExtension = TrackedResource & { + properties?: MachineExtensionProperties; + readonly systemData?: SystemData; +}; + +// @public +export interface MachineExtensionInstanceView { + name?: string; + status?: MachineExtensionInstanceViewStatus; + type?: string; + typeHandlerVersion?: string; +} + +// @public +export interface MachineExtensionInstanceViewStatus { + code?: string; + displayStatus?: string; + level?: StatusLevelTypes; + message?: string; + time?: Date; +} + +// @public +export interface MachineExtensionProperties { + autoUpgradeMinorVersion?: boolean; + forceUpdateTag?: string; + instanceView?: MachineExtensionInstanceView; + protectedSettings?: Record; + readonly provisioningState?: string; + publisher?: string; + settings?: Record; + type?: string; + typeHandlerVersion?: string; +} + +// @public +export interface MachineExtensions { + beginCreateOrUpdate(resourceGroupName: string, machineName: string, extensionName: string, extensionParameters: MachineExtension, options?: MachineExtensionsCreateOrUpdateOptionalParams): Promise, MachineExtensionsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, machineName: string, extensionName: string, extensionParameters: MachineExtension, options?: MachineExtensionsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, machineName: string, extensionName: string, options?: MachineExtensionsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, machineName: string, extensionName: string, options?: MachineExtensionsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, machineName: string, extensionName: string, extensionParameters: MachineExtensionUpdate, options?: MachineExtensionsUpdateOptionalParams): Promise, MachineExtensionsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, machineName: string, extensionName: string, extensionParameters: MachineExtensionUpdate, options?: MachineExtensionsUpdateOptionalParams): Promise; + get(resourceGroupName: string, machineName: string, extensionName: string, options?: MachineExtensionsGetOptionalParams): Promise; + list(resourceGroupName: string, machineName: string, options?: MachineExtensionsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface MachineExtensionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MachineExtensionsCreateOrUpdateResponse = MachineExtension; + +// @public +export interface MachineExtensionsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface MachineExtensionsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MachineExtensionsGetResponse = MachineExtension; + +// @public +export interface MachineExtensionsListNextOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type MachineExtensionsListNextResponse = MachineExtensionsListResult; + +// @public +export interface MachineExtensionsListOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type MachineExtensionsListResponse = MachineExtensionsListResult; + +// @public +export interface MachineExtensionsListResult { + nextLink?: string; + value?: MachineExtension[]; +} + +// @public +export interface MachineExtensionsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MachineExtensionsUpdateResponse = MachineExtension; + +// @public +export type MachineExtensionUpdate = ResourceUpdate & { + properties?: MachineExtensionUpdateProperties; +}; + +// @public +export interface MachineExtensionUpdateProperties { + autoUpgradeMinorVersion?: boolean; + forceUpdateTag?: string; + protectedSettings?: Record; + publisher?: string; + settings?: Record; + type?: string; + typeHandlerVersion?: string; +} + +// @public +export interface MachineExtensionUpgrade { + extensionTargets?: { + [propertyName: string]: ExtensionTargetProperties; + }; +} + +// @public +export interface MachineListResult { + nextLink?: string; + value: Machine[]; +} + +// @public +export interface MachineProperties { + readonly adFqdn?: string; + readonly agentVersion?: string; + clientPublicKey?: string; + readonly detectedProperties?: { + [propertyName: string]: string; + }; + readonly displayName?: string; + readonly dnsFqdn?: string; + readonly domainName?: string; + readonly errorDetails?: ErrorDetail[]; + extensions?: MachineExtensionInstanceView[]; + readonly lastStatusChange?: Date; + locationData?: LocationData; + readonly machineFqdn?: string; + mssqlDiscovered?: string; + readonly osName?: string; + osProfile?: OSProfile; + readonly osSku?: string; + osType?: string; + readonly osVersion?: string; + parentClusterResourceId?: string; + privateLinkScopeResourceId?: string; + readonly provisioningState?: string; + readonly status?: StatusTypes; + vmId?: string; + readonly vmUuid?: string; +} + +// @public +export interface Machines { + delete(resourceGroupName: string, machineName: string, options?: MachinesDeleteOptionalParams): Promise; + get(resourceGroupName: string, machineName: string, options?: MachinesGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: MachinesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: MachinesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface MachinesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface MachinesGetOptionalParams extends coreClient.OperationOptions { + expand?: InstanceViewTypes; +} + +// @public +export type MachinesGetResponse = Machine; + +// @public +export interface MachinesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MachinesListByResourceGroupNextResponse = MachineListResult; + +// @public +export interface MachinesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MachinesListByResourceGroupResponse = MachineListResult; + +// @public +export interface MachinesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MachinesListBySubscriptionNextResponse = MachineListResult; + +// @public +export interface MachinesListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MachinesListBySubscriptionResponse = MachineListResult; + +// @public +export type MachineUpdate = ResourceUpdate & { + identity?: Identity; + properties?: MachineUpdateProperties; +}; + +// @public +export interface MachineUpdateProperties { + locationData?: LocationData; + osProfile?: OSProfile; + parentClusterResourceId?: string; + privateLinkScopeResourceId?: string; +} + +// @public +export interface OperationListResult { + readonly value?: OperationValue[]; +} + +// @public +export interface Operations { + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface OperationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListResponse = OperationListResult; + +// @public +export interface OperationValue { + display?: OperationValueDisplay; + readonly name?: string; + readonly origin?: string; +} + +// @public +export interface OperationValueDisplay { + readonly description?: string; + readonly operation?: string; + readonly provider?: string; + readonly resource?: string; +} + +// @public +export interface OSProfile { + readonly computerName?: string; + linuxConfiguration?: OSProfileLinuxConfiguration; + windowsConfiguration?: OSProfileWindowsConfiguration; +} + +// @public +export interface OSProfileLinuxConfiguration { + assessmentMode?: string; +} + +// @public +export interface OSProfileWindowsConfiguration { + assessmentMode?: string; +} + +// @public +export type PrivateEndpointConnection = ProxyResource & { + properties?: PrivateEndpointConnectionProperties; + readonly systemData?: SystemData; +}; + +// @public +export interface PrivateEndpointConnectionDataModel { + readonly id?: string; + readonly name?: string; + properties?: PrivateEndpointConnectionProperties; + readonly type?: string; +} + +// @public +export interface PrivateEndpointConnectionListResult { + readonly nextLink?: string; + readonly value?: PrivateEndpointConnection[]; +} + +// @public +export interface PrivateEndpointConnectionProperties { + privateEndpoint?: PrivateEndpointProperty; + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionStateProperty; + readonly provisioningState?: string; +} + +// @public +export interface PrivateEndpointConnections { + beginCreateOrUpdate(resourceGroupName: string, scopeName: string, privateEndpointConnectionName: string, parameters: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams): Promise, PrivateEndpointConnectionsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, scopeName: string, privateEndpointConnectionName: string, parameters: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, scopeName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, scopeName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise; + get(resourceGroupName: string, scopeName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsGetOptionalParams): Promise; + listByPrivateLinkScope(resourceGroupName: string, scopeName: string, options?: PrivateEndpointConnectionsListByPrivateLinkScopeOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PrivateEndpointConnectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection; + +// @public +export interface PrivateEndpointConnectionsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface PrivateEndpointConnectionsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection; + +// @public +export interface PrivateEndpointConnectionsListByPrivateLinkScopeNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsListByPrivateLinkScopeNextResponse = PrivateEndpointConnectionListResult; + +// @public +export interface PrivateEndpointConnectionsListByPrivateLinkScopeOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateEndpointConnectionsListByPrivateLinkScopeResponse = PrivateEndpointConnectionListResult; + +// @public +export interface PrivateEndpointProperty { + id?: string; +} + +// @public +export type PrivateLinkResource = ProxyResource & { + properties?: PrivateLinkResourceProperties; + readonly systemData?: SystemData; +}; + +// @public +export interface PrivateLinkResourceListResult { + readonly nextLink?: string; + readonly value?: PrivateLinkResource[]; +} + +// @public +export interface PrivateLinkResourceProperties { + readonly groupId?: string; + readonly requiredMembers?: string[]; + readonly requiredZoneNames?: string[]; +} + +// @public +export interface PrivateLinkResources { + get(resourceGroupName: string, scopeName: string, groupName: string, options?: PrivateLinkResourcesGetOptionalParams): Promise; + listByPrivateLinkScope(resourceGroupName: string, scopeName: string, options?: PrivateLinkResourcesListByPrivateLinkScopeOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PrivateLinkResourcesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkResourcesGetResponse = PrivateLinkResource; + +// @public +export interface PrivateLinkResourcesListByPrivateLinkScopeNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkResourcesListByPrivateLinkScopeNextResponse = PrivateLinkResourceListResult; + +// @public +export interface PrivateLinkResourcesListByPrivateLinkScopeOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkResourcesListByPrivateLinkScopeResponse = PrivateLinkResourceListResult; + +// @public +export interface PrivateLinkScopes { + beginDelete(resourceGroupName: string, scopeName: string, options?: PrivateLinkScopesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, scopeName: string, options?: PrivateLinkScopesDeleteOptionalParams): Promise; + createOrUpdate(resourceGroupName: string, scopeName: string, parameters: HybridComputePrivateLinkScope, options?: PrivateLinkScopesCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, scopeName: string, options?: PrivateLinkScopesGetOptionalParams): Promise; + getValidationDetails(location: string, privateLinkScopeId: string, options?: PrivateLinkScopesGetValidationDetailsOptionalParams): Promise; + getValidationDetailsForMachine(resourceGroupName: string, machineName: string, options?: PrivateLinkScopesGetValidationDetailsForMachineOptionalParams): Promise; + list(options?: PrivateLinkScopesListOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: PrivateLinkScopesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + updateTags(resourceGroupName: string, scopeName: string, privateLinkScopeTags: TagsResource, options?: PrivateLinkScopesUpdateTagsOptionalParams): Promise; +} + +// @public +export interface PrivateLinkScopesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkScopesCreateOrUpdateResponse = HybridComputePrivateLinkScope; + +// @public +export interface PrivateLinkScopesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface PrivateLinkScopesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkScopesGetResponse = HybridComputePrivateLinkScope; + +// @public +export interface PrivateLinkScopesGetValidationDetailsForMachineOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkScopesGetValidationDetailsForMachineResponse = PrivateLinkScopeValidationDetails; + +// @public +export interface PrivateLinkScopesGetValidationDetailsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkScopesGetValidationDetailsResponse = PrivateLinkScopeValidationDetails; + +// @public +export interface PrivateLinkScopesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkScopesListByResourceGroupNextResponse = HybridComputePrivateLinkScopeListResult; + +// @public +export interface PrivateLinkScopesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkScopesListByResourceGroupResponse = HybridComputePrivateLinkScopeListResult; + +// @public +export interface PrivateLinkScopesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkScopesListNextResponse = HybridComputePrivateLinkScopeListResult; + +// @public +export interface PrivateLinkScopesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkScopesListResponse = HybridComputePrivateLinkScopeListResult; + +// @public +export interface PrivateLinkScopesResource { + readonly id?: string; + location: string; + readonly name?: string; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; +} + +// @public +export interface PrivateLinkScopesUpdateTagsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrivateLinkScopesUpdateTagsResponse = HybridComputePrivateLinkScope; + +// @public (undocumented) +export interface PrivateLinkScopeValidationDetails { + connectionDetails?: ConnectionDetail[]; + readonly id?: string; + publicNetworkAccess?: PublicNetworkAccessType; +} + +// @public +export interface PrivateLinkServiceConnectionStateProperty { + readonly actionsRequired?: string; + description: string; + status: string; +} + +// @public +export type ProxyResource = Resource & {}; + +// @public +export type PublicNetworkAccessType = string; + +// @public +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly type?: string; +} + +// @public +export interface ResourceUpdate { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export type StatusLevelTypes = string; + +// @public +export type StatusTypes = string; + +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + +// @public +export interface TagsResource { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export type TrackedResource = Resource & { + tags?: { + [propertyName: string]: string; + }; + location: string; +}; + +// @public +export interface UpgradeExtensionsOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/hybridcompute/arm-hybridcompute/rollup.config.js b/sdk/hybridcompute/arm-hybridcompute/rollup.config.js index 0a36bcb3bae6..9be1955eb7f1 100644 --- a/sdk/hybridcompute/arm-hybridcompute/rollup.config.js +++ b/sdk/hybridcompute/arm-hybridcompute/rollup.config.js @@ -1,37 +1,188 @@ -import rollup from "rollup"; -import nodeResolve from "rollup-plugin-node-resolve"; +/* + * 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"; + +/** + * Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api. + * + * NOTE: this manual configuration is only needed because OpenTelemetry uses an + * __exportStar downleveled helper function to declare its exports which confuses + * rollup's automatic discovery mechanism. + * + * @returns an object reference that can be `...`'d into your cjs() configuration. + */ +export function openTelemetryCommonJs() { + const namedExports = {}; + + for (const key of [ + "@opentelemetry/api", + "@azure/core-tracing/node_modules/@opentelemetry/api" + ]) { + namedExports[key] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "SpanStatusCode", + "getSpanContext", + "setSpanContext" + ]; + } + + const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"]; + + for (const version of releasedOpenTelemetryVersions) { + namedExports[ + // working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path. + `../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js` + ] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "StatusCode", + "CanonicalCode", + "getSpanContext", + "setSpanContext" + ]; + } + + return namedExports; +} + +// #region Warning Handler /** - * @type {rollup.RollupFileOptions} + * A function that can determine whether a rollupwarning should be ignored. If + * the function returns `true`, then the warning will not be displayed. */ -const config = { - input: "./esm/hybridComputeManagementClient.js", - external: [ - "@azure/ms-rest-js", - "@azure/ms-rest-azure-js" - ], - output: { - file: "./dist/arm-hybridcompute.js", - format: "umd", - name: "Azure.ArmHybridcompute", - sourcemap: true, - globals: { - "@azure/ms-rest-js": "msRest", - "@azure/ms-rest-azure-js": "msRestAzure" + +function ignoreNiseSinonEvalWarnings(warning) { + return ( + warning.code === "EVAL" && + warning.id && + (warning.id.includes("node_modules/nise") || + warning.id.includes("node_modules/sinon")) === true + ); +} + +function ignoreChaiCircularDependencyWarnings(warning) { + return ( + warning.code === "CIRCULAR_DEPENDENCY" && + warning.importer && warning.importer.includes("node_modules/chai") === true + ); +} + +const warningInhibitors = [ + ignoreChaiCircularDependencyWarnings, + ignoreNiseSinonEvalWarnings +]; + +/** + * 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/**"] }, - banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */` - }, - plugins: [ - nodeResolve({ mainFields: ['module', 'main'] }), - sourcemaps() - ] + output: { + file: `dist-test/index.browser.js`, + format: "umd", + sourcemap: true + }, + preserveSymlinks: false, + plugins: [ + multiEntry({ exports: false }), + nodeResolve({ + mainFields: ["module", "browser"] + }), + cjs({ + namedExports: { + // Chai's strange internal architecture makes it impossible to statically + // analyze its exports. + chai: [ + "version", + "use", + "util", + "config", + "expect", + "should", + "assert" + ], + ...openTelemetryCommonJs() + } + }), + 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 default config; +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(), cjs()] + }; + + const config = [baseConfig]; + + if (!options.disableBrowserBundle) { + config.push(makeBrowserTestConfig()); + } + + return config; +} + +export default makeConfig(require("./package.json")); diff --git a/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts b/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts index d83c89f25d6e..adf5df59c6a5 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts @@ -1,53 +1,220 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; -import * as Models from "./models"; +import * as coreClient from "@azure/core-client"; +import * as coreAuth from "@azure/core-auth"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "./lroImpl"; +import { + MachinesImpl, + MachineExtensionsImpl, + OperationsImpl, + PrivateLinkScopesImpl, + PrivateLinkResourcesImpl, + PrivateEndpointConnectionsImpl +} from "./operations"; +import { + Machines, + MachineExtensions, + Operations, + PrivateLinkScopes, + PrivateLinkResources, + PrivateEndpointConnections +} from "./operationsInterfaces"; +import * as Parameters from "./models/parameters"; import * as Mappers from "./models/mappers"; -import * as operations from "./operations"; -import { HybridComputeManagementClientContext } from "./hybridComputeManagementClientContext"; +import { + HybridComputeManagementClientOptionalParams, + MachineExtensionUpgrade, + UpgradeExtensionsOptionalParams +} from "./models"; - -class HybridComputeManagementClient extends HybridComputeManagementClientContext { - // Operation groups - machines: operations.Machines; - machineExtensions: operations.MachineExtensions; - operations: operations.Operations; +export class HybridComputeManagementClient extends coreClient.ServiceClient { + $host: string; + apiVersion: string; + subscriptionId: string; /** * Initializes a new instance of the HybridComputeManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. Credentials - * implementing the TokenCredential interface from the @azure/identity package are recommended. For - * more information about these credentials, see - * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the - * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and - * @azure/ms-rest-browserauth are also supported. - * @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure - * subscription. The subscription ID forms part of the URI for every service call. - * @param [options] The parameter options + * @param credentials Subscription credentials which uniquely identify client subscription. + * @param subscriptionId The ID of the target subscription. + * @param options The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.HybridComputeManagementClientOptions) { - super(credentials, subscriptionId, options); - this.machines = new operations.Machines(this); - this.machineExtensions = new operations.MachineExtensions(this); - this.operations = new operations.Operations(this); + constructor( + credentials: coreAuth.TokenCredential, + subscriptionId: string, + options?: HybridComputeManagementClientOptionalParams + ) { + if (credentials === undefined) { + throw new Error("'credentials' cannot be null"); + } + if (subscriptionId === undefined) { + throw new Error("'subscriptionId' cannot be null"); + } + + // Initializing default values for options + if (!options) { + options = {}; + } + const defaults: HybridComputeManagementClientOptionalParams = { + requestContentType: "application/json; charset=utf-8", + credential: credentials + }; + + const packageDetails = `azsdk-js-arm-hybridcompute/3.0.0-beta.1`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; + + if (!options.credentialScopes) { + options.credentialScopes = ["https://management.azure.com/.default"]; + } + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + baseUri: options.endpoint || "https://management.azure.com" + }; + super(optionsWithDefaults); + // Parameter assignments + this.subscriptionId = subscriptionId; + + // Assigning values to Constant parameters + this.$host = options.$host || "https://management.azure.com"; + this.apiVersion = options.apiVersion || "2021-06-10-preview"; + this.machines = new MachinesImpl(this); + this.machineExtensions = new MachineExtensionsImpl(this); + this.operations = new OperationsImpl(this); + this.privateLinkScopes = new PrivateLinkScopesImpl(this); + this.privateLinkResources = new PrivateLinkResourcesImpl(this); + this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); + } + + /** + * The operation to Upgrade Machine Extensions. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. + * @param options The options parameters. + */ + async beginUpgradeExtensions( + resourceGroupName: string, + machineName: string, + extensionUpgradeParameters: MachineExtensionUpgrade, + options?: UpgradeExtensionsOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.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, machineName, extensionUpgradeParameters, options }, + upgradeExtensionsOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * The operation to Upgrade Machine Extensions. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. + * @param options The options parameters. + */ + async beginUpgradeExtensionsAndWait( + resourceGroupName: string, + machineName: string, + extensionUpgradeParameters: MachineExtensionUpgrade, + options?: UpgradeExtensionsOptionalParams + ): Promise { + const poller = await this.beginUpgradeExtensions( + resourceGroupName, + machineName, + extensionUpgradeParameters, + options + ); + return poller.pollUntilDone(); } -} + machines: Machines; + machineExtensions: MachineExtensions; + operations: Operations; + privateLinkScopes: PrivateLinkScopes; + privateLinkResources: PrivateLinkResources; + privateEndpointConnections: PrivateEndpointConnections; +} // Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -export { - HybridComputeManagementClient, - HybridComputeManagementClientContext, - Models as HybridComputeManagementModels, - Mappers as HybridComputeManagementMappers +const upgradeExtensionsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/upgradeExtensions", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.extensionUpgradeParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.machineName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; -export * from "./operations"; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClientContext.ts b/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClientContext.ts deleted file mode 100644 index fdc8d64894bc..000000000000 --- a/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClientContext.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as Models from "./models"; -import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; - -const packageName = "@azure/arm-hybridcompute"; -const packageVersion = "2.1.0"; - -export class HybridComputeManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials | TokenCredential; - subscriptionId: string; - apiVersion?: string; - - /** - * Initializes a new instance of the HybridComputeManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. Credentials - * implementing the TokenCredential interface from the @azure/identity package are recommended. For - * more information about these credentials, see - * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the - * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and - * @azure/ms-rest-browserauth are also supported. - * @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure - * subscription. The subscription ID forms part of the URI for every service call. - * @param [options] The parameter options - */ - constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.HybridComputeManagementClientOptions) { - if (credentials == undefined) { - throw new Error('\'credentials\' cannot be null.'); - } - if (subscriptionId == undefined) { - throw new Error('\'subscriptionId\' cannot be null.'); - } - - if (!options) { - options = {}; - } - if (!options.userAgent) { - const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); - options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; - } - - super(credentials, options); - - this.apiVersion = '2020-08-02'; - this.acceptLanguage = 'en-US'; - this.longRunningOperationRetryTimeout = 30; - this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; - this.requestContentType = "application/json; charset=utf-8"; - this.credentials = credentials; - this.subscriptionId = subscriptionId; - - if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { - this.acceptLanguage = options.acceptLanguage; - } - if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { - this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; - } - } -} diff --git a/sdk/hybridcompute/arm-hybridcompute/src/index.ts b/sdk/hybridcompute/arm-hybridcompute/src/index.ts new file mode 100644 index 000000000000..cd3b5f46fd45 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/index.ts @@ -0,0 +1,12 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +/// +export * from "./models"; +export { HybridComputeManagementClient } from "./hybridComputeManagementClient"; +export * from "./operationsInterfaces"; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/lroImpl.ts b/sdk/hybridcompute/arm-hybridcompute/src/lroImpl.ts new file mode 100644 index 000000000000..518d5f053b4e --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/lroImpl.ts @@ -0,0 +1,34 @@ +/* + * 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 { 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" + }); + } +} diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts index 993b7c5dabbc..2223e789af12 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts @@ -1,1035 +1,1038 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; -import * as msRest from "@azure/ms-rest-js"; +import * as coreClient from "@azure/core-client"; -export { BaseResource, CloudError }; - -/** - * Describes the properties of a Compute Operation value. - */ -export interface OperationValue { - /** - * The origin of the compute operation. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly origin?: string; - /** - * The name of the compute operation. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * The display name of the compute operation. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly operation?: string; - /** - * The display name of the resource the operation applies to. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly resource?: string; - /** - * The description of the operation. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly description?: string; - /** - * The resource provider for the operation. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provider?: string; -} - -/** - * Describes the properties of a Hybrid Compute Operation Value Display. - */ -export interface OperationValueDisplayModel { - /** - * The display name of the compute operation. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly operation?: string; - /** - * The display name of the resource the operation applies to. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly resource?: string; - /** - * The description of the operation. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly description?: string; - /** - * The resource provider for the operation. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provider?: string; -} - -/** - * Specifies the operating system settings for the hybrid machine. - */ -export interface OSProfile { - /** - * Specifies the host OS name of the hybrid machine. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly computerName?: string; -} - -/** - * Metadata pertaining to the geographic location of the resource. - */ -export interface LocationData { - /** - * A canonical name for the geographic or physical location. - */ - name: string; - /** - * The city or locality where the resource is located. - */ - city?: string; - /** - * The district, state, or province where the resource is located. - */ - district?: string; - /** - * The country or region where the resource is located - */ - countryOrRegion?: string; -} - -/** - * Specifies the operating system settings for the hybrid machine. - */ -export interface MachinePropertiesOsProfile extends OSProfile { +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; } -/** - * An interface representing ErrorDetail. - * @summary Error details. - */ +/** The error detail. */ export interface ErrorDetail { /** - * The error's code. - */ - code: string; - /** - * A human readable error message. - */ - message: string; - /** - * Indicates which property in the request is responsible for the error. - */ - target?: string; - /** - * Additional error details. - */ - details?: ErrorDetail[]; -} - -/** - * Instance view status. - */ -export interface MachineExtensionInstanceViewStatus { - /** - * The status code. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly code?: string; /** - * The level code. Possible values include: 'Info', 'Warning', 'Error' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly level?: StatusLevelTypes; + readonly message?: string; /** - * The short localizable label for the status. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly displayStatus?: string; + readonly target?: string; /** - * The detailed status message, including for alerts and error messages. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly message?: string; + readonly details?: ErrorDetail[]; /** - * The time of the status. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly time?: Date; + readonly additionalInfo?: ErrorAdditionalInfo[]; } -/** - * Describes the Machine Extension Instance View. - */ -export interface MachineExtensionInstanceView { - /** - * The machine extension name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { /** - * Specifies the type of the extension; an example is "CustomScriptExtension". - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; /** - * Specifies the version of the script handler. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly typeHandlerVersion?: string; - /** - * Instance view status. + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - status?: MachineExtensionInstanceViewStatus; + readonly info?: Record; } -/** - * Describes the properties of a hybrid machine. - */ +/** Describes the properties of a hybrid machine. */ export interface MachineProperties { + /** Metadata pertaining to the geographic location of the resource. */ locationData?: LocationData; - /** - * Specifies the operating system settings for the hybrid machine. - */ - osProfile?: MachinePropertiesOsProfile; + /** Specifies the operating system settings for the hybrid machine. */ + osProfile?: OSProfile; /** * The provisioning state, which only appears in the response. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: string; /** - * The status of the hybrid machine agent. Possible values include: 'Connected', 'Disconnected', - * 'Error' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The status of the hybrid machine agent. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly status?: StatusTypes; /** * The time of the last status change. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly lastStatusChange?: Date; /** * Details about the error state. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly errorDetails?: ErrorDetail[]; /** * The hybrid machine agent full version. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly agentVersion?: string; - /** - * Specifies the hybrid machine unique ID. - */ + /** Specifies the hybrid machine unique ID. */ vmId?: string; /** * Specifies the hybrid machine display name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly displayName?: string; /** * Specifies the hybrid machine FQDN. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly machineFqdn?: string; - /** - * Public Key that the client provides to be used during initial resource onboarding - */ + /** Public Key that the client provides to be used during initial resource onboarding */ clientPublicKey?: string; /** * The Operating System running on the hybrid machine. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly osName?: string; /** * The version of Operating System running on the hybrid machine. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly osVersion?: string; + /** The type of Operating System (windows/linux). */ + osType?: string; /** * Specifies the Arc Machine's unique SMBIOS ID - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly vmUuid?: string; - /** - * Machine Extensions information - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly extensions?: MachineExtensionInstanceView[]; + /** Machine Extensions information */ + extensions?: MachineExtensionInstanceView[]; /** * Specifies the Operating System product SKU. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly osSku?: string; /** * Specifies the Windows domain name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly domainName?: string; /** * Specifies the AD fully qualified display name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly adFqdn?: string; /** * Specifies the DNS fully qualified display name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly dnsFqdn?: string; + /** The resource id of the private link scope this machine is assigned to, if any. */ + privateLinkScopeResourceId?: string; + /** The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. */ + parentClusterResourceId?: string; + /** Specifies whether any MS SQL instance is discovered on the machine. */ + mssqlDiscovered?: string; + /** + * Detected properties from the machine. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly detectedProperties?: { [propertyName: string]: string }; } -/** - * Describes the ARM updatable properties of a hybrid machine. - */ -export interface MachineUpdateProperties { - locationData?: LocationData; +/** Metadata pertaining to the geographic location of the resource. */ +export interface LocationData { + /** A canonical name for the geographic or physical location. */ + name: string; + /** The city or locality where the resource is located. */ + city?: string; + /** The district, state, or province where the resource is located. */ + district?: string; + /** The country or region where the resource is located */ + countryOrRegion?: string; } -/** - * An interface representing Identity. - * @summary Managed Identity. - */ -export interface Identity { +/** Specifies the operating system settings for the hybrid machine. */ +export interface OSProfile { /** - * The identity type. + * Specifies the host OS name of the hybrid machine. + * NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly computerName?: string; + /** Specifies the windows configuration for update management. */ + windowsConfiguration?: OSProfileWindowsConfiguration; + /** Specifies the linux configuration for update management. */ + linuxConfiguration?: OSProfileLinuxConfiguration; +} + +/** Specifies the windows configuration for update management. */ +export interface OSProfileWindowsConfiguration { + /** Specifies the assessment mode. */ + assessmentMode?: string; +} + +/** Specifies the linux configuration for update management. */ +export interface OSProfileLinuxConfiguration { + /** Specifies the assessment mode. */ + assessmentMode?: string; +} + +/** Describes the Machine Extension Instance View. */ +export interface MachineExtensionInstanceView { + /** The machine extension name. */ + name?: string; + /** Specifies the type of the extension; an example is "CustomScriptExtension". */ type?: string; + /** Specifies the version of the script handler. */ + typeHandlerVersion?: string; + /** Instance view status. */ + status?: MachineExtensionInstanceViewStatus; +} + +/** Instance view status. */ +export interface MachineExtensionInstanceViewStatus { + /** The status code. */ + code?: string; + /** The level code. */ + level?: StatusLevelTypes; + /** The short localizable label for the status. */ + displayStatus?: string; + /** The detailed status message, including for alerts and error messages. */ + message?: string; + /** The time of the status. */ + time?: Date; +} + +/** Identity for the resource. */ +export interface Identity { /** - * The identity's principal id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The principal ID of resource identity. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly principalId?: string; /** - * The identity's tenant id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The tenant ID of resource. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly tenantId?: string; + /** The identity type. */ + type?: "SystemAssigned"; } -/** - * An interface representing MachineIdentity. - */ -export interface MachineIdentity extends Identity { +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; } -/** - * An interface representing Resource. - */ -export interface Resource extends BaseResource { +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { /** - * Fully qualified resource Id for the resource. Ex - - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Fully qualified resource ID for the resource. Ex - /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; /** * The name of the resource - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; /** - * The type of the resource. Ex- Microsoft.Compute/virtualMachines or - * Microsoft.Storage/storageAccounts. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * 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; } -/** - * The resource model definition for a ARM tracked top level resource - */ -export interface TrackedResource extends Resource { - /** - * Resource tags. - */ - tags?: { [propertyName: string]: string }; - /** - * The geo-location where the resource lives - */ - location: string; +/** The List hybrid machine operation response. */ +export interface MachineListResult { + /** The list of hybrid machines. */ + value: Machine[]; + /** The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the next page of hybrid machines. */ + nextLink?: string; } -/** - * Describes a hybrid machine. - */ -export interface Machine extends TrackedResource { - locationData?: LocationData; - /** - * Specifies the operating system settings for the hybrid machine. - */ - osProfile?: MachinePropertiesOsProfile; +/** Describes the properties of a Machine Extension. */ +export interface MachineExtensionProperties { + /** How the extension handler should be forced to update even if the extension configuration has not changed. */ + forceUpdateTag?: string; + /** The name of the extension handler publisher. */ + publisher?: string; + /** Specifies the type of the extension; an example is "CustomScriptExtension". */ + type?: string; + /** Specifies the version of the script handler. */ + typeHandlerVersion?: string; + /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ + autoUpgradeMinorVersion?: boolean; + /** Json formatted public settings for the extension. */ + settings?: Record; + /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ + protectedSettings?: Record; /** * The provisioning state, which only appears in the response. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: string; + /** The machine extension instance view. */ + instanceView?: MachineExtensionInstanceView; +} + +/** Describes the properties of a Machine Extension. */ +export interface MachineExtensionUpdateProperties { + /** How the extension handler should be forced to update even if the extension configuration has not changed. */ + forceUpdateTag?: string; + /** The name of the extension handler publisher. */ + publisher?: string; + /** Specifies the type of the extension; an example is "CustomScriptExtension". */ + type?: string; + /** Specifies the version of the script handler. */ + typeHandlerVersion?: string; + /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ + autoUpgradeMinorVersion?: boolean; + /** Json formatted public settings for the extension. */ + settings?: Record; + /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ + protectedSettings?: Record; +} + +/** The Update Resource model definition. */ +export interface ResourceUpdate { + /** Resource tags */ + tags?: { [propertyName: string]: string }; +} + +/** Describes the Machine Extensions List Result. */ +export interface MachineExtensionsListResult { + /** The list of extensions */ + value?: MachineExtension[]; + /** The uri to fetch the next page of machine extensions. Call ListNext() with this to fetch the next page of extensions. */ + nextLink?: string; +} + +/** Describes the Machine Extension Upgrade Properties */ +export interface MachineExtensionUpgrade { + /** Describes the Extension Target Properties. */ + extensionTargets?: { [propertyName: string]: ExtensionTargetProperties }; +} + +/** Describes the Machine Extension Target Version Properties */ +export interface ExtensionTargetProperties { + /** Properties for the specified Extension to Upgrade. */ + targetVersion?: string; +} + +/** The List Compute Operation operation response. */ +export interface OperationListResult { /** - * The status of the hybrid machine agent. Possible values include: 'Connected', 'Disconnected', - * 'Error' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly status?: StatusTypes; - /** - * The time of the last status change. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly lastStatusChange?: Date; - /** - * Details about the error state. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The list of compute operations + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorDetails?: ErrorDetail[]; + readonly value?: OperationValue[]; +} + +/** Describes the properties of a Compute Operation value. */ +export interface OperationValue { /** - * The hybrid machine agent full version. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The origin of the compute operation. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly agentVersion?: string; + readonly origin?: string; /** - * Specifies the hybrid machine unique ID. + * The name of the compute operation. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - vmId?: string; + readonly name?: string; + /** Display properties */ + display?: OperationValueDisplay; +} + +/** Describes the properties of a Hybrid Compute Operation Value Display. */ +export interface OperationValueDisplay { /** - * Specifies the hybrid machine display name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The display name of the compute operation. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly displayName?: string; + readonly operation?: string; /** - * Specifies the hybrid machine FQDN. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The display name of the resource the operation applies to. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly machineFqdn?: string; + readonly resource?: string; /** - * Public Key that the client provides to be used during initial resource onboarding + * The description of the operation. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - clientPublicKey?: string; + readonly description?: string; /** - * The Operating System running on the hybrid machine. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The resource provider for the operation. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osName?: string; + readonly provider?: string; +} + +/** Describes the list of Azure Arc PrivateLinkScope resources. */ +export interface HybridComputePrivateLinkScopeListResult { + /** List of Azure Arc PrivateLinkScope definitions. */ + value: HybridComputePrivateLinkScope[]; + /** The URI to get the next set of Azure Arc PrivateLinkScope definitions if too many PrivateLinkScopes where returned in the result set. */ + nextLink?: string; +} + +/** Properties that define a Azure Arc PrivateLinkScope resource. */ +export interface HybridComputePrivateLinkScopeProperties { + /** Indicates whether machines associated with the private link scope can also use public Azure Arc service endpoints. */ + publicNetworkAccess?: PublicNetworkAccessType; /** - * The version of Operating System running on the hybrid machine. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Current state of this PrivateLinkScope: whether or not is has been provisioned within the resource group it is defined. Users cannot change this value but are able to read from it. Values will include Provisioning ,Succeeded, Canceled and Failed. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osVersion?: string; + readonly provisioningState?: string; /** - * Specifies the Arc Machine's unique SMBIOS ID - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The Guid id of the private link scope. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly vmUuid?: string; + readonly privateLinkScopeId?: string; /** - * Machine Extensions information - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The collection of associated Private Endpoint Connections. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly extensions?: MachineExtensionInstanceView[]; + readonly privateEndpointConnections?: PrivateEndpointConnectionDataModel[]; +} + +/** The Data Model for a Private Endpoint Connection associated with a Private Link Scope */ +export interface PrivateEndpointConnectionDataModel { /** - * Specifies the Operating System product SKU. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The ARM Resource Id of the Private Endpoint. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly osSku?: string; + readonly id?: string; /** - * Specifies the Windows domain name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The Name of the Private Endpoint. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly domainName?: string; + readonly name?: string; /** - * Specifies the AD fully qualified display name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Azure resource type + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly adFqdn?: string; + readonly type?: string; + /** The Private Endpoint Connection properties. */ + properties?: PrivateEndpointConnectionProperties; +} + +/** Properties of a private endpoint connection. */ +export interface PrivateEndpointConnectionProperties { + /** Private endpoint which the connection belongs to. */ + privateEndpoint?: PrivateEndpointProperty; + /** Connection state of the private endpoint connection. */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionStateProperty; /** - * Specifies the DNS fully qualified display name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * State of the private endpoint connection. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly dnsFqdn?: string; - identity?: MachineIdentity; + readonly provisioningState?: string; } -/** - * The Update Resource model definition. - */ -export interface UpdateResource { +/** Private endpoint which the connection belongs to. */ +export interface PrivateEndpointProperty { + /** Resource id of the private endpoint. */ + id?: string; +} + +/** State of the private endpoint connection. */ +export interface PrivateLinkServiceConnectionStateProperty { + /** The private link service connection status. */ + status: string; + /** The private link service connection description. */ + description: string; /** - * Resource tags + * The actions required for private link service connection. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - tags?: { [propertyName: string]: string }; + readonly actionsRequired?: string; } -/** - * Describes a hybrid machine Update. - */ -export interface MachineUpdate extends UpdateResource { +/** An azure resource object */ +export interface PrivateLinkScopesResource { /** - * The identity type. + * Azure resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. */ - type?: string; + readonly id?: string; /** - * The identity's principal id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Azure resource name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly principalId?: string; + readonly name?: string; /** - * The identity's tenant id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Azure resource type + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly tenantId?: string; - locationData?: LocationData; + readonly type?: string; + /** Resource location */ + location: string; + /** Resource tags */ + tags?: { [propertyName: string]: string }; } -/** - * Contains details when the response code indicates an error. - * @summary Error response. - */ -export interface ErrorResponse { - /** - * The error details. - */ - error: ErrorDetail; +/** A container holding only the Tags for a resource, allowing the user to update the tags on a PrivateLinkScope instance. */ +export interface TagsResource { + /** Resource tags */ + tags?: { [propertyName: string]: string }; } -/** - * Describes a Machine Extension. - */ -export interface MachineExtension extends TrackedResource { - /** - * How the extension handler should be forced to update even if the extension configuration has - * not changed. - */ - forceUpdateTag?: string; - /** - * The name of the extension handler publisher. - */ - publisher?: string; +/** A list of private link resources */ +export interface PrivateLinkResourceListResult { /** - * Specifies the type of the extension; an example is "CustomScriptExtension". + * Array of results. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - machineExtensionType?: string; + readonly value?: PrivateLinkResource[]; /** - * Specifies the version of the script handler. + * Link to retrieve next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - typeHandlerVersion?: string; + readonly nextLink?: string; +} + +/** Properties of a private link resource. */ +export interface PrivateLinkResourceProperties { /** - * Indicates whether the extension should use a newer minor version if one is available at - * deployment time. Once deployed, however, the extension will not upgrade minor versions unless - * redeployed, even with this property set to true. + * The private link resource group id. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - autoUpgradeMinorVersion?: boolean; + readonly groupId?: string; /** - * Json formatted public settings for the extension. + * The private link resource required member names. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - settings?: any; + readonly requiredMembers?: string[]; /** - * The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no - * protected settings at all. + * Required DNS zone names of the the private link resource. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - protectedSettings?: any; + readonly requiredZoneNames?: string[]; +} + +/** A list of private endpoint connections. */ +export interface PrivateEndpointConnectionListResult { /** - * The provisioning state, which only appears in the response. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Array of results. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly value?: PrivateEndpointConnection[]; /** - * The machine extension instance view. + * Link to retrieve next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - instanceView?: MachineExtensionPropertiesInstanceView; + readonly nextLink?: string; } -/** - * Describes a Machine Extension Update. - */ -export interface MachineExtensionUpdate extends UpdateResource { +export interface PrivateLinkScopeValidationDetails { /** - * How the extension handler should be forced to update even if the extension configuration has - * not changed. + * Azure resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. */ - forceUpdateTag?: string; - /** - * The name of the extension handler publisher. - */ - publisher?: string; + readonly id?: string; + /** Indicates whether machines associated with the private link scope can also use public Azure Arc service endpoints. */ + publicNetworkAccess?: PublicNetworkAccessType; + /** List of Private Endpoint Connection details. */ + connectionDetails?: ConnectionDetail[]; +} + +export interface ConnectionDetail { /** - * Specifies the type of the extension; an example is "CustomScriptExtension". + * Azure resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. */ - type?: string; + readonly id?: string; /** - * Specifies the version of the script handler. + * The private endpoint connection private ip address + * NOTE: This property will not be serialized. It can only be populated by the server. */ - typeHandlerVersion?: string; + readonly privateIpAddress?: string; /** - * Indicates whether the extension should use a newer minor version if one is available at - * deployment time. Once deployed, however, the extension will not upgrade minor versions unless - * redeployed, even with this property set to true. + * The private endpoint connection link identifier + * NOTE: This property will not be serialized. It can only be populated by the server. */ - autoUpgradeMinorVersion?: boolean; + readonly linkIdentifier?: string; /** - * Json formatted public settings for the extension. + * The private endpoint connection group id + * NOTE: This property will not be serialized. It can only be populated by the server. */ - settings?: any; + readonly groupId?: string; /** - * The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no - * protected settings at all. + * The private endpoint connection member name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - protectedSettings?: any; + readonly memberName?: string; } -/** - * The machine extension instance view. - */ -export interface MachineExtensionPropertiesInstanceView extends MachineExtensionInstanceView { +/** Describes the ARM updatable properties of a hybrid machine. */ +export interface MachineUpdateProperties { + /** Metadata pertaining to the geographic location of the resource. */ + locationData?: LocationData; + /** Specifies the operating system settings for the hybrid machine. */ + osProfile?: OSProfile; + /** The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. */ + parentClusterResourceId?: string; + /** The resource id of the private link scope this machine is assigned to, if any. */ + privateLinkScopeResourceId?: string; } -/** - * Describes the properties of a Machine Extension. - */ -export interface MachineExtensionPropertiesModel { - /** - * How the extension handler should be forced to update even if the extension configuration has - * not changed. - */ - forceUpdateTag?: string; - /** - * The name of the extension handler publisher. - */ - publisher?: string; - /** - * Specifies the type of the extension; an example is "CustomScriptExtension". - */ - type?: string; - /** - * Specifies the version of the script handler. - */ - typeHandlerVersion?: string; +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export type TrackedResource = 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 type ProxyResource = Resource & {}; + +/** Describes a Machine Extension Update. */ +export type MachineExtensionUpdate = ResourceUpdate & { + /** Describes Machine Extension Update Properties. */ + properties?: MachineExtensionUpdateProperties; +}; + +/** Describes a hybrid machine Update. */ +export type MachineUpdate = ResourceUpdate & { + /** Identity for the resource. */ + identity?: Identity; + /** Hybrid Compute Machine properties */ + properties?: MachineUpdateProperties; +}; + +/** An Azure Arc PrivateLinkScope definition. */ +export type HybridComputePrivateLinkScope = PrivateLinkScopesResource & { + /** Properties that define a Azure Arc PrivateLinkScope resource. */ + properties?: HybridComputePrivateLinkScopeProperties; /** - * Indicates whether the extension should use a newer minor version if one is available at - * deployment time. Once deployed, however, the extension will not upgrade minor versions unless - * redeployed, even with this property set to true. + * The system meta data relating to this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - autoUpgradeMinorVersion?: boolean; + readonly systemData?: SystemData; +}; + +/** Describes a hybrid machine. */ +export type Machine = TrackedResource & { + /** Hybrid Compute Machine properties */ + properties?: MachineProperties; + /** Identity for the resource. */ + identity?: Identity; /** - * Json formatted public settings for the extension. + * The system meta data relating to this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - settings?: any; + readonly systemData?: SystemData; +}; + +/** Describes a Machine Extension. */ +export type MachineExtension = TrackedResource & { + /** Describes Machine Extension Properties. */ + properties?: MachineExtensionProperties; /** - * The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no - * protected settings at all. + * The system meta data relating to this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - protectedSettings?: any; + readonly systemData?: SystemData; +}; + +/** A private link resource */ +export type PrivateLinkResource = ProxyResource & { + /** Resource properties. */ + properties?: PrivateLinkResourceProperties; /** - * The provisioning state, which only appears in the response. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The system meta data relating to this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly systemData?: SystemData; +}; + +/** A private endpoint connection */ +export type PrivateEndpointConnection = ProxyResource & { + /** Resource properties. */ + properties?: PrivateEndpointConnectionProperties; /** - * The machine extension instance view. + * The system meta data relating to this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - instanceView?: MachineExtensionPropertiesInstanceView; + readonly systemData?: SystemData; +}; + +/** Known values of {@link InstanceViewTypes} that the service accepts. */ +export enum KnownInstanceViewTypes { + InstanceView = "instanceView" } /** - * Describes the properties of a Machine Extension. + * Defines values for InstanceViewTypes. \ + * {@link KnownInstanceViewTypes} can be used interchangeably with InstanceViewTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **instanceView** */ -export interface MachineExtensionUpdatePropertiesModel { - /** - * How the extension handler should be forced to update even if the extension configuration has - * not changed. - */ - forceUpdateTag?: string; - /** - * The name of the extension handler publisher. - */ - publisher?: string; - /** - * Specifies the type of the extension; an example is "CustomScriptExtension". - */ - type?: string; - /** - * Specifies the version of the script handler. - */ - typeHandlerVersion?: string; - /** - * Indicates whether the extension should use a newer minor version if one is available at - * deployment time. Once deployed, however, the extension will not upgrade minor versions unless - * redeployed, even with this property set to true. - */ - autoUpgradeMinorVersion?: boolean; - /** - * Json formatted public settings for the extension. - */ - settings?: any; - /** - * The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no - * protected settings at all. - */ - protectedSettings?: any; +export type InstanceViewTypes = string; + +/** Known values of {@link StatusTypes} that the service accepts. */ +export enum KnownStatusTypes { + Connected = "Connected", + Disconnected = "Disconnected", + Error = "Error" } /** - * The resource model definition for a ARM proxy resource. It will have everything other than - * required location and tags + * Defines values for StatusTypes. \ + * {@link KnownStatusTypes} can be used interchangeably with StatusTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Connected** \ + * **Disconnected** \ + * **Error** */ -export interface ProxyResource extends Resource { +export type StatusTypes = string; + +/** Known values of {@link StatusLevelTypes} that the service accepts. */ +export enum KnownStatusLevelTypes { + Info = "Info", + Warning = "Warning", + Error = "Error" } /** - * The resource model definition for a Azure Resource Manager resource with an etag. + * Defines values for StatusLevelTypes. \ + * {@link KnownStatusLevelTypes} can be used interchangeably with StatusLevelTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Info** \ + * **Warning** \ + * **Error** */ -export interface AzureEntityResource extends Resource { - /** - * Resource Etag. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly etag?: string; +export type StatusLevelTypes = string; + +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + User = "User", + Application = "Application", + ManagedIdentity = "ManagedIdentity", + Key = "Key" } /** - * Optional Parameters. + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** */ -export interface MachinesGetOptionalParams extends msRest.RequestOptionsBase { - /** - * The expand expression to apply on the operation. Possible values include: 'instanceView' - */ - expand?: InstanceViewTypes; +export type CreatedByType = string; + +/** Known values of {@link PublicNetworkAccessType} that the service accepts. */ +export enum KnownPublicNetworkAccessType { + /** Allows Azure Arc agents to communicate with Azure Arc services over both public (internet) and private endpoints. */ + Enabled = "Enabled", + /** Does not allow Azure Arc agents to communicate with Azure Arc services over public (internet) endpoints. The agents must use the private link. */ + Disabled = "Disabled" } /** - * Optional Parameters. + * Defines values for PublicNetworkAccessType. \ + * {@link KnownPublicNetworkAccessType} can be used interchangeably with PublicNetworkAccessType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: Allows Azure Arc agents to communicate with Azure Arc services over both public (internet) and private endpoints. \ + * **Disabled**: Does not allow Azure Arc agents to communicate with Azure Arc services over public (internet) endpoints. The agents must use the private link. */ -export interface MachineExtensionsListOptionalParams extends msRest.RequestOptionsBase { - /** - * The expand expression to apply on the operation. - */ - expand?: string; +export type PublicNetworkAccessType = string; + +/** Optional parameters. */ +export interface MachinesDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface MachinesGetOptionalParams extends coreClient.OperationOptions { + /** The expand expression to apply on the operation. */ + expand?: InstanceViewTypes; } -/** - * An interface representing HybridComputeManagementClientOptions. - */ -export interface HybridComputeManagementClientOptions extends AzureServiceClientOptions { - baseUri?: string; +/** Contains response data for the get operation. */ +export type MachinesGetResponse = Machine; + +/** Optional parameters. */ +export interface MachinesListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type MachinesListByResourceGroupResponse = MachineListResult; + +/** Optional parameters. */ +export interface MachinesListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type MachinesListBySubscriptionResponse = MachineListResult; + +/** Optional parameters. */ +export interface MachinesListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type MachinesListByResourceGroupNextResponse = MachineListResult; + +/** Optional parameters. */ +export interface MachinesListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type MachinesListBySubscriptionNextResponse = MachineListResult; + +/** Optional parameters. */ +export interface MachineExtensionsCreateOrUpdateOptionalParams + 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; } -/** - * @interface - * The List hybrid machine operation response. - * @extends Array - */ -export interface MachineListResult extends Array { - /** - * The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the next - * page of hybrid machines. - */ - nextLink?: string; +/** Contains response data for the createOrUpdate operation. */ +export type MachineExtensionsCreateOrUpdateResponse = MachineExtension; + +/** Optional parameters. */ +export interface MachineExtensionsUpdateOptionalParams + 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; } -/** - * @interface - * Describes the Machine Extensions List Result. - * @extends Array - */ -export interface MachineExtensionsListResult extends Array { - /** - * The uri to fetch the next page of machine extensions. Call ListNext() with this to fetch the - * next page of extensions. - */ - nextLink?: string; +/** Contains response data for the update operation. */ +export type MachineExtensionsUpdateResponse = MachineExtension; + +/** Optional parameters. */ +export interface MachineExtensionsDeleteOptionalParams + 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; } -/** - * @interface - * The List Compute Operation operation response. - * @extends Array - */ -export interface OperationListResult extends Array { +/** Optional parameters. */ +export interface MachineExtensionsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type MachineExtensionsGetResponse = MachineExtension; + +/** Optional parameters. */ +export interface MachineExtensionsListOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply on the operation. */ + expand?: string; } -/** - * Defines values for StatusTypes. - * Possible values include: 'Connected', 'Disconnected', 'Error' - * @readonly - * @enum {string} - */ -export type StatusTypes = 'Connected' | 'Disconnected' | 'Error'; +/** Contains response data for the list operation. */ +export type MachineExtensionsListResponse = MachineExtensionsListResult; -/** - * Defines values for StatusLevelTypes. - * Possible values include: 'Info', 'Warning', 'Error' - * @readonly - * @enum {string} - */ -export type StatusLevelTypes = 'Info' | 'Warning' | 'Error'; +/** Optional parameters. */ +export interface MachineExtensionsListNextOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply on the operation. */ + expand?: string; +} -/** - * Defines values for InstanceViewTypes. - * Possible values include: 'instanceView' - * @readonly - * @enum {string} - */ -export type InstanceViewTypes = 'instanceView'; +/** Contains response data for the listNext operation. */ +export type MachineExtensionsListNextResponse = MachineExtensionsListResult; -/** - * Contains response data for the get operation. - */ -export type MachinesGetResponse = Machine & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface UpgradeExtensionsOptionalParams + 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; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: Machine; - }; -}; +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listByResourceGroup operation. - */ -export type MachinesListByResourceGroupResponse = MachineListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the list operation. */ +export type OperationsListResponse = OperationListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: MachineListResult; - }; -}; +/** Optional parameters. */ +export interface PrivateLinkScopesListOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listBySubscription operation. - */ -export type MachinesListBySubscriptionResponse = MachineListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the list operation. */ +export type PrivateLinkScopesListResponse = HybridComputePrivateLinkScopeListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: MachineListResult; - }; -}; +/** Optional parameters. */ +export interface PrivateLinkScopesListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listByResourceGroupNext operation. - */ -export type MachinesListByResourceGroupNextResponse = MachineListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listByResourceGroup operation. */ +export type PrivateLinkScopesListByResourceGroupResponse = HybridComputePrivateLinkScopeListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: MachineListResult; - }; -}; +/** Optional parameters. */ +export interface PrivateLinkScopesDeleteOptionalParams + 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 MachinesListBySubscriptionNextResponse = MachineListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface PrivateLinkScopesGetOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: MachineListResult; - }; -}; +/** Contains response data for the get operation. */ +export type PrivateLinkScopesGetResponse = HybridComputePrivateLinkScope; -/** - * Contains response data for the createOrUpdate operation. - */ -export type MachineExtensionsCreateOrUpdateResponse = MachineExtension & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface PrivateLinkScopesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: MachineExtension; - }; -}; +/** Contains response data for the createOrUpdate operation. */ +export type PrivateLinkScopesCreateOrUpdateResponse = HybridComputePrivateLinkScope; -/** - * Contains response data for the update operation. - */ -export type MachineExtensionsUpdateResponse = MachineExtension & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface PrivateLinkScopesUpdateTagsOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: MachineExtension; - }; -}; +/** Contains response data for the updateTags operation. */ +export type PrivateLinkScopesUpdateTagsResponse = HybridComputePrivateLinkScope; -/** - * Contains response data for the get operation. - */ -export type MachineExtensionsGetResponse = MachineExtension & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface PrivateLinkScopesGetValidationDetailsOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: MachineExtension; - }; -}; +/** Contains response data for the getValidationDetails operation. */ +export type PrivateLinkScopesGetValidationDetailsResponse = PrivateLinkScopeValidationDetails; -/** - * Contains response data for the list operation. - */ -export type MachineExtensionsListResponse = MachineExtensionsListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface PrivateLinkScopesGetValidationDetailsForMachineOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: MachineExtensionsListResult; - }; -}; +/** Contains response data for the getValidationDetailsForMachine operation. */ +export type PrivateLinkScopesGetValidationDetailsForMachineResponse = PrivateLinkScopeValidationDetails; -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type MachineExtensionsBeginCreateOrUpdateResponse = MachineExtension & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface PrivateLinkScopesListNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: MachineExtension; - }; -}; +/** Contains response data for the listNext operation. */ +export type PrivateLinkScopesListNextResponse = HybridComputePrivateLinkScopeListResult; -/** - * Contains response data for the beginUpdate operation. - */ -export type MachineExtensionsBeginUpdateResponse = MachineExtension & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface PrivateLinkScopesListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: MachineExtension; - }; -}; +/** Contains response data for the listByResourceGroupNext operation. */ +export type PrivateLinkScopesListByResourceGroupNextResponse = HybridComputePrivateLinkScopeListResult; -/** - * Contains response data for the listNext operation. - */ -export type MachineExtensionsListNextResponse = MachineExtensionsListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface PrivateLinkResourcesListByPrivateLinkScopeOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: MachineExtensionsListResult; - }; -}; +/** Contains response data for the listByPrivateLinkScope operation. */ +export type PrivateLinkResourcesListByPrivateLinkScopeResponse = PrivateLinkResourceListResult; -/** - * Contains response data for the list operation. - */ -export type OperationsListResponse = OperationListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface PrivateLinkResourcesGetOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationListResult; - }; -}; +/** Contains response data for the get operation. */ +export type PrivateLinkResourcesGetResponse = PrivateLinkResource; + +/** Optional parameters. */ +export interface PrivateLinkResourcesListByPrivateLinkScopeNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByPrivateLinkScopeNext operation. */ +export type PrivateLinkResourcesListByPrivateLinkScopeNextResponse = PrivateLinkResourceListResult; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsCreateOrUpdateOptionalParams + 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 createOrUpdate operation. */ +export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsDeleteOptionalParams + 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; +} + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsListByPrivateLinkScopeOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByPrivateLinkScope operation. */ +export type PrivateEndpointConnectionsListByPrivateLinkScopeResponse = PrivateEndpointConnectionListResult; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionsListByPrivateLinkScopeNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByPrivateLinkScopeNext operation. */ +export type PrivateEndpointConnectionsListByPrivateLinkScopeNextResponse = PrivateEndpointConnectionListResult; + +/** Optional parameters. */ +export interface HybridComputeManagementClientOptionalParams + extends coreClient.ServiceClientOptions { + /** server parameter */ + $host?: string; + /** Api Version */ + apiVersion?: string; + /** Overrides client endpoint. */ + endpoint?: string; +} diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/machineExtensionsMappers.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/machineExtensionsMappers.ts deleted file mode 100644 index 67663c9ee0f5..000000000000 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/machineExtensionsMappers.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - AzureEntityResource, - BaseResource, - CloudError, - ErrorDetail, - Identity, - LocationData, - Machine, - MachineExtension, - MachineExtensionInstanceView, - MachineExtensionInstanceViewStatus, - MachineExtensionPropertiesInstanceView, - MachineExtensionsListResult, - MachineExtensionUpdate, - MachineIdentity, - MachinePropertiesOsProfile, - MachineUpdate, - OSProfile, - ProxyResource, - Resource, - TrackedResource, - UpdateResource -} from "../models/mappers"; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/machinesMappers.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/machinesMappers.ts deleted file mode 100644 index c4d65dc1db0f..000000000000 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/machinesMappers.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - AzureEntityResource, - BaseResource, - ErrorDetail, - ErrorResponse, - Identity, - LocationData, - Machine, - MachineExtension, - MachineExtensionInstanceView, - MachineExtensionInstanceViewStatus, - MachineExtensionPropertiesInstanceView, - MachineIdentity, - MachineListResult, - MachinePropertiesOsProfile, - OSProfile, - ProxyResource, - Resource, - TrackedResource -} from "../models/mappers"; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts index 43cd6ada7615..18083d2ef24f 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts @@ -1,201 +1,58 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; -import * as msRest from "@azure/ms-rest-js"; +import * as coreClient from "@azure/core-client"; -export const CloudError = CloudErrorMapper; -export const BaseResource = BaseResourceMapper; - -export const OperationValue: msRest.CompositeMapper = { - serializedName: "OperationValue", - type: { - name: "Composite", - className: "OperationValue", - modelProperties: { - origin: { - readOnly: true, - serializedName: "origin", - type: { - name: "String" - } - }, - name: { - readOnly: true, - serializedName: "name", - type: { - name: "String" - } - }, - operation: { - readOnly: true, - serializedName: "display.operation", - type: { - name: "String" - } - }, - resource: { - readOnly: true, - serializedName: "display.resource", - type: { - name: "String" - } - }, - description: { - readOnly: true, - serializedName: "display.description", - type: { - name: "String" - } - }, - provider: { - readOnly: true, - serializedName: "display.provider", - type: { - name: "String" - } - } - } - } -}; - -export const OperationValueDisplayModel: msRest.CompositeMapper = { - serializedName: "OperationValueDisplay", - type: { - name: "Composite", - className: "OperationValueDisplayModel", - modelProperties: { - operation: { - readOnly: true, - serializedName: "operation", - type: { - name: "String" - } - }, - resource: { - readOnly: true, - serializedName: "resource", - type: { - name: "String" - } - }, - description: { - readOnly: true, - serializedName: "description", - type: { - name: "String" - } - }, - provider: { - readOnly: true, - serializedName: "provider", - type: { - name: "String" - } - } - } - } -}; - -export const OSProfile: msRest.CompositeMapper = { - serializedName: "OSProfile", - type: { - name: "Composite", - className: "OSProfile", - modelProperties: { - computerName: { - readOnly: true, - serializedName: "computerName", - type: { - name: "String" - } - } - } - } -}; - -export const LocationData: msRest.CompositeMapper = { - serializedName: "locationData", +export const ErrorResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LocationData", + className: "ErrorResponse", modelProperties: { - name: { - required: true, - serializedName: "name", - constraints: { - MaxLength: 256 - }, - type: { - name: "String" - } - }, - city: { - serializedName: "city", - type: { - name: "String" - } - }, - district: { - serializedName: "district", - type: { - name: "String" - } - }, - countryOrRegion: { - serializedName: "countryOrRegion", + error: { + serializedName: "error", type: { - name: "String" + name: "Composite", + className: "ErrorDetail" } } } } }; -export const MachinePropertiesOsProfile: msRest.CompositeMapper = { - serializedName: "MachineProperties_osProfile", - type: { - name: "Composite", - className: "MachinePropertiesOsProfile", - modelProperties: { - ...OSProfile.type.modelProperties - } - } -}; - -export const ErrorDetail: msRest.CompositeMapper = { - serializedName: "ErrorDetail", +export const ErrorDetail: coreClient.CompositeMapper = { type: { name: "Composite", className: "ErrorDetail", modelProperties: { code: { - required: true, serializedName: "code", + readOnly: true, type: { name: "String" } }, message: { - required: true, serializedName: "message", + readOnly: true, type: { name: "String" } }, target: { serializedName: "target", + readOnly: true, type: { name: "String" } }, details: { serializedName: "details", + readOnly: true, type: { name: "Sequence", element: { @@ -205,96 +62,49 @@ export const ErrorDetail: msRest.CompositeMapper = { } } } - } - } - } -}; - -export const MachineExtensionInstanceViewStatus: msRest.CompositeMapper = { - serializedName: "MachineExtensionInstanceView_status", - type: { - name: "Composite", - className: "MachineExtensionInstanceViewStatus", - modelProperties: { - code: { - readOnly: true, - serializedName: "code", - type: { - name: "String" - } - }, - level: { - readOnly: true, - serializedName: "level", - type: { - name: "String" - } - }, - displayStatus: { - readOnly: true, - serializedName: "displayStatus", - type: { - name: "String" - } - }, - message: { - readOnly: true, - serializedName: "message", - type: { - name: "String" - } }, - time: { + additionalInfo: { + serializedName: "additionalInfo", readOnly: true, - serializedName: "time", type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } } } } } }; -export const MachineExtensionInstanceView: msRest.CompositeMapper = { - serializedName: "MachineExtensionInstanceView", +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtensionInstanceView", + className: "ErrorAdditionalInfo", modelProperties: { - name: { - readOnly: true, - serializedName: "name", - type: { - name: "String" - } - }, type: { - readOnly: true, serializedName: "type", - type: { - name: "String" - } - }, - typeHandlerVersion: { readOnly: true, - serializedName: "typeHandlerVersion", type: { name: "String" } }, - status: { - serializedName: "status", + info: { + serializedName: "info", + readOnly: true, type: { - name: "Composite", - className: "MachineExtensionInstanceViewStatus" + name: "Dictionary", + value: { type: { name: "any" } } } } } } }; -export const MachineProperties: msRest.CompositeMapper = { - serializedName: "MachineProperties", +export const MachineProperties: coreClient.CompositeMapper = { type: { name: "Composite", className: "MachineProperties", @@ -310,33 +120,33 @@ export const MachineProperties: msRest.CompositeMapper = { serializedName: "osProfile", type: { name: "Composite", - className: "MachinePropertiesOsProfile" + className: "OSProfile" } }, provisioningState: { - readOnly: true, serializedName: "provisioningState", + readOnly: true, type: { name: "String" } }, status: { - readOnly: true, serializedName: "status", + readOnly: true, type: { name: "String" } }, lastStatusChange: { - readOnly: true, serializedName: "lastStatusChange", + readOnly: true, type: { name: "DateTime" } }, errorDetails: { - readOnly: true, serializedName: "errorDetails", + readOnly: true, type: { name: "Sequence", element: { @@ -348,8 +158,8 @@ export const MachineProperties: msRest.CompositeMapper = { } }, agentVersion: { - readOnly: true, serializedName: "agentVersion", + readOnly: true, type: { name: "String" } @@ -361,15 +171,15 @@ export const MachineProperties: msRest.CompositeMapper = { } }, displayName: { - readOnly: true, serializedName: "displayName", + readOnly: true, type: { name: "String" } }, machineFqdn: { - readOnly: true, serializedName: "machineFqdn", + readOnly: true, type: { name: "String" } @@ -381,28 +191,33 @@ export const MachineProperties: msRest.CompositeMapper = { } }, osName: { - readOnly: true, serializedName: "osName", + readOnly: true, type: { name: "String" } }, osVersion: { - readOnly: true, serializedName: "osVersion", + readOnly: true, + type: { + name: "String" + } + }, + osType: { + serializedName: "osType", type: { name: "String" } }, vmUuid: { - readOnly: true, serializedName: "vmUuid", + readOnly: true, type: { name: "String" } }, extensions: { - readOnly: true, serializedName: "extensions", type: { name: "Sequence", @@ -415,147 +230,152 @@ export const MachineProperties: msRest.CompositeMapper = { } }, osSku: { - readOnly: true, serializedName: "osSku", + readOnly: true, type: { name: "String" } }, domainName: { - readOnly: true, serializedName: "domainName", + readOnly: true, type: { name: "String" } }, adFqdn: { - readOnly: true, serializedName: "adFqdn", + readOnly: true, type: { name: "String" } }, dnsFqdn: { - readOnly: true, serializedName: "dnsFqdn", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const MachineUpdateProperties: msRest.CompositeMapper = { - serializedName: "MachineUpdateProperties", - type: { - name: "Composite", - className: "MachineUpdateProperties", - modelProperties: { - locationData: { - serializedName: "locationData", + }, + privateLinkScopeResourceId: { + serializedName: "privateLinkScopeResourceId", type: { - name: "Composite", - className: "LocationData" + name: "String" } - } - } - } -}; - -export const Identity: msRest.CompositeMapper = { - serializedName: "Identity", - type: { - name: "Composite", - className: "Identity", - modelProperties: { - type: { - serializedName: "type", + }, + parentClusterResourceId: { + serializedName: "parentClusterResourceId", type: { name: "String" } }, - principalId: { - readOnly: true, - serializedName: "principalId", + mssqlDiscovered: { + serializedName: "mssqlDiscovered", type: { name: "String" } }, - tenantId: { + detectedProperties: { + serializedName: "detectedProperties", readOnly: true, - serializedName: "tenantId", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } } } } }; -export const MachineIdentity: msRest.CompositeMapper = { - serializedName: "Machine_identity", +export const LocationData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineIdentity", + className: "LocationData", modelProperties: { - ...Identity.type.modelProperties + name: { + constraints: { + MaxLength: 256 + }, + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + city: { + serializedName: "city", + type: { + name: "String" + } + }, + district: { + serializedName: "district", + type: { + name: "String" + } + }, + countryOrRegion: { + serializedName: "countryOrRegion", + type: { + name: "String" + } + } } } }; -export const Resource: msRest.CompositeMapper = { - serializedName: "Resource", +export const OSProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Resource", + className: "OSProfile", modelProperties: { - id: { + computerName: { + serializedName: "computerName", readOnly: true, - serializedName: "id", type: { name: "String" } }, - name: { - readOnly: true, - serializedName: "name", + windowsConfiguration: { + serializedName: "windowsConfiguration", type: { - name: "String" + name: "Composite", + className: "OSProfileWindowsConfiguration" } }, - type: { - readOnly: true, - serializedName: "type", + linuxConfiguration: { + serializedName: "linuxConfiguration", type: { - name: "String" + name: "Composite", + className: "OSProfileLinuxConfiguration" } } } } }; -export const TrackedResource: msRest.CompositeMapper = { - serializedName: "TrackedResource", +export const OSProfileWindowsConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TrackedResource", + className: "OSProfileWindowsConfiguration", modelProperties: { - ...Resource.type.modelProperties, - tags: { - serializedName: "tags", + assessmentMode: { + serializedName: "patchSettings.assessmentMode", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "String" } - }, - location: { - required: true, - serializedName: "location", + } + } + } +}; + +export const OSProfileLinuxConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OSProfileLinuxConfiguration", + modelProperties: { + assessmentMode: { + serializedName: "patchSettings.assessmentMode", type: { name: "String" } @@ -564,514 +384,490 @@ export const TrackedResource: msRest.CompositeMapper = { } }; -export const Machine: msRest.CompositeMapper = { - serializedName: "Machine", +export const MachineExtensionInstanceView: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Machine", + className: "MachineExtensionInstanceView", modelProperties: { - ...TrackedResource.type.modelProperties, - locationData: { - serializedName: "properties.locationData", + name: { + serializedName: "name", type: { - name: "Composite", - className: "LocationData" + name: "String" } }, - osProfile: { - serializedName: "properties.osProfile", + type: { + serializedName: "type", type: { - name: "Composite", - className: "MachinePropertiesOsProfile" + name: "String" } }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + typeHandlerVersion: { + serializedName: "typeHandlerVersion", type: { name: "String" } }, status: { - readOnly: true, - serializedName: "properties.status", + serializedName: "status", type: { - name: "String" + name: "Composite", + className: "MachineExtensionInstanceViewStatus" } - }, - lastStatusChange: { - readOnly: true, - serializedName: "properties.lastStatusChange", + } + } + } +}; + +export const MachineExtensionInstanceViewStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineExtensionInstanceViewStatus", + modelProperties: { + code: { + serializedName: "code", type: { - name: "DateTime" + name: "String" } }, - errorDetails: { - readOnly: true, - serializedName: "properties.errorDetails", + level: { + serializedName: "level", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorDetail" - } - } + name: "String" } }, - agentVersion: { - readOnly: true, - serializedName: "properties.agentVersion", + displayStatus: { + serializedName: "displayStatus", type: { name: "String" } }, - vmId: { - serializedName: "properties.vmId", + message: { + serializedName: "message", type: { name: "String" } }, - displayName: { - readOnly: true, - serializedName: "properties.displayName", + time: { + serializedName: "time", type: { - name: "String" + name: "DateTime" } - }, - machineFqdn: { + } + } + } +}; + +export const Identity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Identity", + modelProperties: { + principalId: { + serializedName: "principalId", readOnly: true, - serializedName: "properties.machineFqdn", type: { name: "String" } }, - clientPublicKey: { - serializedName: "properties.clientPublicKey", + tenantId: { + serializedName: "tenantId", + readOnly: true, type: { name: "String" } }, - osName: { - readOnly: true, - serializedName: "properties.osName", + type: { + defaultValue: "SystemAssigned", + isConstant: true, + serializedName: "type", type: { name: "String" } - }, - osVersion: { - readOnly: true, - serializedName: "properties.osVersion", + } + } + } +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", type: { name: "String" } }, - vmUuid: { - readOnly: true, - serializedName: "properties.vmUuid", + createdByType: { + serializedName: "createdByType", type: { name: "String" } }, - extensions: { - readOnly: true, - serializedName: "properties.extensions", + createdAt: { + serializedName: "createdAt", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MachineExtensionInstanceView" - } - } + name: "DateTime" } }, - osSku: { - readOnly: true, - serializedName: "properties.osSku", + lastModifiedBy: { + serializedName: "lastModifiedBy", type: { name: "String" } }, - domainName: { - readOnly: true, - serializedName: "properties.domainName", + lastModifiedByType: { + serializedName: "lastModifiedByType", type: { name: "String" } }, - adFqdn: { + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + +export const Resource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", readOnly: true, - serializedName: "properties.adFqdn", type: { name: "String" } }, - dnsFqdn: { + name: { + serializedName: "name", readOnly: true, - serializedName: "properties.dnsFqdn", type: { name: "String" } }, - identity: { - serializedName: "identity", + type: { + serializedName: "type", + readOnly: true, type: { - name: "Composite", - className: "MachineIdentity" + name: "String" } } } } }; -export const UpdateResource: msRest.CompositeMapper = { - serializedName: "UpdateResource", +export const MachineListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UpdateResource", + className: "MachineListResult", modelProperties: { - tags: { - serializedName: "tags", + value: { + serializedName: "value", + required: true, type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { - name: "String" + name: "Composite", + className: "Machine" } } } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } } } } }; -export const MachineUpdate: msRest.CompositeMapper = { - serializedName: "MachineUpdate", +export const MachineExtensionProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineUpdate", + className: "MachineExtensionProperties", modelProperties: { - ...UpdateResource.type.modelProperties, - type: { - serializedName: "identity.type", + forceUpdateTag: { + serializedName: "forceUpdateTag", type: { name: "String" } }, - principalId: { - readOnly: true, - serializedName: "identity.principalId", + publisher: { + serializedName: "publisher", type: { name: "String" } }, - tenantId: { - readOnly: true, - serializedName: "identity.tenantId", + type: { + serializedName: "type", type: { name: "String" } }, - locationData: { - serializedName: "properties.locationData", - type: { - name: "Composite", - className: "LocationData" - } - } - } - } -}; - -export const ErrorResponse: msRest.CompositeMapper = { - serializedName: "ErrorResponse", - type: { - name: "Composite", - className: "ErrorResponse", - modelProperties: { - error: { - required: true, - serializedName: "error", - type: { - name: "Composite", - className: "ErrorDetail" - } - } - } - } -}; - -export const MachineExtension: msRest.CompositeMapper = { - serializedName: "MachineExtension", - type: { - name: "Composite", - className: "MachineExtension", - modelProperties: { - ...TrackedResource.type.modelProperties, - forceUpdateTag: { - serializedName: "properties.forceUpdateTag", - type: { - name: "String" - } - }, - publisher: { - serializedName: "properties.publisher", - type: { - name: "String" - } - }, - machineExtensionType: { - serializedName: "properties.type", - type: { - name: "String" - } - }, - typeHandlerVersion: { - serializedName: "properties.typeHandlerVersion", + typeHandlerVersion: { + serializedName: "typeHandlerVersion", type: { name: "String" } }, autoUpgradeMinorVersion: { - serializedName: "properties.autoUpgradeMinorVersion", + serializedName: "autoUpgradeMinorVersion", type: { name: "Boolean" } }, settings: { - serializedName: "properties.settings", + serializedName: "settings", type: { - name: "Object" + name: "Dictionary", + value: { type: { name: "any" } } } }, protectedSettings: { - serializedName: "properties.protectedSettings", + serializedName: "protectedSettings", type: { - name: "Object" + name: "Dictionary", + value: { type: { name: "any" } } } }, provisioningState: { + serializedName: "provisioningState", readOnly: true, - serializedName: "properties.provisioningState", type: { name: "String" } }, instanceView: { - serializedName: "properties.instanceView", + serializedName: "instanceView", type: { name: "Composite", - className: "MachineExtensionPropertiesInstanceView" + className: "MachineExtensionInstanceView" } } } } }; -export const MachineExtensionUpdate: msRest.CompositeMapper = { - serializedName: "MachineExtensionUpdate", +export const MachineExtensionUpdateProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtensionUpdate", + className: "MachineExtensionUpdateProperties", modelProperties: { - ...UpdateResource.type.modelProperties, forceUpdateTag: { - serializedName: "properties.forceUpdateTag", + serializedName: "forceUpdateTag", type: { name: "String" } }, publisher: { - serializedName: "properties.publisher", + serializedName: "publisher", type: { name: "String" } }, type: { - serializedName: "properties.type", + serializedName: "type", type: { name: "String" } }, typeHandlerVersion: { - serializedName: "properties.typeHandlerVersion", + serializedName: "typeHandlerVersion", type: { name: "String" } }, autoUpgradeMinorVersion: { - serializedName: "properties.autoUpgradeMinorVersion", + serializedName: "autoUpgradeMinorVersion", type: { name: "Boolean" } }, settings: { - serializedName: "properties.settings", + serializedName: "settings", type: { - name: "Object" + name: "Dictionary", + value: { type: { name: "any" } } } }, protectedSettings: { - serializedName: "properties.protectedSettings", + serializedName: "protectedSettings", type: { - name: "Object" + name: "Dictionary", + value: { type: { name: "any" } } } } } } }; -export const MachineExtensionPropertiesInstanceView: msRest.CompositeMapper = { - serializedName: "MachineExtensionProperties_instanceView", +export const ResourceUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtensionPropertiesInstanceView", + className: "ResourceUpdate", modelProperties: { - ...MachineExtensionInstanceView.type.modelProperties + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } } } }; -export const MachineExtensionPropertiesModel: msRest.CompositeMapper = { - serializedName: "MachineExtensionProperties", +export const MachineExtensionsListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtensionPropertiesModel", + className: "MachineExtensionsListResult", modelProperties: { - forceUpdateTag: { - serializedName: "forceUpdateTag", + value: { + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MachineExtension" + } + } } }, - publisher: { - serializedName: "publisher", + nextLink: { + serializedName: "nextLink", type: { name: "String" } - }, - type: { - serializedName: "type", + } + } + } +}; + +export const MachineExtensionUpgrade: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineExtensionUpgrade", + modelProperties: { + extensionTargets: { + serializedName: "extensionTargets", type: { - name: "String" + name: "Dictionary", + value: { + type: { name: "Composite", className: "ExtensionTargetProperties" } + } } - }, - typeHandlerVersion: { - serializedName: "typeHandlerVersion", + } + } + } +}; + +export const ExtensionTargetProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExtensionTargetProperties", + modelProperties: { + targetVersion: { + serializedName: "targetVersion", type: { name: "String" } - }, - autoUpgradeMinorVersion: { - serializedName: "autoUpgradeMinorVersion", - type: { - name: "Boolean" - } - }, - settings: { - serializedName: "settings", + } + } + } +}; + +export const OperationListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, type: { - name: "Object" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationValue" + } + } } - }, - protectedSettings: { - serializedName: "protectedSettings", + } + } + } +}; + +export const OperationValue: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationValue", + modelProperties: { + origin: { + serializedName: "origin", + readOnly: true, type: { - name: "Object" + name: "String" } }, - provisioningState: { + name: { + serializedName: "name", readOnly: true, - serializedName: "provisioningState", type: { name: "String" } }, - instanceView: { - serializedName: "instanceView", + display: { + serializedName: "display", type: { name: "Composite", - className: "MachineExtensionPropertiesInstanceView" + className: "OperationValueDisplay" } } } } }; -export const MachineExtensionUpdatePropertiesModel: msRest.CompositeMapper = { - serializedName: "MachineExtensionUpdateProperties", +export const OperationValueDisplay: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtensionUpdatePropertiesModel", + className: "OperationValueDisplay", modelProperties: { - forceUpdateTag: { - serializedName: "forceUpdateTag", - type: { - name: "String" - } - }, - publisher: { - serializedName: "publisher", + operation: { + serializedName: "operation", + readOnly: true, type: { name: "String" } }, - type: { - serializedName: "type", + resource: { + serializedName: "resource", + readOnly: true, type: { name: "String" } }, - typeHandlerVersion: { - serializedName: "typeHandlerVersion", + description: { + serializedName: "description", + readOnly: true, type: { name: "String" } }, - autoUpgradeMinorVersion: { - serializedName: "autoUpgradeMinorVersion", - type: { - name: "Boolean" - } - }, - settings: { - serializedName: "settings", - type: { - name: "Object" - } - }, - protectedSettings: { - serializedName: "protectedSettings", - type: { - name: "Object" - } - } - } - } -}; - -export const ProxyResource: msRest.CompositeMapper = { - serializedName: "ProxyResource", - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - ...Resource.type.modelProperties - } - } -}; - -export const AzureEntityResource: msRest.CompositeMapper = { - serializedName: "AzureEntityResource", - type: { - name: "Composite", - className: "AzureEntityResource", - modelProperties: { - ...Resource.type.modelProperties, - etag: { + provider: { + serializedName: "provider", readOnly: true, - serializedName: "etag", type: { name: "String" } @@ -1080,21 +876,20 @@ export const AzureEntityResource: msRest.CompositeMapper = { } }; -export const MachineListResult: msRest.CompositeMapper = { - serializedName: "MachineListResult", +export const HybridComputePrivateLinkScopeListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineListResult", + className: "HybridComputePrivateLinkScopeListResult", modelProperties: { value: { + serializedName: "value", required: true, - serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Machine" + className: "HybridComputePrivateLinkScope" } } } @@ -1109,51 +904,629 @@ export const MachineListResult: msRest.CompositeMapper = { } }; -export const MachineExtensionsListResult: msRest.CompositeMapper = { - serializedName: "MachineExtensionsListResult", +export const HybridComputePrivateLinkScopeProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MachineExtensionsListResult", + className: "HybridComputePrivateLinkScopeProperties", modelProperties: { - value: { - serializedName: "", + publicNetworkAccess: { + defaultValue: "Disabled", + serializedName: "publicNetworkAccess", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + privateLinkScopeId: { + serializedName: "privateLinkScopeId", + readOnly: true, + type: { + name: "String" + } + }, + privateEndpointConnections: { + serializedName: "privateEndpointConnections", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "MachineExtension" + className: "PrivateEndpointConnectionDataModel" } } } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } } } } }; -export const OperationListResult: msRest.CompositeMapper = { - serializedName: "OperationListResult", +export const PrivateEndpointConnectionDataModel: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationListResult", + className: "PrivateEndpointConnectionDataModel", modelProperties: { - value: { + id: { + serializedName: "id", readOnly: true, - serializedName: "", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OperationValue" - } - } + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "PrivateEndpointConnectionProperties" + } + } + } + } +}; + +export const PrivateEndpointConnectionProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnectionProperties", + modelProperties: { + privateEndpoint: { + serializedName: "privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpointProperty" + } + }, + privateLinkServiceConnectionState: { + serializedName: "privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionStateProperty" + } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointProperty: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointProperty", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkServiceConnectionStateProperty: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionStateProperty", + modelProperties: { + status: { + serializedName: "status", + required: true, + type: { + name: "String" + } + }, + description: { + serializedName: "description", + required: true, + type: { + name: "String" + } + }, + actionsRequired: { + serializedName: "actionsRequired", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkScopesResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkScopesResource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + 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" } } + } + } + } + } +}; + +export const TagsResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TagsResource", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkResourceListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkResourceProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkResourceProperties", + modelProperties: { + groupId: { + serializedName: "groupId", + readOnly: true, + type: { + name: "String" + } + }, + requiredMembers: { + serializedName: "requiredMembers", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredZoneNames: { + serializedName: "requiredZoneNames", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnectionListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkScopeValidationDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkScopeValidationDetails", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + publicNetworkAccess: { + defaultValue: "Disabled", + serializedName: "publicNetworkAccess", + type: { + name: "String" + } + }, + connectionDetails: { + serializedName: "connectionDetails", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectionDetail" + } + } + } + } + } + } +}; + +export const ConnectionDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectionDetail", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + privateIpAddress: { + serializedName: "privateIpAddress", + readOnly: true, + type: { + name: "String" + } + }, + linkIdentifier: { + serializedName: "linkIdentifier", + readOnly: true, + type: { + name: "String" + } + }, + groupId: { + serializedName: "groupId", + readOnly: true, + type: { + name: "String" + } + }, + memberName: { + serializedName: "memberName", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const MachineUpdateProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineUpdateProperties", + modelProperties: { + locationData: { + serializedName: "locationData", + type: { + name: "Composite", + className: "LocationData" + } + }, + osProfile: { + serializedName: "osProfile", + type: { + name: "Composite", + className: "OSProfile" + } + }, + parentClusterResourceId: { + serializedName: "parentClusterResourceId", + type: { + name: "String" + } + }, + privateLinkScopeResourceId: { + serializedName: "privateLinkScopeResourceId", + 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 MachineExtensionUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineExtensionUpdate", + modelProperties: { + ...ResourceUpdate.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "MachineExtensionUpdateProperties" + } + } + } + } +}; + +export const MachineUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineUpdate", + modelProperties: { + ...ResourceUpdate.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "Identity" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "MachineUpdateProperties" + } + } + } + } +}; + +export const HybridComputePrivateLinkScope: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HybridComputePrivateLinkScope", + modelProperties: { + ...PrivateLinkScopesResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "HybridComputePrivateLinkScopeProperties" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const Machine: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Machine", + modelProperties: { + ...TrackedResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "MachineProperties" + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "Identity" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const MachineExtension: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineExtension", + modelProperties: { + ...TrackedResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "MachineExtensionProperties" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const PrivateLinkResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "PrivateLinkResourceProperties" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const PrivateEndpointConnection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "PrivateEndpointConnectionProperties" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" } } } diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/operationsMappers.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/operationsMappers.ts deleted file mode 100644 index 17e27c67ba9f..000000000000 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/operationsMappers.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - ErrorDetail, - ErrorResponse, - OperationListResult, - OperationValue -} from "../models/mappers"; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts index 8d12a0909808..3e589fbc8dbd 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts @@ -1,95 +1,254 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import { + OperationParameter, + OperationURLParameter, + OperationQueryParameter +} from "@azure/core-client"; +import { + MachineExtension as MachineExtensionMapper, + MachineExtensionUpdate as MachineExtensionUpdateMapper, + MachineExtensionUpgrade as MachineExtensionUpgradeMapper, + HybridComputePrivateLinkScope as HybridComputePrivateLinkScopeMapper, + TagsResource as TagsResourceMapper, + PrivateEndpointConnection as PrivateEndpointConnectionMapper +} from "../models/mappers"; -export const acceptLanguage: msRest.OperationParameter = { - parameterPath: "acceptLanguage", +export const accept: OperationParameter = { + parameterPath: "accept", mapper: { - serializedName: "accept-language", - defaultValue: 'en-US', + defaultValue: "application/json", + isConstant: true, + serializedName: "Accept", type: { name: "String" } } }; -export const apiVersion: msRest.OperationQueryParameter = { - parameterPath: "apiVersion", + +export const $host: OperationURLParameter = { + parameterPath: "$host", mapper: { + serializedName: "$host", required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2021-06-10-preview", + isConstant: true, serializedName: "api-version", type: { name: "String" } } }; -export const expand: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "expand" - ], + +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", mapper: { - serializedName: "$expand", + constraints: { + MinLength: 1 + }, + serializedName: "subscriptionId", + required: true, type: { name: "String" } } }; -export const extensionName: msRest.OperationURLParameter = { - parameterPath: "extensionName", + +export const resourceGroupName: OperationURLParameter = { + parameterPath: "resourceGroupName", mapper: { + constraints: { + MaxLength: 90, + MinLength: 1 + }, + serializedName: "resourceGroupName", required: true, - serializedName: "extensionName", type: { name: "String" } } }; -export const name: msRest.OperationURLParameter = { - parameterPath: "name", + +export const machineName: OperationURLParameter = { + parameterPath: "machineName", mapper: { + serializedName: "machineName", required: true, - serializedName: "name", type: { name: "String" } } }; -export const nextPageLink: msRest.OperationURLParameter = { - parameterPath: "nextPageLink", + +export const expand: OperationQueryParameter = { + parameterPath: ["options", "expand"], + mapper: { + serializedName: "$expand", + type: { + name: "String" + } + } +}; + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", mapper: { - required: true, serializedName: "nextLink", + required: true, type: { name: "String" } }, skipEncoding: true }; -export const resourceGroupName: msRest.OperationURLParameter = { - parameterPath: "resourceGroupName", + +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", + type: { + name: "String" + } + } +}; + +export const extensionParameters: OperationParameter = { + parameterPath: "extensionParameters", + mapper: MachineExtensionMapper +}; + +export const extensionName: OperationURLParameter = { + parameterPath: "extensionName", + mapper: { + serializedName: "extensionName", required: true, - serializedName: "resourceGroupName", type: { name: "String" } } }; -export const subscriptionId: msRest.OperationURLParameter = { - parameterPath: "subscriptionId", + +export const extensionParameters1: OperationParameter = { + parameterPath: "extensionParameters", + mapper: MachineExtensionUpdateMapper +}; + +export const expand1: OperationQueryParameter = { + parameterPath: ["options", "expand"], + mapper: { + serializedName: "$expand", + type: { + name: "String" + } + } +}; + +export const extensionUpgradeParameters: OperationParameter = { + parameterPath: "extensionUpgradeParameters", + mapper: MachineExtensionUpgradeMapper +}; + +export const scopeName: OperationURLParameter = { + parameterPath: "scopeName", mapper: { + serializedName: "scopeName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters: OperationParameter = { + parameterPath: "parameters", + mapper: HybridComputePrivateLinkScopeMapper +}; + +export const privateLinkScopeTags: OperationParameter = { + parameterPath: "privateLinkScopeTags", + mapper: TagsResourceMapper +}; + +export const location: OperationURLParameter = { + parameterPath: "location", + mapper: { + constraints: { + MinLength: 1 + }, + serializedName: "location", + required: true, + type: { + name: "String" + } + } +}; + +export const privateLinkScopeId: OperationURLParameter = { + parameterPath: "privateLinkScopeId", + mapper: { + serializedName: "privateLinkScopeId", + required: true, + type: { + name: "String" + } + } +}; + +export const machineName1: OperationURLParameter = { + parameterPath: "machineName", + mapper: { + constraints: { + MinLength: 1 + }, + serializedName: "machineName", required: true, - serializedName: "subscriptionId", type: { name: "String" } } }; + +export const groupName: OperationURLParameter = { + parameterPath: "groupName", + mapper: { + serializedName: "groupName", + required: true, + type: { + name: "String" + } + } +}; + +export const privateEndpointConnectionName: OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", + mapper: { + serializedName: "privateEndpointConnectionName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters1: OperationParameter = { + parameterPath: "parameters", + mapper: PrivateEndpointConnectionMapper +}; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts index 35660def86a6..f8024e8bc5a1 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts @@ -1,13 +1,14 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export * from "./machines"; export * from "./machineExtensions"; export * from "./operations"; +export * from "./privateLinkScopes"; +export * from "./privateLinkResources"; +export * from "./privateEndpointConnections"; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts index af98d27e6aa0..e129c90144d5 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts @@ -1,399 +1,608 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/machineExtensionsMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { MachineExtensions } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { HybridComputeManagementClientContext } from "../hybridComputeManagementClientContext"; +import { HybridComputeManagementClient } from "../hybridComputeManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + MachineExtension, + MachineExtensionsListNextOptionalParams, + MachineExtensionsListOptionalParams, + MachineExtensionsCreateOrUpdateOptionalParams, + MachineExtensionsCreateOrUpdateResponse, + MachineExtensionUpdate, + MachineExtensionsUpdateOptionalParams, + MachineExtensionsUpdateResponse, + MachineExtensionsDeleteOptionalParams, + MachineExtensionsGetOptionalParams, + MachineExtensionsGetResponse, + MachineExtensionsListResponse, + MachineExtensionsListNextResponse +} from "../models"; -/** Class representing a MachineExtensions. */ -export class MachineExtensions { - private readonly client: HybridComputeManagementClientContext; +/// +/** Class containing MachineExtensions operations. */ +export class MachineExtensionsImpl implements MachineExtensions { + private readonly client: HybridComputeManagementClient; /** - * Create a MachineExtensions. - * @param {HybridComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class MachineExtensions class. + * @param client Reference to the service client */ - constructor(client: HybridComputeManagementClientContext) { + constructor(client: HybridComputeManagementClient) { this.client = client; } /** - * The operation to create or update the extension. - * @param resourceGroupName The name of the resource group. - * @param name The name of the machine where the extension should be created or updated. - * @param extensionName The name of the machine extension. - * @param extensionParameters Parameters supplied to the Create Machine Extension operation. - * @param [options] The optional parameters - * @returns Promise + * The operation to get all extensions of a non-Azure machine + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine containing the extension. + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, name: string, extensionName: string, extensionParameters: Models.MachineExtension, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(resourceGroupName,name,extensionName,extensionParameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + public list( + resourceGroupName: string, + machineName: string, + options?: MachineExtensionsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, machineName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, machineName, options); + } + }; } - /** - * The operation to create or update the extension. - * @param resourceGroupName The name of the resource group. - * @param name The name of the machine where the extension should be created or updated. - * @param extensionName The name of the machine extension. - * @param extensionParameters Parameters supplied to the Create Machine Extension operation. - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, name: string, extensionName: string, extensionParameters: Models.MachineExtensionUpdate, options?: msRest.RequestOptionsBase): Promise { - return this.beginUpdate(resourceGroupName,name,extensionName,extensionParameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + private async *listPagingPage( + resourceGroupName: string, + machineName: string, + options?: MachineExtensionsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, machineName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + machineName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } } - /** - * The operation to delete the extension. - * @param resourceGroupName The name of the resource group. - * @param name The name of the machine where the extension should be deleted. - * @param extensionName The name of the machine extension. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, name: string, extensionName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,name,extensionName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + private async *listPagingAll( + resourceGroupName: string, + machineName: string, + options?: MachineExtensionsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + machineName, + options + )) { + yield* page; + } } /** - * The operation to get the extension. - * @param resourceGroupName The name of the resource group. - * @param name The name of the machine containing the extension. - * @param extensionName The name of the machine extension. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, name: string, extensionName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param name The name of the machine containing the extension. - * @param extensionName The name of the machine extension. - * @param callback The callback - */ - get(resourceGroupName: string, name: string, extensionName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param name The name of the machine containing the extension. + * The operation to create or update the extension. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. - * @param options The optional parameters - * @param callback The callback + * @param extensionParameters Parameters supplied to the Create Machine Extension operation. + * @param options The options parameters. */ - get(resourceGroupName: string, name: string, extensionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, name: string, extensionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + async beginCreateOrUpdate( + resourceGroupName: string, + machineName: string, + extensionName: string, + extensionParameters: MachineExtension, + options?: MachineExtensionsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + MachineExtensionsCreateOrUpdateResponse + > + > { + 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, - name, + machineName, extensionName, + extensionParameters, options }, - getOperationSpec, - callback) as Promise; + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** - * The operation to get all extensions of a non-Azure machine - * @param resourceGroupName The name of the resource group. - * @param name The name of the machine containing the extension. - * @param [options] The optional parameters - * @returns Promise - */ - list(resourceGroupName: string, name: string, options?: Models.MachineExtensionsListOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param name The name of the machine containing the extension. - * @param callback The callback - */ - list(resourceGroupName: string, name: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param name The name of the machine containing the extension. - * @param options The optional parameters - * @param callback The callback + * The operation to create or update the extension. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine where the extension should be created or updated. + * @param extensionName The name of the machine extension. + * @param extensionParameters Parameters supplied to the Create Machine Extension operation. + * @param options The options parameters. */ - list(resourceGroupName: string, name: string, options: Models.MachineExtensionsListOptionalParams, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, name: string, options?: Models.MachineExtensionsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - name, - options - }, - listOperationSpec, - callback) as Promise; + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + machineName: string, + extensionName: string, + extensionParameters: MachineExtension, + options?: MachineExtensionsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + machineName, + extensionName, + extensionParameters, + options + ); + return poller.pollUntilDone(); } /** * The operation to create or update the extension. - * @param resourceGroupName The name of the resource group. - * @param name The name of the machine where the extension should be created or updated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginCreateOrUpdate(resourceGroupName: string, name: string, extensionName: string, extensionParameters: Models.MachineExtension, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( + async beginUpdate( + resourceGroupName: string, + machineName: string, + extensionName: string, + extensionParameters: MachineExtensionUpdate, + options?: MachineExtensionsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + MachineExtensionsUpdateResponse + > + > { + 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, - name, + machineName, extensionName, extensionParameters, options }, - beginCreateOrUpdateOperationSpec, - options); + updateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** * The operation to create or update the extension. - * @param resourceGroupName The name of the resource group. - * @param name The name of the machine where the extension should be created or updated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginUpdate(resourceGroupName: string, name: string, extensionName: string, extensionParameters: Models.MachineExtensionUpdate, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - name, - extensionName, - extensionParameters, - options - }, - beginUpdateOperationSpec, - options); + async beginUpdateAndWait( + resourceGroupName: string, + machineName: string, + extensionName: string, + extensionParameters: MachineExtensionUpdate, + options?: MachineExtensionsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + machineName, + extensionName, + extensionParameters, + options + ); + return poller.pollUntilDone(); } /** * The operation to delete the extension. - * @param resourceGroupName The name of the resource group. - * @param name The name of the machine where the extension should be deleted. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteMethod(resourceGroupName: string, name: string, extensionName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - name, - extensionName, - options - }, - beginDeleteMethodOperationSpec, - options); + async beginDelete( + resourceGroupName: string, + machineName: string, + extensionName: string, + options?: MachineExtensionsDeleteOptionalParams + ): 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, machineName, extensionName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** - * The operation to get all extensions of a non-Azure machine - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise + * The operation to delete the extension. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine where the extension should be deleted. + * @param extensionName The name of the machine extension. + * @param options The options parameters. */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + async beginDeleteAndWait( + resourceGroupName: string, + machineName: string, + extensionName: string, + options?: MachineExtensionsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + machineName, + extensionName, + options + ); + return poller.pollUntilDone(); + } + /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback + * The operation to get the extension. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine containing the extension. + * @param extensionName The name of the machine extension. + * @param options The options parameters. */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + get( + resourceGroupName: string, + machineName: string, + extensionName: string, + options?: MachineExtensionsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, machineName, extensionName, options }, + getOperationSpec + ); + } + /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * The operation to get all extensions of a non-Azure machine + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine containing the extension. + * @param options The options parameters. */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _list( + resourceGroupName: string, + machineName: string, + options?: MachineExtensionsListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; + { resourceGroupName, machineName, options }, + listOperationSpec + ); } -} + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine containing the extension. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + machineName: string, + nextLink: string, + options?: MachineExtensionsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, machineName, nextLink, options }, + listNextOperationSpec + ); + } +} // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/extensions/{extensionName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.name, - Parameters.extensionName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.MachineExtension }, + 201: { + bodyMapper: Mappers.MachineExtension + }, + 202: { + bodyMapper: Mappers.MachineExtension + }, + 204: { + bodyMapper: Mappers.MachineExtension + }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - serializer -}; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/extensions", + requestBody: Parameters.extensionParameters, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.name, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.expand, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.machineName, + Parameters.extensionName ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}", + httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.MachineExtensionsListResult + bodyMapper: Mappers.MachineExtension + }, + 201: { + bodyMapper: Mappers.MachineExtension + }, + 202: { + bodyMapper: Mappers.MachineExtension + }, + 204: { + bodyMapper: Mappers.MachineExtension }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/extensions/{extensionName}", + requestBody: Parameters.extensionParameters1, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.name, - Parameters.extensionName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion + Parameters.machineName, + Parameters.extensionName ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "extensionParameters", - mapper: { - ...Mappers.MachineExtension, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}", + httpMethod: "DELETE", responses: { - 200: { - bodyMapper: Mappers.MachineExtension - }, + 200: {}, + 201: {}, 202: {}, + 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - serializer -}; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/extensions/{extensionName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.name, - Parameters.extensionName, - Parameters.subscriptionId + Parameters.machineName, + Parameters.extensionName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "extensionParameters", - mapper: { - ...Mappers.MachineExtensionUpdate, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.MachineExtension }, - 202: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/extensions/{extensionName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.name, - Parameters.extensionName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.machineName, + Parameters.extensionName ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions", + httpMethod: "GET", responses: { - 200: {}, - 202: {}, - 204: {}, + 200: { + bodyMapper: Mappers.MachineExtensionsListResult + }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, + queryParameters: [Parameters.apiVersion, Parameters.expand1], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.machineName + ], + headerParameters: [Parameters.accept], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.MachineExtensionsListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, + queryParameters: [Parameters.apiVersion, Parameters.expand1], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.machineName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/machines.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/machines.ts index 8d580f932635..8a3d838d5415 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/machines.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/machines.ts @@ -1,224 +1,245 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/machinesMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Machines } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { HybridComputeManagementClientContext } from "../hybridComputeManagementClientContext"; +import { HybridComputeManagementClient } from "../hybridComputeManagementClient"; +import { + Machine, + MachinesListByResourceGroupNextOptionalParams, + MachinesListByResourceGroupOptionalParams, + MachinesListBySubscriptionNextOptionalParams, + MachinesListBySubscriptionOptionalParams, + MachinesDeleteOptionalParams, + MachinesGetOptionalParams, + MachinesGetResponse, + MachinesListByResourceGroupResponse, + MachinesListBySubscriptionResponse, + MachinesListByResourceGroupNextResponse, + MachinesListBySubscriptionNextResponse +} from "../models"; -/** Class representing a Machines. */ -export class Machines { - private readonly client: HybridComputeManagementClientContext; +/// +/** Class containing Machines operations. */ +export class MachinesImpl implements Machines { + private readonly client: HybridComputeManagementClient; /** - * Create a Machines. - * @param {HybridComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Machines class. + * @param client Reference to the service client */ - constructor(client: HybridComputeManagementClientContext) { + constructor(client: HybridComputeManagementClient) { this.client = client; } /** - * The operation to remove a hybrid machine identity in Azure. - * @param resourceGroupName The name of the resource group. - * @param name The name of the hybrid machine. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param name The name of the hybrid machine. - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, name: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param name The name of the hybrid machine. - * @param options The optional parameters - * @param callback The callback + * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the + * response to get the next page of hybrid machines. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - name, - options + public listByResourceGroup( + resourceGroupName: string, + options?: MachinesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); }, - deleteMethodOperationSpec, - callback); + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; } - /** - * Retrieves information about the model view or the instance view of a hybrid machine. - * @param resourceGroupName The name of the resource group. - * @param name The name of the hybrid machine. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, name: string, options?: Models.MachinesGetOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param name The name of the hybrid machine. - * @param callback The callback - */ - get(resourceGroupName: string, name: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param name The name of the hybrid machine. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, name: string, options: Models.MachinesGetOptionalParams, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, name: string, options?: Models.MachinesGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: MachinesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( resourceGroupName, - name, + continuationToken, options - }, - getOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } } - /** - * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the - * response to get the next page of hybrid machines. - * @param resourceGroupName The name of the resource group. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupOperationSpec, - callback) as Promise; + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: MachinesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } } /** * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the * response to get the next page of hybrid machines. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listBySubscription(options?: msRest.RequestOptionsBase): Promise; + public listBySubscription( + options?: MachinesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: MachinesListBySubscriptionOptionalParams + ): AsyncIterableIterator { + let result = await this._listBySubscription(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listBySubscriptionPagingAll( + options?: MachinesListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + /** - * @param callback The callback + * The operation to remove a hybrid machine identity in Azure. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param options The options parameters. */ - listBySubscription(callback: msRest.ServiceCallback): void; + delete( + resourceGroupName: string, + machineName: string, + options?: MachinesDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, machineName, options }, + deleteOperationSpec + ); + } + /** - * @param options The optional parameters - * @param callback The callback + * Retrieves information about the model view or the instance view of a hybrid machine. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param options The options parameters. */ - listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + machineName: string, + options?: MachinesGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - options - }, - listBySubscriptionOperationSpec, - callback) as Promise; + { resourceGroupName, machineName, options }, + getOperationSpec + ); } /** * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the * response to get the next page of hybrid machines. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. */ - listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByResourceGroup( + resourceGroupName: string, + options?: MachinesListByResourceGroupOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback) as Promise; + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); } /** * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the * response to get the next page of hybrid machines. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + private _listBySubscription( + options?: MachinesListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback + * ListByResourceGroupNext + * @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. */ - listBySubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: MachinesListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. */ - listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listBySubscriptionNext( + nextLink: string, + options?: MachinesListBySubscriptionNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listBySubscriptionNextOperationSpec, - callback) as Promise; + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const deleteMethodOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}", httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.name - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: {}, 204: {}, @@ -226,24 +247,20 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.name - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.expand - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.machineName ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.Machine @@ -252,22 +269,20 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - serializer -}; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines", + queryParameters: [Parameters.apiVersion, Parameters.expand], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.machineName ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.MachineListResult @@ -276,21 +291,19 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], serializer }; - -const listBySubscriptionOperationSpec: msRest.OperationSpec = { +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/machines", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/machines", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.MachineListResult @@ -299,19 +312,14 @@ const listBySubscriptionOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], serializer }; - -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.MachineListResult @@ -320,19 +328,19 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; - -const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.MachineListResult @@ -341,5 +349,12 @@ const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/operations.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/operations.ts index 38d79ddce65b..0527fced017f 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/operations.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/operations.ts @@ -1,67 +1,88 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/operationsMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Operations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { HybridComputeManagementClientContext } from "../hybridComputeManagementClientContext"; +import { HybridComputeManagementClient } from "../hybridComputeManagementClient"; +import { + OperationValue, + OperationsListOptionalParams, + OperationsListResponse +} from "../models"; -/** Class representing a Operations. */ -export class Operations { - private readonly client: HybridComputeManagementClientContext; +/// +/** Class containing Operations operations. */ +export class OperationsImpl implements Operations { + private readonly client: HybridComputeManagementClient; /** - * Create a Operations. - * @param {HybridComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Operations class. + * @param client Reference to the service client */ - constructor(client: HybridComputeManagementClientContext) { + constructor(client: HybridComputeManagementClient) { this.client = client; } /** * Gets a list of hybrid compute operations. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; + public list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(options); + yield result.value || []; + } + + private async *listPagingAll( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + /** - * @param options The optional parameters - * @param callback The callback + * Gets a list of hybrid compute operations. + * @param options The options parameters. */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback) as Promise; + private _list( + options?: OperationsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.HybridCompute/operations", httpMethod: "GET", - path: "providers/Microsoft.HybridCompute/operations", - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.OperationListResult @@ -70,5 +91,8 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateEndpointConnections.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateEndpointConnections.ts new file mode 100644 index 000000000000..03575d3e68b9 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateEndpointConnections.ts @@ -0,0 +1,483 @@ +/* + * 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 { PrivateEndpointConnections } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { HybridComputeManagementClient } from "../hybridComputeManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + PrivateEndpointConnection, + PrivateEndpointConnectionsListByPrivateLinkScopeNextOptionalParams, + PrivateEndpointConnectionsListByPrivateLinkScopeOptionalParams, + PrivateEndpointConnectionsGetOptionalParams, + PrivateEndpointConnectionsGetResponse, + PrivateEndpointConnectionsCreateOrUpdateOptionalParams, + PrivateEndpointConnectionsCreateOrUpdateResponse, + PrivateEndpointConnectionsDeleteOptionalParams, + PrivateEndpointConnectionsListByPrivateLinkScopeResponse, + PrivateEndpointConnectionsListByPrivateLinkScopeNextResponse +} from "../models"; + +/// +/** Class containing PrivateEndpointConnections operations. */ +export class PrivateEndpointConnectionsImpl + implements PrivateEndpointConnections { + private readonly client: HybridComputeManagementClient; + + /** + * Initialize a new instance of the class PrivateEndpointConnections class. + * @param client Reference to the service client + */ + constructor(client: HybridComputeManagementClient) { + this.client = client; + } + + /** + * Gets all private endpoint connections on a private link scope. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param options The options parameters. + */ + public listByPrivateLinkScope( + resourceGroupName: string, + scopeName: string, + options?: PrivateEndpointConnectionsListByPrivateLinkScopeOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByPrivateLinkScopePagingAll( + resourceGroupName, + scopeName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByPrivateLinkScopePagingPage( + resourceGroupName, + scopeName, + options + ); + } + }; + } + + private async *listByPrivateLinkScopePagingPage( + resourceGroupName: string, + scopeName: string, + options?: PrivateEndpointConnectionsListByPrivateLinkScopeOptionalParams + ): AsyncIterableIterator { + let result = await this._listByPrivateLinkScope( + resourceGroupName, + scopeName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByPrivateLinkScopeNext( + resourceGroupName, + scopeName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByPrivateLinkScopePagingAll( + resourceGroupName: string, + scopeName: string, + options?: PrivateEndpointConnectionsListByPrivateLinkScopeOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByPrivateLinkScopePagingPage( + resourceGroupName, + scopeName, + options + )) { + yield* page; + } + } + + /** + * Gets a private endpoint connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + scopeName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, scopeName, privateEndpointConnectionName, options }, + getOperationSpec + ); + } + + /** + * Approve or reject a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters A private endpoint connection + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + scopeName: string, + privateEndpointConnectionName: string, + parameters: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PrivateEndpointConnectionsCreateOrUpdateResponse + > + > { + 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, + scopeName, + privateEndpointConnectionName, + parameters, + options + }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Approve or reject a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters A private endpoint connection + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + scopeName: string, + privateEndpointConnectionName: string, + parameters: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + scopeName, + privateEndpointConnectionName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + scopeName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsDeleteOptionalParams + ): 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, scopeName, privateEndpointConnectionName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Deletes a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + scopeName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + scopeName, + privateEndpointConnectionName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets all private endpoint connections on a private link scope. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param options The options parameters. + */ + private _listByPrivateLinkScope( + resourceGroupName: string, + scopeName: string, + options?: PrivateEndpointConnectionsListByPrivateLinkScopeOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, scopeName, options }, + listByPrivateLinkScopeOperationSpec + ); + } + + /** + * ListByPrivateLinkScopeNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param nextLink The nextLink from the previous successful call to the ListByPrivateLinkScope method. + * @param options The options parameters. + */ + private _listByPrivateLinkScopeNext( + resourceGroupName: string, + scopeName: string, + nextLink: string, + options?: PrivateEndpointConnectionsListByPrivateLinkScopeNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, scopeName, nextLink, options }, + listByPrivateLinkScopeNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.scopeName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 201: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 202: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 204: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.scopeName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.scopeName, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByPrivateLinkScopeOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.scopeName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByPrivateLinkScopeNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.scopeName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkResources.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkResources.ts new file mode 100644 index 000000000000..864c941e65c2 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkResources.ts @@ -0,0 +1,233 @@ +/* + * 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 { PrivateLinkResources } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { HybridComputeManagementClient } from "../hybridComputeManagementClient"; +import { + PrivateLinkResource, + PrivateLinkResourcesListByPrivateLinkScopeNextOptionalParams, + PrivateLinkResourcesListByPrivateLinkScopeOptionalParams, + PrivateLinkResourcesListByPrivateLinkScopeResponse, + PrivateLinkResourcesGetOptionalParams, + PrivateLinkResourcesGetResponse, + PrivateLinkResourcesListByPrivateLinkScopeNextResponse +} from "../models"; + +/// +/** Class containing PrivateLinkResources operations. */ +export class PrivateLinkResourcesImpl implements PrivateLinkResources { + private readonly client: HybridComputeManagementClient; + + /** + * Initialize a new instance of the class PrivateLinkResources class. + * @param client Reference to the service client + */ + constructor(client: HybridComputeManagementClient) { + this.client = client; + } + + /** + * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param options The options parameters. + */ + public listByPrivateLinkScope( + resourceGroupName: string, + scopeName: string, + options?: PrivateLinkResourcesListByPrivateLinkScopeOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByPrivateLinkScopePagingAll( + resourceGroupName, + scopeName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByPrivateLinkScopePagingPage( + resourceGroupName, + scopeName, + options + ); + } + }; + } + + private async *listByPrivateLinkScopePagingPage( + resourceGroupName: string, + scopeName: string, + options?: PrivateLinkResourcesListByPrivateLinkScopeOptionalParams + ): AsyncIterableIterator { + let result = await this._listByPrivateLinkScope( + resourceGroupName, + scopeName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByPrivateLinkScopeNext( + resourceGroupName, + scopeName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByPrivateLinkScopePagingAll( + resourceGroupName: string, + scopeName: string, + options?: PrivateLinkResourcesListByPrivateLinkScopeOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByPrivateLinkScopePagingPage( + resourceGroupName, + scopeName, + options + )) { + yield* page; + } + } + + /** + * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param options The options parameters. + */ + private _listByPrivateLinkScope( + resourceGroupName: string, + scopeName: string, + options?: PrivateLinkResourcesListByPrivateLinkScopeOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, scopeName, options }, + listByPrivateLinkScopeOperationSpec + ); + } + + /** + * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param groupName The name of the private link resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + scopeName: string, + groupName: string, + options?: PrivateLinkResourcesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, scopeName, groupName, options }, + getOperationSpec + ); + } + + /** + * ListByPrivateLinkScopeNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param nextLink The nextLink from the previous successful call to the ListByPrivateLinkScope method. + * @param options The options parameters. + */ + private _listByPrivateLinkScopeNext( + resourceGroupName: string, + scopeName: string, + nextLink: string, + options?: PrivateLinkResourcesListByPrivateLinkScopeNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, scopeName, nextLink, options }, + listByPrivateLinkScopeNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByPrivateLinkScopeOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateLinkResources", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.scopeName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateLinkResources/{groupName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.scopeName, + Parameters.groupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByPrivateLinkScopeNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.scopeName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts new file mode 100644 index 000000000000..4e5fed528532 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts @@ -0,0 +1,599 @@ +/* + * 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 { PrivateLinkScopes } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { HybridComputeManagementClient } from "../hybridComputeManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + HybridComputePrivateLinkScope, + PrivateLinkScopesListNextOptionalParams, + PrivateLinkScopesListOptionalParams, + PrivateLinkScopesListByResourceGroupNextOptionalParams, + PrivateLinkScopesListByResourceGroupOptionalParams, + PrivateLinkScopesListResponse, + PrivateLinkScopesListByResourceGroupResponse, + PrivateLinkScopesDeleteOptionalParams, + PrivateLinkScopesGetOptionalParams, + PrivateLinkScopesGetResponse, + PrivateLinkScopesCreateOrUpdateOptionalParams, + PrivateLinkScopesCreateOrUpdateResponse, + TagsResource, + PrivateLinkScopesUpdateTagsOptionalParams, + PrivateLinkScopesUpdateTagsResponse, + PrivateLinkScopesGetValidationDetailsOptionalParams, + PrivateLinkScopesGetValidationDetailsResponse, + PrivateLinkScopesGetValidationDetailsForMachineOptionalParams, + PrivateLinkScopesGetValidationDetailsForMachineResponse, + PrivateLinkScopesListNextResponse, + PrivateLinkScopesListByResourceGroupNextResponse +} from "../models"; + +/// +/** Class containing PrivateLinkScopes operations. */ +export class PrivateLinkScopesImpl implements PrivateLinkScopes { + private readonly client: HybridComputeManagementClient; + + /** + * Initialize a new instance of the class PrivateLinkScopes class. + * @param client Reference to the service client + */ + constructor(client: HybridComputeManagementClient) { + this.client = client; + } + + /** + * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. + * @param options The options parameters. + */ + public list( + options?: PrivateLinkScopesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: PrivateLinkScopesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + options?: PrivateLinkScopesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Gets a list of Azure Arc PrivateLinkScopes within a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: PrivateLinkScopesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: PrivateLinkScopesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: PrivateLinkScopesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. + * @param options The options parameters. + */ + private _list( + options?: PrivateLinkScopesListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * Gets a list of Azure Arc PrivateLinkScopes within a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: PrivateLinkScopesListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Deletes a Azure Arc PrivateLinkScope. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + scopeName: string, + options?: PrivateLinkScopesDeleteOptionalParams + ): 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, scopeName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Deletes a Azure Arc PrivateLinkScope. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + scopeName: string, + options?: PrivateLinkScopesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + scopeName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Returns a Azure Arc PrivateLinkScope. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + scopeName: string, + options?: PrivateLinkScopesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, scopeName, options }, + getOperationSpec + ); + } + + /** + * Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for + * InstrumentationKey nor AppId in the Put operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param parameters Properties that need to be specified to create or update a Azure Arc for Servers + * and Clusters PrivateLinkScope. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + scopeName: string, + parameters: HybridComputePrivateLinkScope, + options?: PrivateLinkScopesCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, scopeName, parameters, options }, + createOrUpdateOperationSpec + ); + } + + /** + * Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateLinkScopeTags Updated tag information to set into the PrivateLinkScope instance. + * @param options The options parameters. + */ + updateTags( + resourceGroupName: string, + scopeName: string, + privateLinkScopeTags: TagsResource, + options?: PrivateLinkScopesUpdateTagsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, scopeName, privateLinkScopeTags, options }, + updateTagsOperationSpec + ); + } + + /** + * Returns a Azure Arc PrivateLinkScope's validation details. + * @param location The location of the target resource. + * @param privateLinkScopeId The id (Guid) of the Azure Arc PrivateLinkScope resource. + * @param options The options parameters. + */ + getValidationDetails( + location: string, + privateLinkScopeId: string, + options?: PrivateLinkScopesGetValidationDetailsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, privateLinkScopeId, options }, + getValidationDetailsOperationSpec + ); + } + + /** + * Returns a Azure Arc PrivateLinkScope's validation details for a given machine. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the target machine to get the private link scope validation details + * for. + * @param options The options parameters. + */ + getValidationDetailsForMachine( + resourceGroupName: string, + machineName: string, + options?: PrivateLinkScopesGetValidationDetailsForMachineOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, machineName, options }, + getValidationDetailsForMachineOperationSpec + ); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: PrivateLinkScopesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @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. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: PrivateLinkScopesListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/privateLinkScopes", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.HybridComputePrivateLinkScopeListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.HybridComputePrivateLinkScopeListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.scopeName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.HybridComputePrivateLinkScope + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.scopeName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.HybridComputePrivateLinkScope + }, + 201: { + bodyMapper: Mappers.HybridComputePrivateLinkScope + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.scopeName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateTagsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.HybridComputePrivateLinkScope + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.privateLinkScopeTags, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.scopeName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getValidationDetailsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/privateLinkScopes/{privateLinkScopeId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkScopeValidationDetails + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.privateLinkScopeId + ], + headerParameters: [Parameters.accept], + serializer +}; +const getValidationDetailsForMachineOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/privateLinkScopes/current", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkScopeValidationDetails + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.machineName1 + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.HybridComputePrivateLinkScopeListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.HybridComputePrivateLinkScopeListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/index.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/index.ts new file mode 100644 index 000000000000..f8024e8bc5a1 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/index.ts @@ -0,0 +1,14 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export * from "./machines"; +export * from "./machineExtensions"; +export * from "./operations"; +export * from "./privateLinkScopes"; +export * from "./privateLinkResources"; +export * from "./privateEndpointConnections"; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineExtensions.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineExtensions.ts new file mode 100644 index 000000000000..0aae932d1c04 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineExtensions.ts @@ -0,0 +1,147 @@ +/* + * 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 { + MachineExtension, + MachineExtensionsListOptionalParams, + MachineExtensionsCreateOrUpdateOptionalParams, + MachineExtensionsCreateOrUpdateResponse, + MachineExtensionUpdate, + MachineExtensionsUpdateOptionalParams, + MachineExtensionsUpdateResponse, + MachineExtensionsDeleteOptionalParams, + MachineExtensionsGetOptionalParams, + MachineExtensionsGetResponse +} from "../models"; + +/// +/** Interface representing a MachineExtensions. */ +export interface MachineExtensions { + /** + * The operation to get all extensions of a non-Azure machine + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine containing the extension. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + machineName: string, + options?: MachineExtensionsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * The operation to create or update the extension. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine where the extension should be created or updated. + * @param extensionName The name of the machine extension. + * @param extensionParameters Parameters supplied to the Create Machine Extension operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + machineName: string, + extensionName: string, + extensionParameters: MachineExtension, + options?: MachineExtensionsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + MachineExtensionsCreateOrUpdateResponse + > + >; + /** + * The operation to create or update the extension. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine where the extension should be created or updated. + * @param extensionName The name of the machine extension. + * @param extensionParameters Parameters supplied to the Create Machine Extension operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + machineName: string, + extensionName: string, + extensionParameters: MachineExtension, + options?: MachineExtensionsCreateOrUpdateOptionalParams + ): Promise; + /** + * The operation to create or update the extension. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine where the extension should be created or updated. + * @param extensionName The name of the machine extension. + * @param extensionParameters Parameters supplied to the Create Machine Extension operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + machineName: string, + extensionName: string, + extensionParameters: MachineExtensionUpdate, + options?: MachineExtensionsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + MachineExtensionsUpdateResponse + > + >; + /** + * The operation to create or update the extension. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine where the extension should be created or updated. + * @param extensionName The name of the machine extension. + * @param extensionParameters Parameters supplied to the Create Machine Extension operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + machineName: string, + extensionName: string, + extensionParameters: MachineExtensionUpdate, + options?: MachineExtensionsUpdateOptionalParams + ): Promise; + /** + * The operation to delete the extension. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine where the extension should be deleted. + * @param extensionName The name of the machine extension. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + machineName: string, + extensionName: string, + options?: MachineExtensionsDeleteOptionalParams + ): Promise, void>>; + /** + * The operation to delete the extension. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine where the extension should be deleted. + * @param extensionName The name of the machine extension. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + machineName: string, + extensionName: string, + options?: MachineExtensionsDeleteOptionalParams + ): Promise; + /** + * The operation to get the extension. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine containing the extension. + * @param extensionName The name of the machine extension. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + machineName: string, + extensionName: string, + options?: MachineExtensionsGetOptionalParams + ): Promise; +} diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machines.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machines.ts new file mode 100644 index 000000000000..1fb8be19778a --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machines.ts @@ -0,0 +1,62 @@ +/* + * 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 { + Machine, + MachinesListByResourceGroupOptionalParams, + MachinesListBySubscriptionOptionalParams, + MachinesDeleteOptionalParams, + MachinesGetOptionalParams, + MachinesGetResponse +} from "../models"; + +/// +/** Interface representing a Machines. */ +export interface Machines { + /** + * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the + * response to get the next page of hybrid machines. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: MachinesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the + * response to get the next page of hybrid machines. + * @param options The options parameters. + */ + listBySubscription( + options?: MachinesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * The operation to remove a hybrid machine identity in Azure. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + machineName: string, + options?: MachinesDeleteOptionalParams + ): Promise; + /** + * Retrieves information about the model view or the instance view of a hybrid machine. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + machineName: string, + options?: MachinesGetOptionalParams + ): Promise; +} diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/operations.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/operations.ts new file mode 100644 index 000000000000..708cdfd3d19a --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/operations.ts @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { OperationValue, OperationsListOptionalParams } from "../models"; + +/// +/** Interface representing a Operations. */ +export interface Operations { + /** + * Gets a list of hybrid compute operations. + * @param options The options parameters. + */ + list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/privateEndpointConnections.ts new file mode 100644 index 000000000000..36e96d115fc1 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/privateEndpointConnections.ts @@ -0,0 +1,109 @@ +/* + * 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 { + PrivateEndpointConnection, + PrivateEndpointConnectionsListByPrivateLinkScopeOptionalParams, + PrivateEndpointConnectionsGetOptionalParams, + PrivateEndpointConnectionsGetResponse, + PrivateEndpointConnectionsCreateOrUpdateOptionalParams, + PrivateEndpointConnectionsCreateOrUpdateResponse, + PrivateEndpointConnectionsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a PrivateEndpointConnections. */ +export interface PrivateEndpointConnections { + /** + * Gets all private endpoint connections on a private link scope. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param options The options parameters. + */ + listByPrivateLinkScope( + resourceGroupName: string, + scopeName: string, + options?: PrivateEndpointConnectionsListByPrivateLinkScopeOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a private endpoint connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + scopeName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsGetOptionalParams + ): Promise; + /** + * Approve or reject a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters A private endpoint connection + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + scopeName: string, + privateEndpointConnectionName: string, + parameters: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PrivateEndpointConnectionsCreateOrUpdateResponse + > + >; + /** + * Approve or reject a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters A private endpoint connection + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + scopeName: string, + privateEndpointConnectionName: string, + parameters: PrivateEndpointConnection, + options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + scopeName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + scopeName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/privateLinkResources.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/privateLinkResources.ts new file mode 100644 index 000000000000..dc0bd72da110 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/privateLinkResources.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + PrivateLinkResource, + PrivateLinkResourcesListByPrivateLinkScopeOptionalParams, + PrivateLinkResourcesGetOptionalParams, + PrivateLinkResourcesGetResponse +} from "../models"; + +/// +/** Interface representing a PrivateLinkResources. */ +export interface PrivateLinkResources { + /** + * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param options The options parameters. + */ + listByPrivateLinkScope( + resourceGroupName: string, + scopeName: string, + options?: PrivateLinkResourcesListByPrivateLinkScopeOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param groupName The name of the private link resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + scopeName: string, + groupName: string, + options?: PrivateLinkResourcesGetOptionalParams + ): Promise; +} diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/privateLinkScopes.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/privateLinkScopes.ts new file mode 100644 index 000000000000..6d244d426636 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/privateLinkScopes.ts @@ -0,0 +1,132 @@ +/* + * 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 { + HybridComputePrivateLinkScope, + PrivateLinkScopesListOptionalParams, + PrivateLinkScopesListByResourceGroupOptionalParams, + PrivateLinkScopesDeleteOptionalParams, + PrivateLinkScopesGetOptionalParams, + PrivateLinkScopesGetResponse, + PrivateLinkScopesCreateOrUpdateOptionalParams, + PrivateLinkScopesCreateOrUpdateResponse, + TagsResource, + PrivateLinkScopesUpdateTagsOptionalParams, + PrivateLinkScopesUpdateTagsResponse, + PrivateLinkScopesGetValidationDetailsOptionalParams, + PrivateLinkScopesGetValidationDetailsResponse, + PrivateLinkScopesGetValidationDetailsForMachineOptionalParams, + PrivateLinkScopesGetValidationDetailsForMachineResponse +} from "../models"; + +/// +/** Interface representing a PrivateLinkScopes. */ +export interface PrivateLinkScopes { + /** + * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. + * @param options The options parameters. + */ + list( + options?: PrivateLinkScopesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a list of Azure Arc PrivateLinkScopes within a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: PrivateLinkScopesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Deletes a Azure Arc PrivateLinkScope. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + scopeName: string, + options?: PrivateLinkScopesDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a Azure Arc PrivateLinkScope. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + scopeName: string, + options?: PrivateLinkScopesDeleteOptionalParams + ): Promise; + /** + * Returns a Azure Arc PrivateLinkScope. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + scopeName: string, + options?: PrivateLinkScopesGetOptionalParams + ): Promise; + /** + * Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for + * InstrumentationKey nor AppId in the Put operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param parameters Properties that need to be specified to create or update a Azure Arc for Servers + * and Clusters PrivateLinkScope. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + scopeName: string, + parameters: HybridComputePrivateLinkScope, + options?: PrivateLinkScopesCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateLinkScopeTags Updated tag information to set into the PrivateLinkScope instance. + * @param options The options parameters. + */ + updateTags( + resourceGroupName: string, + scopeName: string, + privateLinkScopeTags: TagsResource, + options?: PrivateLinkScopesUpdateTagsOptionalParams + ): Promise; + /** + * Returns a Azure Arc PrivateLinkScope's validation details. + * @param location The location of the target resource. + * @param privateLinkScopeId The id (Guid) of the Azure Arc PrivateLinkScope resource. + * @param options The options parameters. + */ + getValidationDetails( + location: string, + privateLinkScopeId: string, + options?: PrivateLinkScopesGetValidationDetailsOptionalParams + ): Promise; + /** + * Returns a Azure Arc PrivateLinkScope's validation details for a given machine. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the target machine to get the private link scope validation details + * for. + * @param options The options parameters. + */ + getValidationDetailsForMachine( + resourceGroupName: string, + machineName: string, + options?: PrivateLinkScopesGetValidationDetailsForMachineOptionalParams + ): Promise; +} diff --git a/sdk/hybridcompute/arm-hybridcompute/test/sampleTest.ts b/sdk/hybridcompute/arm-hybridcompute/test/sampleTest.ts new file mode 100644 index 000000000000..7ed89b043e1b --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/test/sampleTest.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + env, + record, + RecorderEnvironmentSetup, + Recorder +} from "@azure-tools/test-recorder"; +import * as assert from "assert"; + +const recorderEnvSetup: RecorderEnvironmentSetup = { + replaceableVariables: { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" + }, + customizationsOnRecordings: [ + (recording: any): any => + recording.replace( + /"access_token":"[^"]*"/g, + `"access_token":"access_token"` + ) + ], + queryParametersToSkip: [] +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function() { + recorder = record(this, recorderEnvSetup); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/hybridcompute/arm-hybridcompute/tsconfig.json b/sdk/hybridcompute/arm-hybridcompute/tsconfig.json index 422b584abd5e..6e3251194117 100644 --- a/sdk/hybridcompute/arm-hybridcompute/tsconfig.json +++ b/sdk/hybridcompute/arm-hybridcompute/tsconfig.json @@ -3,7 +3,7 @@ "module": "es6", "moduleResolution": "node", "strict": true, - "target": "es5", + "target": "es6", "sourceMap": true, "declarationMap": true, "esModuleInterop": true, @@ -11,9 +11,9 @@ "forceConsistentCasingInFileNames": true, "lib": ["es6", "dom"], "declaration": true, - "outDir": "./esm", + "outDir": "./dist-esm", "importHelpers": true }, - "include": ["./src/**/*.ts"], + "include": ["./src/**/*.ts", "./test/**/*.ts"], "exclude": ["node_modules"] } diff --git a/sdk/hybridcompute/ci.yml b/sdk/hybridcompute/ci.yml new file mode 100644 index 000000000000..f80b669c43e7 --- /dev/null +++ b/sdk/hybridcompute/ci.yml @@ -0,0 +1,29 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. +trigger: + branches: + include: + - main + - release/* + - hotfix/* + paths: + include: + - sdk/hybridcompute/ + +pr: + branches: + include: + - main + - release/* + - hotfix/* + paths: + include: + - sdk/hybridcompute/ + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: hybridcompute + Artifacts: + - name: azure-arm-hybridcompute + safeName: azurearmhybridcompute + \ No newline at end of file