From 00df8eedfc9164bf097f168fef75c193fb0c1216 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 5 Jan 2022 10:33:00 +0000 Subject: [PATCH] CodeGen from PR 16949 in Azure/azure-rest-api-specs Track2 modify readme.go.md 6 (#16949) * Track2 modify readme.go.md 6 * mariadb derective description --- common/config/rush/pnpm-lock.yaml | 131 +++--- rush.json | 5 + .../arm-marketplaceordering/CHANGELOG.md | 11 + .../{LICENSE.txt => LICENSE} | 4 +- .../arm-marketplaceordering/README.md | 150 +++---- .../arm-marketplaceordering/_meta.json | 7 + .../api-extractor.json | 18 + .../arm-marketplaceordering/package.json | 92 ++-- .../review/arm-marketplaceordering.api.md | 192 ++++++++ .../arm-marketplaceordering/rollup.config.js | 211 +++++++-- .../arm-marketplaceordering/src/index.ts | 12 + .../src/marketplaceOrderingAgreements.ts | 95 ++-- .../marketplaceOrderingAgreementsContext.ts | 62 --- .../src/models/index.ts | 394 +++++++--------- .../src/models/mappers.ts | 251 ++++++----- .../models/marketplaceAgreementsMappers.ts | 16 - .../src/models/operationsMappers.ts | 15 - .../src/models/parameters.ts | 109 +++-- .../src/operations/index.ts | 8 +- .../src/operations/marketplaceAgreements.ts | 420 +++++++----------- .../src/operations/operations.ts | 160 ++++--- .../src/operationsInterfaces/index.ts | 10 + .../marketplaceAgreements.ts | 106 +++++ .../src/operationsInterfaces/operations.ts | 22 + .../test/sampleTest.ts | 48 ++ .../arm-marketplaceordering/tsconfig.json | 6 +- sdk/marketplaceordering/ci.yml | 29 ++ 27 files changed, 1543 insertions(+), 1041 deletions(-) create mode 100644 sdk/marketplaceordering/arm-marketplaceordering/CHANGELOG.md rename sdk/marketplaceordering/arm-marketplaceordering/{LICENSE.txt => LICENSE} (96%) create mode 100644 sdk/marketplaceordering/arm-marketplaceordering/_meta.json create mode 100644 sdk/marketplaceordering/arm-marketplaceordering/api-extractor.json create mode 100644 sdk/marketplaceordering/arm-marketplaceordering/review/arm-marketplaceordering.api.md create mode 100644 sdk/marketplaceordering/arm-marketplaceordering/src/index.ts delete mode 100644 sdk/marketplaceordering/arm-marketplaceordering/src/marketplaceOrderingAgreementsContext.ts delete mode 100644 sdk/marketplaceordering/arm-marketplaceordering/src/models/marketplaceAgreementsMappers.ts delete mode 100644 sdk/marketplaceordering/arm-marketplaceordering/src/models/operationsMappers.ts create mode 100644 sdk/marketplaceordering/arm-marketplaceordering/src/operationsInterfaces/index.ts create mode 100644 sdk/marketplaceordering/arm-marketplaceordering/src/operationsInterfaces/marketplaceAgreements.ts create mode 100644 sdk/marketplaceordering/arm-marketplaceordering/src/operationsInterfaces/operations.ts create mode 100644 sdk/marketplaceordering/arm-marketplaceordering/test/sampleTest.ts create mode 100644 sdk/marketplaceordering/ci.yml diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 694e81b4a476..0ce3c1349f78 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -47,6 +47,7 @@ specifiers: '@rush-temp/arm-logic': file:./projects/arm-logic.tgz '@rush-temp/arm-managedapplications': file:./projects/arm-managedapplications.tgz '@rush-temp/arm-managementgroups': file:./projects/arm-managementgroups.tgz + '@rush-temp/arm-marketplaceordering': file:./projects/arm-marketplaceordering.tgz '@rush-temp/arm-mediaservices': file:./projects/arm-mediaservices.tgz '@rush-temp/arm-monitor': file:./projects/arm-monitor.tgz '@rush-temp/arm-msi': file:./projects/arm-msi.tgz @@ -228,6 +229,7 @@ dependencies: '@rush-temp/arm-logic': file:projects/arm-logic.tgz '@rush-temp/arm-managedapplications': file:projects/arm-managedapplications.tgz '@rush-temp/arm-managementgroups': file:projects/arm-managementgroups.tgz + '@rush-temp/arm-marketplaceordering': file:projects/arm-marketplaceordering.tgz '@rush-temp/arm-mediaservices': file:projects/arm-mediaservices.tgz '@rush-temp/arm-monitor': file:projects/arm-monitor.tgz '@rush-temp/arm-msi': file:projects/arm-msi.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 @@ -8770,6 +8772,27 @@ packages: uglify-js: 3.14.5 dev: false + file:projects/arm-marketplaceordering.tgz: + resolution: {integrity: sha512-15YQH5lTTIv1NmN8S7aj/CkbnTY/6frS3mrOrkTeJcbrQP6N7opa9LgTbFZ43991QMAnmw/AolkTFPJYH0wsWg==, tarball: file:projects/arm-marketplaceordering.tgz} + name: '@rush-temp/arm-marketplaceordering' + 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-mediaservices.tgz: resolution: {integrity: sha512-wt5O7fsBlkomvh57wJRSiBwgIAAmjjLwaX3HhUj2WNHhIjY/M3PQ8n/172v99nzZ2hTxBQPmokO4eyz9sKSqDA==, tarball: file:projects/arm-mediaservices.tgz} name: '@rush-temp/arm-mediaservices' @@ -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..be561002be7a 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-marketplaceordering", + "projectFolder": "sdk/marketplaceordering/arm-marketplaceordering", + "versionPolicyName": "management" } ] } \ No newline at end of file diff --git a/sdk/marketplaceordering/arm-marketplaceordering/CHANGELOG.md b/sdk/marketplaceordering/arm-marketplaceordering/CHANGELOG.md new file mode 100644 index 000000000000..6231e2937a6c --- /dev/null +++ b/sdk/marketplaceordering/arm-marketplaceordering/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 3.0.0 (2022-01-05) + +The package of @azure/arm-marketplaceordering is using our next generation design principles since version 3.0.0, 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/marketplaceordering/arm-marketplaceordering/LICENSE.txt b/sdk/marketplaceordering/arm-marketplaceordering/LICENSE similarity index 96% rename from sdk/marketplaceordering/arm-marketplaceordering/LICENSE.txt rename to sdk/marketplaceordering/arm-marketplaceordering/LICENSE index ea8fb1516028..5d1d36e0af80 100644 --- a/sdk/marketplaceordering/arm-marketplaceordering/LICENSE.txt +++ b/sdk/marketplaceordering/arm-marketplaceordering/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/marketplaceordering/arm-marketplaceordering/README.md b/sdk/marketplaceordering/arm-marketplaceordering/README.md index e6ca42ae16ff..df1b93c4b251 100644 --- a/sdk/marketplaceordering/arm-marketplaceordering/README.md +++ b/sdk/marketplaceordering/arm-marketplaceordering/README.md @@ -1,104 +1,98 @@ -## Azure MarketplaceOrderingAgreements SDK for JavaScript +# Azure Service client library for JavaScript -This package contains an isomorphic SDK for MarketplaceOrderingAgreements. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure Service client. + +REST API for MarketplaceOrdering Agreements. + +[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/marketplaceordering/arm-marketplaceordering) | +[Package (NPM)](https://www.npmjs.com/package/@azure/arm-marketplaceordering) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-marketplaceordering) | +[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. -### How to Install +- Latest versions of Safari, Chrome, Edge and Firefox. + +### Prerequisites + +- An [Azure subscription][azure_sub]. + +### Install the `@azure/arm-marketplaceordering` package + +Install the Azure Service client library for JavaScript with `npm`: ```bash npm install @azure/arm-marketplaceordering ``` -### How to use +### Create and authenticate a `MarketplaceOrderingAgreements` + +To create a client object to access the Azure Service API, you will need the `endpoint` of your Azure Service resource and a `credential`. The Azure Service client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your Azure Service resource in the [Azure Portal][azure_portal]. -#### nodejs - Authentication, client creation and get marketplaceAgreements as an example written in TypeScript. +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). -##### Install @azure/ms-rest-nodeauth +To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package: -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. ```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" +npm install @azure/identity ``` -##### Sample code - -```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { MarketplaceOrderingAgreements, MarketplaceOrderingAgreementsModels, MarketplaceOrderingAgreementsMappers } from "@azure/arm-marketplaceordering"; -const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; - -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new MarketplaceOrderingAgreements(creds, subscriptionId); - const publisherId = "testpublisherId"; - const offerId = "testofferId"; - const planId = "testplanId"; - client.marketplaceAgreements.get(publisherId, offerId, planId).then((result) => { - console.log("The result is:"); - console.log(result); - }); -}).catch((err) => { - console.error(err); -}); +You will also need to **register a new AAD application and grant access to Azure Service** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). +Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. + +For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). + +```javascript +const { MarketplaceOrderingAgreements } = require("@azure/arm-marketplaceordering"); +const { DefaultAzureCredential } = require("@azure/identity"); +const subscriptionId = "00000000-0000-0000-0000-000000000000"; +const client = new MarketplaceOrderingAgreements(new DefaultAzureCredential(), subscriptionId); ``` -#### browser - Authentication, client creation and get marketplaceAgreements as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth +### 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). -```bash -npm install @azure/ms-rest-browserauth -``` +## Key concepts -##### Sample code - -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - -- index.html -```html - - - - @azure/arm-marketplaceordering sample - - - - - - - - +### MarketplaceOrderingAgreements + +`MarketplaceOrderingAgreements` is the primary interface for developers using the Azure Service client library. Explore the methods on this client object to understand the different features of the Azure Service 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%2Fmarketplaceordering%2Farm-marketplaceordering%2FREADME.png) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/marketplaceordering/arm-marketplaceordering/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/marketplaceordering/arm-marketplaceordering/_meta.json b/sdk/marketplaceordering/arm-marketplaceordering/_meta.json new file mode 100644 index 000000000000..d42ba4300ab9 --- /dev/null +++ b/sdk/marketplaceordering/arm-marketplaceordering/_meta.json @@ -0,0 +1,7 @@ +{ + "commit": "e8c6db17dc13a00155936dcaeacf4da0a1fabf77", + "readme": "specification/marketplaceordering/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/marketplaceordering/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/marketplaceordering/arm-marketplaceordering/api-extractor.json b/sdk/marketplaceordering/arm-marketplaceordering/api-extractor.json new file mode 100644 index 000000000000..9fc8ea9fda97 --- /dev/null +++ b/sdk/marketplaceordering/arm-marketplaceordering/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-marketplaceordering.d.ts" + }, + "messages": { + "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "extractorMessageReporting": { + "ae-missing-release-tag": { "logLevel": "none" }, + "ae-unresolved-link": { "logLevel": "none" } + } + } +} diff --git a/sdk/marketplaceordering/arm-marketplaceordering/package.json b/sdk/marketplaceordering/arm-marketplaceordering/package.json index 9a6cb2c9ae33..e5e52b5d441f 100644 --- a/sdk/marketplaceordering/arm-marketplaceordering/package.json +++ b/sdk/marketplaceordering/arm-marketplaceordering/package.json @@ -1,57 +1,89 @@ { "name": "@azure/arm-marketplaceordering", + "sdk-type": "mgmt", "author": "Microsoft Corporation", - "description": "MarketplaceOrderingAgreements Library with typescript type definitions for node.js and browser.", - "version": "2.0.0", + "description": "A generated SDK for MarketplaceOrderingAgreements.", + "version": "3.0.0", + "engines": { "node": ">=12.0.0" }, "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", - "tslib": "^1.10.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-marketplaceordering.js", - "module": "./esm/marketplaceOrderingAgreements.js", - "types": "./esm/marketplaceOrderingAgreements.d.ts", + "main": "./dist/index.js", + "module": "./dist-esm/src/index.js", + "types": "./types/arm-marketplaceordering.d.ts", "devDependencies": { - "typescript": "^3.5.3", - "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/marketplaceordering/arm-marketplaceordering", "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-marketplaceordering.js.map'\" -o ./dist/arm-marketplaceordering.min.js ./dist/arm-marketplaceordering.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/marketplaceordering/arm-marketplaceordering/review/arm-marketplaceordering.api.md b/sdk/marketplaceordering/arm-marketplaceordering/review/arm-marketplaceordering.api.md new file mode 100644 index 000000000000..9e9d0adf7260 --- /dev/null +++ b/sdk/marketplaceordering/arm-marketplaceordering/review/arm-marketplaceordering.api.md @@ -0,0 +1,192 @@ +## API Report File for "@azure/arm-marketplaceordering" + +> 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'; + +// @public +export type AgreementTerms = Resource & { + readonly systemData?: SystemData; + publisher?: string; + product?: string; + plan?: string; + licenseTextLink?: string; + privacyPolicyLink?: string; + marketplaceTermsLink?: string; + retrieveDatetime?: string; + signature?: string; + accepted?: boolean; +}; + +// @public +export type CreatedByType = string; + +// @public +export interface ErrorResponse { + error?: ErrorResponseError; +} + +// @public +export interface ErrorResponseError { + readonly code?: string; + readonly message?: string; +} + +// @public +export enum KnownCreatedByType { + // (undocumented) + Application = "Application", + // (undocumented) + Key = "Key", + // (undocumented) + ManagedIdentity = "ManagedIdentity", + // (undocumented) + User = "User" +} + +// @public +export enum KnownOfferType { + // (undocumented) + Virtualmachine = "virtualmachine" +} + +// @public +export interface MarketplaceAgreements { + cancel(publisherId: string, offerId: string, planId: string, options?: MarketplaceAgreementsCancelOptionalParams): Promise; + create(offerType: OfferType, publisherId: string, offerId: string, planId: string, parameters: AgreementTerms, options?: MarketplaceAgreementsCreateOptionalParams): Promise; + get(offerType: OfferType, publisherId: string, offerId: string, planId: string, options?: MarketplaceAgreementsGetOptionalParams): Promise; + getAgreement(publisherId: string, offerId: string, planId: string, options?: MarketplaceAgreementsGetAgreementOptionalParams): Promise; + list(options?: MarketplaceAgreementsListOptionalParams): Promise; + sign(publisherId: string, offerId: string, planId: string, options?: MarketplaceAgreementsSignOptionalParams): Promise; +} + +// @public +export interface MarketplaceAgreementsCancelOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MarketplaceAgreementsCancelResponse = AgreementTerms; + +// @public +export interface MarketplaceAgreementsCreateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MarketplaceAgreementsCreateResponse = AgreementTerms; + +// @public +export interface MarketplaceAgreementsGetAgreementOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MarketplaceAgreementsGetAgreementResponse = AgreementTerms; + +// @public +export interface MarketplaceAgreementsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MarketplaceAgreementsGetResponse = AgreementTerms; + +// @public +export interface MarketplaceAgreementsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MarketplaceAgreementsListResponse = AgreementTerms[]; + +// @public +export interface MarketplaceAgreementsSignOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MarketplaceAgreementsSignResponse = AgreementTerms; + +// @public (undocumented) +export class MarketplaceOrderingAgreements extends coreClient.ServiceClient { + // (undocumented) + $host: string; + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: MarketplaceOrderingAgreementsOptionalParams); + // (undocumented) + apiVersion: string; + // (undocumented) + marketplaceAgreements: MarketplaceAgreements; + // (undocumented) + operations: Operations; + // (undocumented) + subscriptionId: string; +} + +// @public +export interface MarketplaceOrderingAgreementsOptionalParams extends coreClient.ServiceClientOptions { + $host?: string; + apiVersion?: string; + endpoint?: string; +} + +// @public +export type OfferType = string; + +// @public +export interface Operation { + display?: OperationDisplay; + name?: string; +} + +// @public +export interface OperationDisplay { + description?: string; + operation?: string; + provider?: string; + resource?: string; +} + +// @public +export interface OperationListResult { + readonly nextLink?: string; + value?: Operation[]; +} + +// @public +export interface Operations { + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListNextResponse = OperationListResult; + +// @public +export interface OperationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListResponse = OperationListResult; + +// @public +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly type?: string; +} + +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/marketplaceordering/arm-marketplaceordering/rollup.config.js b/sdk/marketplaceordering/arm-marketplaceordering/rollup.config.js index 8bcf52f6116f..9be1955eb7f1 100644 --- a/sdk/marketplaceordering/arm-marketplaceordering/rollup.config.js +++ b/sdk/marketplaceordering/arm-marketplaceordering/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/marketplaceOrderingAgreements.js", - external: [ - "@azure/ms-rest-js", - "@azure/ms-rest-azure-js" - ], - output: { - file: "./dist/arm-marketplaceordering.js", - format: "umd", - name: "Azure.ArmMarketplaceordering", - 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/marketplaceordering/arm-marketplaceordering/src/index.ts b/sdk/marketplaceordering/arm-marketplaceordering/src/index.ts new file mode 100644 index 000000000000..dd8b64906e98 --- /dev/null +++ b/sdk/marketplaceordering/arm-marketplaceordering/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 { MarketplaceOrderingAgreements } from "./marketplaceOrderingAgreements"; +export * from "./operationsInterfaces"; diff --git a/sdk/marketplaceordering/arm-marketplaceordering/src/marketplaceOrderingAgreements.ts b/sdk/marketplaceordering/arm-marketplaceordering/src/marketplaceOrderingAgreements.ts index 3c7a63b3770e..74c31161e444 100644 --- a/sdk/marketplaceordering/arm-marketplaceordering/src/marketplaceOrderingAgreements.ts +++ b/sdk/marketplaceordering/arm-marketplaceordering/src/marketplaceOrderingAgreements.ts @@ -1,44 +1,77 @@ /* - * 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/mappers"; -import * as operations from "./operations"; -import { MarketplaceOrderingAgreementsContext } from "./marketplaceOrderingAgreementsContext"; +import * as coreClient from "@azure/core-client"; +import * as coreAuth from "@azure/core-auth"; +import { MarketplaceAgreementsImpl, OperationsImpl } from "./operations"; +import { MarketplaceAgreements, Operations } from "./operationsInterfaces"; +import { MarketplaceOrderingAgreementsOptionalParams } from "./models"; - -class MarketplaceOrderingAgreements extends MarketplaceOrderingAgreementsContext { - // Operation groups - marketplaceAgreements: operations.MarketplaceAgreements; - operations: operations.Operations; +export class MarketplaceOrderingAgreements extends coreClient.ServiceClient { + $host: string; + apiVersion: string; + subscriptionId: string; /** * Initializes a new instance of the MarketplaceOrderingAgreements class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Subscription credentials which uniquely identify client subscription. * @param subscriptionId The subscription ID that identifies an Azure subscription. - * @param [options] The parameter options + * @param options The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MarketplaceOrderingAgreementsOptions) { - super(credentials, subscriptionId, options); - this.marketplaceAgreements = new operations.MarketplaceAgreements(this); - this.operations = new operations.Operations(this); - } -} + constructor( + credentials: coreAuth.TokenCredential, + subscriptionId: string, + options?: MarketplaceOrderingAgreementsOptionalParams + ) { + 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: MarketplaceOrderingAgreementsOptionalParams = { + requestContentType: "application/json; charset=utf-8", + credential: credentials + }; -// Operation Specifications + const packageDetails = `azsdk-js-arm-marketplaceordering/3.0.0`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; -export { - MarketplaceOrderingAgreements, - MarketplaceOrderingAgreementsContext, - Models as MarketplaceOrderingAgreementsModels, - Mappers as MarketplaceOrderingAgreementsMappers -}; -export * from "./operations"; + 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-01-01"; + this.marketplaceAgreements = new MarketplaceAgreementsImpl(this); + this.operations = new OperationsImpl(this); + } + + marketplaceAgreements: MarketplaceAgreements; + operations: Operations; +} diff --git a/sdk/marketplaceordering/arm-marketplaceordering/src/marketplaceOrderingAgreementsContext.ts b/sdk/marketplaceordering/arm-marketplaceordering/src/marketplaceOrderingAgreementsContext.ts deleted file mode 100644 index 75ba980477a6..000000000000 --- a/sdk/marketplaceordering/arm-marketplaceordering/src/marketplaceOrderingAgreementsContext.ts +++ /dev/null @@ -1,62 +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 * as msRestAzure from "@azure/ms-rest-azure-js"; - -const packageName = "@azure/arm-marketplaceordering"; -const packageVersion = "2.0.0"; - -export class MarketplaceOrderingAgreementsContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; - subscriptionId: string; - apiVersion?: string; - - /** - * Initializes a new instance of the MarketplaceOrderingAgreements class. - * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId The subscription ID that identifies an Azure subscription. - * @param [options] The parameter options - */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MarketplaceOrderingAgreementsOptions) { - 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 = '2015-06-01'; - this.acceptLanguage = 'en-US'; - this.longRunningOperationRetryTimeout = 30; - this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; - this.requestContentType = "application/json; charset=utf-8"; - this.credentials = credentials; - this.subscriptionId = subscriptionId; - - if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { - this.acceptLanguage = options.acceptLanguage; - } - if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { - this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; - } - } -} diff --git a/sdk/marketplaceordering/arm-marketplaceordering/src/models/index.ts b/sdk/marketplaceordering/arm-marketplaceordering/src/models/index.ts index 2c310d323eef..c0244b58355b 100644 --- a/sdk/marketplaceordering/arm-marketplaceordering/src/models/index.ts +++ b/sdk/marketplaceordering/arm-marketplaceordering/src/models/index.ts @@ -1,311 +1,223 @@ /* - * 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"; - -export { BaseResource, CloudError }; +import * as coreClient from "@azure/core-client"; + +/** 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; +} -/** - * ARM resource. - */ -export interface Resource extends BaseResource { +/** ARM resource. */ +export interface Resource { /** * Resource 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 id?: string; /** * Resource 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 name?: string; /** * Resource type. - * **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 type?: string; } -/** - * Terms properties for provided Publisher/Offer/Plan tuple - */ -export interface AgreementTerms extends Resource { - /** - * Publisher identifier string of image being deployed. - */ - publisher?: string; - /** - * Offer identifier string of image being deployed. - */ - product?: string; - /** - * Plan identifier string of image being deployed. - */ - plan?: string; - /** - * Link to HTML with Microsoft and Publisher terms. - */ - licenseTextLink?: string; - /** - * Link to the privacy policy of the publisher. - */ - privacyPolicyLink?: string; - /** - * Date and time in UTC of when the terms were accepted. This is empty if Accepted is false. - */ - retrieveDatetime?: string; - /** - * Terms signature. - */ - signature?: string; - /** - * If any version of the terms have been accepted, otherwise false. - */ - accepted?: boolean; +/** Error response indicates Microsoft.MarketplaceOrdering service is not able to process the incoming request. The reason is provided in the error message. */ +export interface ErrorResponse { + /** The details of the error. */ + error?: ErrorResponseError; } -/** - * The details of the error. - */ +/** The details of the error. */ export interface ErrorResponseError { /** * Error code. - * **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 code?: string; /** * Error message indicating why the operation failed. - * **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 message?: string; } -/** - * Error response indicates Microsoft.MarketplaceOrdering service is not able to process the - * incoming request. The reason is provided in the error message. - */ -export interface ErrorResponse { +/** Result of the request to list MarketplaceOrdering operations. It contains a list of operations and a URL link to get the next set of results. */ +export interface OperationListResult { + /** List of Microsoft.MarketplaceOrdering operations supported by the Microsoft.MarketplaceOrdering resource provider. */ + value?: Operation[]; /** - * The details of the error. + * URL to get the next set of operation list results if there are any. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - error?: ErrorResponseError; + readonly nextLink?: string; } -/** - * The object that represents the operation. - */ +/** Microsoft.MarketplaceOrdering REST API operation */ +export interface Operation { + /** Operation name: {provider}/{resource}/{operation} */ + name?: string; + /** The object that represents the operation. */ + display?: OperationDisplay; +} + +/** The object that represents the operation. */ export interface OperationDisplay { - /** - * Service provider: Microsoft.MarketplaceOrdering - */ + /** Service provider: Microsoft.MarketplaceOrdering */ provider?: string; - /** - * Resource on which the operation is performed: Agreement, virtualmachine, etc. - */ + /** Resource on which the operation is performed: Agreement, virtualmachine, etc. */ resource?: string; - /** - * Operation type: Get Agreement, Sign Agreement, Cancel Agreement etc. - */ + /** Operation type: Get Agreement, Sign Agreement, Cancel Agreement etc. */ operation?: string; + /** Operation description. */ + description?: string; } -/** - * Microsoft.MarketplaceOrdering REST API operation - */ -export interface Operation { - /** - * Operation name: {provider}/{resource}/{operation} - */ - name?: string; +/** Terms properties for provided Publisher/Offer/Plan tuple */ +export type AgreementTerms = Resource & { /** - * The object that represents the operation. + * The system meta data relating to this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - display?: OperationDisplay; -} + readonly systemData?: SystemData; + /** Publisher identifier string of image being deployed. */ + publisher?: string; + /** Offer identifier string of image being deployed. */ + product?: string; + /** Plan identifier string of image being deployed. */ + plan?: string; + /** Link to HTML with Microsoft and Publisher terms. */ + licenseTextLink?: string; + /** Link to the privacy policy of the publisher. */ + privacyPolicyLink?: string; + /** Link to HTML with Azure Marketplace terms. */ + marketplaceTermsLink?: string; + /** Date and time in UTC of when the terms were accepted. This is empty if Accepted is false. */ + retrieveDatetime?: string; + /** Terms signature. */ + signature?: string; + /** If any version of the terms have been accepted, otherwise false. */ + accepted?: boolean; +}; -/** - * An interface representing MarketplaceOrderingAgreementsOptions. - */ -export interface MarketplaceOrderingAgreementsOptions extends AzureServiceClientOptions { - baseUri?: string; +/** Known values of {@link OfferType} that the service accepts. */ +export enum KnownOfferType { + Virtualmachine = "virtualmachine" } /** - * @interface - * Result of the request to list MarketplaceOrdering operations. It contains a list of operations - * and a URL link to get the next set of results. - * @extends Array + * Defines values for OfferType. \ + * {@link KnownOfferType} can be used interchangeably with OfferType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **virtualmachine** */ -export interface OperationListResult extends Array { - /** - * URL to get the next set of operation list results if there are any. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; +export type OfferType = string; + +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + User = "User", + Application = "Application", + ManagedIdentity = "ManagedIdentity", + Key = "Key" } /** - * Contains response data for the get operation. + * 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 type MarketplaceAgreementsGetResponse = AgreementTerms & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type CreatedByType = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AgreementTerms; - }; -}; +/** Optional parameters. */ +export interface MarketplaceAgreementsGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the create operation. - */ -export type MarketplaceAgreementsCreateResponse = AgreementTerms & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type MarketplaceAgreementsGetResponse = AgreementTerms; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AgreementTerms; - }; -}; +/** Optional parameters. */ +export interface MarketplaceAgreementsCreateOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the sign operation. - */ -export type MarketplaceAgreementsSignResponse = AgreementTerms & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the create operation. */ +export type MarketplaceAgreementsCreateResponse = AgreementTerms; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AgreementTerms; - }; -}; +/** Optional parameters. */ +export interface MarketplaceAgreementsSignOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the cancel operation. - */ -export type MarketplaceAgreementsCancelResponse = AgreementTerms & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the sign operation. */ +export type MarketplaceAgreementsSignResponse = AgreementTerms; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AgreementTerms; - }; -}; +/** Optional parameters. */ +export interface MarketplaceAgreementsCancelOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the getAgreement operation. - */ -export type MarketplaceAgreementsGetAgreementResponse = AgreementTerms & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the cancel operation. */ +export type MarketplaceAgreementsCancelResponse = AgreementTerms; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AgreementTerms; - }; -}; +/** Optional parameters. */ +export interface MarketplaceAgreementsGetAgreementOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the list operation. - */ -export type MarketplaceAgreementsListResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the getAgreement operation. */ +export type MarketplaceAgreementsGetAgreementResponse = AgreementTerms; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AgreementTerms[]; - }; -}; +/** Optional parameters. */ +export interface MarketplaceAgreementsListOptionalParams + extends coreClient.OperationOptions {} -/** - * 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; +/** Contains response data for the list operation. */ +export type MarketplaceAgreementsListResponse = AgreementTerms[]; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationListResult; - }; -}; +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listNext operation. - */ -export type OperationsListNextResponse = OperationListResult & { - /** - * 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: OperationListResult; - }; -}; +/** Optional parameters. */ +export interface OperationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type OperationsListNextResponse = OperationListResult; + +/** Optional parameters. */ +export interface MarketplaceOrderingAgreementsOptionalParams + extends coreClient.ServiceClientOptions { + /** server parameter */ + $host?: string; + /** Api Version */ + apiVersion?: string; + /** Overrides client endpoint. */ + endpoint?: string; +} diff --git a/sdk/marketplaceordering/arm-marketplaceordering/src/models/mappers.ts b/sdk/marketplaceordering/arm-marketplaceordering/src/models/mappers.ts index f5702ff6034c..f09614c44aa6 100644 --- a/sdk/marketplaceordering/arm-marketplaceordering/src/models/mappers.ts +++ b/sdk/marketplaceordering/arm-marketplaceordering/src/models/mappers.ts @@ -1,123 +1,119 @@ /* - * 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 Resource: msRest.CompositeMapper = { - serializedName: "Resource", +export const SystemData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Resource", + className: "SystemData", modelProperties: { - id: { - readOnly: true, - serializedName: "id", + createdBy: { + serializedName: "createdBy", type: { name: "String" } }, - name: { - readOnly: true, - serializedName: "name", + createdByType: { + serializedName: "createdByType", type: { name: "String" } }, - type: { - readOnly: true, - serializedName: "type", + createdAt: { + serializedName: "createdAt", type: { - name: "String" - } - } - } - } -}; - -export const AgreementTerms: msRest.CompositeMapper = { - serializedName: "AgreementTerms", - type: { - name: "Composite", - className: "AgreementTerms", - modelProperties: { - ...Resource.type.modelProperties, - publisher: { - serializedName: "properties.publisher", - type: { - name: "String" + name: "DateTime" } }, - product: { - serializedName: "properties.product", + lastModifiedBy: { + serializedName: "lastModifiedBy", type: { name: "String" } }, - plan: { - serializedName: "properties.plan", + lastModifiedByType: { + serializedName: "lastModifiedByType", type: { name: "String" } }, - licenseTextLink: { - serializedName: "properties.licenseTextLink", + lastModifiedAt: { + serializedName: "lastModifiedAt", type: { - name: "String" + name: "DateTime" } - }, - privacyPolicyLink: { - serializedName: "properties.privacyPolicyLink", + } + } + } +}; + +export const Resource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, type: { name: "String" } }, - retrieveDatetime: { - serializedName: "properties.retrieveDatetime", + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - signature: { - serializedName: "properties.signature", + type: { + serializedName: "type", + readOnly: true, type: { name: "String" } - }, - accepted: { - serializedName: "properties.accepted", + } + } + } +}; + +export const ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", type: { - name: "Boolean" + name: "Composite", + className: "ErrorResponseError" } } } } }; -export const ErrorResponseError: msRest.CompositeMapper = { - serializedName: "ErrorResponse_error", +export const ErrorResponseError: coreClient.CompositeMapper = { type: { name: "Composite", className: "ErrorResponseError", modelProperties: { code: { - readOnly: true, serializedName: "code", + readOnly: true, type: { name: "String" } }, message: { - readOnly: true, serializedName: "message", + readOnly: true, type: { name: "String" } @@ -126,25 +122,57 @@ export const ErrorResponseError: msRest.CompositeMapper = { } }; -export const ErrorResponse: msRest.CompositeMapper = { - serializedName: "ErrorResponse", +export const OperationListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorResponse", + className: "OperationListResult", modelProperties: { - error: { - serializedName: "error", + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const Operation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + display: { + serializedName: "display", type: { name: "Composite", - className: "ErrorResponseError" + className: "OperationDisplay" } } } } }; -export const OperationDisplay: msRest.CompositeMapper = { - serializedName: "Operation_display", +export const OperationDisplay: coreClient.CompositeMapper = { type: { name: "Composite", className: "OperationDisplay", @@ -166,58 +194,83 @@ export const OperationDisplay: msRest.CompositeMapper = { type: { name: "String" } + }, + description: { + serializedName: "description", + type: { + name: "String" + } } } } }; -export const Operation: msRest.CompositeMapper = { - serializedName: "Operation", +export const AgreementTerms: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Operation", + className: "AgreementTerms", modelProperties: { - name: { - serializedName: "name", + ...Resource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + publisher: { + serializedName: "properties.publisher", type: { name: "String" } }, - display: { - serializedName: "display", + product: { + serializedName: "properties.product", type: { - name: "Composite", - className: "OperationDisplay" + name: "String" } - } - } - } -}; - -export const OperationListResult: msRest.CompositeMapper = { - serializedName: "OperationListResult", - type: { - name: "Composite", - className: "OperationListResult", - modelProperties: { - value: { - serializedName: "", + }, + plan: { + serializedName: "properties.plan", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Operation" - } - } + name: "String" } }, - nextLink: { - readOnly: true, - serializedName: "nextLink", + licenseTextLink: { + serializedName: "properties.licenseTextLink", type: { name: "String" } + }, + privacyPolicyLink: { + serializedName: "properties.privacyPolicyLink", + type: { + name: "String" + } + }, + marketplaceTermsLink: { + serializedName: "properties.marketplaceTermsLink", + type: { + name: "String" + } + }, + retrieveDatetime: { + serializedName: "properties.retrieveDatetime", + type: { + name: "String" + } + }, + signature: { + serializedName: "properties.signature", + type: { + name: "String" + } + }, + accepted: { + serializedName: "properties.accepted", + type: { + name: "Boolean" + } } } } diff --git a/sdk/marketplaceordering/arm-marketplaceordering/src/models/marketplaceAgreementsMappers.ts b/sdk/marketplaceordering/arm-marketplaceordering/src/models/marketplaceAgreementsMappers.ts deleted file mode 100644 index 10d9ac850590..000000000000 --- a/sdk/marketplaceordering/arm-marketplaceordering/src/models/marketplaceAgreementsMappers.ts +++ /dev/null @@ -1,16 +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 { - AgreementTerms, - BaseResource, - CloudError, - ErrorResponse, - ErrorResponseError, - Resource -} from "../models/mappers"; diff --git a/sdk/marketplaceordering/arm-marketplaceordering/src/models/operationsMappers.ts b/sdk/marketplaceordering/arm-marketplaceordering/src/models/operationsMappers.ts deleted file mode 100644 index f95be41b77a7..000000000000 --- a/sdk/marketplaceordering/arm-marketplaceordering/src/models/operationsMappers.ts +++ /dev/null @@ -1,15 +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 { - ErrorResponse, - ErrorResponseError, - Operation, - OperationDisplay, - OperationListResult -} from "../models/mappers"; diff --git a/sdk/marketplaceordering/arm-marketplaceordering/src/models/parameters.ts b/sdk/marketplaceordering/arm-marketplaceordering/src/models/parameters.ts index 2462ce8c76ff..1cae2a2b557c 100644 --- a/sdk/marketplaceordering/arm-marketplaceordering/src/models/parameters.ts +++ b/sdk/marketplaceordering/arm-marketplaceordering/src/models/parameters.ts @@ -1,95 +1,134 @@ /* - * 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 { AgreementTerms as AgreementTermsMapper } 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-01-01", + isConstant: true, serializedName: "api-version", type: { name: "String" } } }; -export const nextPageLink: msRest.OperationURLParameter = { - parameterPath: "nextPageLink", + +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", mapper: { + serializedName: "subscriptionId", required: true, - serializedName: "nextLink", type: { name: "String" } - }, - skipEncoding: true + } }; -export const offerId: msRest.OperationURLParameter = { - parameterPath: "offerId", + +export const offerType: OperationURLParameter = { + parameterPath: "offerType", mapper: { + serializedName: "offerType", required: true, - serializedName: "offerId", type: { name: "String" } } }; -export const offerType: msRest.OperationURLParameter = { - parameterPath: "offerType", + +export const publisherId: OperationURLParameter = { + parameterPath: "publisherId", + mapper: { + serializedName: "publisherId", + required: true, + type: { + name: "String" + } + } +}; + +export const offerId: OperationURLParameter = { + parameterPath: "offerId", mapper: { + serializedName: "offerId", required: true, - isConstant: true, - serializedName: "offerType", - defaultValue: 'virtualmachine', type: { name: "String" } } }; -export const planId: msRest.OperationURLParameter = { + +export const planId: OperationURLParameter = { parameterPath: "planId", mapper: { - required: true, serializedName: "planId", + required: true, type: { name: "String" } } }; -export const publisherId: msRest.OperationURLParameter = { - parameterPath: "publisherId", + +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], mapper: { - required: true, - serializedName: "publisherId", + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", type: { name: "String" } } }; -export const subscriptionId: msRest.OperationURLParameter = { - parameterPath: "subscriptionId", + +export const parameters: OperationParameter = { + parameterPath: "parameters", + mapper: AgreementTermsMapper +}; + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", mapper: { + serializedName: "nextLink", required: true, - serializedName: "subscriptionId", type: { name: "String" } - } + }, + skipEncoding: true }; diff --git a/sdk/marketplaceordering/arm-marketplaceordering/src/operations/index.ts b/sdk/marketplaceordering/arm-marketplaceordering/src/operations/index.ts index 075720543718..5c3352752d17 100644 --- a/sdk/marketplaceordering/arm-marketplaceordering/src/operations/index.ts +++ b/sdk/marketplaceordering/arm-marketplaceordering/src/operations/index.ts @@ -1,11 +1,9 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export * from "./marketplaceAgreements"; diff --git a/sdk/marketplaceordering/arm-marketplaceordering/src/operations/marketplaceAgreements.ts b/sdk/marketplaceordering/arm-marketplaceordering/src/operations/marketplaceAgreements.ts index bbedaac653da..941ffd10aedf 100644 --- a/sdk/marketplaceordering/arm-marketplaceordering/src/operations/marketplaceAgreements.ts +++ b/sdk/marketplaceordering/arm-marketplaceordering/src/operations/marketplaceAgreements.ts @@ -1,105 +1,87 @@ /* - * 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/marketplaceAgreementsMappers"; +import { MarketplaceAgreements } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { MarketplaceOrderingAgreementsContext } from "../marketplaceOrderingAgreementsContext"; +import { MarketplaceOrderingAgreements } from "../marketplaceOrderingAgreements"; +import { + OfferType, + MarketplaceAgreementsGetOptionalParams, + MarketplaceAgreementsGetResponse, + AgreementTerms, + MarketplaceAgreementsCreateOptionalParams, + MarketplaceAgreementsCreateResponse, + MarketplaceAgreementsSignOptionalParams, + MarketplaceAgreementsSignResponse, + MarketplaceAgreementsCancelOptionalParams, + MarketplaceAgreementsCancelResponse, + MarketplaceAgreementsGetAgreementOptionalParams, + MarketplaceAgreementsGetAgreementResponse, + MarketplaceAgreementsListOptionalParams, + MarketplaceAgreementsListResponse +} from "../models"; -/** Class representing a MarketplaceAgreements. */ -export class MarketplaceAgreements { - private readonly client: MarketplaceOrderingAgreementsContext; +/** Class containing MarketplaceAgreements operations. */ +export class MarketplaceAgreementsImpl implements MarketplaceAgreements { + private readonly client: MarketplaceOrderingAgreements; /** - * Create a MarketplaceAgreements. - * @param {MarketplaceOrderingAgreementsContext} client Reference to the service client. + * Initialize a new instance of the class MarketplaceAgreements class. + * @param client Reference to the service client */ - constructor(client: MarketplaceOrderingAgreementsContext) { + constructor(client: MarketplaceOrderingAgreements) { this.client = client; } /** * Get marketplace terms. + * @param offerType Offer Type, currently only virtualmachine type is supported. * @param publisherId Publisher identifier string of image being deployed. * @param offerId Offer identifier string of image being deployed. * @param planId Plan identifier string of image being deployed. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - get(publisherId: string, offerId: string, planId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param publisherId Publisher identifier string of image being deployed. - * @param offerId Offer identifier string of image being deployed. - * @param planId Plan identifier string of image being deployed. - * @param callback The callback - */ - get(publisherId: string, offerId: string, planId: string, callback: msRest.ServiceCallback): void; - /** - * @param publisherId Publisher identifier string of image being deployed. - * @param offerId Offer identifier string of image being deployed. - * @param planId Plan identifier string of image being deployed. - * @param options The optional parameters - * @param callback The callback - */ - get(publisherId: string, offerId: string, planId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(publisherId: string, offerId: string, planId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + offerType: OfferType, + publisherId: string, + offerId: string, + planId: string, + options?: MarketplaceAgreementsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - publisherId, - offerId, - planId, - options - }, - getOperationSpec, - callback) as Promise; + { offerType, publisherId, offerId, planId, options }, + getOperationSpec + ); } /** * Save marketplace terms. + * @param offerType Offer Type, currently only virtualmachine type is supported. * @param publisherId Publisher identifier string of image being deployed. * @param offerId Offer identifier string of image being deployed. * @param planId Plan identifier string of image being deployed. * @param parameters Parameters supplied to the Create Marketplace Terms operation. - * @param [options] The optional parameters - * @returns Promise - */ - create(publisherId: string, offerId: string, planId: string, parameters: Models.AgreementTerms, options?: msRest.RequestOptionsBase): Promise; - /** - * @param publisherId Publisher identifier string of image being deployed. - * @param offerId Offer identifier string of image being deployed. - * @param planId Plan identifier string of image being deployed. - * @param parameters Parameters supplied to the Create Marketplace Terms operation. - * @param callback The callback + * @param options The options parameters. */ - create(publisherId: string, offerId: string, planId: string, parameters: Models.AgreementTerms, callback: msRest.ServiceCallback): void; - /** - * @param publisherId Publisher identifier string of image being deployed. - * @param offerId Offer identifier string of image being deployed. - * @param planId Plan identifier string of image being deployed. - * @param parameters Parameters supplied to the Create Marketplace Terms operation. - * @param options The optional parameters - * @param callback The callback - */ - create(publisherId: string, offerId: string, planId: string, parameters: Models.AgreementTerms, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - create(publisherId: string, offerId: string, planId: string, parameters: Models.AgreementTerms, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + create( + offerType: OfferType, + publisherId: string, + offerId: string, + planId: string, + parameters: AgreementTerms, + options?: MarketplaceAgreementsCreateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - publisherId, - offerId, - planId, - parameters, - options - }, - createOperationSpec, - callback) as Promise; + { offerType, publisherId, offerId, planId, parameters, options }, + createOperationSpec + ); } /** @@ -107,35 +89,18 @@ export class MarketplaceAgreements { * @param publisherId Publisher identifier string of image being deployed. * @param offerId Offer identifier string of image being deployed. * @param planId Plan identifier string of image being deployed. - * @param [options] The optional parameters - * @returns Promise - */ - sign(publisherId: string, offerId: string, planId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param publisherId Publisher identifier string of image being deployed. - * @param offerId Offer identifier string of image being deployed. - * @param planId Plan identifier string of image being deployed. - * @param callback The callback - */ - sign(publisherId: string, offerId: string, planId: string, callback: msRest.ServiceCallback): void; - /** - * @param publisherId Publisher identifier string of image being deployed. - * @param offerId Offer identifier string of image being deployed. - * @param planId Plan identifier string of image being deployed. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - sign(publisherId: string, offerId: string, planId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - sign(publisherId: string, offerId: string, planId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + sign( + publisherId: string, + offerId: string, + planId: string, + options?: MarketplaceAgreementsSignOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - publisherId, - offerId, - planId, - options - }, - signOperationSpec, - callback) as Promise; + { publisherId, offerId, planId, options }, + signOperationSpec + ); } /** @@ -143,35 +108,18 @@ export class MarketplaceAgreements { * @param publisherId Publisher identifier string of image being deployed. * @param offerId Offer identifier string of image being deployed. * @param planId Plan identifier string of image being deployed. - * @param [options] The optional parameters - * @returns Promise - */ - cancel(publisherId: string, offerId: string, planId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param publisherId Publisher identifier string of image being deployed. - * @param offerId Offer identifier string of image being deployed. - * @param planId Plan identifier string of image being deployed. - * @param callback The callback - */ - cancel(publisherId: string, offerId: string, planId: string, callback: msRest.ServiceCallback): void; - /** - * @param publisherId Publisher identifier string of image being deployed. - * @param offerId Offer identifier string of image being deployed. - * @param planId Plan identifier string of image being deployed. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - cancel(publisherId: string, offerId: string, planId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - cancel(publisherId: string, offerId: string, planId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + cancel( + publisherId: string, + offerId: string, + planId: string, + options?: MarketplaceAgreementsCancelOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - publisherId, - offerId, - planId, - options - }, - cancelOperationSpec, - callback) as Promise; + { publisherId, offerId, planId, options }, + cancelOperationSpec + ); } /** @@ -179,114 +127,61 @@ export class MarketplaceAgreements { * @param publisherId Publisher identifier string of image being deployed. * @param offerId Offer identifier string of image being deployed. * @param planId Plan identifier string of image being deployed. - * @param [options] The optional parameters - * @returns Promise - */ - getAgreement(publisherId: string, offerId: string, planId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param publisherId Publisher identifier string of image being deployed. - * @param offerId Offer identifier string of image being deployed. - * @param planId Plan identifier string of image being deployed. - * @param callback The callback + * @param options The options parameters. */ - getAgreement(publisherId: string, offerId: string, planId: string, callback: msRest.ServiceCallback): void; - /** - * @param publisherId Publisher identifier string of image being deployed. - * @param offerId Offer identifier string of image being deployed. - * @param planId Plan identifier string of image being deployed. - * @param options The optional parameters - * @param callback The callback - */ - getAgreement(publisherId: string, offerId: string, planId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getAgreement(publisherId: string, offerId: string, planId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getAgreement( + publisherId: string, + offerId: string, + planId: string, + options?: MarketplaceAgreementsGetAgreementOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - publisherId, - offerId, - planId, - options - }, - getAgreementOperationSpec, - callback) as Promise; + { publisherId, offerId, planId, options }, + getAgreementOperationSpec + ); } /** * List marketplace agreements in the subscription. - * @param [options] The optional parameters - * @returns Promise - */ - list(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback + * @param options The options parameters. */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback) as Promise; + list( + options?: MarketplaceAgreementsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/offerTypes/{offerType}/publishers/{publisherId}/offers/{offerId}/plans/{planId}/agreements/current", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/offerTypes/{offerType}/publishers/{publisherId}/offers/{offerId}/plans/{planId}/agreements/current", - urlParameters: [ - Parameters.subscriptionId, - Parameters.offerType, - Parameters.publisherId, - Parameters.offerId, - Parameters.planId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.AgreementTerms }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, - serializer -}; - -const createOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/offerTypes/{offerType}/publishers/{publisherId}/offers/{offerId}/plans/{planId}/agreements/current", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.offerType, + Parameters.$host, Parameters.subscriptionId, + Parameters.offerType, Parameters.publisherId, Parameters.offerId, Parameters.planId ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.AgreementTerms, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/offerTypes/{offerType}/publishers/{publisherId}/offers/{offerId}/plans/{planId}/agreements/current", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.AgreementTerms @@ -295,24 +190,24 @@ const createOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - serializer -}; - -const signOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements/{publisherId}/offers/{offerId}/plans/{planId}/sign", + requestBody: Parameters.parameters, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, + Parameters.offerType, Parameters.publisherId, Parameters.offerId, Parameters.planId ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const signOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements/{publisherId}/offers/{offerId}/plans/{planId}/sign", + httpMethod: "POST", responses: { 200: { bodyMapper: Mappers.AgreementTerms @@ -321,24 +216,21 @@ const signOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - serializer -}; - -const cancelOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements/{publisherId}/offers/{offerId}/plans/{planId}/cancel", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.publisherId, Parameters.offerId, Parameters.planId ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept], + serializer +}; +const cancelOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements/{publisherId}/offers/{offerId}/plans/{planId}/cancel", + httpMethod: "POST", responses: { 200: { bodyMapper: Mappers.AgreementTerms @@ -347,65 +239,59 @@ const cancelOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - serializer -}; - -const getAgreementOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements/{publisherId}/offers/{offerId}/plans/{planId}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.publisherId, Parameters.offerId, Parameters.planId ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept], + serializer +}; +const getAgreementOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements/{publisherId}/offers/{offerId}/plans/{planId}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.AgreementTerms }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.publisherId, + Parameters.offerId, + Parameters.planId + ], + headerParameters: [Parameters.accept], serializer }; - -const listOperationSpec: msRest.OperationSpec = { +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: { - serializedName: "parsedResponse", type: { name: "Sequence", - element: { - type: { - name: "Composite", - className: "AgreementTerms" - } - } + element: { type: { name: "Composite", className: "AgreementTerms" } } } } }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/marketplaceordering/arm-marketplaceordering/src/operations/operations.ts b/sdk/marketplaceordering/arm-marketplaceordering/src/operations/operations.ts index ddcbbe2cc097..b9aaaf964548 100644 --- a/sdk/marketplaceordering/arm-marketplaceordering/src/operations/operations.ts +++ b/sdk/marketplaceordering/arm-marketplaceordering/src/operations/operations.ts @@ -1,95 +1,111 @@ /* - * 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 { MarketplaceOrderingAgreementsContext } from "../marketplaceOrderingAgreementsContext"; +import { MarketplaceOrderingAgreements } from "../marketplaceOrderingAgreements"; +import { + Operation, + OperationsListNextOptionalParams, + OperationsListOptionalParams, + OperationsListResponse, + OperationsListNextResponse +} from "../models"; -/** Class representing a Operations. */ -export class Operations { - private readonly client: MarketplaceOrderingAgreementsContext; +/// +/** Class containing Operations operations. */ +export class OperationsImpl implements Operations { + private readonly client: MarketplaceOrderingAgreements; /** - * Create a Operations. - * @param {MarketplaceOrderingAgreementsContext} client Reference to the service client. + * Initialize a new instance of the class Operations class. + * @param client Reference to the service client */ - constructor(client: MarketplaceOrderingAgreementsContext) { + constructor(client: MarketplaceOrderingAgreements) { this.client = client; } /** * Lists all of the available Microsoft.MarketplaceOrdering REST API 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; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options + public list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; }, - listOperationSpec, - callback) as Promise; + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: OperationsListOptionalParams + ): 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?: OperationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } } /** * Lists all of the available Microsoft.MarketplaceOrdering REST API operations. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback + * @param options The options parameters. */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + private _list( + options?: OperationsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @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 _listNext( + nextLink: string, + options?: OperationsListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; + { nextLink, options }, + listNextOperationSpec + ); } } - // 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.MarketplaceOrdering/operations", httpMethod: "GET", - path: "providers/Microsoft.MarketplaceOrdering/operations", - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.OperationListResult @@ -98,19 +114,14 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + 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.OperationListResult @@ -119,5 +130,8 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.nextLink], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/marketplaceordering/arm-marketplaceordering/src/operationsInterfaces/index.ts b/sdk/marketplaceordering/arm-marketplaceordering/src/operationsInterfaces/index.ts new file mode 100644 index 000000000000..5c3352752d17 --- /dev/null +++ b/sdk/marketplaceordering/arm-marketplaceordering/src/operationsInterfaces/index.ts @@ -0,0 +1,10 @@ +/* + * 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 "./marketplaceAgreements"; +export * from "./operations"; diff --git a/sdk/marketplaceordering/arm-marketplaceordering/src/operationsInterfaces/marketplaceAgreements.ts b/sdk/marketplaceordering/arm-marketplaceordering/src/operationsInterfaces/marketplaceAgreements.ts new file mode 100644 index 000000000000..7f68268e2446 --- /dev/null +++ b/sdk/marketplaceordering/arm-marketplaceordering/src/operationsInterfaces/marketplaceAgreements.ts @@ -0,0 +1,106 @@ +/* + * 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 { + OfferType, + MarketplaceAgreementsGetOptionalParams, + MarketplaceAgreementsGetResponse, + AgreementTerms, + MarketplaceAgreementsCreateOptionalParams, + MarketplaceAgreementsCreateResponse, + MarketplaceAgreementsSignOptionalParams, + MarketplaceAgreementsSignResponse, + MarketplaceAgreementsCancelOptionalParams, + MarketplaceAgreementsCancelResponse, + MarketplaceAgreementsGetAgreementOptionalParams, + MarketplaceAgreementsGetAgreementResponse, + MarketplaceAgreementsListOptionalParams, + MarketplaceAgreementsListResponse +} from "../models"; + +/** Interface representing a MarketplaceAgreements. */ +export interface MarketplaceAgreements { + /** + * Get marketplace terms. + * @param offerType Offer Type, currently only virtualmachine type is supported. + * @param publisherId Publisher identifier string of image being deployed. + * @param offerId Offer identifier string of image being deployed. + * @param planId Plan identifier string of image being deployed. + * @param options The options parameters. + */ + get( + offerType: OfferType, + publisherId: string, + offerId: string, + planId: string, + options?: MarketplaceAgreementsGetOptionalParams + ): Promise; + /** + * Save marketplace terms. + * @param offerType Offer Type, currently only virtualmachine type is supported. + * @param publisherId Publisher identifier string of image being deployed. + * @param offerId Offer identifier string of image being deployed. + * @param planId Plan identifier string of image being deployed. + * @param parameters Parameters supplied to the Create Marketplace Terms operation. + * @param options The options parameters. + */ + create( + offerType: OfferType, + publisherId: string, + offerId: string, + planId: string, + parameters: AgreementTerms, + options?: MarketplaceAgreementsCreateOptionalParams + ): Promise; + /** + * Sign marketplace terms. + * @param publisherId Publisher identifier string of image being deployed. + * @param offerId Offer identifier string of image being deployed. + * @param planId Plan identifier string of image being deployed. + * @param options The options parameters. + */ + sign( + publisherId: string, + offerId: string, + planId: string, + options?: MarketplaceAgreementsSignOptionalParams + ): Promise; + /** + * Cancel marketplace terms. + * @param publisherId Publisher identifier string of image being deployed. + * @param offerId Offer identifier string of image being deployed. + * @param planId Plan identifier string of image being deployed. + * @param options The options parameters. + */ + cancel( + publisherId: string, + offerId: string, + planId: string, + options?: MarketplaceAgreementsCancelOptionalParams + ): Promise; + /** + * Get marketplace agreement. + * @param publisherId Publisher identifier string of image being deployed. + * @param offerId Offer identifier string of image being deployed. + * @param planId Plan identifier string of image being deployed. + * @param options The options parameters. + */ + getAgreement( + publisherId: string, + offerId: string, + planId: string, + options?: MarketplaceAgreementsGetAgreementOptionalParams + ): Promise; + /** + * List marketplace agreements in the subscription. + * @param options The options parameters. + */ + list( + options?: MarketplaceAgreementsListOptionalParams + ): Promise; +} diff --git a/sdk/marketplaceordering/arm-marketplaceordering/src/operationsInterfaces/operations.ts b/sdk/marketplaceordering/arm-marketplaceordering/src/operationsInterfaces/operations.ts new file mode 100644 index 000000000000..497b77d23eda --- /dev/null +++ b/sdk/marketplaceordering/arm-marketplaceordering/src/operationsInterfaces/operations.ts @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Operation, OperationsListOptionalParams } from "../models"; + +/// +/** Interface representing a Operations. */ +export interface Operations { + /** + * Lists all of the available Microsoft.MarketplaceOrdering REST API operations. + * @param options The options parameters. + */ + list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/marketplaceordering/arm-marketplaceordering/test/sampleTest.ts b/sdk/marketplaceordering/arm-marketplaceordering/test/sampleTest.ts new file mode 100644 index 000000000000..7ed89b043e1b --- /dev/null +++ b/sdk/marketplaceordering/arm-marketplaceordering/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/marketplaceordering/arm-marketplaceordering/tsconfig.json b/sdk/marketplaceordering/arm-marketplaceordering/tsconfig.json index 422b584abd5e..6e3251194117 100644 --- a/sdk/marketplaceordering/arm-marketplaceordering/tsconfig.json +++ b/sdk/marketplaceordering/arm-marketplaceordering/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/marketplaceordering/ci.yml b/sdk/marketplaceordering/ci.yml new file mode 100644 index 000000000000..227e94a69418 --- /dev/null +++ b/sdk/marketplaceordering/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/marketplaceordering/ + +pr: + branches: + include: + - main + - release/* + - hotfix/* + paths: + include: + - sdk/marketplaceordering/ + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: marketplaceordering + Artifacts: + - name: azure-arm-marketplaceordering + safeName: azurearmmarketplaceordering + \ No newline at end of file