From 47a4d1ef296d131ef01b50b58df6de36ed9f2c77 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 13 Jul 2022 15:43:34 +0000 Subject: [PATCH] CodeGen from PR 2513 in test-repo-billy/azure-rest-api-specs Merge pull request #2513 from test-repo-billy/xiaoxu/swaggertest071322 update swagger file --- common/config/rush/pnpm-lock.yaml | 151 ++-- rush.json | 9 +- sdk/adp/arm-adp/CHANGELOG.md | 11 + sdk/adp/arm-adp/LICENSE | 21 + sdk/adp/arm-adp/README.md | 38 + sdk/adp/arm-adp/_meta.json | 8 + sdk/adp/arm-adp/api-extractor.json | 31 + sdk/adp/arm-adp/package.json | 114 +++ sdk/adp/arm-adp/review/adp.api.md | 466 ++++++++++ sdk/adp/arm-adp/rollup.config.js | 122 +++ sdk/adp/arm-adp/src/adpManagementClient.ts | 135 +++ sdk/adp/arm-adp/src/index.ts | 12 + sdk/adp/arm-adp/src/lroImpl.ts | 34 + sdk/adp/arm-adp/src/models/index.ts | 606 +++++++++++++ sdk/adp/arm-adp/src/models/mappers.ts | 833 ++++++++++++++++++ sdk/adp/arm-adp/src/models/parameters.ts | 164 ++++ sdk/adp/arm-adp/src/operations/accounts.ts | 704 +++++++++++++++ sdk/adp/arm-adp/src/operations/dataPools.ts | 592 +++++++++++++ sdk/adp/arm-adp/src/operations/index.ts | 11 + sdk/adp/arm-adp/src/operations/operations.ts | 137 +++ .../src/operationsInterfaces/accounts.ts | 142 +++ .../src/operationsInterfaces/dataPools.ts | 138 +++ .../arm-adp/src/operationsInterfaces/index.ts | 11 + .../src/operationsInterfaces/operations.ts | 22 + sdk/adp/arm-adp/test/sampleTest.ts | 43 + sdk/adp/arm-adp/tsconfig.json | 27 + sdk/adp/ci.mgmt.yml | 38 + 27 files changed, 4558 insertions(+), 62 deletions(-) create mode 100644 sdk/adp/arm-adp/CHANGELOG.md create mode 100644 sdk/adp/arm-adp/LICENSE create mode 100644 sdk/adp/arm-adp/README.md create mode 100644 sdk/adp/arm-adp/_meta.json create mode 100644 sdk/adp/arm-adp/api-extractor.json create mode 100644 sdk/adp/arm-adp/package.json create mode 100644 sdk/adp/arm-adp/review/adp.api.md create mode 100644 sdk/adp/arm-adp/rollup.config.js create mode 100644 sdk/adp/arm-adp/src/adpManagementClient.ts create mode 100644 sdk/adp/arm-adp/src/index.ts create mode 100644 sdk/adp/arm-adp/src/lroImpl.ts create mode 100644 sdk/adp/arm-adp/src/models/index.ts create mode 100644 sdk/adp/arm-adp/src/models/mappers.ts create mode 100644 sdk/adp/arm-adp/src/models/parameters.ts create mode 100644 sdk/adp/arm-adp/src/operations/accounts.ts create mode 100644 sdk/adp/arm-adp/src/operations/dataPools.ts create mode 100644 sdk/adp/arm-adp/src/operations/index.ts create mode 100644 sdk/adp/arm-adp/src/operations/operations.ts create mode 100644 sdk/adp/arm-adp/src/operationsInterfaces/accounts.ts create mode 100644 sdk/adp/arm-adp/src/operationsInterfaces/dataPools.ts create mode 100644 sdk/adp/arm-adp/src/operationsInterfaces/index.ts create mode 100644 sdk/adp/arm-adp/src/operationsInterfaces/operations.ts create mode 100644 sdk/adp/arm-adp/test/sampleTest.ts create mode 100644 sdk/adp/arm-adp/tsconfig.json create mode 100644 sdk/adp/ci.mgmt.yml diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 9d8459d3e26f..aa6dd19dd22d 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2,6 +2,7 @@ lockfileVersion: 5.3 specifiers: '@rush-temp/abort-controller': file:./projects/abort-controller.tgz + '@rush-temp/adp': file:./projects/adp.tgz '@rush-temp/agrifood-farming': file:./projects/agrifood-farming.tgz '@rush-temp/ai-anomaly-detector': file:./projects/ai-anomaly-detector.tgz '@rush-temp/ai-document-translator': file:./projects/ai-document-translator.tgz @@ -286,6 +287,7 @@ specifiers: dependencies: '@rush-temp/abort-controller': file:projects/abort-controller.tgz + '@rush-temp/adp': file:projects/adp.tgz '@rush-temp/agrifood-farming': file:projects/agrifood-farming.tgz '@rush-temp/ai-anomaly-detector': file:projects/ai-anomaly-detector.tgz '@rush-temp/ai-document-translator': file:projects/ai-document-translator.tgz @@ -3008,7 +3010,7 @@ packages: dev: false /array-flatten/1.1.1: - resolution: {integrity: sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=} + resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} dev: false /array-includes/3.1.5: @@ -3248,7 +3250,7 @@ packages: dev: false /buffer-equal-constant-time/1.0.1: - resolution: {integrity: sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=} + resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} dev: false /buffer-from/1.1.2: @@ -3379,7 +3381,7 @@ packages: dev: false /charenc/0.0.2: - resolution: {integrity: sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=} + resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==} dev: false /check-error/1.0.2: @@ -3500,7 +3502,7 @@ packages: dev: false /concat-map/0.0.1: - resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: false /concurrently/7.2.0: @@ -3552,7 +3554,7 @@ packages: dev: false /cookie-signature/1.0.6: - resolution: {integrity: sha1-4wOogrNCzD7oylE6eZmXNNqzriw=} + resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} dev: false /cookie/0.4.2: @@ -3580,6 +3582,7 @@ packages: /core-js/3.22.5: resolution: {integrity: sha512-VP/xYuvJ0MJWRAobcmQ8F2H6Bsn+s7zqAAjFaHGBMc5AQm7zaelhD1LGduFn2EehEcQcU+br6t+fwbpQ5d1ZWA==} + deprecated: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. requiresBuild: true dev: false @@ -3636,7 +3639,7 @@ packages: dev: false /crypt/0.0.2: - resolution: {integrity: sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=} + resolution: {integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==} dev: false /csv-parse/5.0.4: @@ -3871,11 +3874,11 @@ packages: dev: false /edge-launcher/1.2.2: - resolution: {integrity: sha1-60Cq+9Bnpup27/+rBke81VCbN7I=} + resolution: {integrity: sha512-JcD5WBi3BHZXXVSSeEhl6sYO8g5cuynk/hifBzds2Bp4JdzCGLNMHgMCKu5DvrO1yatMgF0goFsxXRGus0yh1g==} dev: false /ee-first/1.1.1: - resolution: {integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=} + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} dev: false /electron-to-chromium/1.4.137: @@ -4708,7 +4711,7 @@ packages: dev: false /fresh/0.5.2: - resolution: {integrity: sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=} + resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} dev: false @@ -4861,7 +4864,7 @@ packages: dev: false /github-from-package/0.0.0: - resolution: {integrity: sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=} + resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==} dev: false /glob-parent/5.1.2: @@ -6119,7 +6122,7 @@ packages: dev: false /media-typer/0.3.0: - resolution: {integrity: sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=} + resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} dev: false @@ -6129,7 +6132,7 @@ packages: dev: false /merge-descriptors/1.0.1: - resolution: {integrity: sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=} + resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==} dev: false /merge-stream/2.0.0: @@ -6465,7 +6468,7 @@ packages: dev: false /noms/0.0.0: - resolution: {integrity: sha1-2o69nzr51nYJGbJ9nNyAkqczKFk=} + resolution: {integrity: sha512-lNDU9VJaOPxUmXcLb+HQFeUgQQPtMI24Gt6hgfuMHRJgMRHMF/qZ4HJD3GDru4sSw9IQl2jPjAYnQrdIeLbwow==} dependencies: inherits: 2.0.4 readable-stream: 1.0.34 @@ -7081,7 +7084,7 @@ packages: dev: false /read-pkg/3.0.0: - resolution: {integrity: sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=} + resolution: {integrity: sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==} engines: {node: '>=4'} dependencies: load-json-file: 4.0.0 @@ -7090,7 +7093,7 @@ packages: dev: false /readable-stream/1.0.34: - resolution: {integrity: sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=} + resolution: {integrity: sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==} dependencies: core-util-is: 1.0.3 inherits: 2.0.4 @@ -7134,7 +7137,7 @@ packages: dev: false /rechoir/0.6.2: - resolution: {integrity: sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=} + resolution: {integrity: sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==} engines: {node: '>= 0.10'} dependencies: resolve: 1.22.0 @@ -7159,18 +7162,18 @@ packages: dev: false /release-zalgo/1.0.0: - resolution: {integrity: sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=} + resolution: {integrity: sha512-gUAyHVHPPC5wdqX/LG4LWtRYtgjxyX78oanFNTMMyFEfOqdC54s3eE82imuWKbOeqYht2CrNf64Qb8vgmmtZGA==} engines: {node: '>=4'} dependencies: es6-error: 4.1.1 dev: false /remove-trailing-separator/1.1.0: - resolution: {integrity: sha1-wkvOKig62tW8P1jg1IJJuSN52O8=} + resolution: {integrity: sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==} dev: false /require-directory/2.1.1: - resolution: {integrity: sha1-jGStX9MNqxyXbiNE/+f3kqam30I=} + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} dev: false @@ -7200,11 +7203,11 @@ packages: dev: false /requires-port/1.0.0: - resolution: {integrity: sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=} + resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} dev: false /resolve-dir/1.0.1: - resolution: {integrity: sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=} + resolution: {integrity: sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==} engines: {node: '>=0.10.0'} dependencies: expand-tilde: 2.0.2 @@ -7222,7 +7225,7 @@ packages: dev: false /resolve-url/0.2.1: - resolution: {integrity: sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=} + resolution: {integrity: sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==} deprecated: https://github.com/lydell/resolve-url#deprecated dev: false @@ -7304,7 +7307,7 @@ packages: dev: false /rollup-plugin-sourcemaps/0.4.2_rollup@1.32.1: - resolution: {integrity: sha1-YhJaqUCHqt97g+9N+vYptHMTXoc=} + resolution: {integrity: sha512-pHUvzofmQx/C3zCkX14h9J9MbRfMjaARED8j8qOY+au4prtk2d567GD29WAHQTeGsDAVeStms3cPnRboC41YzA==} engines: {node: '>=4.5.0', npm: '>=2.15.9'} peerDependencies: rollup: '>=0.31.2' @@ -7315,7 +7318,7 @@ packages: dev: false /rollup-plugin-sourcemaps/0.4.2_rollup@2.73.0: - resolution: {integrity: sha1-YhJaqUCHqt97g+9N+vYptHMTXoc=} + resolution: {integrity: sha512-pHUvzofmQx/C3zCkX14h9J9MbRfMjaARED8j8qOY+au4prtk2d567GD29WAHQTeGsDAVeStms3cPnRboC41YzA==} engines: {node: '>=4.5.0', npm: '>=2.15.9'} peerDependencies: rollup: '>=0.31.2' @@ -7455,7 +7458,7 @@ packages: dev: false /semver/5.3.0: - resolution: {integrity: sha1-myzl094C0XxgEq0yaqa00M9U+U8=} + resolution: {integrity: sha512-mfmm3/H9+67MCVix1h+IXTpDwL6710LyHuk7+cWC9T1mE0qz4iHhh6r4hU2wrIT9iTsAAC2XQRvfblL028cpLw==} hasBin: true dev: false @@ -7513,7 +7516,7 @@ packages: dev: false /set-blocking/2.0.0: - resolution: {integrity: sha1-BF+XgtARrppoA93TgrJDkrPYkPc=} + resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} dev: false /setprototypeof/1.2.0: @@ -7521,7 +7524,7 @@ packages: dev: false /shebang-command/1.2.0: - resolution: {integrity: sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=} + resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} engines: {node: '>=0.10.0'} dependencies: shebang-regex: 1.0.0 @@ -7535,7 +7538,7 @@ packages: dev: false /shebang-regex/1.0.0: - resolution: {integrity: sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=} + resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} engines: {node: '>=0.10.0'} dev: false @@ -7708,7 +7711,7 @@ packages: dev: false /spawn-command/0.0.2-1: - resolution: {integrity: sha1-YvXpRmmBwbeW3Fkpk34RycaSG9A=} + resolution: {integrity: sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg==} dev: false /spawn-wrap/2.0.0: @@ -7746,11 +7749,11 @@ packages: dev: false /sprintf-js/1.0.3: - resolution: {integrity: sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=} + resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} dev: false /statuses/1.5.0: - resolution: {integrity: sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=} + resolution: {integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==} engines: {node: '>= 0.6'} dev: false @@ -7781,7 +7784,7 @@ packages: dev: false /string-width/1.0.2: - resolution: {integrity: sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=} + resolution: {integrity: sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==} engines: {node: '>=0.10.0'} dependencies: code-point-at: 1.1.0 @@ -7841,7 +7844,7 @@ packages: dev: false /string_decoder/0.10.31: - resolution: {integrity: sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=} + resolution: {integrity: sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==} dev: false /string_decoder/1.1.1: @@ -7857,14 +7860,14 @@ packages: dev: false /strip-ansi/3.0.1: - resolution: {integrity: sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=} + resolution: {integrity: sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==} engines: {node: '>=0.10.0'} dependencies: ansi-regex: 2.1.1 dev: false /strip-ansi/4.0.0: - resolution: {integrity: sha1-qEeQIusaw2iocTibY1JixQXuNo8=} + resolution: {integrity: sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==} engines: {node: '>=4'} dependencies: ansi-regex: 3.0.1 @@ -7885,7 +7888,7 @@ packages: dev: false /strip-bom/3.0.0: - resolution: {integrity: sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=} + resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} dev: false @@ -7905,7 +7908,7 @@ packages: dev: false /strip-json-comments/2.0.1: - resolution: {integrity: sha1-PFMZQukIwml8DsNEhYwobHygpgo=} + resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} engines: {node: '>=0.10.0'} dev: false @@ -8009,11 +8012,11 @@ packages: dev: false /text-table/0.2.0: - resolution: {integrity: sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=} + resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: false /through/2.3.8: - resolution: {integrity: sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=} + resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} dev: false /through2/2.0.5: @@ -8024,7 +8027,7 @@ packages: dev: false /timsort/0.3.0: - resolution: {integrity: sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=} + resolution: {integrity: sha512-qsdtZH+vMoCARQtyod4imc2nIJwg9Cc7lPRrw9CzF8ZKR0khdr8+2nX80PBhET3tcyTtJDxAffGh2rXH4tyU8A==} dev: false /tmp/0.2.1: @@ -8035,7 +8038,7 @@ packages: dev: false /to-fast-properties/2.0.0: - resolution: {integrity: sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=} + resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} dev: false @@ -8070,11 +8073,11 @@ packages: dev: false /tr46/0.0.3: - resolution: {integrity: sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=} + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} dev: false /tr46/1.0.1: - resolution: {integrity: sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=} + resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==} dependencies: punycode: 2.1.1 dev: false @@ -8236,7 +8239,7 @@ packages: dev: false /tunnel-agent/0.6.0: - resolution: {integrity: sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=} + resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} dependencies: safe-buffer: 5.2.1 dev: false @@ -8367,7 +8370,7 @@ packages: dev: false /unpipe/1.0.0: - resolution: {integrity: sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=} + resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} engines: {node: '>= 0.8'} dev: false @@ -8383,19 +8386,19 @@ packages: dev: false /urix/0.1.0: - resolution: {integrity: sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=} + resolution: {integrity: sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==} deprecated: Please see https://github.com/lydell/urix#deprecated dev: false /url/0.11.0: - resolution: {integrity: sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=} + resolution: {integrity: sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==} dependencies: punycode: 1.3.2 querystring: 0.2.0 dev: false /util-deprecate/1.0.2: - resolution: {integrity: sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=} + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} dev: false /util/0.12.4: @@ -8410,7 +8413,7 @@ packages: dev: false /utils-merge/1.0.1: - resolution: {integrity: sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=} + resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} engines: {node: '>= 0.4.0'} dev: false @@ -8451,17 +8454,17 @@ packages: dev: false /vary/1.1.2: - resolution: {integrity: sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=} + resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} dev: false /void-elements/2.0.1: - resolution: {integrity: sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=} + resolution: {integrity: sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung==} engines: {node: '>=0.10.0'} dev: false /webidl-conversions/3.0.1: - resolution: {integrity: sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=} + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} dev: false /webidl-conversions/4.0.2: @@ -8469,7 +8472,7 @@ packages: dev: false /whatwg-url/5.0.0: - resolution: {integrity: sha1-lmRU6HZUYuN2RNNib2dCzotwll0=} + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} dependencies: tr46: 0.0.3 webidl-conversions: 3.0.1 @@ -8494,7 +8497,7 @@ packages: dev: false /which-module/2.0.0: - resolution: {integrity: sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=} + resolution: {integrity: sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==} dev: false /which-typed-array/1.1.8: @@ -8569,7 +8572,7 @@ packages: dev: false /wrappy/1.0.2: - resolution: {integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=} + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} dev: false /write-file-atomic/3.0.3: @@ -8621,7 +8624,7 @@ packages: dev: false /xml/1.0.1: - resolution: {integrity: sha1-eLpyAgApxbyHuKgaPPzXS0ovweU=} + resolution: {integrity: sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==} dev: false /xml2js/0.4.23: @@ -8758,7 +8761,7 @@ packages: dev: false /yauzl/2.10.0: - resolution: {integrity: sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=} + resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} dependencies: buffer-crc32: 0.2.13 fd-slicer: 1.1.0 @@ -8833,6 +8836,35 @@ packages: - utf-8-validate dev: false + file:projects/adp.tgz: + resolution: {integrity: sha512-Vt49s+7WdLxh3lCGYOnAWo6wx4KBeYmX5rT+1nisA0qT1gPwXBbu8IU4xxHxB+ow5Kaub9bXZHUaIc9XlXdxfw==, tarball: file:projects/adp.tgz} + name: '@rush-temp/adp' + version: 0.0.0 + dependencies: + '@azure/core-lro': 2.2.4 + '@azure/identity': 2.0.4 + '@microsoft/api-extractor': 7.18.11 + '@rollup/plugin-commonjs': 21.1.0_rollup@2.73.0 + '@rollup/plugin-json': 4.1.0_rollup@2.73.0 + '@rollup/plugin-multi-entry': 4.1.0_rollup@2.73.0 + '@rollup/plugin-node-resolve': 13.3.0_rollup@2.73.0 + '@types/chai': 4.3.1 + chai: 4.3.6 + cross-env: 7.0.3 + mkdirp: 1.0.4 + mocha: 7.2.0 + rimraf: 3.0.2 + rollup: 2.73.0 + rollup-plugin-sourcemaps: 0.6.3_rollup@2.73.0 + tslib: 2.4.0 + typescript: 4.2.4 + uglify-js: 3.15.5 + transitivePeerDependencies: + - '@types/node' + - debug + - supports-color + dev: false + file:projects/agrifood-farming.tgz: resolution: {integrity: sha512-jfGRFh/wo0pjskAqt8jgTp8xnEXNQt/JQMkpSfCAT5EJ5ze59y9Gnfu3K9/VJ+IaAxD6f5K9vGngkEq76ImNSQ==, tarball: file:projects/agrifood-farming.tgz} name: '@rush-temp/agrifood-farming' @@ -11291,7 +11323,7 @@ packages: dev: false file:projects/arm-imagebuilder.tgz: - resolution: {integrity: sha512-/+cDQGr6KaQWlAlnlCwXn6SQ7DACFnnnJd+T9PZ7tQPetMAZrcE2V9UFcmK6/ckODkKswXsOpEeMcjjLzfjZ+w==, tarball: file:projects/arm-imagebuilder.tgz} + resolution: {integrity: sha512-vZKU3oP46Op1+AjMvZnoN6xBFWgHM+Unc/l15Eb2e8U+yMukGVagCG5kREdaRPh/zm0/4LnE+iPe1CCRBsYfNw==, tarball: file:projects/arm-imagebuilder.tgz} name: '@rush-temp/arm-imagebuilder' version: 0.0.0 dependencies: @@ -11313,12 +11345,11 @@ packages: mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.73.0 - rollup-plugin-sourcemaps: 0.6.3_rollup@2.73.0 + rollup-plugin-sourcemaps: 0.6.3_3524d2876ecc1a2f21bdb8bf03c48501 tslib: 2.4.0 typescript: 4.2.4 uglify-js: 3.15.5 transitivePeerDependencies: - - '@types/node' - debug - supports-color dev: false diff --git a/rush.json b/rush.json index ea2ed095aab3..c116474b1180 100644 --- a/rush.json +++ b/rush.json @@ -1,7 +1,7 @@ /** * This is the main configuration file for Rush. * For full documentation, please see https://rushjs.io - */ { + */{ "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json", /** * (Required) This specifies the version of the Rush engine to be used in this repo. @@ -1730,6 +1730,11 @@ "packageName": "@azure/arm-confidentialledger", "projectFolder": "sdk/confidentialledger/arm-confidentialledger", "versionPolicyName": "management" + }, + { + "packageName": "adp", + "projectFolder": "sdk/adp/arm-adp", + "versionPolicyName": "management" } ] -} +} \ No newline at end of file diff --git a/sdk/adp/arm-adp/CHANGELOG.md b/sdk/adp/arm-adp/CHANGELOG.md new file mode 100644 index 000000000000..ed650b749eb7 --- /dev/null +++ b/sdk/adp/arm-adp/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (2022-07-13) + +The package of adp is using our next generation design principles since version 1.0.0-beta.1, which contains breaking changes. + +To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog). + +To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide). + +To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/adp/arm-adp/LICENSE b/sdk/adp/arm-adp/LICENSE new file mode 100644 index 000000000000..5d1d36e0af80 --- /dev/null +++ b/sdk/adp/arm-adp/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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 +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/sdk/adp/arm-adp/README.md b/sdk/adp/arm-adp/README.md new file mode 100644 index 000000000000..f4302675bdf5 --- /dev/null +++ b/sdk/adp/arm-adp/README.md @@ -0,0 +1,38 @@ +# AdpManagement client library for JavaScript + +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AdpManagement client. + +Microsoft Autonomous Development Platform + +[Package (NPM)](https://www.npmjs.com/package/adp) | +[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. + +See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. + + +### Install the `adp` package + +Install the AdpManagement client library for JavaScript with `npm`: + +```bash +npm install adp +``` + + + +### JavaScript Bundle +To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). + +## Key concepts + +### AdpManagementClient + +`AdpManagementClient` is the primary interface for developers using the AdpManagement client library. Explore the methods on this client object to understand the different features of the AdpManagement service that you can access. + diff --git a/sdk/adp/arm-adp/_meta.json b/sdk/adp/arm-adp/_meta.json new file mode 100644 index 000000000000..45306ab17a2e --- /dev/null +++ b/sdk/adp/arm-adp/_meta.json @@ -0,0 +1,8 @@ +{ + "commit": "e504015b342d3c7e91cc275758d47049701cb0af", + "readme": "specification/adp/resource-manager/readme.md", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/adp/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.20.20220608.1", + "repository_url": "https://github.com/test-repo-billy/azure-rest-api-specs.git", + "release_tool": "azure-tools-js-sdk-release-tools@2.3.5", + "use": "@autorest/typescript@6.0.0-alpha.20.20220608.1" +} \ No newline at end of file diff --git a/sdk/adp/arm-adp/api-extractor.json b/sdk/adp/arm-adp/api-extractor.json new file mode 100644 index 000000000000..ce9a845f7701 --- /dev/null +++ b/sdk/adp/arm-adp/api-extractor.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "./types/adp.d.ts" + }, + "messages": { + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, + "extractorMessageReporting": { + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } + } + } +} \ No newline at end of file diff --git a/sdk/adp/arm-adp/package.json b/sdk/adp/arm-adp/package.json new file mode 100644 index 000000000000..becbdcaf21ee --- /dev/null +++ b/sdk/adp/arm-adp/package.json @@ -0,0 +1,114 @@ +{ + "name": "adp", + "sdk-type": "mgmt", + "author": "Microsoft Corporation", + "description": "A generated SDK for AdpManagementClient.", + "version": "1.0.0-beta.1", + "engines": { + "node": ">=12.0.0" + }, + "dependencies": { + "@azure/core-lro": "^2.2.0", + "@azure/abort-controller": "^1.0.0", + "@azure/core-paging": "^1.2.0", + "@azure/core-client": "^1.5.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-rest-pipeline": "^1.8.0", + "tslib": "^2.2.0" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "license": "MIT", + "main": "./dist/index.js", + "module": "./dist-esm/src/index.js", + "types": "./types/adp.d.ts", + "devDependencies": { + "@microsoft/api-extractor": "7.18.11", + "@rollup/plugin-commonjs": "^21.0.1", + "@rollup/plugin-json": "^4.1.0", + "@rollup/plugin-multi-entry": "^4.1.0", + "@rollup/plugin-node-resolve": "^13.1.3", + "mkdirp": "^1.0.4", + "rollup": "^2.66.1", + "rollup-plugin-sourcemaps": "^0.6.3", + "typescript": "~4.2.0", + "uglify-js": "^3.4.9", + "rimraf": "^3.0.0", + "@azure/identity": "^2.0.1", + "@azure-tools/test-recorder": "^2.0.0", + "@azure-tools/test-credential": "^1.0.0", + "mocha": "^7.1.1", + "@types/chai": "^4.2.8", + "chai": "^4.2.0", + "cross-env": "^7.0.2", + "@azure/dev-tool": "^1.0.0" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/adp/arm-adp", + "repository": { + "type": "git", + "url": "https://github.com/Azure/azure-sdk-for-js.git" + }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "files": [ + "dist/**/*.js", + "dist/**/*.js.map", + "dist/**/*.d.ts", + "dist/**/*.d.ts.map", + "dist-esm/**/*.js", + "dist-esm/**/*.js.map", + "dist-esm/**/*.d.ts", + "dist-esm/**/*.d.ts.map", + "src/**/*.ts", + "README.md", + "LICENSE", + "rollup.config.js", + "tsconfig.json", + "review/*", + "CHANGELOG.md", + "types/*" + ], + "scripts": { + "build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "api-extractor run --local", + "lint": "echo skipped", + "audit": "echo skipped", + "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "build:node": "echo skipped", + "build:browser": "echo skipped", + "build:test": "echo skipped", + "build:samples": "echo skipped.", + "check-format": "echo skipped", + "execute:samples": "echo skipped", + "format": "echo skipped", + "test": "npm run integration-test", + "test:node": "echo skipped", + "test:browser": "echo skipped", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:browser": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:browser": "echo skipped", + "docs": "echo skipped" + }, + "sideEffects": false, + "//metadata": { + "constantPaths": [ + { + "path": "src/adpManagementClient.ts", + "prefix": "packageDetails" + } + ] + }, + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/adp/arm-adp/review/adp.api.md b/sdk/adp/arm-adp/review/adp.api.md new file mode 100644 index 000000000000..2c7142d501a2 --- /dev/null +++ b/sdk/adp/arm-adp/review/adp.api.md @@ -0,0 +1,466 @@ +## API Report File for "adp" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import * as coreAuth from '@azure/core-auth'; +import * as coreClient from '@azure/core-client'; +import { PagedAsyncIterableIterator } from '@azure/core-paging'; +import { PollerLike } from '@azure/core-lro'; +import { PollOperationState } from '@azure/core-lro'; + +// @public +export type Account = TrackedResource & { + readonly systemData?: SystemData; + readonly accountId?: string; + readonly provisioningState?: ProvisioningState; +}; + +// @public +export interface AccountCheckNameAvailabilityParameters { + name: string; + type: Type; +} + +// @public +export interface AccountList { + nextLink?: string; + readonly value?: Account[]; +} + +// @public +export interface AccountPatch { + readonly accountId?: string; + readonly provisioningState?: ProvisioningState; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface Accounts { + beginCreateOrUpdate(resourceGroupName: string, accountName: string, options?: AccountsCreateOrUpdateOptionalParams): Promise, AccountsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, accountName: string, options?: AccountsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, accountName: string, options?: AccountsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, accountName: string, options?: AccountsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, accountName: string, options?: AccountsUpdateOptionalParams): Promise, AccountsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, accountName: string, options?: AccountsUpdateOptionalParams): Promise; + checkNameAvailability(parameters: AccountCheckNameAvailabilityParameters, options?: AccountsCheckNameAvailabilityOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, options?: AccountsGetOptionalParams): Promise; + list(options?: AccountsListOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: AccountsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface AccountsCheckNameAvailabilityOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccountsCheckNameAvailabilityResponse = CheckNameAvailabilityResult; + +// @public +export interface AccountsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + parameters?: Account; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type AccountsCreateOrUpdateResponse = Account; + +// @public +export interface AccountsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface AccountsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccountsGetResponse = Account; + +// @public +export interface AccountsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccountsListByResourceGroupNextResponse = AccountList; + +// @public +export interface AccountsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccountsListByResourceGroupResponse = AccountList; + +// @public +export interface AccountsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccountsListNextResponse = AccountList; + +// @public +export interface AccountsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccountsListResponse = AccountList; + +// @public +export interface AccountsUpdateOptionalParams extends coreClient.OperationOptions { + parameters?: AccountPatch; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type AccountsUpdateResponse = Account; + +// @public (undocumented) +export class AdpManagementClient extends coreClient.ServiceClient { + // (undocumented) + $host: string; + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AdpManagementClientOptionalParams); + // (undocumented) + accounts: Accounts; + // (undocumented) + apiVersion: string; + // (undocumented) + dataPools: DataPools; + // (undocumented) + operations: Operations; + // (undocumented) + subscriptionId: string; +} + +// @public +export interface AdpManagementClientOptionalParams extends coreClient.ServiceClientOptions { + $host?: string; + apiVersion?: string; + endpoint?: string; +} + +// @public +export type CheckNameAvailabilityReason = string; + +// @public +export interface CheckNameAvailabilityResult { + readonly message?: string; + readonly nameAvailable?: boolean; + readonly reason?: CheckNameAvailabilityReason; +} + +// @public +export type CreatedByType = string; + +// @public +export type DataPool = Resource & { + readonly systemData?: SystemData; + readonly dataPoolId?: string; + readonly provisioningState?: ProvisioningState; + locations?: DataPoolLocation[]; + tags?: { + [propertyName: string]: string; + }; +}; + +// @public +export interface DataPoolBaseProperties { + readonly dataPoolId?: string; + locations?: DataPoolLocation[]; + readonly provisioningState?: ProvisioningState; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface DataPoolEncryption { + keyName: string; + keyVaultUri: string; + keyVersion?: string; + userAssignedIdentity: string; +} + +// @public +export interface DataPoolList { + nextLink?: string; + readonly value?: DataPool[]; +} + +// @public +export interface DataPoolLocation { + encryption?: DataPoolEncryption; + name: string; + storageAccountCount?: number; + storageSku?: StorageSku; +} + +// @public +export type DataPoolPatch = Resource & { + readonly systemData?: SystemData; + readonly dataPoolId?: string; + readonly provisioningState?: ProvisioningState; + locations?: DataPoolLocation[]; + tags?: { + [propertyName: string]: string; + }; +}; + +// @public +export type DataPoolProperties = DataPoolBaseProperties; + +// @public +export interface DataPools { + beginCreateOrUpdate(resourceGroupName: string, accountName: string, dataPoolName: string, options?: DataPoolsCreateOrUpdateOptionalParams): Promise, DataPoolsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, accountName: string, dataPoolName: string, options?: DataPoolsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, accountName: string, dataPoolName: string, options?: DataPoolsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, accountName: string, dataPoolName: string, options?: DataPoolsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, accountName: string, dataPoolName: string, options?: DataPoolsUpdateOptionalParams): Promise, DataPoolsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, accountName: string, dataPoolName: string, options?: DataPoolsUpdateOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, dataPoolName: string, options?: DataPoolsGetOptionalParams): Promise; + list(resourceGroupName: string, accountName: string, options?: DataPoolsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface DataPoolsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + parameters?: DataPool; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DataPoolsCreateOrUpdateResponse = DataPool; + +// @public +export interface DataPoolsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface DataPoolsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DataPoolsGetResponse = DataPool; + +// @public +export interface DataPoolsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DataPoolsListNextResponse = DataPoolList; + +// @public +export interface DataPoolsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DataPoolsListResponse = DataPoolList; + +// @public +export interface DataPoolsUpdateOptionalParams extends coreClient.OperationOptions { + parameters?: DataPoolPatch; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DataPoolsUpdateResponse = DataPool; + +// @public +export interface ErrorDefinition { + readonly code?: string; + readonly details?: ErrorDefinition[]; + readonly message?: string; +} + +// @public +export interface ErrorResponse { + error?: ErrorDefinition; +} + +// @public +export enum KnownCheckNameAvailabilityReason { + // (undocumented) + AlreadyExists = "AlreadyExists", + // (undocumented) + Invalid = "Invalid" +} + +// @public +export enum KnownCreatedByType { + // (undocumented) + Application = "Application", + // (undocumented) + Key = "Key", + // (undocumented) + ManagedIdentity = "ManagedIdentity", + // (undocumented) + User = "User" +} + +// @public +export enum KnownProvisioningState { + // (undocumented) + Accepted = "Accepted", + // (undocumented) + Canceled = "Canceled", + // (undocumented) + Deleting = "Deleting", + // (undocumented) + Failed = "Failed", + // (undocumented) + Provisioning = "Provisioning", + // (undocumented) + Succeeded = "Succeeded" +} + +// @public +export enum KnownStorageSkuName { + // (undocumented) + PremiumLRS = "Premium_LRS", + // (undocumented) + PremiumZRS = "Premium_ZRS", + // (undocumented) + StandardGRS = "Standard_GRS", + // (undocumented) + StandardGzrs = "Standard_Gzrs", + // (undocumented) + StandardLRS = "Standard_LRS", + // (undocumented) + StandardRagrs = "Standard_Ragrs", + // (undocumented) + StandardRagzrs = "Standard_Ragzrs", + // (undocumented) + StandardZRS = "Standard_ZRS" +} + +// @public +export enum KnownType { + // (undocumented) + MicrosoftAutonomousDevelopmentPlatformAccounts = "Microsoft.AutonomousDevelopmentPlatform/accounts" +} + +// @public +export interface Operation { + actionType?: string; + display?: OperationDisplay; + isDataAction?: boolean; + name?: string; + origin?: string; + serviceSpecification?: OperationServiceSpecification; +} + +// @public +export interface OperationDisplay { + description?: string; + operation?: string; + provider?: string; + resource?: string; +} + +// @public +export interface OperationListResult { + nextLink?: string; + value?: Operation[]; +} + +// @public +export interface OperationLogSpecification { + blobDuration?: string; + displayName?: string; + name?: string; +} + +// @public +export interface OperationMetricAvailability { + blobDuration?: string; + timeGrain?: string; +} + +// @public +export interface OperationMetricSpecification { + aggregationType?: string; + availabilities?: OperationMetricAvailability[]; + displayDescription?: string; + displayName?: string; + enableRegionalMdmAccount?: string; + name?: string; + sourceMdmAccount?: string; + sourceMdmNamespace?: string; + unit?: string; +} + +// @public +export interface Operations { + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface OperationServiceSpecification { + logSpecifications?: OperationLogSpecification[]; + metricSpecifications?: OperationMetricSpecification[]; +} + +// @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 type ProvisioningState = string; + +// @public +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly type?: string; +} + +// @public +export interface StorageSku { + name: StorageSkuName; +} + +// @public +export type StorageSkuName = string; + +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + +// @public +export type TrackedResource = Resource & { + tags?: { + [propertyName: string]: string; + }; + location: string; +}; + +// @public +export type Type = string; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/adp/arm-adp/rollup.config.js b/sdk/adp/arm-adp/rollup.config.js new file mode 100644 index 000000000000..3f89d7309da5 --- /dev/null +++ b/sdk/adp/arm-adp/rollup.config.js @@ -0,0 +1,122 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import nodeResolve from "@rollup/plugin-node-resolve"; +import cjs from "@rollup/plugin-commonjs"; +import sourcemaps from "rollup-plugin-sourcemaps"; +import multiEntry from "@rollup/plugin-multi-entry"; +import json from "@rollup/plugin-json"; + +import nodeBuiltins from "builtin-modules"; + +// #region Warning Handler + +/** + * A function that can determine whether a rollup warning should be ignored. If + * the function returns `true`, then the warning will not be displayed. + */ + +function ignoreNiseSinonEval(warning) { + return ( + warning.code === "EVAL" && + warning.id && + (warning.id.includes("node_modules/nise") || + warning.id.includes("node_modules/sinon")) === true + ); +} + +function ignoreChaiCircularDependency(warning) { + return ( + warning.code === "CIRCULAR_DEPENDENCY" && + warning.importer && warning.importer.includes("node_modules/chai") === true + ); +} + +const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval]; + +/** + * Construct a warning handler for the shared rollup configuration + * that ignores certain warnings that are not relevant to testing. + */ +function makeOnWarnForTesting() { + return (warning, warn) => { + // If every inhibitor returns false (i.e. no inhibitors), then show the warning + if (warningInhibitors.every((inhib) => !inhib(warning))) { + warn(warning); + } + }; +} + +// #endregion + +function makeBrowserTestConfig() { + const config = { + input: { + include: ["dist-esm/test/**/*.spec.js"], + exclude: ["dist-esm/test/**/node/**"] + }, + output: { + file: `dist-test/index.browser.js`, + format: "umd", + sourcemap: true + }, + preserveSymlinks: false, + plugins: [ + multiEntry({ exports: false }), + nodeResolve({ + mainFields: ["module", "browser"] + }), + cjs(), + json(), + sourcemaps() + //viz({ filename: "dist-test/browser-stats.html", sourcemap: true }) + ], + onwarn: makeOnWarnForTesting(), + // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, + // rollup started respecting the "sideEffects" field in package.json. Since + // our package.json sets "sideEffects=false", this also applies to test + // code, which causes all tests to be removed by tree-shaking. + treeshake: false + }; + + return config; +} + +const defaultConfigurationOptions = { + disableBrowserBundle: false +}; + +export function makeConfig(pkg, options) { + options = { + ...defaultConfigurationOptions, + ...(options || {}) + }; + + const baseConfig = { + // Use the package's module field if it has one + input: pkg["module"] || "dist-esm/src/index.js", + external: [ + ...nodeBuiltins, + ...Object.keys(pkg.dependencies), + ...Object.keys(pkg.devDependencies) + ], + output: { file: "dist/index.js", format: "cjs", sourcemap: true }, + preserveSymlinks: false, + plugins: [sourcemaps(), nodeResolve()] + }; + + const config = [baseConfig]; + + if (!options.disableBrowserBundle) { + config.push(makeBrowserTestConfig()); + } + + return config; +} + +export default makeConfig(require("./package.json")); diff --git a/sdk/adp/arm-adp/src/adpManagementClient.ts b/sdk/adp/arm-adp/src/adpManagementClient.ts new file mode 100644 index 000000000000..70890854fef3 --- /dev/null +++ b/sdk/adp/arm-adp/src/adpManagementClient.ts @@ -0,0 +1,135 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import * as coreClient from "@azure/core-client"; +import * as coreRestPipeline from "@azure/core-rest-pipeline"; +import { + PipelineRequest, + PipelineResponse, + SendRequest +} from "@azure/core-rest-pipeline"; +import * as coreAuth from "@azure/core-auth"; +import { OperationsImpl, AccountsImpl, DataPoolsImpl } from "./operations"; +import { Operations, Accounts, DataPools } from "./operationsInterfaces"; +import { AdpManagementClientOptionalParams } from "./models"; + +export class AdpManagementClient extends coreClient.ServiceClient { + $host: string; + apiVersion: string; + subscriptionId: string; + + /** + * Initializes a new instance of the AdpManagementClient class. + * @param credentials Subscription credentials which uniquely identify client subscription. + * @param subscriptionId The ID of the target subscription. + * @param options The parameter options + */ + constructor( + credentials: coreAuth.TokenCredential, + subscriptionId: string, + options?: AdpManagementClientOptionalParams + ) { + 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: AdpManagementClientOptionalParams = { + requestContentType: "application/json; charset=utf-8", + credential: credentials + }; + + const packageDetails = `azsdk-js-adp/1.0.0-beta.1`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; + + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + baseUri: + options.endpoint ?? options.baseUri ?? "https://management.azure.com" + }; + super(optionsWithDefaults); + + if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { + const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); + const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + (pipelinePolicy) => + pipelinePolicy.name === + coreRestPipeline.bearerTokenAuthenticationPolicyName + ); + if (!bearerTokenAuthenticationPolicyFound) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + scopes: `${optionsWithDefaults.baseUri}/.default`, + challengeCallbacks: { + authorizeRequestOnChallenge: + coreClient.authorizeRequestOnClaimChallenge + } + }) + ); + } + } + // Parameter assignments + this.subscriptionId = subscriptionId; + + // Assigning values to Constant parameters + this.$host = options.$host || "https://management.azure.com"; + this.apiVersion = options.apiVersion || "2021-11-01-preview"; + this.operations = new OperationsImpl(this); + this.accounts = new AccountsImpl(this); + this.dataPools = new DataPoolsImpl(this); + this.addCustomApiVersionPolicy(options.apiVersion); + } + + /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ + private addCustomApiVersionPolicy(apiVersion?: string) { + if (!apiVersion) { + return; + } + const apiVersionPolicy = { + name: "CustomApiVersionPolicy", + async sendRequest( + request: PipelineRequest, + next: SendRequest + ): Promise { + const param = request.url.split("?"); + if (param.length > 1) { + const newParams = param[1].split("&").map((item) => { + if (item.indexOf("api-version") > -1) { + return item.replace(/(?<==).*$/, apiVersion); + } else { + return item; + } + }); + request.url = param[0] + "?" + newParams.join("&"); + } + return next(request); + } + }; + this.pipeline.addPolicy(apiVersionPolicy); + } + + operations: Operations; + accounts: Accounts; + dataPools: DataPools; +} diff --git a/sdk/adp/arm-adp/src/index.ts b/sdk/adp/arm-adp/src/index.ts new file mode 100644 index 000000000000..0fbc5aaf40a9 --- /dev/null +++ b/sdk/adp/arm-adp/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 { AdpManagementClient } from "./adpManagementClient"; +export * from "./operationsInterfaces"; diff --git a/sdk/adp/arm-adp/src/lroImpl.ts b/sdk/adp/arm-adp/src/lroImpl.ts new file mode 100644 index 000000000000..518d5f053b4e --- /dev/null +++ b/sdk/adp/arm-adp/src/lroImpl.ts @@ -0,0 +1,34 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { LongRunningOperation, LroResponse } from "@azure/core-lro"; + +export class LroImpl implements LongRunningOperation { + constructor( + private sendOperationFn: (args: any, spec: any) => Promise>, + private args: Record, + private spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record, + public requestPath: string = spec.path!, + public requestMethod: string = spec.httpMethod + ) {} + public async sendInitialRequest(): Promise> { + return this.sendOperationFn(this.args, this.spec); + } + public async sendPollRequest(path: string): Promise> { + const { requestBody, ...restSpec } = this.spec; + return this.sendOperationFn(this.args, { + ...restSpec, + path, + httpMethod: "GET" + }); + } +} diff --git a/sdk/adp/arm-adp/src/models/index.ts b/sdk/adp/arm-adp/src/models/index.ts new file mode 100644 index 000000000000..371e50a6181e --- /dev/null +++ b/sdk/adp/arm-adp/src/models/index.ts @@ -0,0 +1,606 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import * as coreClient from "@azure/core-client"; + +/** Available operations of the service */ +export interface OperationListResult { + /** List of operations supported by the Resource Provider */ + value?: Operation[]; + /** URL to get the next set of operation list results if there are any */ + nextLink?: string; +} + +/** Operation detail payload */ +export interface Operation { + /** Name of the operation */ + name?: string; + /** Indicates whether the operation is a data action */ + isDataAction?: boolean; + /** Indicates the action type */ + actionType?: string; + /** Display of the operation */ + display?: OperationDisplay; + /** Origin of the operation */ + origin?: string; + /** Details about a service operation */ + serviceSpecification?: OperationServiceSpecification; +} + +/** Operation display payload */ +export interface OperationDisplay { + /** Resource provider of the operation */ + provider?: string; + /** Resource of the operation */ + resource?: string; + /** Localized friendly name for the operation */ + operation?: string; + /** Localized friendly description for the operation */ + description?: string; +} + +/** Details about a service operation */ +export interface OperationServiceSpecification { + /** Details about operations related to logs */ + logSpecifications?: OperationLogSpecification[]; + /** Details about operations related to metrics */ + metricSpecifications?: OperationMetricSpecification[]; +} + +/** Details about an operation related to logs */ +export interface OperationLogSpecification { + /** The name of the log category */ + name?: string; + /** Localized display name */ + displayName?: string; + /** Blobs created in the customer storage account, per hour */ + blobDuration?: string; +} + +/** Details about an operation related to metrics */ +export interface OperationMetricSpecification { + /** The name of the metric */ + name?: string; + /** Localized display name of the metric */ + displayName?: string; + /** The description of the metric */ + displayDescription?: string; + /** The unit that the metric is measured in */ + unit?: string; + /** The type of metric aggregation */ + aggregationType?: string; + /** Whether or not the service is using regional MDM accounts */ + enableRegionalMdmAccount?: string; + /** The name of the MDM account */ + sourceMdmAccount?: string; + /** The name of the MDM namespace */ + sourceMdmNamespace?: string; + /** Defines how often data for metrics becomes available */ + availabilities?: OperationMetricAvailability[]; +} + +/** Defines how often data for a metric becomes available */ +export interface OperationMetricAvailability { + /** The granularity for the metric */ + timeGrain?: string; + /** Blob created in the customer storage account, per hour */ + blobDuration?: string; +} + +/** Error response */ +export interface ErrorResponse { + /** The error details */ + error?: ErrorDefinition; +} + +/** Error definition */ +export interface ErrorDefinition { + /** + * Service specific error code which serves as the substatus for the HTTP error code + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * Description of the error + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * Internal error details + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDefinition[]; +} + +/** The parameters used to check the availability of the account name */ +export interface AccountCheckNameAvailabilityParameters { + /** The account name */ + name: string; + /** The type of resource, Microsoft.AutonomousDevelopmentPlatform/accounts */ + type: Type; +} + +/** The checkNameAvailability operation response */ +export interface CheckNameAvailabilityResult { + /** + * Gets a boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or is invalid and cannot be used + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nameAvailable?: boolean; + /** + * Gets the reason that an account name could not be used. The reason element is only returned if nameAvailable is false + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly reason?: CheckNameAvailabilityReason; + /** + * Gets an error message explaining the reason value in more detail + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; +} + +/** The list operation response, that contains the data pools and their properties */ +export interface AccountList { + /** + * List of accounts and their properties + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: Account[]; + /** URL to get the next set of operation list results if there are any */ + nextLink?: string; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + 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; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { + /** + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; +} + +/** ADP account */ +export interface AccountPatch { + /** Resource tags */ + tags?: { [propertyName: string]: string }; + /** + * The account's data-plane ID + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly accountId?: string; + /** + * Gets the status of the account at the time the operation was called + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** The list operation response, that contains the data pools and their properties */ +export interface DataPoolList { + /** + * List of data pools and their properties + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: DataPool[]; + /** URL to get the next set of operation list results if there are any */ + nextLink?: string; +} + +/** Data Pool properties */ +export interface DataPoolBaseProperties { + /** + * The Data Pool's data-plane ID + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly dataPoolId?: string; + /** + * Gets the status of the data pool at the time the operation was called + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** Gets or sets the collection of locations where Data Pool resources should be created */ + locations?: DataPoolLocation[]; + /** Resource tags */ + tags?: { [propertyName: string]: string }; +} + +/** Location of a Data Pool */ +export interface DataPoolLocation { + /** The location name */ + name: string; + /** Encryption properties of a Data Pool location */ + encryption?: DataPoolEncryption; + /** The Storage SKU. Default: Standard_ZRS. */ + storageSku?: StorageSku; + /** The amount of storage accounts provisioned per Data Pool. Default: 5 */ + storageAccountCount?: number; +} + +/** Encryption properties of a Data Pool */ +export interface DataPoolEncryption { + /** The URI of a soft delete-enabled Key Vault that is in the same location as the Data Pool location */ + keyVaultUri: string; + /** The name of Key Vault key */ + keyName: string; + /** The version of Key Vault key */ + keyVersion?: string; + /** The resource ID of a user-assigned Managed Identity used to access the encryption key in the Key Vault. Requires access to the key operations get, wrap, unwrap, and recover */ + userAssignedIdentity: string; +} + +/** The Storage SKU. */ +export interface StorageSku { + /** The SKU name */ + name: StorageSkuName; +} + +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export type TrackedResource = Resource & { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives */ + location: string; +}; + +/** ADP Data Pool */ +export type DataPool = Resource & { + /** + * The system meta data relating to this resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** + * The Data Pool's data-plane ID + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly dataPoolId?: string; + /** + * Gets the status of the data pool at the time the operation was called + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** Gets or sets the collection of locations where Data Pool resources should be created */ + locations?: DataPoolLocation[]; + /** Resource tags */ + tags?: { [propertyName: string]: string }; +}; + +/** ADP Data Pool */ +export type DataPoolPatch = Resource & { + /** + * The system meta data relating to this resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** + * The Data Pool's data-plane ID + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly dataPoolId?: string; + /** + * Gets the status of the data pool at the time the operation was called + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** Gets or sets the collection of locations where Data Pool resources should be created */ + locations?: DataPoolLocation[]; + /** Resource tags */ + tags?: { [propertyName: string]: string }; +}; + +/** Data Pool properties */ +export type DataPoolProperties = DataPoolBaseProperties; + +/** ADP account */ +export type Account = TrackedResource & { + /** + * The system meta data relating to this resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** + * The account's data-plane ID + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly accountId?: string; + /** + * Gets the status of the account at the time the operation was called + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +}; + +/** Known values of {@link Type} that the service accepts. */ +export enum KnownType { + MicrosoftAutonomousDevelopmentPlatformAccounts = "Microsoft.AutonomousDevelopmentPlatform/accounts" +} + +/** + * Defines values for Type. \ + * {@link KnownType} can be used interchangeably with Type, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Microsoft.AutonomousDevelopmentPlatform\/accounts** + */ +export type Type = string; + +/** Known values of {@link CheckNameAvailabilityReason} that the service accepts. */ +export enum KnownCheckNameAvailabilityReason { + Invalid = "Invalid", + AlreadyExists = "AlreadyExists" +} + +/** + * Defines values for CheckNameAvailabilityReason. \ + * {@link KnownCheckNameAvailabilityReason} can be used interchangeably with CheckNameAvailabilityReason, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **AlreadyExists** + */ +export type CheckNameAvailabilityReason = string; + +/** Known values of {@link ProvisioningState} that the service accepts. */ +export enum KnownProvisioningState { + Succeeded = "Succeeded", + Failed = "Failed", + Canceled = "Canceled", + Accepted = "Accepted", + Provisioning = "Provisioning", + Deleting = "Deleting" +} + +/** + * Defines values for ProvisioningState. \ + * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **Accepted** \ + * **Provisioning** \ + * **Deleting** + */ +export type ProvisioningState = string; + +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + User = "User", + Application = "Application", + ManagedIdentity = "ManagedIdentity", + Key = "Key" +} + +/** + * 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 CreatedByType = string; + +/** Known values of {@link StorageSkuName} that the service accepts. */ +export enum KnownStorageSkuName { + StandardLRS = "Standard_LRS", + StandardGRS = "Standard_GRS", + StandardRagrs = "Standard_Ragrs", + StandardZRS = "Standard_ZRS", + PremiumLRS = "Premium_LRS", + PremiumZRS = "Premium_ZRS", + StandardGzrs = "Standard_Gzrs", + StandardRagzrs = "Standard_Ragzrs" +} + +/** + * Defines values for StorageSkuName. \ + * {@link KnownStorageSkuName} can be used interchangeably with StorageSkuName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard_LRS** \ + * **Standard_GRS** \ + * **Standard_Ragrs** \ + * **Standard_ZRS** \ + * **Premium_LRS** \ + * **Premium_ZRS** \ + * **Standard_Gzrs** \ + * **Standard_Ragzrs** + */ +export type StorageSkuName = string; + +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OperationsListResponse = OperationListResult; + +/** Optional parameters. */ +export interface OperationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type OperationsListNextResponse = OperationListResult; + +/** Optional parameters. */ +export interface AccountsCheckNameAvailabilityOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the checkNameAvailability operation. */ +export type AccountsCheckNameAvailabilityResponse = CheckNameAvailabilityResult; + +/** Optional parameters. */ +export interface AccountsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type AccountsListResponse = AccountList; + +/** Optional parameters. */ +export interface AccountsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type AccountsListByResourceGroupResponse = AccountList; + +/** Optional parameters. */ +export interface AccountsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type AccountsGetResponse = Account; + +/** Optional parameters. */ +export interface AccountsUpdateOptionalParams + extends coreClient.OperationOptions { + /** The parameters to provide for the current ADP account */ + parameters?: AccountPatch; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type AccountsUpdateResponse = Account; + +/** Optional parameters. */ +export interface AccountsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** The parameters to provide for the ADP account */ + parameters?: Account; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type AccountsCreateOrUpdateResponse = Account; + +/** Optional parameters. */ +export interface AccountsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface AccountsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type AccountsListNextResponse = AccountList; + +/** Optional parameters. */ +export interface AccountsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type AccountsListByResourceGroupNextResponse = AccountList; + +/** Optional parameters. */ +export interface DataPoolsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type DataPoolsListResponse = DataPoolList; + +/** Optional parameters. */ +export interface DataPoolsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type DataPoolsGetResponse = DataPool; + +/** Optional parameters. */ +export interface DataPoolsUpdateOptionalParams + extends coreClient.OperationOptions { + /** The parameters to provide for the Data Pool */ + parameters?: DataPoolPatch; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type DataPoolsUpdateResponse = DataPool; + +/** Optional parameters. */ +export interface DataPoolsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** The parameters to provide for the Data Pool */ + parameters?: DataPool; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type DataPoolsCreateOrUpdateResponse = DataPool; + +/** Optional parameters. */ +export interface DataPoolsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface DataPoolsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type DataPoolsListNextResponse = DataPoolList; + +/** Optional parameters. */ +export interface AdpManagementClientOptionalParams + extends coreClient.ServiceClientOptions { + /** server parameter */ + $host?: string; + /** Api Version */ + apiVersion?: string; + /** Overrides client endpoint. */ + endpoint?: string; +} diff --git a/sdk/adp/arm-adp/src/models/mappers.ts b/sdk/adp/arm-adp/src/models/mappers.ts new file mode 100644 index 000000000000..7d9a06ea4826 --- /dev/null +++ b/sdk/adp/arm-adp/src/models/mappers.ts @@ -0,0 +1,833 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import * as coreClient from "@azure/core-client"; + +export const OperationListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const Operation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + isDataAction: { + serializedName: "isDataAction", + type: { + name: "Boolean" + } + }, + actionType: { + serializedName: "actionType", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", + type: { + name: "String" + } + }, + serviceSpecification: { + serializedName: "properties.serviceSpecification", + type: { + name: "Composite", + className: "OperationServiceSpecification" + } + } + } + } +}; + +export const OperationDisplay: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const OperationServiceSpecification: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationServiceSpecification", + modelProperties: { + logSpecifications: { + serializedName: "logSpecifications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationLogSpecification" + } + } + } + }, + metricSpecifications: { + serializedName: "metricSpecifications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationMetricSpecification" + } + } + } + } + } + } +}; + +export const OperationLogSpecification: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationLogSpecification", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + blobDuration: { + serializedName: "blobDuration", + type: { + name: "String" + } + } + } + } +}; + +export const OperationMetricSpecification: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationMetricSpecification", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + displayDescription: { + serializedName: "displayDescription", + type: { + name: "String" + } + }, + unit: { + serializedName: "unit", + type: { + name: "String" + } + }, + aggregationType: { + serializedName: "aggregationType", + type: { + name: "String" + } + }, + enableRegionalMdmAccount: { + serializedName: "enableRegionalMdmAccount", + type: { + name: "String" + } + }, + sourceMdmAccount: { + serializedName: "sourceMdmAccount", + type: { + name: "String" + } + }, + sourceMdmNamespace: { + serializedName: "sourceMdmNamespace", + type: { + name: "String" + } + }, + availabilities: { + serializedName: "availabilities", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationMetricAvailability" + } + } + } + } + } + } +}; + +export const OperationMetricAvailability: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationMetricAvailability", + modelProperties: { + timeGrain: { + serializedName: "timeGrain", + type: { + name: "String" + } + }, + blobDuration: { + serializedName: "blobDuration", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDefinition" + } + } + } + } +}; + +export const ErrorDefinition: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDefinition", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDefinition" + } + } + } + } + } + } +}; + +export const AccountCheckNameAvailabilityParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccountCheckNameAvailabilityParameters", + modelProperties: { + name: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*") + }, + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const CheckNameAvailabilityResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CheckNameAvailabilityResult", + modelProperties: { + nameAvailable: { + serializedName: "nameAvailable", + readOnly: true, + type: { + name: "Boolean" + } + }, + reason: { + serializedName: "reason", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const AccountList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccountList", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Account" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + +export const Resource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const AccountPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccountPatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + accountId: { + serializedName: "properties.accountId", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const DataPoolList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataPoolList", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataPool" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const DataPoolBaseProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataPoolBaseProperties", + modelProperties: { + dataPoolId: { + serializedName: "dataPoolId", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + locations: { + serializedName: "locations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataPoolLocation" + } + } + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const DataPoolLocation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataPoolLocation", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + encryption: { + serializedName: "encryption", + type: { + name: "Composite", + className: "DataPoolEncryption" + } + }, + storageSku: { + serializedName: "storageSku", + type: { + name: "Composite", + className: "StorageSku" + } + }, + storageAccountCount: { + constraints: { + InclusiveMinimum: 1 + }, + serializedName: "storageAccountCount", + type: { + name: "Number" + } + } + } + } +}; + +export const DataPoolEncryption: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataPoolEncryption", + modelProperties: { + keyVaultUri: { + serializedName: "keyVaultUri", + required: true, + type: { + name: "String" + } + }, + keyName: { + serializedName: "keyName", + required: true, + type: { + name: "String" + } + }, + keyVersion: { + serializedName: "keyVersion", + type: { + name: "String" + } + }, + userAssignedIdentity: { + serializedName: "userAssignedIdentity", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const StorageSku: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageSku", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const TrackedResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const DataPool: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataPool", + modelProperties: { + ...Resource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + dataPoolId: { + serializedName: "properties.dataPoolId", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + locations: { + serializedName: "properties.locations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataPoolLocation" + } + } + } + }, + tags: { + serializedName: "properties.tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const DataPoolPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataPoolPatch", + modelProperties: { + ...Resource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + dataPoolId: { + serializedName: "properties.dataPoolId", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + locations: { + serializedName: "properties.locations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataPoolLocation" + } + } + } + }, + tags: { + serializedName: "properties.tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const DataPoolProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataPoolProperties", + modelProperties: { + ...DataPoolBaseProperties.type.modelProperties + } + } +}; + +export const Account: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Account", + modelProperties: { + ...TrackedResource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + accountId: { + serializedName: "properties.accountId", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/adp/arm-adp/src/models/parameters.ts b/sdk/adp/arm-adp/src/models/parameters.ts new file mode 100644 index 000000000000..4cc8ef5a144f --- /dev/null +++ b/sdk/adp/arm-adp/src/models/parameters.ts @@ -0,0 +1,164 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + OperationParameter, + OperationURLParameter, + OperationQueryParameter +} from "@azure/core-client"; +import { + AccountCheckNameAvailabilityParameters as AccountCheckNameAvailabilityParametersMapper, + AccountPatch as AccountPatchMapper, + Account as AccountMapper, + DataPoolPatch as DataPoolPatchMapper, + DataPool as DataPoolMapper +} from "../models/mappers"; + +export const accept: OperationParameter = { + parameterPath: "accept", + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Accept", + type: { + name: "String" + } + } +}; + +export const $host: OperationURLParameter = { + parameterPath: "$host", + mapper: { + serializedName: "$host", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2021-11-01-preview", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", + mapper: { + serializedName: "nextLink", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", + type: { + name: "String" + } + } +}; + +export const parameters: OperationParameter = { + parameterPath: "parameters", + mapper: AccountCheckNameAvailabilityParametersMapper +}; + +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + constraints: { + MinLength: 1 + }, + serializedName: "subscriptionId", + required: true, + type: { + name: "String" + } + } +}; + +export const resourceGroupName: OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + constraints: { + MaxLength: 90, + MinLength: 1 + }, + serializedName: "resourceGroupName", + required: true, + type: { + name: "String" + } + } +}; + +export const accountName: OperationURLParameter = { + parameterPath: "accountName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*"), + MaxLength: 50 + }, + serializedName: "accountName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters1: OperationParameter = { + parameterPath: ["options", "parameters"], + mapper: AccountPatchMapper +}; + +export const parameters2: OperationParameter = { + parameterPath: ["options", "parameters"], + mapper: AccountMapper +}; + +export const dataPoolName: OperationURLParameter = { + parameterPath: "dataPoolName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*"), + MaxLength: 50 + }, + serializedName: "dataPoolName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters3: OperationParameter = { + parameterPath: ["options", "parameters"], + mapper: DataPoolPatchMapper +}; + +export const parameters4: OperationParameter = { + parameterPath: ["options", "parameters"], + mapper: DataPoolMapper +}; diff --git a/sdk/adp/arm-adp/src/operations/accounts.ts b/sdk/adp/arm-adp/src/operations/accounts.ts new file mode 100644 index 000000000000..76936e687fa6 --- /dev/null +++ b/sdk/adp/arm-adp/src/operations/accounts.ts @@ -0,0 +1,704 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Accounts } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AdpManagementClient } from "../adpManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + Account, + AccountsListNextOptionalParams, + AccountsListOptionalParams, + AccountsListByResourceGroupNextOptionalParams, + AccountsListByResourceGroupOptionalParams, + AccountCheckNameAvailabilityParameters, + AccountsCheckNameAvailabilityOptionalParams, + AccountsCheckNameAvailabilityResponse, + AccountsListResponse, + AccountsListByResourceGroupResponse, + AccountsGetOptionalParams, + AccountsGetResponse, + AccountsUpdateOptionalParams, + AccountsUpdateResponse, + AccountsCreateOrUpdateOptionalParams, + AccountsCreateOrUpdateResponse, + AccountsDeleteOptionalParams, + AccountsListNextResponse, + AccountsListByResourceGroupNextResponse +} from "../models"; + +/// +/** Class containing Accounts operations. */ +export class AccountsImpl implements Accounts { + private readonly client: AdpManagementClient; + + /** + * Initialize a new instance of the class Accounts class. + * @param client Reference to the service client + */ + constructor(client: AdpManagementClient) { + this.client = client; + } + + /** + * List all ADP accounts available under the subscription + * @param options The options parameters. + */ + public list( + options?: AccountsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: AccountsListOptionalParams + ): 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?: AccountsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * List all ADP accounts available under the resource group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: AccountsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: AccountsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: AccountsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Checks that the account name is valid and is not already in use + * @param parameters The checkNameAvailability parameters. + * @param options The options parameters. + */ + checkNameAvailability( + parameters: AccountCheckNameAvailabilityParameters, + options?: AccountsCheckNameAvailabilityOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { parameters, options }, + checkNameAvailabilityOperationSpec + ); + } + + /** + * List all ADP accounts available under the subscription + * @param options The options parameters. + */ + private _list( + options?: AccountsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * List all ADP accounts available under the resource group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: AccountsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Gets the properties of an ADP account + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + options?: AccountsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, options }, + getOperationSpec + ); + } + + /** + * Updates the properties of an existing ADP account + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + accountName: string, + options?: AccountsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + AccountsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, options }, + updateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Updates the properties of an existing ADP account + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + accountName: string, + options?: AccountsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + accountName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Creates or updates an ADP account + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + accountName: string, + options?: AccountsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + AccountsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, options }, + createOrUpdateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Creates or updates an ADP account + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + accountName: string, + options?: AccountsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + accountName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes an ADP account + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + accountName: string, + options?: AccountsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, options }, + deleteOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Deletes an ADP account + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + options?: AccountsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + accountName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: AccountsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: AccountsListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.AutonomousDevelopmentPlatform/checkNameAvailability", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.CheckNameAvailabilityResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.AutonomousDevelopmentPlatform/accounts", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AccountList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AutonomousDevelopmentPlatform/accounts", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AccountList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AutonomousDevelopmentPlatform/accounts/{accountName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Account + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AutonomousDevelopmentPlatform/accounts/{accountName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.Account + }, + 201: { + bodyMapper: Mappers.Account + }, + 202: { + bodyMapper: Mappers.Account + }, + 204: { + bodyMapper: Mappers.Account + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AutonomousDevelopmentPlatform/accounts/{accountName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Account + }, + 201: { + bodyMapper: Mappers.Account + }, + 202: { + bodyMapper: Mappers.Account + }, + 204: { + bodyMapper: Mappers.Account + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AutonomousDevelopmentPlatform/accounts/{accountName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AccountList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AccountList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/adp/arm-adp/src/operations/dataPools.ts b/sdk/adp/arm-adp/src/operations/dataPools.ts new file mode 100644 index 000000000000..b7aeb0d72b99 --- /dev/null +++ b/sdk/adp/arm-adp/src/operations/dataPools.ts @@ -0,0 +1,592 @@ +/* + * 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 { DataPools } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AdpManagementClient } from "../adpManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + DataPool, + DataPoolsListNextOptionalParams, + DataPoolsListOptionalParams, + DataPoolsListResponse, + DataPoolsGetOptionalParams, + DataPoolsGetResponse, + DataPoolsUpdateOptionalParams, + DataPoolsUpdateResponse, + DataPoolsCreateOrUpdateOptionalParams, + DataPoolsCreateOrUpdateResponse, + DataPoolsDeleteOptionalParams, + DataPoolsListNextResponse +} from "../models"; + +/// +/** Class containing DataPools operations. */ +export class DataPoolsImpl implements DataPools { + private readonly client: AdpManagementClient; + + /** + * Initialize a new instance of the class DataPools class. + * @param client Reference to the service client + */ + constructor(client: AdpManagementClient) { + this.client = client; + } + + /** + * Lists the data pools under the ADP account + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + accountName: string, + options?: DataPoolsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, accountName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, accountName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + accountName: string, + options?: DataPoolsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, accountName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + accountName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + accountName: string, + options?: DataPoolsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + accountName, + options + )) { + yield* page; + } + } + + /** + * Lists the data pools under the ADP account + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + accountName: string, + options?: DataPoolsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, options }, + listOperationSpec + ); + } + + /** + * Gets the properties of a Data Pool + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param dataPoolName The name of the Data Pool + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + dataPoolName: string, + options?: DataPoolsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, dataPoolName, options }, + getOperationSpec + ); + } + + /** + * Updates the properties of an existing Data Pool + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param dataPoolName The name of the Data Pool + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + accountName: string, + dataPoolName: string, + options?: DataPoolsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DataPoolsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, dataPoolName, options }, + updateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Updates the properties of an existing Data Pool + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param dataPoolName The name of the Data Pool + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + accountName: string, + dataPoolName: string, + options?: DataPoolsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + accountName, + dataPoolName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Creates or updates a Data Pool + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param dataPoolName The name of the Data Pool + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + accountName: string, + dataPoolName: string, + options?: DataPoolsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DataPoolsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, dataPoolName, options }, + createOrUpdateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Creates or updates a Data Pool + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param dataPoolName The name of the Data Pool + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + accountName: string, + dataPoolName: string, + options?: DataPoolsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + accountName, + dataPoolName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes a Data Pool + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param dataPoolName The name of the Data Pool + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + accountName: string, + dataPoolName: string, + options?: DataPoolsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, dataPoolName, options }, + deleteOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Deletes a Data Pool + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param dataPoolName The name of the Data Pool + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + dataPoolName: string, + options?: DataPoolsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + accountName, + dataPoolName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + accountName: string, + nextLink: string, + options?: DataPoolsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AutonomousDevelopmentPlatform/accounts/{accountName}/dataPools", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DataPoolList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AutonomousDevelopmentPlatform/accounts/{accountName}/dataPools/{dataPoolName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DataPool + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.dataPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AutonomousDevelopmentPlatform/accounts/{accountName}/dataPools/{dataPoolName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.DataPool + }, + 201: { + bodyMapper: Mappers.DataPool + }, + 202: { + bodyMapper: Mappers.DataPool + }, + 204: { + bodyMapper: Mappers.DataPool + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters3, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.dataPoolName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AutonomousDevelopmentPlatform/accounts/{accountName}/dataPools/{dataPoolName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DataPool + }, + 201: { + bodyMapper: Mappers.DataPool + }, + 202: { + bodyMapper: Mappers.DataPool + }, + 204: { + bodyMapper: Mappers.DataPool + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters4, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.dataPoolName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AutonomousDevelopmentPlatform/accounts/{accountName}/dataPools/{dataPoolName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.dataPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DataPoolList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/adp/arm-adp/src/operations/index.ts b/sdk/adp/arm-adp/src/operations/index.ts new file mode 100644 index 000000000000..c4d5b8642105 --- /dev/null +++ b/sdk/adp/arm-adp/src/operations/index.ts @@ -0,0 +1,11 @@ +/* + * 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 "./operations"; +export * from "./accounts"; +export * from "./dataPools"; diff --git a/sdk/adp/arm-adp/src/operations/operations.ts b/sdk/adp/arm-adp/src/operations/operations.ts new file mode 100644 index 000000000000..8bd2b065527b --- /dev/null +++ b/sdk/adp/arm-adp/src/operations/operations.ts @@ -0,0 +1,137 @@ +/* + * 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 { Operations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AdpManagementClient } from "../adpManagementClient"; +import { + Operation, + OperationsListNextOptionalParams, + OperationsListOptionalParams, + OperationsListResponse, + OperationsListNextResponse +} from "../models"; + +/// +/** Class containing Operations operations. */ +export class OperationsImpl implements Operations { + private readonly client: AdpManagementClient; + + /** + * Initialize a new instance of the class Operations class. + * @param client Reference to the service client + */ + constructor(client: AdpManagementClient) { + this.client = client; + } + + /** + * Lists all of the available Autonomous Development Platform provider operations + * @param options The options parameters. + */ + public list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + 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 Autonomous Development Platform provider operations + * @param options The options parameters. + */ + private _list( + options?: OperationsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: OperationsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.AutonomousDevelopmentPlatform/operations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.nextLink], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/adp/arm-adp/src/operationsInterfaces/accounts.ts b/sdk/adp/arm-adp/src/operationsInterfaces/accounts.ts new file mode 100644 index 000000000000..62feb0284ab4 --- /dev/null +++ b/sdk/adp/arm-adp/src/operationsInterfaces/accounts.ts @@ -0,0 +1,142 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + Account, + AccountsListOptionalParams, + AccountsListByResourceGroupOptionalParams, + AccountCheckNameAvailabilityParameters, + AccountsCheckNameAvailabilityOptionalParams, + AccountsCheckNameAvailabilityResponse, + AccountsGetOptionalParams, + AccountsGetResponse, + AccountsUpdateOptionalParams, + AccountsUpdateResponse, + AccountsCreateOrUpdateOptionalParams, + AccountsCreateOrUpdateResponse, + AccountsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a Accounts. */ +export interface Accounts { + /** + * List all ADP accounts available under the subscription + * @param options The options parameters. + */ + list( + options?: AccountsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * List all ADP accounts available under the resource group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: AccountsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Checks that the account name is valid and is not already in use + * @param parameters The checkNameAvailability parameters. + * @param options The options parameters. + */ + checkNameAvailability( + parameters: AccountCheckNameAvailabilityParameters, + options?: AccountsCheckNameAvailabilityOptionalParams + ): Promise; + /** + * Gets the properties of an ADP account + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + options?: AccountsGetOptionalParams + ): Promise; + /** + * Updates the properties of an existing ADP account + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + accountName: string, + options?: AccountsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + AccountsUpdateResponse + > + >; + /** + * Updates the properties of an existing ADP account + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + accountName: string, + options?: AccountsUpdateOptionalParams + ): Promise; + /** + * Creates or updates an ADP account + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + accountName: string, + options?: AccountsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + AccountsCreateOrUpdateResponse + > + >; + /** + * Creates or updates an ADP account + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + accountName: string, + options?: AccountsCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes an ADP account + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + accountName: string, + options?: AccountsDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes an ADP account + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + options?: AccountsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/adp/arm-adp/src/operationsInterfaces/dataPools.ts b/sdk/adp/arm-adp/src/operationsInterfaces/dataPools.ts new file mode 100644 index 000000000000..5ed57b11a82d --- /dev/null +++ b/sdk/adp/arm-adp/src/operationsInterfaces/dataPools.ts @@ -0,0 +1,138 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + DataPool, + DataPoolsListOptionalParams, + DataPoolsGetOptionalParams, + DataPoolsGetResponse, + DataPoolsUpdateOptionalParams, + DataPoolsUpdateResponse, + DataPoolsCreateOrUpdateOptionalParams, + DataPoolsCreateOrUpdateResponse, + DataPoolsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a DataPools. */ +export interface DataPools { + /** + * Lists the data pools under the ADP account + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param options The options parameters. + */ + list( + resourceGroupName: string, + accountName: string, + options?: DataPoolsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the properties of a Data Pool + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param dataPoolName The name of the Data Pool + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + dataPoolName: string, + options?: DataPoolsGetOptionalParams + ): Promise; + /** + * Updates the properties of an existing Data Pool + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param dataPoolName The name of the Data Pool + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + accountName: string, + dataPoolName: string, + options?: DataPoolsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DataPoolsUpdateResponse + > + >; + /** + * Updates the properties of an existing Data Pool + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param dataPoolName The name of the Data Pool + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + accountName: string, + dataPoolName: string, + options?: DataPoolsUpdateOptionalParams + ): Promise; + /** + * Creates or updates a Data Pool + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param dataPoolName The name of the Data Pool + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + accountName: string, + dataPoolName: string, + options?: DataPoolsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DataPoolsCreateOrUpdateResponse + > + >; + /** + * Creates or updates a Data Pool + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param dataPoolName The name of the Data Pool + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + accountName: string, + dataPoolName: string, + options?: DataPoolsCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes a Data Pool + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param dataPoolName The name of the Data Pool + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + accountName: string, + dataPoolName: string, + options?: DataPoolsDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a Data Pool + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account + * @param dataPoolName The name of the Data Pool + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + dataPoolName: string, + options?: DataPoolsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/adp/arm-adp/src/operationsInterfaces/index.ts b/sdk/adp/arm-adp/src/operationsInterfaces/index.ts new file mode 100644 index 000000000000..c4d5b8642105 --- /dev/null +++ b/sdk/adp/arm-adp/src/operationsInterfaces/index.ts @@ -0,0 +1,11 @@ +/* + * 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 "./operations"; +export * from "./accounts"; +export * from "./dataPools"; diff --git a/sdk/adp/arm-adp/src/operationsInterfaces/operations.ts b/sdk/adp/arm-adp/src/operationsInterfaces/operations.ts new file mode 100644 index 000000000000..1af1a5323433 --- /dev/null +++ b/sdk/adp/arm-adp/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 Autonomous Development Platform provider operations + * @param options The options parameters. + */ + list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/adp/arm-adp/test/sampleTest.ts b/sdk/adp/arm-adp/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/adp/arm-adp/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/adp/arm-adp/tsconfig.json b/sdk/adp/arm-adp/tsconfig.json new file mode 100644 index 000000000000..3e6ae96443f3 --- /dev/null +++ b/sdk/adp/arm-adp/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "module": "es6", + "moduleResolution": "node", + "strict": true, + "target": "es6", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": [ + "es6", + "dom" + ], + "declaration": true, + "outDir": "./dist-esm", + "importHelpers": true + }, + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/sdk/adp/ci.mgmt.yml b/sdk/adp/ci.mgmt.yml new file mode 100644 index 000000000000..9876dd93b97c --- /dev/null +++ b/sdk/adp/ci.mgmt.yml @@ -0,0 +1,38 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - feature/* + - release/* + - hotfix/* + exclude: + - feature/v4 + paths: + include: + - sdk/adp/arm-adp + - sdk/adp/ci.mgmt.yml + +pr: + branches: + include: + - main + - feature/* + - release/* + - hotfix/* + exclude: + - feature/v4 + paths: + include: + - sdk/adp/arm-adp + - sdk/adp/ci.mgmt.yml + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: adp + Artifacts: + - name: adp + safeName: adp + \ No newline at end of file