From 0ab2d08b90ed6c282482e89aa901e6d658763b51 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 13 May 2025 19:31:10 +0000 Subject: [PATCH] CodeGen from PR 34640 in Azure/azure-rest-api-specs Merge 7f7ae8ab02f8654fbeb9618b34fa696c326cdfe9 into 7fc6689d84858b1c71b786526b04c014c4589968 --- common/config/rush/pnpm-lock.yaml | 88 +- rush.json | 17 +- .../arm-azuredatatransfer/CHANGELOG.md | 7 + .../arm-azuredatatransfer/LICENSE | 21 + .../arm-azuredatatransfer/README.md | 114 + .../arm-azuredatatransfer/_meta.json | 8 + .../arm-azuredatatransfer/api-extractor.json | 31 + .../arm-azuredatatransfer/package.json | 135 + .../review/arm-azuredatatransfer.api.md | 1336 ++++++++ .../arm-azuredatatransfer/sample.env | 1 + .../src/azuredatatransferrp.ts | 161 + .../arm-azuredatatransfer/src/index.ts | 13 + .../arm-azuredatatransfer/src/lroImpl.ts | 36 + .../arm-azuredatatransfer/src/models/index.ts | 2009 ++++++++++++ .../src/models/mappers.ts | 2839 +++++++++++++++++ .../src/models/parameters.ts | 239 ++ .../src/operations/azureDataTransfer.ts | 97 + .../src/operations/connections.ts | 1026 ++++++ .../src/operations/flows.ts | 1735 ++++++++++ .../src/operations/index.ts | 13 + .../src/operations/operations.ts | 142 + .../src/operations/pipelines.ts | 1140 +++++++ .../operationsInterfaces/azureDataTransfer.ts | 38 + .../src/operationsInterfaces/connections.ts | 176 + .../src/operationsInterfaces/flows.ts | 454 +++ .../src/operationsInterfaces/index.ts | 13 + .../src/operationsInterfaces/operations.ts | 20 + .../src/operationsInterfaces/pipelines.ts | 262 ++ .../arm-azuredatatransfer/src/pagingHelper.ts | 36 + .../test/sampleTest.spec.ts | 38 + .../test/snippets.spec.ts | 32 + .../tsconfig.browser.config.json | 3 + .../arm-azuredatatransfer/tsconfig.json | 10 + .../tsconfig.samples.json | 8 + .../arm-azuredatatransfer/tsconfig.src.json | 3 + .../arm-azuredatatransfer/tsconfig.test.json | 3 + .../vitest.browser.config.ts | 17 + .../arm-azuredatatransfer/vitest.config.ts | 16 + .../vitest.esm.config.ts | 12 + sdk/azuredatatransfer/ci.mgmt.yml | 38 + 40 files changed, 12360 insertions(+), 27 deletions(-) create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/CHANGELOG.md create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/LICENSE create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/README.md create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/_meta.json create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/api-extractor.json create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/package.json create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/review/arm-azuredatatransfer.api.md create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/sample.env create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/src/azuredatatransferrp.ts create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/src/index.ts create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/src/lroImpl.ts create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/src/models/index.ts create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/src/models/mappers.ts create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/src/models/parameters.ts create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/src/operations/azureDataTransfer.ts create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/src/operations/connections.ts create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/src/operations/flows.ts create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/src/operations/index.ts create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/src/operations/operations.ts create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/src/operations/pipelines.ts create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/src/operationsInterfaces/azureDataTransfer.ts create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/src/operationsInterfaces/connections.ts create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/src/operationsInterfaces/flows.ts create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/src/operationsInterfaces/index.ts create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/src/operationsInterfaces/operations.ts create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/src/operationsInterfaces/pipelines.ts create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/src/pagingHelper.ts create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/test/sampleTest.spec.ts create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/test/snippets.spec.ts create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/tsconfig.browser.config.json create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/tsconfig.json create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/tsconfig.samples.json create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/tsconfig.src.json create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/tsconfig.test.json create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/vitest.browser.config.ts create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/vitest.config.ts create mode 100644 sdk/azuredatatransfer/arm-azuredatatransfer/vitest.esm.config.ts create mode 100644 sdk/azuredatatransfer/ci.mgmt.yml diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 2c70e35614c6..111e0431e6fa 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -139,6 +139,9 @@ importers: '@rush-temp/arm-azureadexternalidentities': specifier: file:./projects/arm-azureadexternalidentities.tgz version: file:projects/arm-azureadexternalidentities.tgz(@types/debug@4.1.12)(tsx@4.19.4)(vite@6.3.5(@types/node@22.7.9)(tsx@4.19.4)(yaml@2.7.1))(yaml@2.7.1) + '@rush-temp/arm-azuredatatransfer': + specifier: file:./projects/arm-azuredatatransfer.tgz + version: file:projects/arm-azuredatatransfer.tgz(@types/debug@4.1.12)(tsx@4.19.4)(vite@6.3.5(@types/node@22.7.9)(tsx@4.19.4)(yaml@2.7.1))(yaml@2.7.1) '@rush-temp/arm-azurestack': specifier: file:./projects/arm-azurestack.tgz version: file:projects/arm-azurestack.tgz(@types/debug@4.1.12)(tsx@4.19.4)(vite@6.3.5(@types/node@22.7.9)(tsx@4.19.4)(yaml@2.7.1))(yaml@2.7.1) @@ -2493,6 +2496,10 @@ packages: resolution: {integrity: sha512-Vm4ACdn2CWPqZu7h56ZK+Vsr8q7d6RKXTqyefJQxrVxLlJ2wdRK1TY+xCxqSh5W/diKGTiGC06fFzUckEKy5+w==, tarball: file:projects/arm-azureadexternalidentities.tgz} version: 0.0.0 + '@rush-temp/arm-azuredatatransfer@file:projects/arm-azuredatatransfer.tgz': + resolution: {integrity: sha512-53LCRLS1evuiv7oAO1Nq7HAoRwYFpFSq+9lc8iAFRFDreVffbSSHAg+Lij9tUTAOs5rmM5ePOXZ6wEr7kQvuVw==, tarball: file:projects/arm-azuredatatransfer.tgz} + version: 0.0.0 + '@rush-temp/arm-azurestack@file:projects/arm-azurestack.tgz': resolution: {integrity: sha512-800n6z/BrNGueWgh9a+68LhFPcVM/XlOLb4hZoB+Di7QAdpmyrvw5dQUV6S6LLss7BKAfof1DKBwq4sShE1mzw==, tarball: file:projects/arm-azurestack.tgz} version: 0.0.0 @@ -10078,6 +10085,41 @@ snapshots: - webdriverio - yaml + '@rush-temp/arm-azuredatatransfer@file:projects/arm-azuredatatransfer.tgz(@types/debug@4.1.12)(tsx@4.19.4)(vite@6.3.5(@types/node@22.7.9)(tsx@4.19.4)(yaml@2.7.1))(yaml@2.7.1)': + dependencies: + '@azure/core-lro': 2.7.2 + '@types/node': 18.19.100 + '@vitest/browser': 3.1.3(playwright@1.52.0)(vite@6.3.5(@types/node@22.7.9)(tsx@4.19.4)(yaml@2.7.1))(vitest@3.1.3) + '@vitest/coverage-istanbul': 3.1.3(vitest@3.1.3) + dotenv: 16.5.0 + playwright: 1.52.0 + tslib: 2.8.1 + typescript: 5.8.3 + vitest: 3.1.3(@types/debug@4.1.12)(@types/node@18.19.100)(@vitest/browser@3.1.3)(tsx@4.19.4)(yaml@2.7.1) + transitivePeerDependencies: + - '@edge-runtime/vm' + - '@types/debug' + - '@vitest/ui' + - bufferutil + - happy-dom + - jiti + - jsdom + - less + - lightningcss + - msw + - safaridriver + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - tsx + - utf-8-validate + - vite + - webdriverio + - yaml + '@rush-temp/arm-azurestack@file:projects/arm-azurestack.tgz(@types/debug@4.1.12)(tsx@4.19.4)(vite@6.3.5(@types/node@22.7.9)(tsx@4.19.4)(yaml@2.7.1))(yaml@2.7.1)': dependencies: '@types/node': 18.19.100 @@ -22953,11 +22995,11 @@ snapshots: '@types/body-parser@1.19.5': dependencies: '@types/connect': 3.4.38 - '@types/node': 18.19.100 + '@types/node': 22.7.9 '@types/bunyan@1.8.11': dependencies: - '@types/node': 18.19.100 + '@types/node': 22.7.9 '@types/chai-as-promised@8.0.2': dependencies: @@ -22969,7 +23011,7 @@ snapshots: '@types/connect@3.4.38': dependencies: - '@types/node': 18.19.100 + '@types/node': 22.7.9 '@types/debug@4.1.12': dependencies: @@ -22988,14 +23030,14 @@ snapshots: '@types/express-serve-static-core@4.19.6': dependencies: - '@types/node': 18.19.100 + '@types/node': 22.7.9 '@types/qs': 6.9.18 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 '@types/express-serve-static-core@5.0.6': dependencies: - '@types/node': 18.19.100 + '@types/node': 22.7.9 '@types/qs': 6.9.18 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 @@ -23016,16 +23058,16 @@ snapshots: '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 18.19.100 + '@types/node': 22.7.9 '@types/fs-extra@8.1.5': dependencies: - '@types/node': 18.19.100 + '@types/node': 22.7.9 '@types/glob@7.2.0': dependencies: '@types/minimatch': 5.1.2 - '@types/node': 18.19.100 + '@types/node': 22.7.9 '@types/http-errors@2.0.4': {} @@ -23036,18 +23078,18 @@ snapshots: '@types/is-buffer@2.0.2': dependencies: - '@types/node': 18.19.100 + '@types/node': 22.7.9 '@types/json-schema@7.0.15': {} '@types/jsonfile@6.1.4': dependencies: - '@types/node': 18.19.100 + '@types/node': 22.7.9 '@types/jsonwebtoken@9.0.9': dependencies: '@types/ms': 2.1.0 - '@types/node': 18.19.100 + '@types/node': 22.7.9 '@types/linkify-it@5.0.0': {} @@ -23070,11 +23112,11 @@ snapshots: '@types/mysql@2.15.26': dependencies: - '@types/node': 18.19.100 + '@types/node': 22.7.9 '@types/node-fetch@2.6.12': dependencies: - '@types/node': 18.19.100 + '@types/node': 22.7.9 form-data: 4.0.2 '@types/node@18.19.100': @@ -23099,7 +23141,7 @@ snapshots: '@types/pg@8.6.1': dependencies: - '@types/node': 18.19.100 + '@types/node': 22.7.9 pg-protocol: 1.8.0 pg-types: 2.2.0 @@ -23107,7 +23149,7 @@ snapshots: '@types/prompts@2.4.9': dependencies: - '@types/node': 20.17.46 + '@types/node': 22.7.9 kleur: 3.0.3 '@types/qs@6.9.18': {} @@ -23116,7 +23158,7 @@ snapshots: '@types/readdir-glob@1.1.5': dependencies: - '@types/node': 18.19.100 + '@types/node': 22.7.9 '@types/resolve@1.20.2': {} @@ -23127,19 +23169,19 @@ snapshots: '@types/send@0.17.4': dependencies: '@types/mime': 1.3.5 - '@types/node': 18.19.100 + '@types/node': 22.7.9 '@types/serve-static@1.15.7': dependencies: '@types/http-errors': 2.0.4 - '@types/node': 18.19.100 + '@types/node': 22.7.9 '@types/send': 0.17.4 '@types/shimmer@1.2.0': {} '@types/through@0.0.33': dependencies: - '@types/node': 18.19.100 + '@types/node': 22.7.9 '@types/triple-beam@1.3.5': {} @@ -23147,15 +23189,15 @@ snapshots: '@types/unzipper@0.10.11': dependencies: - '@types/node': 18.19.100 + '@types/node': 22.7.9 '@types/ws@7.4.7': dependencies: - '@types/node': 18.19.100 + '@types/node': 22.7.9 '@types/ws@8.18.1': dependencies: - '@types/node': 18.19.100 + '@types/node': 22.7.9 '@types/yargs-parser@21.0.3': {} @@ -25336,7 +25378,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 18.19.100 + '@types/node': 22.7.9 long: 5.3.2 proxy-addr@2.0.7: diff --git a/rush.json b/rush.json index 228494b8babb..5cbb22b5610d 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. @@ -555,7 +555,9 @@ "projectFolder": "common/tools/dev-tool", "versionPolicyName": "utility", // Add Identity to decoupledLocalDependencies so that dev-tool uses the package from npm, avoiding a cyclic dependency. - "decoupledLocalDependencies": ["@azure/identity"] + "decoupledLocalDependencies": [ + "@azure/identity" + ] }, { "packageName": "@azure/eventgrid", @@ -595,7 +597,9 @@ { "packageName": "@azure/identity", "projectFolder": "sdk/identity/identity", - "decoupledLocalDependencies": ["@azure/keyvault-keys"], + "decoupledLocalDependencies": [ + "@azure/keyvault-keys" + ], "versionPolicyName": "client" }, { @@ -2367,6 +2371,11 @@ "packageName": "@azure/arm-carbonoptimization", "projectFolder": "sdk/carbonoptimization/arm-carbonoptimization", "versionPolicyName": "management" + }, + { + "packageName": "@azure/arm-azuredatatransfer", + "projectFolder": "sdk/azuredatatransfer/arm-azuredatatransfer", + "versionPolicyName": "management" } ] -} +} \ No newline at end of file diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/CHANGELOG.md b/sdk/azuredatatransfer/arm-azuredatatransfer/CHANGELOG.md new file mode 100644 index 000000000000..54bf56fe21c8 --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/CHANGELOG.md @@ -0,0 +1,7 @@ +# Release History + +## 1.0.0-beta.1 (2025-05-13) + +### Features Added + +The package of @azure/arm-azuredatatransfer is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart). diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/LICENSE b/sdk/azuredatatransfer/arm-azuredatatransfer/LICENSE new file mode 100644 index 000000000000..63447fd8bbbf --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) Microsoft Corporation. + +MIT License + +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/azuredatatransfer/arm-azuredatatransfer/README.md b/sdk/azuredatatransfer/arm-azuredatatransfer/README.md new file mode 100644 index 000000000000..2830fdfde8f1 --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/README.md @@ -0,0 +1,114 @@ +# Azuredatatransferrp client library for JavaScript + +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azuredatatransferrp client. + +Azure Data Transfer service resource provider + +[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/azuredatatransfer/arm-azuredatatransfer) | +[Package (NPM)](https://www.npmjs.com/package/@azure/arm-azuredatatransfer) | +[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-azuredatatransfer?view=azure-node-preview) | +[Samples](https://github.com/Azure-Samples/azure-samples-js-management) + +## Getting started + +### Currently supported environments + +- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule) +- Latest versions of Safari, Chrome, Edge and Firefox. + +See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. + +### Prerequisites + +- An [Azure subscription][azure_sub]. + +### Install the `@azure/arm-azuredatatransfer` package + +Install the Azuredatatransferrp client library for JavaScript with `npm`: + +```bash +npm install @azure/arm-azuredatatransfer +``` + +### Create and authenticate a `Azuredatatransferrp` + +To create a client object to access the Azuredatatransferrp API, you will need the `endpoint` of your Azuredatatransferrp resource and a `credential`. The Azuredatatransferrp client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your Azuredatatransferrp resource in the [Azure Portal][azure_portal]. + +You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token). + +To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package: + +```bash +npm install @azure/identity +``` + +You will also need to **register a new AAD application and grant access to Azuredatatransferrp** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). + +For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). + +Using Node.js and Node-like environments, you can use the `DefaultAzureCredential` class to authenticate the client. + +```ts snippet:ReadmeSampleCreateClient_Node +import { Azuredatatransferrp } from "@azure/arm-azuredatatransfer"; +import { DefaultAzureCredential } from "@azure/identity"; + +const subscriptionId = "00000000-0000-0000-0000-000000000000"; +const client = new Azuredatatransferrp(new DefaultAzureCredential(), subscriptionId); +``` + +For browser environments, use the `InteractiveBrowserCredential` from the `@azure/identity` package to authenticate. + +```ts snippet:ReadmeSampleCreateClient_Browser +import { InteractiveBrowserCredential } from "@azure/identity"; +import { Azuredatatransferrp } from "@azure/arm-azuredatatransfer"; + +const credential = new InteractiveBrowserCredential({ + tenantId: "", + clientId: "" + }); +const client = new Azuredatatransferrp(credential, subscriptionId); +``` + +### JavaScript Bundle +To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). + +## Key concepts + +### Azuredatatransferrp + +`Azuredatatransferrp` is the primary interface for developers using the Azuredatatransferrp client library. Explore the methods on this client object to understand the different features of the Azuredatatransferrp service that you can access. + +## Troubleshooting + +### Logging + +Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: + +```ts snippet:SetLogLevel +import { setLogLevel } from "@azure/logger"; + +setLogLevel("info"); +``` + +For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). + +## Next steps + +Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library. + +## Contributing + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. + +## Related projects + +- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) + + +[azure_cli]: https://learn.microsoft.com/cli/azure +[azure_sub]: https://azure.microsoft.com/free/ +[azure_sub]: https://azure.microsoft.com/free/ +[azure_portal]: https://portal.azure.com +[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity +[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/_meta.json b/sdk/azuredatatransfer/arm-azuredatatransfer/_meta.json new file mode 100644 index 000000000000..a991848f98bb --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/_meta.json @@ -0,0 +1,8 @@ +{ + "commit": "320a0d0b8833149ea600fc7f53eaef3f85014cae", + "readme": "specification/azuredatatransfer/resource-manager/readme.md", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/azuredatatransfer/resource-manager/readme.md --use=@autorest/typescript@^6.0.12", + "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.27", + "use": "@autorest/typescript@^6.0.12" +} diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/api-extractor.json b/sdk/azuredatatransfer/arm-azuredatatransfer/api-extractor.json new file mode 100644 index 000000000000..c2759440942b --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/api-extractor.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "dist/esm/index.d.ts", + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "dist/arm-azuredatatransfer.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/azuredatatransfer/arm-azuredatatransfer/package.json b/sdk/azuredatatransfer/arm-azuredatatransfer/package.json new file mode 100644 index 000000000000..f3689e2f1f4f --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/package.json @@ -0,0 +1,135 @@ +{ + "name": "@azure/arm-azuredatatransfer", + "sdk-type": "mgmt", + "author": "Microsoft Corporation", + "description": "A generated SDK for Azuredatatransferrp.", + "version": "1.0.0-beta.1", + "engines": { + "node": ">=18.0.0" + }, + "dependencies": { + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.9.0", + "@azure/core-client": "^1.9.4", + "@azure/core-lro": "^2.5.4", + "@azure/core-paging": "^1.6.2", + "@azure/core-rest-pipeline": "^1.20.0", + "tslib": "^2.8.1" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic", + "cloud" + ], + "license": "MIT", + "main": "./dist/commonjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/commonjs/index.d.ts", + "type": "module", + "devDependencies": { + "@azure-tools/test-credential": "^2.0.0", + "@azure-tools/test-recorder": "^4.1.0", + "@azure-tools/test-utils-vitest": "^1.0.0", + "@azure/dev-tool": "^1.0.0", + "@azure/identity": "^4.9.1", + "@azure/logger": "^1.2.0", + "@types/node": "^18.0.0", + "@vitest/browser": "^3.0.9", + "@vitest/coverage-istanbul": "^3.0.9", + "dotenv": "^16.0.0", + "playwright": "^1.52.0", + "typescript": "~5.8.2", + "vitest": "^3.0.9" + }, + "repository": "github:Azure/azure-sdk-for-js", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "files": [ + "dist/", + "README.md", + "LICENSE", + "review/", + "CHANGELOG.md" + ], + "scripts": { + "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api", + "build:browser": "echo skipped", + "build:node": "echo skipped", + "build:samples": "echo skipped.", + "build:test": "echo skipped", + "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", + "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "execute:samples": "echo skipped", + "extract-api": "dev-tool run extract-api", + "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:browser": "echo skipped", + "integration-test:node": "dev-tool run test:vitest --esm", + "lint": "echo skipped", + "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "pack": "npm pack 2>&1", + "prepack": "npm run build", + "test": "npm run integration-test", + "test:browser": "echo skipped", + "test:node": "dev-tool run test:vitest", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:browser": "echo skipped", + "unit-test:node": "dev-tool run test:vitest", + "update-snippets": "dev-tool run update-snippets", + "test:node:esm": "dev-tool run test:vitest --esm" + }, + "sideEffects": false, + "//metadata": { + "constantPaths": [ + { + "path": "src/azuredatatransferrp.ts", + "prefix": "packageDetails" + } + ] + }, + "autoPublish": true, + "browser": "./dist/browser/index.js", + "react-native": "./dist/react-native/index.js", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/azuredatatransfer/arm-azuredatatransfer", + "tshy": { + "project": "./tsconfig.src.json", + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + }, + "dialects": [ + "esm", + "commonjs" + ], + "esmDialects": [ + "browser", + "react-native" + ], + "selfLink": false + }, + "exports": { + "./package.json": "./package.json", + ".": { + "browser": { + "types": "./dist/browser/index.d.ts", + "default": "./dist/browser/index.js" + }, + "react-native": { + "types": "./dist/react-native/index.d.ts", + "default": "./dist/react-native/index.js" + }, + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + } + } +} \ No newline at end of file diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/review/arm-azuredatatransfer.api.md b/sdk/azuredatatransfer/arm-azuredatatransfer/review/arm-azuredatatransfer.api.md new file mode 100644 index 000000000000..8a02f9ab4e27 --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/review/arm-azuredatatransfer.api.md @@ -0,0 +1,1336 @@ +## API Report File for "@azure/arm-azuredatatransfer" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import * as coreAuth from '@azure/core-auth'; +import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PagedAsyncIterableIterator } from '@azure/core-paging'; +import { SimplePollerLike } from '@azure/core-lro'; + +// @public +export interface Action { + actionType: ActionType; + justification?: string; + targets: string[]; + targetType: TargetType; +} + +// @public +export type ActionType = string; + +// @public +export interface ApiFlowOptions { + apiMode?: ApiMode; + audienceOverride?: string; + cname?: string; + identityTranslation?: IdentityTranslation; + remoteCallingModeClientId?: string; + remoteEndpoint?: string; + senderClientId?: string; +} + +// @public +export type ApiMode = string; + +// @public +export interface AzureDataTransfer { + listApprovedSchemas(body: ListApprovedSchemasRequest, options?: AzureDataTransferListApprovedSchemasOptionalParams): Promise; + validateSchema(body: Schema, options?: AzureDataTransferValidateSchemaOptionalParams): Promise; +} + +// @public +export interface AzureDataTransferListApprovedSchemasOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AzureDataTransferListApprovedSchemasResponse = SchemasListResult; + +// @public (undocumented) +export class Azuredatatransferrp extends coreClient.ServiceClient { + // (undocumented) + $host: string; + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AzuredatatransferrpOptionalParams); + constructor(credentials: coreAuth.TokenCredential, options?: AzuredatatransferrpOptionalParams); + // (undocumented) + apiVersion: string; + // (undocumented) + azureDataTransfer: AzureDataTransfer; + // (undocumented) + connections: Connections; + // (undocumented) + flows: Flows; + // (undocumented) + operations: Operations; + // (undocumented) + pipelines: Pipelines; + // (undocumented) + subscriptionId?: string; +} + +// @public +export interface AzuredatatransferrpOptionalParams extends coreClient.ServiceClientOptions { + $host?: string; + apiVersion?: string; + endpoint?: string; +} + +// @public +export interface AzureDataTransferValidateSchemaOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AzureDataTransferValidateSchemaResponse = ValidateSchemaResult; + +// @public +export interface AzureResourceManagerArmResponseConnection { + body: Connection; +} + +// @public +export interface AzureResourceManagerArmResponseFlow { + body: Flow; +} + +// @public +export interface AzureResourceManagerArmResponsePipeline { + body: Pipeline; +} + +// @public +export interface Connection extends TrackedResource { + identity?: ManagedServiceIdentity; + properties?: ConnectionProperties; +} + +// @public +export interface ConnectionIdList { + value?: string[]; +} + +// @public +export interface ConnectionListResult { + nextLink?: string; + value: Connection[]; +} + +// @public +export interface ConnectionProperties { + readonly approver?: string; + readonly dateSubmitted?: Date; + direction?: Direction; + flowTypes?: FlowType[]; + readonly forceDisabledStatus?: ForceDisabledStatus[]; + justification?: string; + readonly linkedConnectionId?: string; + readonly linkStatus?: LinkStatus; + pin?: string; + pipeline: string; + policies?: string[]; + primaryContact?: string; + readonly provisioningState?: ProvisioningState; + remoteSubscriptionId?: string; + requirementId?: string; + schemas?: Schema[]; + schemaUris?: string[]; + secondaryContacts?: string[]; + readonly status?: ConnectionStatus; + readonly statusReason?: string; +} + +// @public +export interface Connections { + beginDelete(resourceGroupName: string, connectionName: string, options?: ConnectionsDeleteOptionalParams): Promise, ConnectionsDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, connectionName: string, options?: ConnectionsDeleteOptionalParams): Promise; + beginLink(resourceGroupName: string, connectionName: string, body: ResourceBody, options?: ConnectionsLinkOptionalParams): Promise, ConnectionsLinkResponse>>; + beginLinkAndWait(resourceGroupName: string, connectionName: string, body: ResourceBody, options?: ConnectionsLinkOptionalParams): Promise; + beginUpdate(resourceGroupName: string, connectionName: string, properties: ConnectionsPatch, options?: ConnectionsUpdateOptionalParams): Promise, ConnectionsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, connectionName: string, properties: ConnectionsPatch, options?: ConnectionsUpdateOptionalParams): Promise; + createOrUpdate(resourceGroupName: string, connectionName: string, resource: Connection, options?: ConnectionsCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, connectionName: string, options?: ConnectionsGetOptionalParams): Promise; + list(resourceGroupName: string, connectionName: string, options?: ConnectionsListOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: ConnectionsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: ConnectionsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + listPendingFlowsList(resourceGroupName: string, connectionName: string, options?: ConnectionsListPendingFlowsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ConnectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectionsCreateOrUpdateResponse = Connection; + +// @public +export interface ConnectionsDeleteHeaders { + location?: string; + retryAfter?: number; +} + +// @public +export interface ConnectionsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ConnectionsDeleteResponse = ConnectionsDeleteHeaders; + +// @public +export interface ConnectionsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectionsGetResponse = Connection; + +// @public +export interface ConnectionsLinkHeaders { + location?: string; + retryAfter?: number; +} + +// @public +export interface ConnectionsLinkOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ConnectionsLinkResponse = Connection; + +// @public +export interface ConnectionsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectionsListByResourceGroupNextResponse = ConnectionListResult; + +// @public +export interface ConnectionsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectionsListByResourceGroupResponse = ConnectionListResult; + +// @public +export interface ConnectionsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectionsListBySubscriptionNextResponse = ConnectionListResult; + +// @public +export interface ConnectionsListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectionsListBySubscriptionResponse = ConnectionListResult; + +// @public +export interface ConnectionsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectionsListNextResponse = PendingConnectionListResult; + +// @public +export interface ConnectionsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ConnectionsListPendingFlowsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectionsListPendingFlowsListNextResponse = PendingFlowListResult; + +// @public +export interface ConnectionsListPendingFlowsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectionsListPendingFlowsListResponse = PendingFlowListResult; + +// @public +export type ConnectionsListResponse = PendingConnectionListResult; + +// @public +export interface ConnectionsPatch { + identity?: ManagedServiceIdentity; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export type ConnectionStatus = string; + +// @public +export interface ConnectionsUpdateHeaders { + location?: string; + retryAfter?: number; +} + +// @public +export interface ConnectionsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ConnectionsUpdateResponse = Connection; + +// @public +export type CreatedByType = string; + +// @public +export type DataType = string; + +// @public +export type Direction = string; + +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} + +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface ErrorResponse { + error?: ErrorDetail; +} + +// @public +export interface Flow extends TrackedResource { + identity?: ManagedServiceIdentity; + plan?: Plan; + properties?: FlowProperties; +} + +// @public +export type FlowBillingTier = string; + +// @public +export interface FlowListResult { + nextLink?: string; + value: Flow[]; +} + +// @public +export interface FlowProperties { + apiFlowOptions?: ApiFlowOptions; + connection?: SelectedResource; + consumerGroup?: string; + customerManagedKeyVaultUri?: string; + dataType?: DataType; + destinationEndpointPorts?: number[]; + destinationEndpoints?: string[]; + eventHubId?: string; + readonly flowId?: string; + flowType?: FlowType; + readonly forceDisabledStatus?: ForceDisabledStatus[]; + keyVaultUri?: string; + readonly linkedFlowId?: string; + readonly linkStatus?: LinkStatus; + messagingOptions?: MessagingOptions; + passphrase?: string; + policies?: string[]; + readonly provisioningState?: ProvisioningState; + schema?: Schema; + serviceBusQueueId?: string; + sourceAddresses?: StreamSourceAddresses; + status?: FlowStatus; + storageAccountId?: string; + storageAccountName?: string; + storageContainerName?: string; + storageTableName?: string; + streamId?: string; + streamLatency?: number; + streamProtocol?: StreamProtocol; +} + +// @public +export interface Flows { + beginDelete(resourceGroupName: string, connectionName: string, flowName: string, options?: FlowsDeleteOptionalParams): Promise, FlowsDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, connectionName: string, flowName: string, options?: FlowsDeleteOptionalParams): Promise; + beginDisable(resourceGroupName: string, connectionName: string, flowName: string, options?: FlowsDisableOptionalParams): Promise, FlowsDisableResponse>>; + beginDisableAndWait(resourceGroupName: string, connectionName: string, flowName: string, options?: FlowsDisableOptionalParams): Promise; + beginEnable(resourceGroupName: string, connectionName: string, flowName: string, options?: FlowsEnableOptionalParams): Promise, FlowsEnableResponse>>; + beginEnableAndWait(resourceGroupName: string, connectionName: string, flowName: string, options?: FlowsEnableOptionalParams): Promise; + beginGeneratePassphrase(resourceGroupName: string, connectionName: string, flowName: string, options?: FlowsGeneratePassphraseOptionalParams): Promise, FlowsGeneratePassphraseResponse>>; + beginGeneratePassphraseAndWait(resourceGroupName: string, connectionName: string, flowName: string, options?: FlowsGeneratePassphraseOptionalParams): Promise; + beginLink(resourceGroupName: string, connectionName: string, flowName: string, body: ResourceBody, options?: FlowsLinkOptionalParams): Promise, FlowsLinkResponse>>; + beginLinkAndWait(resourceGroupName: string, connectionName: string, flowName: string, body: ResourceBody, options?: FlowsLinkOptionalParams): Promise; + beginSetDestinationEndpointPorts(resourceGroupName: string, connectionName: string, flowName: string, body: SetDestinationEndpointPorts, options?: FlowsSetDestinationEndpointPortsOptionalParams): Promise, FlowsSetDestinationEndpointPortsResponse>>; + beginSetDestinationEndpointPortsAndWait(resourceGroupName: string, connectionName: string, flowName: string, body: SetDestinationEndpointPorts, options?: FlowsSetDestinationEndpointPortsOptionalParams): Promise; + beginSetDestinationEndpoints(resourceGroupName: string, connectionName: string, flowName: string, body: SetDestinationEndpoints, options?: FlowsSetDestinationEndpointsOptionalParams): Promise, FlowsSetDestinationEndpointsResponse>>; + beginSetDestinationEndpointsAndWait(resourceGroupName: string, connectionName: string, flowName: string, body: SetDestinationEndpoints, options?: FlowsSetDestinationEndpointsOptionalParams): Promise; + beginSetPassphrase(resourceGroupName: string, connectionName: string, flowName: string, body: SetStreamPassphrase, options?: FlowsSetPassphraseOptionalParams): Promise, FlowsSetPassphraseResponse>>; + beginSetPassphraseAndWait(resourceGroupName: string, connectionName: string, flowName: string, body: SetStreamPassphrase, options?: FlowsSetPassphraseOptionalParams): Promise; + beginSetSourceAddresses(resourceGroupName: string, connectionName: string, flowName: string, body: SetSourceAddresses, options?: FlowsSetSourceAddressesOptionalParams): Promise, FlowsSetSourceAddressesResponse>>; + beginSetSourceAddressesAndWait(resourceGroupName: string, connectionName: string, flowName: string, body: SetSourceAddresses, options?: FlowsSetSourceAddressesOptionalParams): Promise; + beginUpdate(resourceGroupName: string, connectionName: string, flowName: string, properties: FlowsPatch, options?: FlowsUpdateOptionalParams): Promise, FlowsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, connectionName: string, flowName: string, properties: FlowsPatch, options?: FlowsUpdateOptionalParams): Promise; + createOrUpdate(resourceGroupName: string, connectionName: string, flowName: string, resource: Flow, options?: FlowsCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, connectionName: string, flowName: string, options?: FlowsGetOptionalParams): Promise; + getDestinationEndpointPorts(resourceGroupName: string, connectionName: string, flowName: string, options?: FlowsGetDestinationEndpointPortsOptionalParams): Promise; + getDestinationEndpoints(resourceGroupName: string, connectionName: string, flowName: string, options?: FlowsGetDestinationEndpointsOptionalParams): Promise; + getSourceAddresses(resourceGroupName: string, connectionName: string, flowName: string, options?: FlowsGetSourceAddressesOptionalParams): Promise; + getStreamConnectionString(resourceGroupName: string, connectionName: string, flowName: string, options?: FlowsGetStreamConnectionStringOptionalParams): Promise; + listByConnection(resourceGroupName: string, connectionName: string, options?: FlowsListByConnectionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface FlowsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FlowsCreateOrUpdateResponse = Flow; + +// @public +export interface FlowsDeleteHeaders { + location?: string; + retryAfter?: number; +} + +// @public +export interface FlowsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type FlowsDeleteResponse = FlowsDeleteHeaders; + +// @public +export interface FlowsDisableHeaders { + location?: string; + retryAfter?: number; +} + +// @public +export interface FlowsDisableOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type FlowsDisableResponse = Flow; + +// @public +export interface FlowsEnableHeaders { + location?: string; + retryAfter?: number; +} + +// @public +export interface FlowsEnableOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type FlowsEnableResponse = Flow; + +// @public +export interface FlowsGeneratePassphraseHeaders { + location?: string; + retryAfter?: number; +} + +// @public +export interface FlowsGeneratePassphraseOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type FlowsGeneratePassphraseResponse = Flow; + +// @public +export interface FlowsGetDestinationEndpointPortsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FlowsGetDestinationEndpointPortsResponse = GetDestinationEndpointPortsResult; + +// @public +export interface FlowsGetDestinationEndpointsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FlowsGetDestinationEndpointsResponse = GetDestinationEndpointsResult; + +// @public +export interface FlowsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FlowsGetResponse = Flow; + +// @public +export interface FlowsGetSourceAddressesOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FlowsGetSourceAddressesResponse = StreamSourceAddresses; + +// @public +export interface FlowsGetStreamConnectionStringOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FlowsGetStreamConnectionStringResponse = GetStreamConnectionStringResult; + +// @public +export interface FlowsLinkHeaders { + location?: string; + retryAfter?: number; +} + +// @public +export interface FlowsLinkOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type FlowsLinkResponse = Flow; + +// @public +export interface FlowsListByConnectionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FlowsListByConnectionNextResponse = FlowListResult; + +// @public +export interface FlowsListByConnectionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FlowsListByConnectionResponse = FlowListResult; + +// @public +export interface FlowsPatch { + identity?: ManagedServiceIdentity; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface FlowsSetDestinationEndpointPortsHeaders { + location?: string; + retryAfter?: number; +} + +// @public +export interface FlowsSetDestinationEndpointPortsOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type FlowsSetDestinationEndpointPortsResponse = Flow; + +// @public +export interface FlowsSetDestinationEndpointsHeaders { + location?: string; + retryAfter?: number; +} + +// @public +export interface FlowsSetDestinationEndpointsOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type FlowsSetDestinationEndpointsResponse = Flow; + +// @public +export interface FlowsSetPassphraseHeaders { + location?: string; + retryAfter?: number; +} + +// @public +export interface FlowsSetPassphraseOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type FlowsSetPassphraseResponse = Flow; + +// @public +export interface FlowsSetSourceAddressesHeaders { + location?: string; + retryAfter?: number; +} + +// @public +export interface FlowsSetSourceAddressesOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type FlowsSetSourceAddressesResponse = Flow; + +// @public +export type FlowStatus = string; + +// @public +export interface FlowsUpdateHeaders { + location?: string; + retryAfter?: number; +} + +// @public +export interface FlowsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type FlowsUpdateResponse = Flow; + +// @public +export type FlowType = string; + +// @public +export type ForceDisabledStatus = string; + +// @public +export function getContinuationToken(page: unknown): string | undefined; + +// @public +export interface GetDestinationEndpointPortsResult { + ports?: number[]; +} + +// @public +export interface GetDestinationEndpointsResult { + endpoints?: string[]; +} + +// @public +export interface GetStreamConnectionStringResult { + connectionString?: string; +} + +// @public +export type IdentityTranslation = string; + +// @public +export interface InternalMetadataProperties { + [property: string]: any; + operationStatus?: OperationStatusProperties; + readonly statusSetBy?: string; +} + +// @public +export enum KnownActionType { + Internal = "Internal" +} + +// @public +export enum KnownApiMode { + Endpoint = "Endpoint", + SDK = "SDK" +} + +// @public +export enum KnownConnectionStatus { + Accepted = "Accepted", + Approved = "Approved", + InReview = "InReview", + Rejected = "Rejected" +} + +// @public +export enum KnownCreatedByType { + Application = "Application", + Key = "Key", + ManagedIdentity = "ManagedIdentity", + User = "User" +} + +// @public +export enum KnownDataType { + Blob = "Blob", + Table = "Table" +} + +// @public +export enum KnownDirection { + Receive = "Receive", + Send = "Send" +} + +// @public +export enum KnownFlowBillingTier { + BlobTransport = "BlobTransport", + Premium = "Premium", + Standard = "Standard" +} + +// @public +export enum KnownFlowStatus { + Disabled = "Disabled", + Enabled = "Enabled" +} + +// @public +export enum KnownFlowType { + API = "API", + BasicFiles = "BasicFiles", + Complex = "Complex", + Data = "Data", + DevSecOps = "DevSecOps", + DiskImages = "DiskImages", + Messaging = "Messaging", + MicrosoftInternal = "MicrosoftInternal", + Mission = "Mission", + MissionOpaqueXML = "MissionOpaqueXML", + Opaque = "Opaque", + Standard = "Standard", + StreamingVideo = "StreamingVideo", + Unknown = "Unknown" +} + +// @public +export enum KnownForceDisabledStatus { + ConnectionForceDisabled = "ConnectionForceDisabled", + FlowTypeForceDisabled = "FlowTypeForceDisabled" +} + +// @public +export enum KnownIdentityTranslation { + ServiceIdentity = "ServiceIdentity", + UserIdentity = "UserIdentity" +} + +// @public +export enum KnownLinkStatus { + Linked = "Linked", + Unlinked = "Unlinked" +} + +// @public +export enum KnownManagedServiceIdentityType { + None = "None", + SystemAssigned = "SystemAssigned", + SystemAssignedUserAssigned = "SystemAssigned,UserAssigned", + UserAssigned = "UserAssigned" +} + +// @public +export enum KnownOperationStatusEnum { + Failed = "Failed", + Succeeded = "Succeeded" +} + +// @public +export enum KnownOrigin { + System = "system", + User = "user", + UserSystem = "user,system" +} + +// @public +export enum KnownPipelineStatus { + Disabled = "Disabled", + Enabled = "Enabled" +} + +// @public +export enum KnownProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Failed = "Failed", + Succeeded = "Succeeded" +} + +// @public +export enum KnownSchemaStatus { + Approved = "Approved", + New = "New" +} + +// @public +export enum KnownSchemaType { + Xsd = "Xsd", + Zip = "Zip" +} + +// @public +export enum KnownStreamProtocol { + RTP = "RTP", + SRT = "SRT", + UDP = "UDP" +} + +// @public +export enum KnownTargetType { + Connection = "Connection", + FlowType = "FlowType", + Pipeline = "Pipeline" +} + +// @public +export enum KnownValidateSchemaStatus { + Failed = "Failed", + Succeeded = "Succeeded" +} + +// @public +export type LinkStatus = string; + +// @public +export interface ListApprovedSchemasRequest { + direction?: Direction; + pipeline?: string; +} + +// @public +export interface ListFlowsByPipelineConnection { + flows?: Flow[]; + id?: string; +} + +// @public +export interface ListFlowsByPipelineResult { + value?: ListFlowsByPipelineConnection[]; +} + +// @public +export interface ManagedServiceIdentity { + readonly principalId?: string; + readonly tenantId?: string; + type: ManagedServiceIdentityType; + userAssignedIdentities?: { + [propertyName: string]: UserAssignedIdentity | null; + }; +} + +// @public +export type ManagedServiceIdentityType = string; + +// @public +export interface MessagingOptions { + billingTier?: FlowBillingTier; +} + +// @public +export interface Operation { + readonly actionType?: ActionType; + display?: OperationDisplay; + readonly isDataAction?: boolean; + readonly name?: string; + readonly origin?: Origin; +} + +// @public +export interface OperationDisplay { + readonly description?: string; + readonly operation?: string; + readonly provider?: string; + readonly resource?: string; +} + +// @public +export interface OperationListResult { + readonly nextLink?: string; + readonly value?: Operation[]; +} + +// @public +export interface Operations { + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @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 OperationStatusEnum = string; + +// @public +export interface OperationStatusProperties { + readonly id?: string; + readonly message?: string; + readonly status?: OperationStatusEnum; +} + +// @public +export type Origin = string; + +// @public +export interface PendingConnection { + readonly approver?: string; + readonly dateSubmitted?: Date; + direction?: Direction; + flowTypes?: FlowType[]; + readonly forceDisabledStatus?: ForceDisabledStatus[]; + readonly id?: string; + justification?: string; + readonly linkedConnectionId?: string; + readonly linkStatus?: LinkStatus; + location: string; + readonly name?: string; + pin?: string; + pipeline: string; + policies?: string[]; + primaryContact?: string; + properties?: Connection; + readonly provisioningState?: ProvisioningState; + remoteSubscriptionId?: string; + requirementId?: string; + schemas?: Schema[]; + schemaUris?: string[]; + secondaryContacts?: string[]; + readonly status?: ConnectionStatus; + readonly statusReason?: string; + readonly subscriptionId?: string; + readonly systemData?: SystemData; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; +} + +// @public +export interface PendingConnectionListResult { + nextLink?: string; + value: PendingConnection[]; +} + +// @public +export interface PendingFlow { + apiFlowOptions?: ApiFlowOptions; + connection?: SelectedResource; + readonly connectionId?: string; + consumerGroup?: string; + customerManagedKeyVaultUri?: string; + dataType?: DataType; + destinationEndpointPorts?: number[]; + destinationEndpoints?: string[]; + eventHubId?: string; + readonly flowId?: string; + flowType?: FlowType; + readonly forceDisabledStatus?: ForceDisabledStatus[]; + readonly id?: string; + keyVaultUri?: string; + readonly linkedFlowId?: string; + readonly linkStatus?: LinkStatus; + location: string; + messagingOptions?: MessagingOptions; + readonly name?: string; + passphrase?: string; + policies?: string[]; + properties?: Flow; + readonly provisioningState?: ProvisioningState; + schema?: Schema; + serviceBusQueueId?: string; + sourceAddresses?: StreamSourceAddresses; + status?: FlowStatus; + storageAccountId?: string; + storageAccountName?: string; + storageContainerName?: string; + storageTableName?: string; + streamId?: string; + streamLatency?: number; + streamProtocol?: StreamProtocol; + readonly subscriptionId?: string; + readonly systemData?: SystemData; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; +} + +// @public +export interface PendingFlowListResult { + nextLink?: string; + value: PendingFlow[]; +} + +// @public +export interface Pipeline extends TrackedResource { + identity?: ManagedServiceIdentity; + properties?: PipelineProperties; +} + +// @public +export interface PipelineConnection { + [property: string]: any; + readonly etag?: string; + id: string; + readonly location?: string; + readonly name?: string; + properties?: PipelineConnectionProperties; + readonly systemData?: SystemData; + readonly type?: string; +} + +// @public +export interface PipelineConnectionProperties { + [property: string]: any; + internalMetadata?: InternalMetadataProperties; +} + +// @public +export interface PipelineListResult { + nextLink?: string; + value: Pipeline[]; +} + +// @public +export interface PipelineProperties { + readonly connections?: PipelineConnection[]; + disabledFlowTypes?: FlowType[]; + displayName?: string; + flowTypes?: FlowType[]; + policies?: string[]; + readonly provisioningState?: ProvisioningState; + quarantineDownloadStorageAccount?: string; + quarantineDownloadStorageContainer?: string; + remoteCloud: string; + status?: PipelineStatus; + subscribers?: Subscriber[]; +} + +// @public +export interface Pipelines { + beginApproveConnection(resourceGroupName: string, pipelineName: string, body: ResourceBody, options?: PipelinesApproveConnectionOptionalParams): Promise, PipelinesApproveConnectionResponse>>; + beginApproveConnectionAndWait(resourceGroupName: string, pipelineName: string, body: ResourceBody, options?: PipelinesApproveConnectionOptionalParams): Promise; + beginCreateOrUpdate(resourceGroupName: string, pipelineName: string, resource: Pipeline, options?: PipelinesCreateOrUpdateOptionalParams): Promise, PipelinesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, pipelineName: string, resource: Pipeline, options?: PipelinesCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, pipelineName: string, options?: PipelinesDeleteOptionalParams): Promise, PipelinesDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, pipelineName: string, options?: PipelinesDeleteOptionalParams): Promise; + beginExecuteAction(resourceGroupName: string, pipelineName: string, body: Action, options?: PipelinesExecuteActionOptionalParams): Promise, PipelinesExecuteActionResponse>>; + beginExecuteActionAndWait(resourceGroupName: string, pipelineName: string, body: Action, options?: PipelinesExecuteActionOptionalParams): Promise; + beginRejectConnection(resourceGroupName: string, pipelineName: string, body: ResourceBody, options?: PipelinesRejectConnectionOptionalParams): Promise, PipelinesRejectConnectionResponse>>; + beginRejectConnectionAndWait(resourceGroupName: string, pipelineName: string, body: ResourceBody, options?: PipelinesRejectConnectionOptionalParams): Promise; + beginUpdate(resourceGroupName: string, pipelineName: string, properties: PipelinesPatch, options?: PipelinesUpdateOptionalParams): Promise, PipelinesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, pipelineName: string, properties: PipelinesPatch, options?: PipelinesUpdateOptionalParams): Promise; + get(resourceGroupName: string, pipelineName: string, options?: PipelinesGetOptionalParams): Promise; + list(resourceGroupName: string, pipelineName: string, options?: PipelinesListOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: PipelinesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: PipelinesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + listSchemasList(resourceGroupName: string, pipelineName: string, body: Schema, options?: PipelinesListSchemasListOptionalParams): Promise; +} + +// @public +export interface PipelinesApproveConnectionHeaders { + location?: string; + retryAfter?: number; +} + +// @public +export interface PipelinesApproveConnectionOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PipelinesApproveConnectionResponse = Connection; + +// @public +export interface PipelinesCreateOrUpdateHeaders { + azureAsyncOperation?: string; + retryAfter?: number; +} + +// @public +export interface PipelinesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PipelinesCreateOrUpdateResponse = Pipeline; + +// @public +export interface PipelinesDeleteHeaders { + location?: string; + retryAfter?: number; +} + +// @public +export interface PipelinesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PipelinesDeleteResponse = PipelinesDeleteHeaders; + +// @public +export interface PipelinesExecuteActionHeaders { + location?: string; + retryAfter?: number; +} + +// @public +export interface PipelinesExecuteActionOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PipelinesExecuteActionResponse = Pipeline; + +// @public +export interface PipelinesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PipelinesGetResponse = Pipeline; + +// @public +export interface PipelinesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PipelinesListByResourceGroupNextResponse = PipelineListResult; + +// @public +export interface PipelinesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PipelinesListByResourceGroupResponse = PipelineListResult; + +// @public +export interface PipelinesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PipelinesListBySubscriptionNextResponse = PipelineListResult; + +// @public +export interface PipelinesListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PipelinesListBySubscriptionResponse = PipelineListResult; + +// @public +export interface PipelinesListOptionalParams extends coreClient.OperationOptions { + connections?: ConnectionIdList; +} + +// @public +export type PipelinesListResponse = ListFlowsByPipelineResult; + +// @public +export interface PipelinesListSchemasListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PipelinesListSchemasListResponse = SchemasListResult; + +// @public +export interface PipelinesPatch { + identity?: ManagedServiceIdentity; + properties?: PipelinesPatchProperties; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface PipelinesPatchProperties { + connections?: PipelineConnection[]; + flowTypes?: FlowType[]; +} + +// @public +export interface PipelinesRejectConnectionHeaders { + location?: string; + retryAfter?: number; +} + +// @public +export interface PipelinesRejectConnectionOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PipelinesRejectConnectionResponse = Connection; + +// @public +export type PipelineStatus = string; + +// @public +export interface PipelinesUpdateHeaders { + location?: string; + retryAfter?: number; +} + +// @public +export interface PipelinesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PipelinesUpdateResponse = Pipeline; + +// @public +export interface Plan { + name: string; + product: string; + promotionCode?: string; + publisher: string; + version?: string; +} + +// @public +export type ProvisioningState = string; + +// @public +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly systemData?: SystemData; + readonly type?: string; +} + +// @public +export interface ResourceBody { + id: string; + statusReason?: string; +} + +// @public +export interface Schema { + connectionId?: string; + content?: string; + direction?: Direction; + id?: string; + name?: string; + schemaType?: SchemaType; + schemaUri?: string; + status?: SchemaStatus; +} + +// @public +export interface SchemasListResult { + value?: Schema[]; +} + +// @public +export type SchemaStatus = string; + +// @public +export type SchemaType = string; + +// @public +export interface SelectedResource { + id: string; + location?: string; + name?: string; + subscriptionName?: string; +} + +// @public +export interface SetDestinationEndpointPorts { + ports?: number[]; +} + +// @public +export interface SetDestinationEndpoints { + endpoints?: string[]; +} + +// @public +export interface SetSourceAddresses { + values?: string[]; +} + +// @public +export interface SetStreamPassphrase { + value?: string; +} + +// @public +export type StreamProtocol = string; + +// @public +export interface StreamSourceAddresses { + sourceAddresses?: string[]; +} + +// @public +export interface Subscriber { + email?: string; + notifications?: number; +} + +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + +// @public +export type TargetType = string; + +// @public +export interface TrackedResource extends Resource { + location: string; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface UserAssignedIdentity { + readonly clientId?: string; + readonly principalId?: string; +} + +// @public +export interface ValidateSchemaResult { + message?: string; + status?: ValidateSchemaStatus; +} + +// @public +export type ValidateSchemaStatus = string; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/sample.env b/sdk/azuredatatransfer/arm-azuredatatransfer/sample.env new file mode 100644 index 000000000000..508439fc7d62 --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/sample.env @@ -0,0 +1 @@ +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/src/azuredatatransferrp.ts b/sdk/azuredatatransfer/arm-azuredatatransfer/src/azuredatatransferrp.ts new file mode 100644 index 000000000000..060371c1b980 --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/src/azuredatatransferrp.ts @@ -0,0 +1,161 @@ +/* + * 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 { + AzureDataTransferImpl, + OperationsImpl, + ConnectionsImpl, + PipelinesImpl, + FlowsImpl, +} from "./operations/index.js"; +import { + AzureDataTransfer, + Operations, + Connections, + Pipelines, + Flows, +} from "./operationsInterfaces/index.js"; +import { AzuredatatransferrpOptionalParams } from "./models/index.js"; + +export class Azuredatatransferrp extends coreClient.ServiceClient { + $host: string; + apiVersion: string; + subscriptionId?: string; + + /** + * Initializes a new instance of the Azuredatatransferrp class. + * @param credentials Subscription credentials which uniquely identify client subscription. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. + * @param options The parameter options + */ + constructor( + credentials: coreAuth.TokenCredential, + subscriptionId: string, + options?: AzuredatatransferrpOptionalParams, + ); + constructor(credentials: coreAuth.TokenCredential, options?: AzuredatatransferrpOptionalParams); + constructor( + credentials: coreAuth.TokenCredential, + subscriptionIdOrOptions?: AzuredatatransferrpOptionalParams | string, + options?: AzuredatatransferrpOptionalParams, + ) { + if (credentials === undefined) { + throw new Error("'credentials' cannot be null"); + } + + let subscriptionId: string | undefined; + + if (typeof subscriptionIdOrOptions === "string") { + subscriptionId = subscriptionIdOrOptions; + } else if (typeof subscriptionIdOrOptions === "object") { + options = subscriptionIdOrOptions; + } + + // Initializing default values for options + if (!options) { + options = {}; + } + const defaults: AzuredatatransferrpOptionalParams = { + requestContentType: "application/json; charset=utf-8", + credential: credentials, + }; + + const packageDetails = `azsdk-js-arm-azuredatatransfer/1.0.0-beta.1`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; + + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix, + }, + endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com", + }; + super(optionsWithDefaults); + + let bearerTokenAuthenticationPolicyFound: boolean = false; + if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { + const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = + options.pipeline.getOrderedPolicies(); + bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + (pipelinePolicy) => + pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName, + ); + } + if ( + !options || + !options.pipeline || + options.pipeline.getOrderedPolicies().length == 0 || + !bearerTokenAuthenticationPolicyFound + ) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName, + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + credential: credentials, + scopes: + optionsWithDefaults.credentialScopes ?? `${optionsWithDefaults.endpoint}/.default`, + challengeCallbacks: { + authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge, + }, + }), + ); + } + // Parameter assignments + this.subscriptionId = subscriptionId; + + // Assigning values to Constant parameters + this.$host = options.$host || "https://management.azure.com"; + this.apiVersion = options.apiVersion || "2025-04-11-preview"; + this.azureDataTransfer = new AzureDataTransferImpl(this); + this.operations = new OperationsImpl(this); + this.connections = new ConnectionsImpl(this); + this.pipelines = new PipelinesImpl(this); + this.flows = new FlowsImpl(this); + this.addCustomApiVersionPolicy(options.apiVersion); + } + + /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ + private addCustomApiVersionPolicy(apiVersion?: string) { + if (!apiVersion) { + return; + } + const apiVersionPolicy = { + name: "CustomApiVersionPolicy", + async sendRequest(request: PipelineRequest, next: SendRequest): Promise { + const param = request.url.split("?"); + if (param.length > 1) { + const newParams = param[1].split("&").map((item) => { + if (item.indexOf("api-version") > -1) { + return "api-version=" + apiVersion; + } else { + return item; + } + }); + request.url = param[0] + "?" + newParams.join("&"); + } + return next(request); + }, + }; + this.pipeline.addPolicy(apiVersionPolicy); + } + + azureDataTransfer: AzureDataTransfer; + operations: Operations; + connections: Connections; + pipelines: Pipelines; + flows: Flows; +} diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/src/index.ts b/sdk/azuredatatransfer/arm-azuredatatransfer/src/index.ts new file mode 100644 index 000000000000..478aa22753d6 --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/src/index.ts @@ -0,0 +1,13 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +/// +export { getContinuationToken } from "./pagingHelper.js"; +export * from "./models/index.js"; +export { Azuredatatransferrp } from "./azuredatatransferrp.js"; +export * from "./operationsInterfaces/index.js"; diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/src/lroImpl.ts b/sdk/azuredatatransfer/arm-azuredatatransfer/src/lroImpl.ts new file mode 100644 index 000000000000..1b3a95e6c540 --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/src/lroImpl.ts @@ -0,0 +1,36 @@ +/* + * 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 { AbortSignalLike } from "@azure/abort-controller"; +import { LongRunningOperation, LroResponse } from "@azure/core-lro"; + +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: (path: string, options?: { abortSignal?: AbortSignalLike }) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal, + }); + }, + }; +} diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/src/models/index.ts b/sdk/azuredatatransfer/arm-azuredatatransfer/src/models/index.ts new file mode 100644 index 000000000000..3088a9a440df --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/src/models/index.ts @@ -0,0 +1,2009 @@ +/* + * 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"; + +/** The request used to list approved schemas within the resource provider. */ +export interface ListApprovedSchemasRequest { + /** The name of the pipeline to filter approved schemas. */ + pipeline?: string; + /** The direction pipeline to filter approved schemas. */ + direction?: Direction; +} + +/** The schemas list result. */ +export interface SchemasListResult { + /** Schemas array. */ + value?: Schema[]; +} + +/** The schema object. */ +export interface Schema { + /** ID associated with this schema */ + id?: string; + /** Connection ID associated with this schema */ + connectionId?: string; + /** Status of the schema */ + status?: SchemaStatus; + /** Name of the schema */ + name?: string; + /** Content of the schema */ + content?: string; + /** The direction of the schema. */ + direction?: Direction; + /** Uri containing SAS token for the zipped schema */ + schemaUri?: string; + /** The Schema Type */ + schemaType?: SchemaType; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +/** The error detail. */ +export interface ErrorDetail { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; +} + +/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ +export interface OperationListResult { + /** + * List of operations supported by the resource provider + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: Operation[]; + /** + * URL to get the next set of operation list results (if there are any). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Details of a REST API operation, returned from the Resource Provider Operations API */ +export interface Operation { + /** + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isDataAction?: boolean; + /** Localized display information for this particular operation. */ + display?: OperationDisplay; + /** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly origin?: Origin; + /** + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly actionType?: ActionType; +} + +/** Localized display information for this particular operation. */ +export interface OperationDisplay { + /** + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provider?: string; + /** + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resource?: string; + /** + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operation?: string; + /** + * The short, localized friendly description of the operation; suitable for tool tips and detailed views. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; +} + +/** Result of the schema validation. */ +export interface ValidateSchemaResult { + /** Validation status of the schema */ + status?: ValidateSchemaStatus; + /** Message describing the schema validation */ + message?: string; +} + +/** The response of a Connection list operation. */ +export interface ConnectionListResult { + /** The Connection items on this page */ + value: Connection[]; + /** The link to the next page of items */ + nextLink?: string; +} + +/** Properties of connection */ +export interface ConnectionProperties { + /** Pipeline to use to transfer data */ + pipeline: string; + /** Direction of data movement */ + direction?: Direction; + /** Justification for the connection request */ + justification?: string; + /** + * Status of the connection + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: ConnectionStatus; + /** + * Force disablement status of the current connection + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly forceDisabledStatus?: ForceDisabledStatus[]; + /** + * Reason for status + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly statusReason?: string; + /** + * Link status of the current connection + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly linkStatus?: LinkStatus; + /** + * Resource ID of the linked connection + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly linkedConnectionId?: string; + /** The flow types being requested for this connection */ + flowTypes?: FlowType[]; + /** Requirement ID of the connection */ + requirementId?: string; + /** Subscription ID to link cloud subscriptions together */ + remoteSubscriptionId?: string; + /** + * Approver of this connection request + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly approver?: string; + /** PIN to link requests together */ + pin?: string; + /** + * The timestamp that this connection request was submitted at + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly dateSubmitted?: Date; + /** The primary contact for this connection request */ + primaryContact?: string; + /** The secondary contacts for this connection request */ + secondaryContacts?: string[]; + /** + * Provisioning state of the connection + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** The policies for this connection */ + policies?: string[]; + /** The schemas for this connection */ + schemas?: Schema[]; + /** The schema URIs for this connection */ + schemaUris?: string[]; +} + +/** Managed service identity (system assigned and/or user assigned identities) */ +export interface ManagedServiceIdentity { + /** + * The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ + type: ManagedServiceIdentityType; + /** The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. */ + userAssignedIdentities?: { + [propertyName: string]: UserAssignedIdentity | null; + }; +} + +/** User assigned identity properties */ +export interface UserAssignedIdentity { + /** + * The principal ID of the assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The client ID of the assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly clientId?: string; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { + /** + * Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * 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; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +} + +/** 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; +} + +/** The response of a Pipeline list operation. */ +export interface PipelineListResult { + /** The Pipeline items on this page */ + value: Pipeline[]; + /** The link to the next page of items */ + nextLink?: string; +} + +/** Properties of pipeline */ +export interface PipelineProperties { + /** Remote cloud of the data to be transferred or received */ + remoteCloud: string; + /** Display name of this pipeline */ + displayName?: string; + /** + * Connections associated with pipeline + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly connections?: PipelineConnection[]; + /** Subscribers of this resource */ + subscribers?: Subscriber[]; + /** + * Provisioning state of the pipeline + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** The policies for this pipeline */ + policies?: string[]; + /** The flow types allowed for this pipeline */ + flowTypes?: FlowType[]; + /** The flow types that are disabled for this pipeline */ + disabledFlowTypes?: FlowType[]; + /** Quarantine Download Storage Account */ + quarantineDownloadStorageAccount?: string; + /** Quarantine Download Storage Container */ + quarantineDownloadStorageContainer?: string; + /** Status of the current pipeline */ + status?: PipelineStatus; +} + +/** Connection body inside a pipeline */ +export interface PipelineConnection { + /** Describes unknown properties. The value of an unknown property can be of "any" type. */ + [property: string]: any; + /** Connection id inside pipeline */ + id: string; + /** + * Connection name inside pipeline + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Connection type inside pipeline + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Connection location inside pipeline + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly location?: string; + /** + * Connection etag inside pipeline + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly etag?: string; + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** Connection properties inside pipeline */ + properties?: PipelineConnectionProperties; +} + +/** Connection properties inside pipeline */ +export interface PipelineConnectionProperties { + /** Describes unknown properties. The value of an unknown property can be of "any" type. */ + [property: string]: any; + /** Internal metadata of the connection inside pipeline. */ + internalMetadata?: InternalMetadataProperties; +} + +/** Internal metadata of the connection inside pipeline. */ +export interface InternalMetadataProperties { + /** Describes unknown properties. The value of an unknown property can be of "any" type. */ + [property: string]: any; + /** Operation status associated with the last patch request */ + operationStatus?: OperationStatusProperties; + /** + * User that last set the approved status for this connection + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly statusSetBy?: string; +} + +/** Operation status associated with the last patch request */ +export interface OperationStatusProperties { + /** + * Operation status for the last patch request for this connection. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: OperationStatusEnum; + /** + * Operation status ID of the last patch request for this connection. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Message for the operation for the last patch request for this connection. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; +} + +/** An individual that would like to subscribe to events that occur on a pipeline. */ +export interface Subscriber { + /** Email of the subscriber */ + email?: string; + /** Number specifying what notifications to receive */ + notifications?: number; +} + +/** The connections resource patch definition. */ +export interface ConnectionsPatch { + /** The managed service identities assigned to this resource. */ + identity?: ManagedServiceIdentity; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; +} + +/** The response of a Flow list operation. */ +export interface FlowListResult { + /** The Flow items on this page */ + value: Flow[]; + /** The link to the next page of items */ + nextLink?: string; +} + +/** Properties of flow */ +export interface FlowProperties { + /** The connection associated with this flow */ + connection?: SelectedResource; + /** + * Dataflow GUID associated with this flow + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly flowId?: string; + /** AME, PME, or TORUS only! AKV Chain Containing SAS Token */ + keyVaultUri?: string; + /** + * Link status of the current flow + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly linkStatus?: LinkStatus; + /** + * Resource ID of the linked flow + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly linkedFlowId?: string; + /** Status of the current flow */ + status?: FlowStatus; + /** + * Force disablement status of the current flow + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly forceDisabledStatus?: ForceDisabledStatus[]; + /** Storage Account */ + storageAccountName?: string; + /** Storage Account ID */ + storageAccountId?: string; + /** Storage Container Name */ + storageContainerName?: string; + /** Storage Table Name */ + storageTableName?: string; + /** Service Bus Queue ID */ + serviceBusQueueId?: string; + /** The flow type for this flow */ + flowType?: FlowType; + /** Transfer Storage Blobs or Tables */ + dataType?: DataType; + /** + * Provisioning state of the flow + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** The policies for this flow */ + policies?: string[]; + /** The selected schema for this flow */ + schema?: Schema; + /** The messaging options for this flow */ + messagingOptions?: MessagingOptions; + /** The API Flow configuration options for Azure Data Transfer API Flow type. */ + apiFlowOptions?: ApiFlowOptions; + /** The URI to the customer managed key for this flow */ + customerManagedKeyVaultUri?: string; + /** The flow stream identifier */ + streamId?: string; + /** The protocol of the stream */ + streamProtocol?: StreamProtocol; + /** The latency of the stream in milliseconds */ + streamLatency?: number; + /** The passphrase used for SRT streams */ + passphrase?: string; + /** The source IP address and CIDR ranges of the stream */ + sourceAddresses?: StreamSourceAddresses; + /** The destination endpoints of the stream */ + destinationEndpoints?: string[]; + /** The destination endpoint ports of the stream */ + destinationEndpointPorts?: number[]; + /** Event Hub ID */ + eventHubId?: string; + /** Event Hub Consumer Group */ + consumerGroup?: string; +} + +/** A resource selected from ARM */ +export interface SelectedResource { + /** Name of the connection */ + name?: string; + /** Id of the connection */ + id: string; + /** Location of the connection */ + location?: string; + /** Name of the subscription with the connection */ + subscriptionName?: string; +} + +/** The option associated with messaging flows. */ +export interface MessagingOptions { + /** Billing tier for this messaging flow */ + billingTier?: FlowBillingTier; +} + +/** Properties specific to API Flow Type */ +export interface ApiFlowOptions { + /** Remote host to which communication needs to be made */ + remoteEndpoint?: string; + /** Unique CNAME to represent the Azure Data Transfer API Flow instance */ + cname?: string; + /** Remote Calling Mode in the Azure Data Transfer API Flow, which describes how the API Flow will be invoked */ + apiMode?: ApiMode; + /** Flag for if Azure Data Transfer API Flow should extract the user token */ + identityTranslation?: IdentityTranslation; + /** Sender's app user assigned Manage Identity client ID */ + senderClientId?: string; + /** Remote stub app registration Client ID */ + remoteCallingModeClientId?: string; + /** Optional field to override the audience of the remote endpoint */ + audienceOverride?: string; +} + +/** The source IP address and CIDR ranges of the stream */ +export interface StreamSourceAddresses { + /** A source IP address or CIDR range */ + sourceAddresses?: string[]; +} + +/** Plan for the resource. */ +export interface Plan { + /** A user defined name of the 3rd Party Artifact that is being procured. */ + name: string; + /** The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic */ + publisher: string; + /** The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. */ + product: string; + /** A publisher provided promotion code as provisioned in Data Market for the said product/artifact. */ + promotionCode?: string; + /** The version of the desired product/artifact. */ + version?: string; +} + +/** The flows resource patch definition. */ +export interface FlowsPatch { + /** The managed service identities assigned to this resource. */ + identity?: ManagedServiceIdentity; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; +} + +/** List of destination endpoint ports for the flow stream */ +export interface GetDestinationEndpointPortsResult { + /** The destination endpoint port for the flow stream */ + ports?: number[]; +} + +/** List of destination endpoints for the flow stream */ +export interface GetDestinationEndpointsResult { + /** The destination endpoints for the flow stream */ + endpoints?: string[]; +} + +/** The connection string for the specified streaming flow */ +export interface GetStreamConnectionStringResult { + /** The connection string for the specified streaming flow */ + connectionString?: string; +} + +/** The resource to reference. */ +export interface ResourceBody { + /** ID of the resource. */ + id: string; + /** Reason for resource operation. */ + statusReason?: string; +} + +/** Set the destination endpoint ports for the specified stream ID */ +export interface SetDestinationEndpointPorts { + /** The specified stream ID destination endpoint ports */ + ports?: number[]; +} + +/** Set the destination endpoints for the specified stream ID */ +export interface SetDestinationEndpoints { + /** The specified stream ID destination endpoints */ + endpoints?: string[]; +} + +/** Set the passphrase used for SRT streams */ +export interface SetStreamPassphrase { + /** The passphrase used for SRT streams */ + value?: string; +} + +/** Set the source addresses for the specified stream ID */ +export interface SetSourceAddresses { + /** Source addresses */ + values?: string[]; +} + +/** The response of a PendingConnection list operation. */ +export interface PendingConnectionListResult { + /** The PendingConnection items on this page */ + value: PendingConnection[]; + /** The link to the next page of items */ + nextLink?: string; +} + +/** Pending connection object */ +export interface PendingConnection { + /** Pipeline to use to transfer data */ + pipeline: string; + /** Direction of data movement */ + direction?: Direction; + /** Justification for the connection request */ + justification?: string; + /** + * Status of the connection + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: ConnectionStatus; + /** + * Force disablement status of the current connection + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly forceDisabledStatus?: ForceDisabledStatus[]; + /** + * Reason for status + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly statusReason?: string; + /** + * Link status of the current connection + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly linkStatus?: LinkStatus; + /** + * Resource ID of the linked connection + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly linkedConnectionId?: string; + /** The flow types being requested for this connection */ + flowTypes?: FlowType[]; + /** Requirement ID of the connection */ + requirementId?: string; + /** Subscription ID to link cloud subscriptions together */ + remoteSubscriptionId?: string; + /** + * Approver of this connection request + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly approver?: string; + /** PIN to link requests together */ + pin?: string; + /** + * The timestamp that this connection request was submitted at + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly dateSubmitted?: Date; + /** The primary contact for this connection request */ + primaryContact?: string; + /** The secondary contacts for this connection request */ + secondaryContacts?: string[]; + /** + * Provisioning state of the connection + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** The policies for this connection */ + policies?: string[]; + /** The schemas for this connection */ + schemas?: Schema[]; + /** The schema URIs for this connection */ + schemaUris?: string[]; + /** The resource-specific properties for this resource. */ + properties?: Connection; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives */ + location: string; + /** + * 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; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** + * Subscription ID of the pending connection. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly subscriptionId?: string; +} + +/** The response of a PendingFlow list operation. */ +export interface PendingFlowListResult { + /** The PendingFlow items on this page */ + value: PendingFlow[]; + /** The link to the next page of items */ + nextLink?: string; +} + +/** Pending flow object */ +export interface PendingFlow { + /** The connection associated with this flow */ + connection?: SelectedResource; + /** + * Dataflow GUID associated with this flow + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly flowId?: string; + /** AME, PME, or TORUS only! AKV Chain Containing SAS Token */ + keyVaultUri?: string; + /** + * Link status of the current flow + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly linkStatus?: LinkStatus; + /** + * Resource ID of the linked flow + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly linkedFlowId?: string; + /** Status of the current flow */ + status?: FlowStatus; + /** + * Force disablement status of the current flow + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly forceDisabledStatus?: ForceDisabledStatus[]; + /** Storage Account */ + storageAccountName?: string; + /** Storage Account ID */ + storageAccountId?: string; + /** Storage Container Name */ + storageContainerName?: string; + /** Storage Table Name */ + storageTableName?: string; + /** Service Bus Queue ID */ + serviceBusQueueId?: string; + /** The flow type for this flow */ + flowType?: FlowType; + /** Transfer Storage Blobs or Tables */ + dataType?: DataType; + /** + * Provisioning state of the flow + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** The policies for this flow */ + policies?: string[]; + /** The selected schema for this flow */ + schema?: Schema; + /** The messaging options for this flow */ + messagingOptions?: MessagingOptions; + /** The API Flow configuration options for Azure Data Transfer API Flow type. */ + apiFlowOptions?: ApiFlowOptions; + /** The URI to the customer managed key for this flow */ + customerManagedKeyVaultUri?: string; + /** The flow stream identifier */ + streamId?: string; + /** The protocol of the stream */ + streamProtocol?: StreamProtocol; + /** The latency of the stream in milliseconds */ + streamLatency?: number; + /** The passphrase used for SRT streams */ + passphrase?: string; + /** The source IP address and CIDR ranges of the stream */ + sourceAddresses?: StreamSourceAddresses; + /** The destination endpoints of the stream */ + destinationEndpoints?: string[]; + /** The destination endpoint ports of the stream */ + destinationEndpointPorts?: number[]; + /** Event Hub ID */ + eventHubId?: string; + /** Event Hub Consumer Group */ + consumerGroup?: string; + /** The resource-specific properties for this resource. */ + properties?: Flow; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives */ + location: string; + /** + * 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; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** + * Subscription ID of the pending flow. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly subscriptionId?: string; + /** + * Connection ID of the pending flow. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly connectionId?: string; +} + +/** The pipelines resource patch definition. */ +export interface PipelinesPatch { + /** Properties of pipelines patch body. */ + properties?: PipelinesPatchProperties; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The managed service identities assigned to this resource. */ + identity?: ManagedServiceIdentity; +} + +/** Properties of pipelines patch body. */ +export interface PipelinesPatchProperties { + /** Connections associated with pipeline */ + connections?: PipelineConnection[]; + /** The flow types allowed for this pipeline */ + flowTypes?: FlowType[]; +} + +/** The action to be executed. */ +export interface Action { + /** Type of action to be executed */ + actionType: ActionType; + /** Type of target to execute the action on */ + targetType: TargetType; + /** Targets for the action */ + targets: string[]; + /** Business justification for the action */ + justification?: string; +} + +/** An array of connection id resources. */ +export interface ConnectionIdList { + /** Connection ID to target */ + value?: string[]; +} + +/** An array of flow resources. */ +export interface ListFlowsByPipelineResult { + /** List flows by pipeline result by connection */ + value?: ListFlowsByPipelineConnection[]; +} + +/** A connection resource id in addition to all child flow resources under this connection. */ +export interface ListFlowsByPipelineConnection { + /** ID of the connection. */ + id?: string; + /** List of flows associated with the connection. */ + flows?: Flow[]; +} + +/** Azure operation completed successfully. */ +export interface AzureResourceManagerArmResponseConnection { + /** The body type of the operation request or response. */ + body: Connection; +} + +/** Azure operation completed successfully. */ +export interface AzureResourceManagerArmResponseFlow { + /** The body type of the operation request or response. */ + body: Flow; +} + +/** Azure operation completed successfully. */ +export interface AzureResourceManagerArmResponsePipeline { + /** The body type of the operation request or response. */ + body: Pipeline; +} + +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export interface TrackedResource extends Resource { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives */ + location: string; +} + +/** The connection resource definition. */ +export interface Connection extends TrackedResource { + /** Properties of connection */ + properties?: ConnectionProperties; + /** The managed service identities assigned to this resource. */ + identity?: ManagedServiceIdentity; +} + +/** The pipeline resource definition. */ +export interface Pipeline extends TrackedResource { + /** Properties of pipeline */ + properties?: PipelineProperties; + /** The managed service identities assigned to this resource. */ + identity?: ManagedServiceIdentity; +} + +/** The flow resource definition. */ +export interface Flow extends TrackedResource { + /** Properties of flow */ + properties?: FlowProperties; + /** Details of the resource plan. */ + plan?: Plan; + /** The managed service identities assigned to this resource. */ + identity?: ManagedServiceIdentity; +} + +/** Defines headers for Connections_update operation. */ +export interface ConnectionsUpdateHeaders { + /** The Location header contains the URL where the status of the long running operation can be checked. */ + location?: string; + /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ + retryAfter?: number; +} + +/** Defines headers for Connections_delete operation. */ +export interface ConnectionsDeleteHeaders { + /** The Location header contains the URL where the status of the long running operation can be checked. */ + location?: string; + /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ + retryAfter?: number; +} + +/** Defines headers for Connections_link operation. */ +export interface ConnectionsLinkHeaders { + /** The Location header contains the URL where the status of the long running operation can be checked. */ + location?: string; + /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ + retryAfter?: number; +} + +/** Defines headers for Pipelines_createOrUpdate operation. */ +export interface PipelinesCreateOrUpdateHeaders { + /** A link to the status monitor */ + azureAsyncOperation?: string; + /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ + retryAfter?: number; +} + +/** Defines headers for Pipelines_update operation. */ +export interface PipelinesUpdateHeaders { + /** The Location header contains the URL where the status of the long running operation can be checked. */ + location?: string; + /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ + retryAfter?: number; +} + +/** Defines headers for Pipelines_delete operation. */ +export interface PipelinesDeleteHeaders { + /** The Location header contains the URL where the status of the long running operation can be checked. */ + location?: string; + /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ + retryAfter?: number; +} + +/** Defines headers for Pipelines_approveConnection operation. */ +export interface PipelinesApproveConnectionHeaders { + /** The Location header contains the URL where the status of the long running operation can be checked. */ + location?: string; + /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ + retryAfter?: number; +} + +/** Defines headers for Pipelines_executeAction operation. */ +export interface PipelinesExecuteActionHeaders { + /** The Location header contains the URL where the status of the long running operation can be checked. */ + location?: string; + /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ + retryAfter?: number; +} + +/** Defines headers for Pipelines_rejectConnection operation. */ +export interface PipelinesRejectConnectionHeaders { + /** The Location header contains the URL where the status of the long running operation can be checked. */ + location?: string; + /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ + retryAfter?: number; +} + +/** Defines headers for Flows_update operation. */ +export interface FlowsUpdateHeaders { + /** The Location header contains the URL where the status of the long running operation can be checked. */ + location?: string; + /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ + retryAfter?: number; +} + +/** Defines headers for Flows_delete operation. */ +export interface FlowsDeleteHeaders { + /** The Location header contains the URL where the status of the long running operation can be checked. */ + location?: string; + /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ + retryAfter?: number; +} + +/** Defines headers for Flows_disable operation. */ +export interface FlowsDisableHeaders { + /** The Location header contains the URL where the status of the long running operation can be checked. */ + location?: string; + /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ + retryAfter?: number; +} + +/** Defines headers for Flows_enable operation. */ +export interface FlowsEnableHeaders { + /** The Location header contains the URL where the status of the long running operation can be checked. */ + location?: string; + /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ + retryAfter?: number; +} + +/** Defines headers for Flows_generatePassphrase operation. */ +export interface FlowsGeneratePassphraseHeaders { + /** The Location header contains the URL where the status of the long running operation can be checked. */ + location?: string; + /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ + retryAfter?: number; +} + +/** Defines headers for Flows_link operation. */ +export interface FlowsLinkHeaders { + /** The Location header contains the URL where the status of the long running operation can be checked. */ + location?: string; + /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ + retryAfter?: number; +} + +/** Defines headers for Flows_setDestinationEndpointPorts operation. */ +export interface FlowsSetDestinationEndpointPortsHeaders { + /** The Location header contains the URL where the status of the long running operation can be checked. */ + location?: string; + /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ + retryAfter?: number; +} + +/** Defines headers for Flows_setDestinationEndpoints operation. */ +export interface FlowsSetDestinationEndpointsHeaders { + /** The Location header contains the URL where the status of the long running operation can be checked. */ + location?: string; + /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ + retryAfter?: number; +} + +/** Defines headers for Flows_setPassphrase operation. */ +export interface FlowsSetPassphraseHeaders { + /** The Location header contains the URL where the status of the long running operation can be checked. */ + location?: string; + /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ + retryAfter?: number; +} + +/** Defines headers for Flows_setSourceAddresses operation. */ +export interface FlowsSetSourceAddressesHeaders { + /** The Location header contains the URL where the status of the long running operation can be checked. */ + location?: string; + /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ + retryAfter?: number; +} + +/** Known values of {@link Direction} that the service accepts. */ +export enum KnownDirection { + /** The direction is on the sending side of a pipeline, connection, or flow. */ + Send = "Send", + /** The direction is on the receiving side side of a pipeline, connection, or flow. */ + Receive = "Receive", +} + +/** + * Defines values for Direction. \ + * {@link KnownDirection} can be used interchangeably with Direction, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Send**: The direction is on the sending side of a pipeline, connection, or flow. \ + * **Receive**: The direction is on the receiving side side of a pipeline, connection, or flow. + */ +export type Direction = string; + +/** Known values of {@link SchemaStatus} that the service accepts. */ +export enum KnownSchemaStatus { + /** A schema that has not been approved and is awaiting review. */ + New = "New", + /** A schema that has been approved and is ready for use. */ + Approved = "Approved", +} + +/** + * Defines values for SchemaStatus. \ + * {@link KnownSchemaStatus} can be used interchangeably with SchemaStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **New**: A schema that has not been approved and is awaiting review. \ + * **Approved**: A schema that has been approved and is ready for use. + */ +export type SchemaStatus = string; + +/** Known values of {@link SchemaType} that the service accepts. */ +export enum KnownSchemaType { + /** The schema represents a single XML schema definition file. */ + Xsd = "Xsd", + /** The schema represents a ZIP file with multiple XML schema definition files within it. */ + Zip = "Zip", +} + +/** + * Defines values for SchemaType. \ + * {@link KnownSchemaType} can be used interchangeably with SchemaType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Xsd**: The schema represents a single XML schema definition file. \ + * **Zip**: The schema represents a ZIP file with multiple XML schema definition files within it. + */ +export type SchemaType = string; + +/** Known values of {@link Origin} that the service accepts. */ +export enum KnownOrigin { + /** User */ + User = "user", + /** System */ + System = "system", + /** UserSystem */ + UserSystem = "user,system", +} + +/** + * Defines values for Origin. \ + * {@link KnownOrigin} can be used interchangeably with Origin, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **user** \ + * **system** \ + * **user,system** + */ +export type Origin = string; + +/** Known values of {@link ActionType} that the service accepts. */ +export enum KnownActionType { + /** Internal */ + Internal = "Internal", +} + +/** + * Defines values for ActionType. \ + * {@link KnownActionType} can be used interchangeably with ActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Internal** + */ +export type ActionType = string; + +/** Known values of {@link ValidateSchemaStatus} that the service accepts. */ +export enum KnownValidateSchemaStatus { + /** Validation of the schema was successful. */ + Succeeded = "Succeeded", + /** The schema failed validation, whether due to error or an invalid schema. */ + Failed = "Failed", +} + +/** + * Defines values for ValidateSchemaStatus. \ + * {@link KnownValidateSchemaStatus} can be used interchangeably with ValidateSchemaStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Validation of the schema was successful. \ + * **Failed**: The schema failed validation, whether due to error or an invalid schema. + */ +export type ValidateSchemaStatus = string; + +/** Known values of {@link ConnectionStatus} that the service accepts. */ +export enum KnownConnectionStatus { + /** This connection has been created but is under review by the pipeline owner. */ + InReview = "InReview", + /** This connection has been approved by the pipeline owner and is ready for use. */ + Approved = "Approved", + /** This connection has been rejected by the pipeline owner and cannot be used. */ + Rejected = "Rejected", + /** Creation of the connection has been accepted. */ + Accepted = "Accepted", +} + +/** + * Defines values for ConnectionStatus. \ + * {@link KnownConnectionStatus} can be used interchangeably with ConnectionStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **InReview**: This connection has been created but is under review by the pipeline owner. \ + * **Approved**: This connection has been approved by the pipeline owner and is ready for use. \ + * **Rejected**: This connection has been rejected by the pipeline owner and cannot be used. \ + * **Accepted**: Creation of the connection has been accepted. + */ +export type ConnectionStatus = string; + +/** Known values of {@link ForceDisabledStatus} that the service accepts. */ +export enum KnownForceDisabledStatus { + /** This Flow has been disabled as the connection has been disabled. */ + ConnectionForceDisabled = "ConnectionForceDisabled", + /** This Flow has been disabled as the flow type this flow uses has been disabled. */ + FlowTypeForceDisabled = "FlowTypeForceDisabled", +} + +/** + * Defines values for ForceDisabledStatus. \ + * {@link KnownForceDisabledStatus} can be used interchangeably with ForceDisabledStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ConnectionForceDisabled**: This Flow has been disabled as the connection has been disabled. \ + * **FlowTypeForceDisabled**: This Flow has been disabled as the flow type this flow uses has been disabled. + */ +export type ForceDisabledStatus = string; + +/** Known values of {@link LinkStatus} that the service accepts. */ +export enum KnownLinkStatus { + /** + * The pipeline, connection, or flow is currently linked with another corresponding pipeline, + * connection, or flow, and can be used. + */ + Linked = "Linked", + /** + * The pipeline, connection, or flow is not linked with another corresponding pipeline, + * connection, or flow, and cannot be used. + */ + Unlinked = "Unlinked", +} + +/** + * Defines values for LinkStatus. \ + * {@link KnownLinkStatus} can be used interchangeably with LinkStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Linked**: The pipeline, connection, or flow is currently linked with another corresponding pipeline, + * connection, or flow, and can be used. \ + * **Unlinked**: The pipeline, connection, or flow is not linked with another corresponding pipeline, + * connection, or flow, and cannot be used. + */ +export type LinkStatus = string; + +/** Known values of {@link FlowType} that the service accepts. */ +export enum KnownFlowType { + /** This type of flow is not set. */ + Unknown = "Unknown", + /** This flow sends complex documents, such as Microsoft Office documents of Portable document format files. */ + Complex = "Complex", + /** This flow sends source code files and artifacts. */ + DevSecOps = "DevSecOps", + /** This flow over the Azure Data Transfer low latency messaging subsystem. */ + Messaging = "Messaging", + /** This flow sends data that will not be processed by any security system. */ + Mission = "Mission", + /** This flow is assigned to internal Microsoft use cases. */ + MicrosoftInternal = "MicrosoftInternal", + /** This flow sends blobs that can be used for multiple use cases. */ + BasicFiles = "BasicFiles", + /** This flow sends blobs that can be used for multiple use cases. */ + Data = "Data", + /** This flow sends blobs that can be used for multiple use cases. */ + Standard = "Standard", + /** This flow sends video streams. */ + StreamingVideo = "StreamingVideo", + /** This flow sends blobs that will not be processed by any security system. */ + Opaque = "Opaque", + /** This flow sends Extensible Markup Language that will not be processed by any security system. */ + MissionOpaqueXML = "MissionOpaqueXML", + /** This flow sends blobs that can be used for Virtual Machines. */ + DiskImages = "DiskImages", + /** This flow sends data via an Application Programmer Interface. */ + API = "API", +} + +/** + * Defines values for FlowType. \ + * {@link KnownFlowType} can be used interchangeably with FlowType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: This type of flow is not set. \ + * **Complex**: This flow sends complex documents, such as Microsoft Office documents of Portable document format files. \ + * **DevSecOps**: This flow sends source code files and artifacts. \ + * **Messaging**: This flow over the Azure Data Transfer low latency messaging subsystem. \ + * **Mission**: This flow sends data that will not be processed by any security system. \ + * **MicrosoftInternal**: This flow is assigned to internal Microsoft use cases. \ + * **BasicFiles**: This flow sends blobs that can be used for multiple use cases. \ + * **Data**: This flow sends blobs that can be used for multiple use cases. \ + * **Standard**: This flow sends blobs that can be used for multiple use cases. \ + * **StreamingVideo**: This flow sends video streams. \ + * **Opaque**: This flow sends blobs that will not be processed by any security system. \ + * **MissionOpaqueXML**: This flow sends Extensible Markup Language that will not be processed by any security system. \ + * **DiskImages**: This flow sends blobs that can be used for Virtual Machines. \ + * **API**: This flow sends data via an Application Programmer Interface. + */ +export type FlowType = string; + +/** Known values of {@link ProvisioningState} that the service accepts. */ +export enum KnownProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", + /** Resource has been accepted for creation. */ + Accepted = "Accepted", +} + +/** + * 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**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. \ + * **Accepted**: Resource has been accepted for creation. + */ +export type ProvisioningState = string; + +/** Known values of {@link ManagedServiceIdentityType} that the service accepts. */ +export enum KnownManagedServiceIdentityType { + /** None */ + None = "None", + /** SystemAssigned */ + SystemAssigned = "SystemAssigned", + /** UserAssigned */ + UserAssigned = "UserAssigned", + /** SystemAssignedUserAssigned */ + SystemAssignedUserAssigned = "SystemAssigned,UserAssigned", +} + +/** + * Defines values for ManagedServiceIdentityType. \ + * {@link KnownManagedServiceIdentityType} can be used interchangeably with ManagedServiceIdentityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **SystemAssigned** \ + * **UserAssigned** \ + * **SystemAssigned,UserAssigned** + */ +export type ManagedServiceIdentityType = string; + +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + /** User */ + User = "User", + /** Application */ + Application = "Application", + /** ManagedIdentity */ + ManagedIdentity = "ManagedIdentity", + /** Key */ + 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 OperationStatusEnum} that the service accepts. */ +export enum KnownOperationStatusEnum { + /** The last patch request for this connection completed with an error. */ + Failed = "Failed", + /** The last patch request for this connection completed. */ + Succeeded = "Succeeded", +} + +/** + * Defines values for OperationStatusEnum. \ + * {@link KnownOperationStatusEnum} can be used interchangeably with OperationStatusEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Failed**: The last patch request for this connection completed with an error. \ + * **Succeeded**: The last patch request for this connection completed. + */ +export type OperationStatusEnum = string; + +/** Known values of {@link PipelineStatus} that the service accepts. */ +export enum KnownPipelineStatus { + /** The pipeline is currently enabled and all child connection and flow resources below able to send or receive data. */ + Enabled = "Enabled", + /** The pipeline is currently disabled and all child connection and flow resources below are unable to send or receive data. */ + Disabled = "Disabled", +} + +/** + * Defines values for PipelineStatus. \ + * {@link KnownPipelineStatus} can be used interchangeably with PipelineStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: The pipeline is currently enabled and all child connection and flow resources below able to send or receive data. \ + * **Disabled**: The pipeline is currently disabled and all child connection and flow resources below are unable to send or receive data. + */ +export type PipelineStatus = string; + +/** Known values of {@link FlowStatus} that the service accepts. */ +export enum KnownFlowStatus { + /** The flow is currently enabled and able to send or receive data. */ + Enabled = "Enabled", + /** The flow is currently disabled and cannot send or receive data. */ + Disabled = "Disabled", +} + +/** + * Defines values for FlowStatus. \ + * {@link KnownFlowStatus} can be used interchangeably with FlowStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: The flow is currently enabled and able to send or receive data. \ + * **Disabled**: The flow is currently disabled and cannot send or receive data. + */ +export type FlowStatus = string; + +/** Known values of {@link DataType} that the service accepts. */ +export enum KnownDataType { + /** The flow uses Azure Storage blobs to send or receive data. */ + Blob = "Blob", + /** The flow uses Azure Storage tables to send or receive data. */ + Table = "Table", +} + +/** + * Defines values for DataType. \ + * {@link KnownDataType} can be used interchangeably with DataType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Blob**: The flow uses Azure Storage blobs to send or receive data. \ + * **Table**: The flow uses Azure Storage tables to send or receive data. + */ +export type DataType = string; + +/** Known values of {@link FlowBillingTier} that the service accepts. */ +export enum KnownFlowBillingTier { + /** Billing tier for messaging processing that charges based on how much data is transferred. */ + BlobTransport = "BlobTransport", + /** Billing tier for standard messaging processing that charges based on having the messaging resource allocated. */ + Standard = "Standard", + /** Billing tier for premium messaging processing that charges based on having the messaging resource allocated. */ + Premium = "Premium", +} + +/** + * Defines values for FlowBillingTier. \ + * {@link KnownFlowBillingTier} can be used interchangeably with FlowBillingTier, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **BlobTransport**: Billing tier for messaging processing that charges based on how much data is transferred. \ + * **Standard**: Billing tier for standard messaging processing that charges based on having the messaging resource allocated. \ + * **Premium**: Billing tier for premium messaging processing that charges based on having the messaging resource allocated. + */ +export type FlowBillingTier = string; + +/** Known values of {@link ApiMode} that the service accepts. */ +export enum KnownApiMode { + /** The API flow will forward calls to a custom Software Development Kit implementation. */ + SDK = "SDK", + /** The API flow will forward calls to a specified endpoint. */ + Endpoint = "Endpoint", +} + +/** + * Defines values for ApiMode. \ + * {@link KnownApiMode} can be used interchangeably with ApiMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SDK**: The API flow will forward calls to a custom Software Development Kit implementation. \ + * **Endpoint**: The API flow will forward calls to a specified endpoint. + */ +export type ApiMode = string; + +/** Known values of {@link IdentityTranslation} that the service accepts. */ +export enum KnownIdentityTranslation { + /** + * The API flow will make use of the user identity that called this API flow, and pass that token + * through the boundary. + */ + UserIdentity = "UserIdentity", + /** The API flow will make use of the Azure Data Transfer Flow managed identity on the other side of the boundary. */ + ServiceIdentity = "ServiceIdentity", +} + +/** + * Defines values for IdentityTranslation. \ + * {@link KnownIdentityTranslation} can be used interchangeably with IdentityTranslation, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **UserIdentity**: The API flow will make use of the user identity that called this API flow, and pass that token + * through the boundary. \ + * **ServiceIdentity**: The API flow will make use of the Azure Data Transfer Flow managed identity on the other side of the boundary. + */ +export type IdentityTranslation = string; + +/** Known values of {@link StreamProtocol} that the service accepts. */ +export enum KnownStreamProtocol { + /** This Flow is using User Datagram Protocol for the video stream. */ + UDP = "UDP", + /** This Flow is using Secure Reliable Transfer for the video stream. */ + SRT = "SRT", + /** This Flow is using Real-time Transport Protocol for the video stream. */ + RTP = "RTP", +} + +/** + * Defines values for StreamProtocol. \ + * {@link KnownStreamProtocol} can be used interchangeably with StreamProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **UDP**: This Flow is using User Datagram Protocol for the video stream. \ + * **SRT**: This Flow is using Secure Reliable Transfer for the video stream. \ + * **RTP**: This Flow is using Real-time Transport Protocol for the video stream. + */ +export type StreamProtocol = string; + +/** Known values of {@link TargetType} that the service accepts. */ +export enum KnownTargetType { + /** The action executing is targeting a pipeline. */ + Pipeline = "Pipeline", + /** The action executing is targeting a connection. */ + Connection = "Connection", + /** The action executing is targeting a flow type. */ + FlowType = "FlowType", +} + +/** + * Defines values for TargetType. \ + * {@link KnownTargetType} can be used interchangeably with TargetType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Pipeline**: The action executing is targeting a pipeline. \ + * **Connection**: The action executing is targeting a connection. \ + * **FlowType**: The action executing is targeting a flow type. + */ +export type TargetType = string; + +/** Optional parameters. */ +export interface AzureDataTransferListApprovedSchemasOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listApprovedSchemas operation. */ +export type AzureDataTransferListApprovedSchemasResponse = SchemasListResult; + +/** Optional parameters. */ +export interface AzureDataTransferValidateSchemaOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the validateSchema operation. */ +export type AzureDataTransferValidateSchemaResponse = ValidateSchemaResult; + +/** 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 ConnectionsListBySubscriptionOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type ConnectionsListBySubscriptionResponse = ConnectionListResult; + +/** Optional parameters. */ +export interface ConnectionsListByResourceGroupOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type ConnectionsListByResourceGroupResponse = ConnectionListResult; + +/** Optional parameters. */ +export interface ConnectionsGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ConnectionsGetResponse = Connection; + +/** Optional parameters. */ +export interface ConnectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type ConnectionsCreateOrUpdateResponse = Connection; + +/** Optional parameters. */ +export interface ConnectionsUpdateOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type ConnectionsUpdateResponse = Connection; + +/** Optional parameters. */ +export interface ConnectionsDeleteOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type ConnectionsDeleteResponse = ConnectionsDeleteHeaders; + +/** Optional parameters. */ +export interface ConnectionsLinkOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the link operation. */ +export type ConnectionsLinkResponse = Connection; + +/** Optional parameters. */ +export interface ConnectionsListOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ConnectionsListResponse = PendingConnectionListResult; + +/** Optional parameters. */ +export interface ConnectionsListPendingFlowsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listPendingFlowsList operation. */ +export type ConnectionsListPendingFlowsListResponse = PendingFlowListResult; + +/** Optional parameters. */ +export interface ConnectionsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type ConnectionsListBySubscriptionNextResponse = ConnectionListResult; + +/** Optional parameters. */ +export interface ConnectionsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type ConnectionsListByResourceGroupNextResponse = ConnectionListResult; + +/** Optional parameters. */ +export interface ConnectionsListNextOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ConnectionsListNextResponse = PendingConnectionListResult; + +/** Optional parameters. */ +export interface ConnectionsListPendingFlowsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listPendingFlowsListNext operation. */ +export type ConnectionsListPendingFlowsListNextResponse = PendingFlowListResult; + +/** Optional parameters. */ +export interface PipelinesListBySubscriptionOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type PipelinesListBySubscriptionResponse = PipelineListResult; + +/** Optional parameters. */ +export interface PipelinesListByResourceGroupOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type PipelinesListByResourceGroupResponse = PipelineListResult; + +/** Optional parameters. */ +export interface PipelinesGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PipelinesGetResponse = Pipeline; + +/** Optional parameters. */ +export interface PipelinesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type PipelinesCreateOrUpdateResponse = Pipeline; + +/** Optional parameters. */ +export interface PipelinesUpdateOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type PipelinesUpdateResponse = Pipeline; + +/** Optional parameters. */ +export interface PipelinesDeleteOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type PipelinesDeleteResponse = PipelinesDeleteHeaders; + +/** Optional parameters. */ +export interface PipelinesApproveConnectionOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the approveConnection operation. */ +export type PipelinesApproveConnectionResponse = Connection; + +/** Optional parameters. */ +export interface PipelinesExecuteActionOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the executeAction operation. */ +export type PipelinesExecuteActionResponse = Pipeline; + +/** Optional parameters. */ +export interface PipelinesListOptionalParams extends coreClient.OperationOptions { + /** Connection(s) to retrieve flows of */ + connections?: ConnectionIdList; +} + +/** Contains response data for the list operation. */ +export type PipelinesListResponse = ListFlowsByPipelineResult; + +/** Optional parameters. */ +export interface PipelinesListSchemasListOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the listSchemasList operation. */ +export type PipelinesListSchemasListResponse = SchemasListResult; + +/** Optional parameters. */ +export interface PipelinesRejectConnectionOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the rejectConnection operation. */ +export type PipelinesRejectConnectionResponse = Connection; + +/** Optional parameters. */ +export interface PipelinesListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type PipelinesListBySubscriptionNextResponse = PipelineListResult; + +/** Optional parameters. */ +export interface PipelinesListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type PipelinesListByResourceGroupNextResponse = PipelineListResult; + +/** Optional parameters. */ +export interface FlowsListByConnectionOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the listByConnection operation. */ +export type FlowsListByConnectionResponse = FlowListResult; + +/** Optional parameters. */ +export interface FlowsGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type FlowsGetResponse = Flow; + +/** Optional parameters. */ +export interface FlowsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type FlowsCreateOrUpdateResponse = Flow; + +/** Optional parameters. */ +export interface FlowsUpdateOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type FlowsUpdateResponse = Flow; + +/** Optional parameters. */ +export interface FlowsDeleteOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type FlowsDeleteResponse = FlowsDeleteHeaders; + +/** Optional parameters. */ +export interface FlowsDisableOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the disable operation. */ +export type FlowsDisableResponse = Flow; + +/** Optional parameters. */ +export interface FlowsEnableOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the enable operation. */ +export type FlowsEnableResponse = Flow; + +/** Optional parameters. */ +export interface FlowsGeneratePassphraseOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the generatePassphrase operation. */ +export type FlowsGeneratePassphraseResponse = Flow; + +/** Optional parameters. */ +export interface FlowsGetDestinationEndpointPortsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getDestinationEndpointPorts operation. */ +export type FlowsGetDestinationEndpointPortsResponse = GetDestinationEndpointPortsResult; + +/** Optional parameters. */ +export interface FlowsGetDestinationEndpointsOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the getDestinationEndpoints operation. */ +export type FlowsGetDestinationEndpointsResponse = GetDestinationEndpointsResult; + +/** Optional parameters. */ +export interface FlowsGetSourceAddressesOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the getSourceAddresses operation. */ +export type FlowsGetSourceAddressesResponse = StreamSourceAddresses; + +/** Optional parameters. */ +export interface FlowsGetStreamConnectionStringOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the getStreamConnectionString operation. */ +export type FlowsGetStreamConnectionStringResponse = GetStreamConnectionStringResult; + +/** Optional parameters. */ +export interface FlowsLinkOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the link operation. */ +export type FlowsLinkResponse = Flow; + +/** Optional parameters. */ +export interface FlowsSetDestinationEndpointPortsOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the setDestinationEndpointPorts operation. */ +export type FlowsSetDestinationEndpointPortsResponse = Flow; + +/** Optional parameters. */ +export interface FlowsSetDestinationEndpointsOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the setDestinationEndpoints operation. */ +export type FlowsSetDestinationEndpointsResponse = Flow; + +/** Optional parameters. */ +export interface FlowsSetPassphraseOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the setPassphrase operation. */ +export type FlowsSetPassphraseResponse = Flow; + +/** Optional parameters. */ +export interface FlowsSetSourceAddressesOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the setSourceAddresses operation. */ +export type FlowsSetSourceAddressesResponse = Flow; + +/** Optional parameters. */ +export interface FlowsListByConnectionNextOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the listByConnectionNext operation. */ +export type FlowsListByConnectionNextResponse = FlowListResult; + +/** Optional parameters. */ +export interface AzuredatatransferrpOptionalParams extends coreClient.ServiceClientOptions { + /** server parameter */ + $host?: string; + /** Api Version */ + apiVersion?: string; + /** Overrides client endpoint. */ + endpoint?: string; +} diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/src/models/mappers.ts b/sdk/azuredatatransfer/arm-azuredatatransfer/src/models/mappers.ts new file mode 100644 index 000000000000..c22b3e5c0c3c --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/src/models/mappers.ts @@ -0,0 +1,2839 @@ +/* + * 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 ListApprovedSchemasRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ListApprovedSchemasRequest", + modelProperties: { + pipeline: { + serializedName: "pipeline", + type: { + name: "String", + }, + }, + direction: { + serializedName: "direction", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const SchemasListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SchemasListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Schema", + }, + }, + }, + }, + }, + }, +}; + +export const Schema: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Schema", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String", + }, + }, + connectionId: { + serializedName: "connectionId", + type: { + name: "String", + }, + }, + status: { + serializedName: "status", + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + content: { + serializedName: "content", + type: { + name: "String", + }, + }, + direction: { + serializedName: "direction", + type: { + name: "String", + }, + }, + schemaUri: { + serializedName: "schemaUri", + type: { + name: "String", + }, + }, + schemaType: { + serializedName: "schemaType", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail", + }, + }, + }, + }, +}; + +export const ErrorDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String", + }, + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String", + }, + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String", + }, + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail", + }, + }, + }, + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + }, + }, + }, + }, + }, + }, +}; + +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String", + }, + }, + info: { + serializedName: "info", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } }, + }, + }, + }, + }, +}; + +export const OperationListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const Operation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + isDataAction: { + serializedName: "isDataAction", + readOnly: true, + type: { + name: "Boolean", + }, + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay", + }, + }, + origin: { + serializedName: "origin", + readOnly: true, + type: { + name: "String", + }, + }, + actionType: { + serializedName: "actionType", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const OperationDisplay: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + readOnly: true, + type: { + name: "String", + }, + }, + resource: { + serializedName: "resource", + readOnly: true, + type: { + name: "String", + }, + }, + operation: { + serializedName: "operation", + readOnly: true, + type: { + name: "String", + }, + }, + description: { + serializedName: "description", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ValidateSchemaResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ValidateSchemaResult", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String", + }, + }, + message: { + serializedName: "message", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ConnectionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectionListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Connection", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ConnectionProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectionProperties", + modelProperties: { + pipeline: { + serializedName: "pipeline", + required: true, + type: { + name: "String", + }, + }, + direction: { + serializedName: "direction", + type: { + name: "String", + }, + }, + justification: { + serializedName: "justification", + type: { + name: "String", + }, + }, + status: { + serializedName: "status", + readOnly: true, + type: { + name: "String", + }, + }, + forceDisabledStatus: { + serializedName: "forceDisabledStatus", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + statusReason: { + serializedName: "statusReason", + readOnly: true, + type: { + name: "String", + }, + }, + linkStatus: { + serializedName: "linkStatus", + readOnly: true, + type: { + name: "String", + }, + }, + linkedConnectionId: { + serializedName: "linkedConnectionId", + readOnly: true, + type: { + name: "String", + }, + }, + flowTypes: { + serializedName: "flowTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + requirementId: { + serializedName: "requirementId", + type: { + name: "String", + }, + }, + remoteSubscriptionId: { + serializedName: "remoteSubscriptionId", + type: { + name: "String", + }, + }, + approver: { + serializedName: "approver", + readOnly: true, + type: { + name: "String", + }, + }, + pin: { + serializedName: "pin", + type: { + name: "String", + }, + }, + dateSubmitted: { + serializedName: "dateSubmitted", + readOnly: true, + type: { + name: "DateTime", + }, + }, + primaryContact: { + serializedName: "primaryContact", + type: { + name: "String", + }, + }, + secondaryContacts: { + serializedName: "secondaryContacts", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String", + }, + }, + policies: { + serializedName: "policies", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + schemas: { + serializedName: "schemas", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Schema", + }, + }, + }, + }, + schemaUris: { + serializedName: "schemaUris", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const ManagedServiceIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedServiceIdentity", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "Uuid", + }, + }, + tenantId: { + serializedName: "tenantId", + readOnly: true, + type: { + name: "Uuid", + }, + }, + type: { + serializedName: "type", + required: true, + type: { + name: "String", + }, + }, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { name: "Composite", className: "UserAssignedIdentity" }, + }, + }, + }, + }, + }, +}; + +export const UserAssignedIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UserAssignedIdentity", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "Uuid", + }, + }, + clientId: { + serializedName: "clientId", + readOnly: true, + type: { + name: "Uuid", + }, + }, + }, + }, +}; + +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", + }, + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + }, + }, + }, + }, +}; + +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 PipelineListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PipelineListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Pipeline", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const PipelineProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PipelineProperties", + modelProperties: { + remoteCloud: { + serializedName: "remoteCloud", + required: true, + type: { + name: "String", + }, + }, + displayName: { + serializedName: "displayName", + type: { + name: "String", + }, + }, + connections: { + serializedName: "connections", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PipelineConnection", + }, + }, + }, + }, + subscribers: { + serializedName: "subscribers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Subscriber", + }, + }, + }, + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String", + }, + }, + policies: { + serializedName: "policies", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + flowTypes: { + serializedName: "flowTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + disabledFlowTypes: { + serializedName: "disabledFlowTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + quarantineDownloadStorageAccount: { + serializedName: "quarantineDownloadStorageAccount", + type: { + name: "String", + }, + }, + quarantineDownloadStorageContainer: { + serializedName: "quarantineDownloadStorageContainer", + type: { + name: "String", + }, + }, + status: { + serializedName: "status", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const PipelineConnection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PipelineConnection", + additionalProperties: { type: { name: "Object" } }, + modelProperties: { + id: { + serializedName: "id", + required: true, + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + readOnly: true, + type: { + name: "String", + }, + }, + etag: { + serializedName: "etag", + readOnly: true, + type: { + name: "String", + }, + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + }, + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "PipelineConnectionProperties", + }, + }, + }, + }, +}; + +export const PipelineConnectionProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PipelineConnectionProperties", + additionalProperties: { type: { name: "Object" } }, + modelProperties: { + internalMetadata: { + serializedName: "internalMetadata", + type: { + name: "Composite", + className: "InternalMetadataProperties", + }, + }, + }, + }, +}; + +export const InternalMetadataProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InternalMetadataProperties", + additionalProperties: { type: { name: "Object" } }, + modelProperties: { + operationStatus: { + serializedName: "operationStatus", + type: { + name: "Composite", + className: "OperationStatusProperties", + }, + }, + statusSetBy: { + serializedName: "statusSetBy", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const OperationStatusProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationStatusProperties", + modelProperties: { + status: { + serializedName: "status", + readOnly: true, + type: { + name: "String", + }, + }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String", + }, + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const Subscriber: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Subscriber", + modelProperties: { + email: { + serializedName: "email", + type: { + name: "String", + }, + }, + notifications: { + serializedName: "notifications", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const ConnectionsPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectionsPatch", + modelProperties: { + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity", + }, + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + }, + }, +}; + +export const FlowListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FlowListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Flow", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const FlowProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FlowProperties", + modelProperties: { + connection: { + serializedName: "connection", + type: { + name: "Composite", + className: "SelectedResource", + }, + }, + flowId: { + serializedName: "flowId", + readOnly: true, + type: { + name: "String", + }, + }, + keyVaultUri: { + serializedName: "keyVaultUri", + type: { + name: "String", + }, + }, + linkStatus: { + serializedName: "linkStatus", + readOnly: true, + type: { + name: "String", + }, + }, + linkedFlowId: { + serializedName: "linkedFlowId", + readOnly: true, + type: { + name: "String", + }, + }, + status: { + serializedName: "status", + type: { + name: "String", + }, + }, + forceDisabledStatus: { + serializedName: "forceDisabledStatus", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + storageAccountName: { + serializedName: "storageAccountName", + type: { + name: "String", + }, + }, + storageAccountId: { + serializedName: "storageAccountId", + type: { + name: "String", + }, + }, + storageContainerName: { + serializedName: "storageContainerName", + type: { + name: "String", + }, + }, + storageTableName: { + serializedName: "storageTableName", + type: { + name: "String", + }, + }, + serviceBusQueueId: { + serializedName: "serviceBusQueueId", + type: { + name: "String", + }, + }, + flowType: { + serializedName: "flowType", + type: { + name: "String", + }, + }, + dataType: { + serializedName: "dataType", + type: { + name: "String", + }, + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String", + }, + }, + policies: { + serializedName: "policies", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + schema: { + serializedName: "schema", + type: { + name: "Composite", + className: "Schema", + }, + }, + messagingOptions: { + serializedName: "messagingOptions", + type: { + name: "Composite", + className: "MessagingOptions", + }, + }, + apiFlowOptions: { + serializedName: "apiFlowOptions", + type: { + name: "Composite", + className: "ApiFlowOptions", + }, + }, + customerManagedKeyVaultUri: { + serializedName: "customerManagedKeyVaultUri", + type: { + name: "String", + }, + }, + streamId: { + serializedName: "streamId", + type: { + name: "String", + }, + }, + streamProtocol: { + serializedName: "streamProtocol", + type: { + name: "String", + }, + }, + streamLatency: { + serializedName: "streamLatency", + type: { + name: "Number", + }, + }, + passphrase: { + serializedName: "passphrase", + type: { + name: "String", + }, + }, + sourceAddresses: { + serializedName: "sourceAddresses", + type: { + name: "Composite", + className: "StreamSourceAddresses", + }, + }, + destinationEndpoints: { + serializedName: "destinationEndpoints", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + destinationEndpointPorts: { + serializedName: "destinationEndpointPorts", + type: { + name: "Sequence", + element: { + type: { + name: "Number", + }, + }, + }, + }, + eventHubId: { + serializedName: "eventHubId", + type: { + name: "String", + }, + }, + consumerGroup: { + serializedName: "consumerGroup", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const SelectedResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SelectedResource", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + id: { + serializedName: "id", + required: true, + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + subscriptionName: { + serializedName: "subscriptionName", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const MessagingOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MessagingOptions", + modelProperties: { + billingTier: { + serializedName: "billingTier", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ApiFlowOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ApiFlowOptions", + modelProperties: { + remoteEndpoint: { + serializedName: "remoteEndpoint", + type: { + name: "String", + }, + }, + cname: { + serializedName: "cname", + type: { + name: "String", + }, + }, + apiMode: { + serializedName: "apiMode", + type: { + name: "String", + }, + }, + identityTranslation: { + serializedName: "identityTranslation", + type: { + name: "String", + }, + }, + senderClientId: { + serializedName: "senderClientId", + type: { + name: "String", + }, + }, + remoteCallingModeClientId: { + serializedName: "remoteCallingModeClientId", + type: { + name: "String", + }, + }, + audienceOverride: { + serializedName: "audienceOverride", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const StreamSourceAddresses: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StreamSourceAddresses", + modelProperties: { + sourceAddresses: { + serializedName: "sourceAddresses", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const Plan: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Plan", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String", + }, + }, + publisher: { + serializedName: "publisher", + required: true, + type: { + name: "String", + }, + }, + product: { + serializedName: "product", + required: true, + type: { + name: "String", + }, + }, + promotionCode: { + serializedName: "promotionCode", + type: { + name: "String", + }, + }, + version: { + serializedName: "version", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const FlowsPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FlowsPatch", + modelProperties: { + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity", + }, + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + }, + }, +}; + +export const GetDestinationEndpointPortsResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GetDestinationEndpointPortsResult", + modelProperties: { + ports: { + serializedName: "ports", + type: { + name: "Sequence", + element: { + type: { + name: "Number", + }, + }, + }, + }, + }, + }, +}; + +export const GetDestinationEndpointsResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GetDestinationEndpointsResult", + modelProperties: { + endpoints: { + serializedName: "endpoints", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const GetStreamConnectionStringResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GetStreamConnectionStringResult", + modelProperties: { + connectionString: { + serializedName: "connectionString", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ResourceBody: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceBody", + modelProperties: { + id: { + serializedName: "id", + required: true, + type: { + name: "String", + }, + }, + statusReason: { + serializedName: "statusReason", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const SetDestinationEndpointPorts: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SetDestinationEndpointPorts", + modelProperties: { + ports: { + serializedName: "ports", + type: { + name: "Sequence", + element: { + type: { + name: "Number", + }, + }, + }, + }, + }, + }, +}; + +export const SetDestinationEndpoints: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SetDestinationEndpoints", + modelProperties: { + endpoints: { + serializedName: "endpoints", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const SetStreamPassphrase: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SetStreamPassphrase", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const SetSourceAddresses: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SetSourceAddresses", + modelProperties: { + values: { + serializedName: "values", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const PendingConnectionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PendingConnectionListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PendingConnection", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const PendingConnection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PendingConnection", + modelProperties: { + pipeline: { + serializedName: "pipeline", + required: true, + type: { + name: "String", + }, + }, + direction: { + serializedName: "direction", + type: { + name: "String", + }, + }, + justification: { + serializedName: "justification", + type: { + name: "String", + }, + }, + status: { + serializedName: "status", + readOnly: true, + type: { + name: "String", + }, + }, + forceDisabledStatus: { + serializedName: "forceDisabledStatus", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + statusReason: { + serializedName: "statusReason", + readOnly: true, + type: { + name: "String", + }, + }, + linkStatus: { + serializedName: "linkStatus", + readOnly: true, + type: { + name: "String", + }, + }, + linkedConnectionId: { + serializedName: "linkedConnectionId", + readOnly: true, + type: { + name: "String", + }, + }, + flowTypes: { + serializedName: "flowTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + requirementId: { + serializedName: "requirementId", + type: { + name: "String", + }, + }, + remoteSubscriptionId: { + serializedName: "remoteSubscriptionId", + type: { + name: "String", + }, + }, + approver: { + serializedName: "approver", + readOnly: true, + type: { + name: "String", + }, + }, + pin: { + serializedName: "pin", + type: { + name: "String", + }, + }, + dateSubmitted: { + serializedName: "dateSubmitted", + readOnly: true, + type: { + name: "DateTime", + }, + }, + primaryContact: { + serializedName: "primaryContact", + type: { + name: "String", + }, + }, + secondaryContacts: { + serializedName: "secondaryContacts", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String", + }, + }, + policies: { + serializedName: "policies", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + schemas: { + serializedName: "schemas", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Schema", + }, + }, + }, + }, + schemaUris: { + serializedName: "schemaUris", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "Connection", + }, + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String", + }, + }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String", + }, + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + }, + }, + subscriptionId: { + serializedName: "subscriptionId", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const PendingFlowListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PendingFlowListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PendingFlow", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const PendingFlow: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PendingFlow", + modelProperties: { + connection: { + serializedName: "connection", + type: { + name: "Composite", + className: "SelectedResource", + }, + }, + flowId: { + serializedName: "flowId", + readOnly: true, + type: { + name: "String", + }, + }, + keyVaultUri: { + serializedName: "keyVaultUri", + type: { + name: "String", + }, + }, + linkStatus: { + serializedName: "linkStatus", + readOnly: true, + type: { + name: "String", + }, + }, + linkedFlowId: { + serializedName: "linkedFlowId", + readOnly: true, + type: { + name: "String", + }, + }, + status: { + serializedName: "status", + type: { + name: "String", + }, + }, + forceDisabledStatus: { + serializedName: "forceDisabledStatus", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + storageAccountName: { + serializedName: "storageAccountName", + type: { + name: "String", + }, + }, + storageAccountId: { + serializedName: "storageAccountId", + type: { + name: "String", + }, + }, + storageContainerName: { + serializedName: "storageContainerName", + type: { + name: "String", + }, + }, + storageTableName: { + serializedName: "storageTableName", + type: { + name: "String", + }, + }, + serviceBusQueueId: { + serializedName: "serviceBusQueueId", + type: { + name: "String", + }, + }, + flowType: { + serializedName: "flowType", + type: { + name: "String", + }, + }, + dataType: { + serializedName: "dataType", + type: { + name: "String", + }, + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String", + }, + }, + policies: { + serializedName: "policies", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + schema: { + serializedName: "schema", + type: { + name: "Composite", + className: "Schema", + }, + }, + messagingOptions: { + serializedName: "messagingOptions", + type: { + name: "Composite", + className: "MessagingOptions", + }, + }, + apiFlowOptions: { + serializedName: "apiFlowOptions", + type: { + name: "Composite", + className: "ApiFlowOptions", + }, + }, + customerManagedKeyVaultUri: { + serializedName: "customerManagedKeyVaultUri", + type: { + name: "String", + }, + }, + streamId: { + serializedName: "streamId", + type: { + name: "String", + }, + }, + streamProtocol: { + serializedName: "streamProtocol", + type: { + name: "String", + }, + }, + streamLatency: { + serializedName: "streamLatency", + type: { + name: "Number", + }, + }, + passphrase: { + serializedName: "passphrase", + type: { + name: "String", + }, + }, + sourceAddresses: { + serializedName: "sourceAddresses", + type: { + name: "Composite", + className: "StreamSourceAddresses", + }, + }, + destinationEndpoints: { + serializedName: "destinationEndpoints", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + destinationEndpointPorts: { + serializedName: "destinationEndpointPorts", + type: { + name: "Sequence", + element: { + type: { + name: "Number", + }, + }, + }, + }, + eventHubId: { + serializedName: "eventHubId", + type: { + name: "String", + }, + }, + consumerGroup: { + serializedName: "consumerGroup", + type: { + name: "String", + }, + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "Flow", + }, + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String", + }, + }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String", + }, + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + }, + }, + subscriptionId: { + serializedName: "subscriptionId", + readOnly: true, + type: { + name: "String", + }, + }, + connectionId: { + serializedName: "connectionId", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const PipelinesPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PipelinesPatch", + modelProperties: { + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "PipelinesPatchProperties", + }, + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity", + }, + }, + }, + }, +}; + +export const PipelinesPatchProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PipelinesPatchProperties", + modelProperties: { + connections: { + serializedName: "connections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PipelineConnection", + }, + }, + }, + }, + flowTypes: { + serializedName: "flowTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const Action: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Action", + modelProperties: { + actionType: { + serializedName: "actionType", + required: true, + type: { + name: "String", + }, + }, + targetType: { + serializedName: "targetType", + required: true, + type: { + name: "String", + }, + }, + targets: { + serializedName: "targets", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + justification: { + serializedName: "justification", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ConnectionIdList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectionIdList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const ListFlowsByPipelineResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ListFlowsByPipelineResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ListFlowsByPipelineConnection", + }, + }, + }, + }, + }, + }, +}; + +export const ListFlowsByPipelineConnection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ListFlowsByPipelineConnection", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String", + }, + }, + flows: { + serializedName: "flows", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Flow", + }, + }, + }, + }, + }, + }, +}; + +export const AzureResourceManagerArmResponseConnection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureResourceManagerArmResponseConnection", + modelProperties: { + body: { + serializedName: "body", + type: { + name: "Composite", + className: "Connection", + }, + }, + }, + }, +}; + +export const AzureResourceManagerArmResponseFlow: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureResourceManagerArmResponseFlow", + modelProperties: { + body: { + serializedName: "body", + type: { + name: "Composite", + className: "Flow", + }, + }, + }, + }, +}; + +export const AzureResourceManagerArmResponsePipeline: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureResourceManagerArmResponsePipeline", + modelProperties: { + body: { + serializedName: "body", + type: { + name: "Composite", + className: "Pipeline", + }, + }, + }, + }, +}; + +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 Connection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Connection", + modelProperties: { + ...TrackedResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ConnectionProperties", + }, + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity", + }, + }, + }, + }, +}; + +export const Pipeline: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Pipeline", + modelProperties: { + ...TrackedResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "PipelineProperties", + }, + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity", + }, + }, + }, + }, +}; + +export const Flow: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Flow", + modelProperties: { + ...TrackedResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "FlowProperties", + }, + }, + plan: { + serializedName: "plan", + type: { + name: "Composite", + className: "Plan", + }, + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity", + }, + }, + }, + }, +}; + +export const ConnectionsUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectionsUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const ConnectionsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectionsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const ConnectionsLinkHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectionsLinkHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const PipelinesCreateOrUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PipelinesCreateOrUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const PipelinesUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PipelinesUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const PipelinesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PipelinesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const PipelinesApproveConnectionHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PipelinesApproveConnectionHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const PipelinesExecuteActionHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PipelinesExecuteActionHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const PipelinesRejectConnectionHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PipelinesRejectConnectionHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const FlowsUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FlowsUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const FlowsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FlowsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const FlowsDisableHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FlowsDisableHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const FlowsEnableHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FlowsEnableHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const FlowsGeneratePassphraseHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FlowsGeneratePassphraseHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const FlowsLinkHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FlowsLinkHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const FlowsSetDestinationEndpointPortsHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FlowsSetDestinationEndpointPortsHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const FlowsSetDestinationEndpointsHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FlowsSetDestinationEndpointsHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const FlowsSetPassphraseHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FlowsSetPassphraseHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const FlowsSetSourceAddressesHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FlowsSetSourceAddressesHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number", + }, + }, + }, + }, +}; diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/src/models/parameters.ts b/sdk/azuredatatransfer/arm-azuredatatransfer/src/models/parameters.ts new file mode 100644 index 000000000000..3257436c530e --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/src/models/parameters.ts @@ -0,0 +1,239 @@ +/* + * 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 { + ListApprovedSchemasRequest as ListApprovedSchemasRequestMapper, + Schema as SchemaMapper, + Connection as ConnectionMapper, + ConnectionsPatch as ConnectionsPatchMapper, + ResourceBody as ResourceBodyMapper, + Pipeline as PipelineMapper, + PipelinesPatch as PipelinesPatchMapper, + Action as ActionMapper, + ConnectionIdList as ConnectionIdListMapper, + Flow as FlowMapper, + FlowsPatch as FlowsPatchMapper, + SetDestinationEndpointPorts as SetDestinationEndpointPortsMapper, + SetDestinationEndpoints as SetDestinationEndpointsMapper, + SetStreamPassphrase as SetStreamPassphraseMapper, + SetSourceAddresses as SetSourceAddressesMapper, +} from "../models/mappers.js"; + +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", + type: { + name: "String", + }, + }, +}; + +export const body: OperationParameter = { + parameterPath: "body", + mapper: ListApprovedSchemasRequestMapper, +}; + +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: "2025-04-11-preview", + isConstant: true, + serializedName: "api-version", + type: { + name: "String", + }, + }, +}; + +export const body1: OperationParameter = { + parameterPath: "body", + mapper: SchemaMapper, +}; + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", + mapper: { + serializedName: "nextLink", + required: true, + type: { + name: "String", + }, + }, + skipEncoding: true, +}; + +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + serializedName: "subscriptionId", + required: true, + type: { + name: "Uuid", + }, + }, +}; + +export const resourceGroupName: OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + constraints: { + MaxLength: 90, + MinLength: 1, + }, + serializedName: "resourceGroupName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const connectionName: OperationURLParameter = { + parameterPath: "connectionName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9-]{3,64}$"), + MaxLength: 64, + MinLength: 3, + }, + serializedName: "connectionName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const resource: OperationParameter = { + parameterPath: "resource", + mapper: ConnectionMapper, +}; + +export const properties: OperationParameter = { + parameterPath: "properties", + mapper: ConnectionsPatchMapper, +}; + +export const body2: OperationParameter = { + parameterPath: "body", + mapper: ResourceBodyMapper, +}; + +export const pipelineName: OperationURLParameter = { + parameterPath: "pipelineName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9-]{3,64}$"), + MaxLength: 64, + MinLength: 3, + }, + serializedName: "pipelineName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const resource1: OperationParameter = { + parameterPath: "resource", + mapper: PipelineMapper, +}; + +export const properties1: OperationParameter = { + parameterPath: "properties", + mapper: PipelinesPatchMapper, +}; + +export const body3: OperationParameter = { + parameterPath: "body", + mapper: ActionMapper, +}; + +export const connections: OperationParameter = { + parameterPath: ["options", "connections"], + mapper: ConnectionIdListMapper, +}; + +export const flowName: OperationURLParameter = { + parameterPath: "flowName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9-]{3,64}$"), + MaxLength: 64, + MinLength: 3, + }, + serializedName: "flowName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const resource2: OperationParameter = { + parameterPath: "resource", + mapper: FlowMapper, +}; + +export const properties2: OperationParameter = { + parameterPath: "properties", + mapper: FlowsPatchMapper, +}; + +export const body4: OperationParameter = { + parameterPath: "body", + mapper: SetDestinationEndpointPortsMapper, +}; + +export const body5: OperationParameter = { + parameterPath: "body", + mapper: SetDestinationEndpointsMapper, +}; + +export const body6: OperationParameter = { + parameterPath: "body", + mapper: SetStreamPassphraseMapper, +}; + +export const body7: OperationParameter = { + parameterPath: "body", + mapper: SetSourceAddressesMapper, +}; diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/src/operations/azureDataTransfer.ts b/sdk/azuredatatransfer/arm-azuredatatransfer/src/operations/azureDataTransfer.ts new file mode 100644 index 000000000000..1fdd5ce1d2fb --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/src/operations/azureDataTransfer.ts @@ -0,0 +1,97 @@ +/* + * 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 { AzureDataTransfer } from "../operationsInterfaces/index.js"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Azuredatatransferrp } from "../azuredatatransferrp.js"; +import { + ListApprovedSchemasRequest, + AzureDataTransferListApprovedSchemasOptionalParams, + AzureDataTransferListApprovedSchemasResponse, + Schema, + AzureDataTransferValidateSchemaOptionalParams, + AzureDataTransferValidateSchemaResponse, +} from "../models/index.js"; + +/** Class containing AzureDataTransfer operations. */ +export class AzureDataTransferImpl implements AzureDataTransfer { + private readonly client: Azuredatatransferrp; + + /** + * Initialize a new instance of the class AzureDataTransfer class. + * @param client Reference to the service client + */ + constructor(client: Azuredatatransferrp) { + this.client = client; + } + + /** + * Lists approved schemas for Azure Data Transfer. + * @param body The request body + * @param options The options parameters. + */ + listApprovedSchemas( + body: ListApprovedSchemasRequest, + options?: AzureDataTransferListApprovedSchemasOptionalParams, + ): Promise { + return this.client.sendOperationRequest({ body, options }, listApprovedSchemasOperationSpec); + } + + /** + * Validates a schema for Azure Data Transfer. + * @param body The request body + * @param options The options parameters. + */ + validateSchema( + body: Schema, + options?: AzureDataTransferValidateSchemaOptionalParams, + ): Promise { + return this.client.sendOperationRequest({ body, options }, validateSchemaOperationSpec); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listApprovedSchemasOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.AzureDataTransfer/listApprovedSchemas", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.SchemasListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.body, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const validateSchemaOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.AzureDataTransfer/validateSchema", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ValidateSchemaResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.body1, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/src/operations/connections.ts b/sdk/azuredatatransfer/arm-azuredatatransfer/src/operations/connections.ts new file mode 100644 index 000000000000..bd682e6ad4d5 --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/src/operations/connections.ts @@ -0,0 +1,1026 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Connections } from "../operationsInterfaces/index.js"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Azuredatatransferrp } from "../azuredatatransferrp.js"; +import { SimplePollerLike, OperationState, createHttpPoller } from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl.js"; +import { + Connection, + ConnectionsListBySubscriptionNextOptionalParams, + ConnectionsListBySubscriptionOptionalParams, + ConnectionsListBySubscriptionResponse, + ConnectionsListByResourceGroupNextOptionalParams, + ConnectionsListByResourceGroupOptionalParams, + ConnectionsListByResourceGroupResponse, + PendingConnection, + ConnectionsListNextOptionalParams, + ConnectionsListOptionalParams, + ConnectionsListResponse, + PendingFlow, + ConnectionsListPendingFlowsListNextOptionalParams, + ConnectionsListPendingFlowsListOptionalParams, + ConnectionsListPendingFlowsListResponse, + ConnectionsGetOptionalParams, + ConnectionsGetResponse, + ConnectionsCreateOrUpdateOptionalParams, + ConnectionsCreateOrUpdateResponse, + ConnectionsPatch, + ConnectionsUpdateOptionalParams, + ConnectionsUpdateResponse, + ConnectionsDeleteOptionalParams, + ConnectionsDeleteResponse, + ResourceBody, + ConnectionsLinkOptionalParams, + ConnectionsLinkResponse, + ConnectionsListBySubscriptionNextResponse, + ConnectionsListByResourceGroupNextResponse, + ConnectionsListNextResponse, + ConnectionsListPendingFlowsListNextResponse, +} from "../models/index.js"; + +/// +/** Class containing Connections operations. */ +export class ConnectionsImpl implements Connections { + private readonly client: Azuredatatransferrp; + + /** + * Initialize a new instance of the class Connections class. + * @param client Reference to the service client + */ + constructor(client: Azuredatatransferrp) { + this.client = client; + } + + /** + * Gets connections in a subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: ConnectionsListBySubscriptionOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + }, + }; + } + + private async *listBySubscriptionPagingPage( + options?: ConnectionsListBySubscriptionOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ConnectionsListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: ConnectionsListBySubscriptionOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Gets connections in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: ConnectionsListByResourceGroupOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); + }, + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: ConnectionsListByResourceGroupOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ConnectionsListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: ConnectionsListByResourceGroupOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { + yield* page; + } + } + + /** + * Lists all pending connections for a connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + connectionName: string, + options?: ConnectionsListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, connectionName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(resourceGroupName, connectionName, options, settings); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + connectionName: string, + options?: ConnectionsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ConnectionsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, connectionName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(resourceGroupName, connectionName, continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + connectionName: string, + options?: ConnectionsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceGroupName, connectionName, options)) { + yield* page; + } + } + + /** + * Lists all pending flows for a connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param options The options parameters. + */ + public listPendingFlowsList( + resourceGroupName: string, + connectionName: string, + options?: ConnectionsListPendingFlowsListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPendingFlowsListPagingAll(resourceGroupName, connectionName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPendingFlowsListPagingPage( + resourceGroupName, + connectionName, + options, + settings, + ); + }, + }; + } + + private async *listPendingFlowsListPagingPage( + resourceGroupName: string, + connectionName: string, + options?: ConnectionsListPendingFlowsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ConnectionsListPendingFlowsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listPendingFlowsList(resourceGroupName, connectionName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listPendingFlowsListNext( + resourceGroupName, + connectionName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPendingFlowsListPagingAll( + resourceGroupName: string, + connectionName: string, + options?: ConnectionsListPendingFlowsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPendingFlowsListPagingPage( + resourceGroupName, + connectionName, + options, + )) { + yield* page; + } + } + + /** + * Gets connections in a subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: ConnectionsListBySubscriptionOptionalParams, + ): Promise { + return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec); + } + + /** + * Gets connections in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: ConnectionsListByResourceGroupOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec, + ); + } + + /** + * Gets connection resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + connectionName: string, + options?: ConnectionsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectionName, options }, + getOperationSpec, + ); + } + + /** + * Creates or updates the connection resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param resource Connection body + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + connectionName: string, + resource: Connection, + options?: ConnectionsCreateOrUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectionName, resource, options }, + createOrUpdateOperationSpec, + ); + } + + /** + * Updates the connection resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param properties Connection body + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + connectionName: string, + properties: ConnectionsPatch, + options?: ConnectionsUpdateOptionalParams, + ): Promise< + SimplePollerLike, ConnectionsUpdateResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, connectionName, properties, options }, + spec: updateOperationSpec, + }); + const poller = await createHttpPoller< + ConnectionsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Updates the connection resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param properties Connection body + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + connectionName: string, + properties: ConnectionsPatch, + options?: ConnectionsUpdateOptionalParams, + ): Promise { + const poller = await this.beginUpdate(resourceGroupName, connectionName, properties, options); + return poller.pollUntilDone(); + } + + /** + * Deletes the connection resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + connectionName: string, + options?: ConnectionsDeleteOptionalParams, + ): Promise< + SimplePollerLike, ConnectionsDeleteResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, connectionName, options }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + ConnectionsDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Deletes the connection resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + connectionName: string, + options?: ConnectionsDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete(resourceGroupName, connectionName, options); + return poller.pollUntilDone(); + } + + /** + * Links the connection to its pending connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param body Connection body + * @param options The options parameters. + */ + async beginLink( + resourceGroupName: string, + connectionName: string, + body: ResourceBody, + options?: ConnectionsLinkOptionalParams, + ): Promise, ConnectionsLinkResponse>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, connectionName, body, options }, + spec: linkOperationSpec, + }); + const poller = await createHttpPoller< + ConnectionsLinkResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Links the connection to its pending connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param body Connection body + * @param options The options parameters. + */ + async beginLinkAndWait( + resourceGroupName: string, + connectionName: string, + body: ResourceBody, + options?: ConnectionsLinkOptionalParams, + ): Promise { + const poller = await this.beginLink(resourceGroupName, connectionName, body, options); + return poller.pollUntilDone(); + } + + /** + * Lists all pending connections for a connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + connectionName: string, + options?: ConnectionsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectionName, options }, + listOperationSpec, + ); + } + + /** + * Lists all pending flows for a connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param options The options parameters. + */ + private _listPendingFlowsList( + resourceGroupName: string, + connectionName: string, + options?: ConnectionsListPendingFlowsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectionName, options }, + listPendingFlowsListOperationSpec, + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: ConnectionsListBySubscriptionNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec, + ); + } + + /** + * 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?: ConnectionsListByResourceGroupNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec, + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + connectionName: string, + nextLink: string, + options?: ConnectionsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectionName, nextLink, options }, + listNextOperationSpec, + ); + } + + /** + * ListPendingFlowsListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param nextLink The nextLink from the previous successful call to the ListPendingFlowsList method. + * @param options The options parameters. + */ + private _listPendingFlowsListNext( + resourceGroupName: string, + connectionName: string, + nextLink: string, + options?: ConnectionsListPendingFlowsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectionName, nextLink, options }, + listPendingFlowsListNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.AzureDataTransfer/connections", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConnectionListResult, + }, + 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.AzureDataTransfer/connections", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConnectionListResult, + }, + 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.AzureDataTransfer/connections/{connectionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Connection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectionName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Connection, + }, + 201: { + bodyMapper: Mappers.Connection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.resource, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectionName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.Connection, + }, + 201: { + bodyMapper: Mappers.Connection, + }, + 202: { + bodyMapper: Mappers.Connection, + }, + 204: { + bodyMapper: Mappers.Connection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.properties, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectionName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.ConnectionsDeleteHeaders, + }, + 201: { + headersMapper: Mappers.ConnectionsDeleteHeaders, + }, + 202: { + headersMapper: Mappers.ConnectionsDeleteHeaders, + }, + 204: { + headersMapper: Mappers.ConnectionsDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectionName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const linkOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/link", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.Connection, + }, + 201: { + bodyMapper: Mappers.Connection, + }, + 202: { + bodyMapper: Mappers.Connection, + }, + 204: { + bodyMapper: Mappers.Connection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.body2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectionName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/listPendingConnections", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PendingConnectionListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectionName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listPendingFlowsListOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/listPendingFlows", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PendingFlowListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectionName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConnectionListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer, +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConnectionListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PendingConnectionListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectionName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listPendingFlowsListNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PendingFlowListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectionName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/src/operations/flows.ts b/sdk/azuredatatransfer/arm-azuredatatransfer/src/operations/flows.ts new file mode 100644 index 000000000000..36ca49b5e169 --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/src/operations/flows.ts @@ -0,0 +1,1735 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Flows } from "../operationsInterfaces/index.js"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Azuredatatransferrp } from "../azuredatatransferrp.js"; +import { SimplePollerLike, OperationState, createHttpPoller } from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl.js"; +import { + Flow, + FlowsListByConnectionNextOptionalParams, + FlowsListByConnectionOptionalParams, + FlowsListByConnectionResponse, + FlowsGetOptionalParams, + FlowsGetResponse, + FlowsCreateOrUpdateOptionalParams, + FlowsCreateOrUpdateResponse, + FlowsPatch, + FlowsUpdateOptionalParams, + FlowsUpdateResponse, + FlowsDeleteOptionalParams, + FlowsDeleteResponse, + FlowsDisableOptionalParams, + FlowsDisableResponse, + FlowsEnableOptionalParams, + FlowsEnableResponse, + FlowsGeneratePassphraseOptionalParams, + FlowsGeneratePassphraseResponse, + FlowsGetDestinationEndpointPortsOptionalParams, + FlowsGetDestinationEndpointPortsResponse, + FlowsGetDestinationEndpointsOptionalParams, + FlowsGetDestinationEndpointsResponse, + FlowsGetSourceAddressesOptionalParams, + FlowsGetSourceAddressesResponse, + FlowsGetStreamConnectionStringOptionalParams, + FlowsGetStreamConnectionStringResponse, + ResourceBody, + FlowsLinkOptionalParams, + FlowsLinkResponse, + SetDestinationEndpointPorts, + FlowsSetDestinationEndpointPortsOptionalParams, + FlowsSetDestinationEndpointPortsResponse, + SetDestinationEndpoints, + FlowsSetDestinationEndpointsOptionalParams, + FlowsSetDestinationEndpointsResponse, + SetStreamPassphrase, + FlowsSetPassphraseOptionalParams, + FlowsSetPassphraseResponse, + SetSourceAddresses, + FlowsSetSourceAddressesOptionalParams, + FlowsSetSourceAddressesResponse, + FlowsListByConnectionNextResponse, +} from "../models/index.js"; + +/// +/** Class containing Flows operations. */ +export class FlowsImpl implements Flows { + private readonly client: Azuredatatransferrp; + + /** + * Initialize a new instance of the class Flows class. + * @param client Reference to the service client + */ + constructor(client: Azuredatatransferrp) { + this.client = client; + } + + /** + * Gets flows in a connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param options The options parameters. + */ + public listByConnection( + resourceGroupName: string, + connectionName: string, + options?: FlowsListByConnectionOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listByConnectionPagingAll(resourceGroupName, connectionName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByConnectionPagingPage( + resourceGroupName, + connectionName, + options, + settings, + ); + }, + }; + } + + private async *listByConnectionPagingPage( + resourceGroupName: string, + connectionName: string, + options?: FlowsListByConnectionOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: FlowsListByConnectionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByConnection(resourceGroupName, connectionName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByConnectionNext( + resourceGroupName, + connectionName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByConnectionPagingAll( + resourceGroupName: string, + connectionName: string, + options?: FlowsListByConnectionOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listByConnectionPagingPage( + resourceGroupName, + connectionName, + options, + )) { + yield* page; + } + } + + /** + * Gets flows in a connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param options The options parameters. + */ + private _listByConnection( + resourceGroupName: string, + connectionName: string, + options?: FlowsListByConnectionOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectionName, options }, + listByConnectionOperationSpec, + ); + } + + /** + * Gets flow resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + connectionName: string, + flowName: string, + options?: FlowsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectionName, flowName, options }, + getOperationSpec, + ); + } + + /** + * Creates or updates the flow resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param resource Flow body + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + connectionName: string, + flowName: string, + resource: Flow, + options?: FlowsCreateOrUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectionName, flowName, resource, options }, + createOrUpdateOperationSpec, + ); + } + + /** + * Updates the flow resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param properties Flow body + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + connectionName: string, + flowName: string, + properties: FlowsPatch, + options?: FlowsUpdateOptionalParams, + ): Promise, FlowsUpdateResponse>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + connectionName, + flowName, + properties, + options, + }, + spec: updateOperationSpec, + }); + const poller = await createHttpPoller>( + lro, + { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }, + ); + await poller.poll(); + return poller; + } + + /** + * Updates the flow resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param properties Flow body + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + connectionName: string, + flowName: string, + properties: FlowsPatch, + options?: FlowsUpdateOptionalParams, + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + connectionName, + flowName, + properties, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Deletes the flow resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + connectionName: string, + flowName: string, + options?: FlowsDeleteOptionalParams, + ): Promise, FlowsDeleteResponse>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, connectionName, flowName, options }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller>( + lro, + { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }, + ); + await poller.poll(); + return poller; + } + + /** + * Deletes the flow resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + connectionName: string, + flowName: string, + options?: FlowsDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete(resourceGroupName, connectionName, flowName, options); + return poller.pollUntilDone(); + } + + /** + * Disables the specified flow + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param options The options parameters. + */ + async beginDisable( + resourceGroupName: string, + connectionName: string, + flowName: string, + options?: FlowsDisableOptionalParams, + ): Promise, FlowsDisableResponse>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, connectionName, flowName, options }, + spec: disableOperationSpec, + }); + const poller = await createHttpPoller< + FlowsDisableResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Disables the specified flow + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param options The options parameters. + */ + async beginDisableAndWait( + resourceGroupName: string, + connectionName: string, + flowName: string, + options?: FlowsDisableOptionalParams, + ): Promise { + const poller = await this.beginDisable(resourceGroupName, connectionName, flowName, options); + return poller.pollUntilDone(); + } + + /** + * Enables the specified flow. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param options The options parameters. + */ + async beginEnable( + resourceGroupName: string, + connectionName: string, + flowName: string, + options?: FlowsEnableOptionalParams, + ): Promise, FlowsEnableResponse>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, connectionName, flowName, options }, + spec: enableOperationSpec, + }); + const poller = await createHttpPoller>( + lro, + { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }, + ); + await poller.poll(); + return poller; + } + + /** + * Enables the specified flow. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param options The options parameters. + */ + async beginEnableAndWait( + resourceGroupName: string, + connectionName: string, + flowName: string, + options?: FlowsEnableOptionalParams, + ): Promise { + const poller = await this.beginEnable(resourceGroupName, connectionName, flowName, options); + return poller.pollUntilDone(); + } + + /** + * Generate a compliant passphrase for the specified flow. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param options The options parameters. + */ + async beginGeneratePassphrase( + resourceGroupName: string, + connectionName: string, + flowName: string, + options?: FlowsGeneratePassphraseOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + FlowsGeneratePassphraseResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, connectionName, flowName, options }, + spec: generatePassphraseOperationSpec, + }); + const poller = await createHttpPoller< + FlowsGeneratePassphraseResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Generate a compliant passphrase for the specified flow. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param options The options parameters. + */ + async beginGeneratePassphraseAndWait( + resourceGroupName: string, + connectionName: string, + flowName: string, + options?: FlowsGeneratePassphraseOptionalParams, + ): Promise { + const poller = await this.beginGeneratePassphrase( + resourceGroupName, + connectionName, + flowName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Get the destination endpoint ports for the specified flow and stream ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param options The options parameters. + */ + getDestinationEndpointPorts( + resourceGroupName: string, + connectionName: string, + flowName: string, + options?: FlowsGetDestinationEndpointPortsOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectionName, flowName, options }, + getDestinationEndpointPortsOperationSpec, + ); + } + + /** + * Get the destination endpoints for the specified flow and stream ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param options The options parameters. + */ + getDestinationEndpoints( + resourceGroupName: string, + connectionName: string, + flowName: string, + options?: FlowsGetDestinationEndpointsOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectionName, flowName, options }, + getDestinationEndpointsOperationSpec, + ); + } + + /** + * Get the source addresses for the specified flow. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param options The options parameters. + */ + getSourceAddresses( + resourceGroupName: string, + connectionName: string, + flowName: string, + options?: FlowsGetSourceAddressesOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectionName, flowName, options }, + getSourceAddressesOperationSpec, + ); + } + + /** + * Get the connection string for the specified flow. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param options The options parameters. + */ + getStreamConnectionString( + resourceGroupName: string, + connectionName: string, + flowName: string, + options?: FlowsGetStreamConnectionStringOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectionName, flowName, options }, + getStreamConnectionStringOperationSpec, + ); + } + + /** + * Links the specified flow. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param body Flow body + * @param options The options parameters. + */ + async beginLink( + resourceGroupName: string, + connectionName: string, + flowName: string, + body: ResourceBody, + options?: FlowsLinkOptionalParams, + ): Promise, FlowsLinkResponse>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, connectionName, flowName, body, options }, + spec: linkOperationSpec, + }); + const poller = await createHttpPoller>( + lro, + { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }, + ); + await poller.poll(); + return poller; + } + + /** + * Links the specified flow. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param body Flow body + * @param options The options parameters. + */ + async beginLinkAndWait( + resourceGroupName: string, + connectionName: string, + flowName: string, + body: ResourceBody, + options?: FlowsLinkOptionalParams, + ): Promise { + const poller = await this.beginLink(resourceGroupName, connectionName, flowName, body, options); + return poller.pollUntilDone(); + } + + /** + * Set the destination endpoint ports for the specified flow and stream ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param body Stream ID destination endpoint ports wanted + * @param options The options parameters. + */ + async beginSetDestinationEndpointPorts( + resourceGroupName: string, + connectionName: string, + flowName: string, + body: SetDestinationEndpointPorts, + options?: FlowsSetDestinationEndpointPortsOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + FlowsSetDestinationEndpointPortsResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, connectionName, flowName, body, options }, + spec: setDestinationEndpointPortsOperationSpec, + }); + const poller = await createHttpPoller< + FlowsSetDestinationEndpointPortsResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Set the destination endpoint ports for the specified flow and stream ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param body Stream ID destination endpoint ports wanted + * @param options The options parameters. + */ + async beginSetDestinationEndpointPortsAndWait( + resourceGroupName: string, + connectionName: string, + flowName: string, + body: SetDestinationEndpointPorts, + options?: FlowsSetDestinationEndpointPortsOptionalParams, + ): Promise { + const poller = await this.beginSetDestinationEndpointPorts( + resourceGroupName, + connectionName, + flowName, + body, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Set the destination endpoints for the specified flow and stream ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param body Stream ID destination endpoints wanted + * @param options The options parameters. + */ + async beginSetDestinationEndpoints( + resourceGroupName: string, + connectionName: string, + flowName: string, + body: SetDestinationEndpoints, + options?: FlowsSetDestinationEndpointsOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + FlowsSetDestinationEndpointsResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, connectionName, flowName, body, options }, + spec: setDestinationEndpointsOperationSpec, + }); + const poller = await createHttpPoller< + FlowsSetDestinationEndpointsResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Set the destination endpoints for the specified flow and stream ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param body Stream ID destination endpoints wanted + * @param options The options parameters. + */ + async beginSetDestinationEndpointsAndWait( + resourceGroupName: string, + connectionName: string, + flowName: string, + body: SetDestinationEndpoints, + options?: FlowsSetDestinationEndpointsOptionalParams, + ): Promise { + const poller = await this.beginSetDestinationEndpoints( + resourceGroupName, + connectionName, + flowName, + body, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Sets the passphrase of the specified flow. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param body Passphrase to set + * @param options The options parameters. + */ + async beginSetPassphrase( + resourceGroupName: string, + connectionName: string, + flowName: string, + body: SetStreamPassphrase, + options?: FlowsSetPassphraseOptionalParams, + ): Promise< + SimplePollerLike, FlowsSetPassphraseResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, connectionName, flowName, body, options }, + spec: setPassphraseOperationSpec, + }); + const poller = await createHttpPoller< + FlowsSetPassphraseResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Sets the passphrase of the specified flow. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param body Passphrase to set + * @param options The options parameters. + */ + async beginSetPassphraseAndWait( + resourceGroupName: string, + connectionName: string, + flowName: string, + body: SetStreamPassphrase, + options?: FlowsSetPassphraseOptionalParams, + ): Promise { + const poller = await this.beginSetPassphrase( + resourceGroupName, + connectionName, + flowName, + body, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Set the source addresses for the specified flow. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param body Source addresses wanted + * @param options The options parameters. + */ + async beginSetSourceAddresses( + resourceGroupName: string, + connectionName: string, + flowName: string, + body: SetSourceAddresses, + options?: FlowsSetSourceAddressesOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + FlowsSetSourceAddressesResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, connectionName, flowName, body, options }, + spec: setSourceAddressesOperationSpec, + }); + const poller = await createHttpPoller< + FlowsSetSourceAddressesResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Set the source addresses for the specified flow. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param body Source addresses wanted + * @param options The options parameters. + */ + async beginSetSourceAddressesAndWait( + resourceGroupName: string, + connectionName: string, + flowName: string, + body: SetSourceAddresses, + options?: FlowsSetSourceAddressesOptionalParams, + ): Promise { + const poller = await this.beginSetSourceAddresses( + resourceGroupName, + connectionName, + flowName, + body, + options, + ); + return poller.pollUntilDone(); + } + + /** + * ListByConnectionNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param nextLink The nextLink from the previous successful call to the ListByConnection method. + * @param options The options parameters. + */ + private _listByConnectionNext( + resourceGroupName: string, + connectionName: string, + nextLink: string, + options?: FlowsListByConnectionNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectionName, nextLink, options }, + listByConnectionNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByConnectionOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FlowListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectionName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Flow, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectionName, + Parameters.flowName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Flow, + }, + 201: { + bodyMapper: Mappers.Flow, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.resource2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectionName, + Parameters.flowName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.Flow, + }, + 201: { + bodyMapper: Mappers.Flow, + }, + 202: { + bodyMapper: Mappers.Flow, + }, + 204: { + bodyMapper: Mappers.Flow, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.properties2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectionName, + Parameters.flowName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.FlowsDeleteHeaders, + }, + 201: { + headersMapper: Mappers.FlowsDeleteHeaders, + }, + 202: { + headersMapper: Mappers.FlowsDeleteHeaders, + }, + 204: { + headersMapper: Mappers.FlowsDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectionName, + Parameters.flowName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const disableOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/disable", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.Flow, + }, + 201: { + bodyMapper: Mappers.Flow, + }, + 202: { + bodyMapper: Mappers.Flow, + }, + 204: { + bodyMapper: Mappers.Flow, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectionName, + Parameters.flowName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const enableOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/enable", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.Flow, + }, + 201: { + bodyMapper: Mappers.Flow, + }, + 202: { + bodyMapper: Mappers.Flow, + }, + 204: { + bodyMapper: Mappers.Flow, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectionName, + Parameters.flowName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const generatePassphraseOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/generatePassphrase", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.Flow, + }, + 201: { + bodyMapper: Mappers.Flow, + }, + 202: { + bodyMapper: Mappers.Flow, + }, + 204: { + bodyMapper: Mappers.Flow, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectionName, + Parameters.flowName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getDestinationEndpointPortsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/getDestinationEndpointPorts", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.GetDestinationEndpointPortsResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectionName, + Parameters.flowName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getDestinationEndpointsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/getDestinationEndpoints", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.GetDestinationEndpointsResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectionName, + Parameters.flowName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getSourceAddressesOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/getSourceAddresses", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.StreamSourceAddresses, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectionName, + Parameters.flowName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getStreamConnectionStringOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/getStreamConnectionString", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.GetStreamConnectionStringResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectionName, + Parameters.flowName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const linkOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/link", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.Flow, + }, + 201: { + bodyMapper: Mappers.Flow, + }, + 202: { + bodyMapper: Mappers.Flow, + }, + 204: { + bodyMapper: Mappers.Flow, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.body2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectionName, + Parameters.flowName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const setDestinationEndpointPortsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/setDestinationEndpointPorts", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.Flow, + }, + 201: { + bodyMapper: Mappers.Flow, + }, + 202: { + bodyMapper: Mappers.Flow, + }, + 204: { + bodyMapper: Mappers.Flow, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.body4, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectionName, + Parameters.flowName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const setDestinationEndpointsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/setDestinationEndpoints", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.Flow, + }, + 201: { + bodyMapper: Mappers.Flow, + }, + 202: { + bodyMapper: Mappers.Flow, + }, + 204: { + bodyMapper: Mappers.Flow, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.body5, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectionName, + Parameters.flowName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const setPassphraseOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/setPassphrase", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.Flow, + }, + 201: { + bodyMapper: Mappers.Flow, + }, + 202: { + bodyMapper: Mappers.Flow, + }, + 204: { + bodyMapper: Mappers.Flow, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.body6, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectionName, + Parameters.flowName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const setSourceAddressesOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/setSourceAddresses", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.Flow, + }, + 201: { + bodyMapper: Mappers.Flow, + }, + 202: { + bodyMapper: Mappers.Flow, + }, + 204: { + bodyMapper: Mappers.Flow, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.body7, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectionName, + Parameters.flowName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const listByConnectionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FlowListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectionName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/src/operations/index.ts b/sdk/azuredatatransfer/arm-azuredatatransfer/src/operations/index.ts new file mode 100644 index 000000000000..fd12fe9469f7 --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/src/operations/index.ts @@ -0,0 +1,13 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export * from "./azureDataTransfer.js"; +export * from "./operations.js"; +export * from "./connections.js"; +export * from "./pipelines.js"; +export * from "./flows.js"; diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/src/operations/operations.ts b/sdk/azuredatatransfer/arm-azuredatatransfer/src/operations/operations.ts new file mode 100644 index 000000000000..856db9b69203 --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/src/operations/operations.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, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Operations } from "../operationsInterfaces/index.js"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Azuredatatransferrp } from "../azuredatatransferrp.js"; +import { + Operation, + OperationsListNextOptionalParams, + OperationsListOptionalParams, + OperationsListResponse, + OperationsListNextResponse, +} from "../models/index.js"; + +/// +/** Class containing Operations operations. */ +export class OperationsImpl implements Operations { + private readonly client: Azuredatatransferrp; + + /** + * Initialize a new instance of the class Operations class. + * @param client Reference to the service client + */ + constructor(client: Azuredatatransferrp) { + this.client = client; + } + + /** + * List the operations for the provider + * @param options The options parameters. + */ + public list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(options, settings); + }, + }; + } + + private async *listPagingPage( + options?: OperationsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: OperationsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + options?: OperationsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * List the operations for the provider + * @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.AzureDataTransfer/operations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [Parameters.$host, Parameters.nextLink], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/src/operations/pipelines.ts b/sdk/azuredatatransfer/arm-azuredatatransfer/src/operations/pipelines.ts new file mode 100644 index 000000000000..02911dc65439 --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/src/operations/pipelines.ts @@ -0,0 +1,1140 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Pipelines } from "../operationsInterfaces/index.js"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Azuredatatransferrp } from "../azuredatatransferrp.js"; +import { SimplePollerLike, OperationState, createHttpPoller } from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl.js"; +import { + Pipeline, + PipelinesListBySubscriptionNextOptionalParams, + PipelinesListBySubscriptionOptionalParams, + PipelinesListBySubscriptionResponse, + PipelinesListByResourceGroupNextOptionalParams, + PipelinesListByResourceGroupOptionalParams, + PipelinesListByResourceGroupResponse, + PipelinesGetOptionalParams, + PipelinesGetResponse, + PipelinesCreateOrUpdateOptionalParams, + PipelinesCreateOrUpdateResponse, + PipelinesPatch, + PipelinesUpdateOptionalParams, + PipelinesUpdateResponse, + PipelinesDeleteOptionalParams, + PipelinesDeleteResponse, + ResourceBody, + PipelinesApproveConnectionOptionalParams, + PipelinesApproveConnectionResponse, + Action, + PipelinesExecuteActionOptionalParams, + PipelinesExecuteActionResponse, + PipelinesListOptionalParams, + PipelinesListResponse, + Schema, + PipelinesListSchemasListOptionalParams, + PipelinesListSchemasListResponse, + PipelinesRejectConnectionOptionalParams, + PipelinesRejectConnectionResponse, + PipelinesListBySubscriptionNextResponse, + PipelinesListByResourceGroupNextResponse, +} from "../models/index.js"; + +/// +/** Class containing Pipelines operations. */ +export class PipelinesImpl implements Pipelines { + private readonly client: Azuredatatransferrp; + + /** + * Initialize a new instance of the class Pipelines class. + * @param client Reference to the service client + */ + constructor(client: Azuredatatransferrp) { + this.client = client; + } + + /** + * Gets pipelines in a subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: PipelinesListBySubscriptionOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + }, + }; + } + + private async *listBySubscriptionPagingPage( + options?: PipelinesListBySubscriptionOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: PipelinesListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: PipelinesListBySubscriptionOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Gets pipelines in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: PipelinesListByResourceGroupOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); + }, + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: PipelinesListByResourceGroupOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: PipelinesListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: PipelinesListByResourceGroupOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { + yield* page; + } + } + + /** + * Gets pipelines in a subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: PipelinesListBySubscriptionOptionalParams, + ): Promise { + return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec); + } + + /** + * Gets pipelines in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: PipelinesListByResourceGroupOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec, + ); + } + + /** + * Gets pipeline resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + pipelineName: string, + options?: PipelinesGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, pipelineName, options }, + getOperationSpec, + ); + } + + /** + * Creates or updates the pipeline resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param resource Pipeline body + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + pipelineName: string, + resource: Pipeline, + options?: PipelinesCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + PipelinesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, pipelineName, resource, options }, + spec: createOrUpdateOperationSpec, + }); + const poller = await createHttpPoller< + PipelinesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * Creates or updates the pipeline resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param resource Pipeline body + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + pipelineName: string, + resource: Pipeline, + options?: PipelinesCreateOrUpdateOptionalParams, + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + pipelineName, + resource, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Updates the pipeline resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param properties Pipeline body + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + pipelineName: string, + properties: PipelinesPatch, + options?: PipelinesUpdateOptionalParams, + ): Promise, PipelinesUpdateResponse>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, pipelineName, properties, options }, + spec: updateOperationSpec, + }); + const poller = await createHttpPoller< + PipelinesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Updates the pipeline resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param properties Pipeline body + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + pipelineName: string, + properties: PipelinesPatch, + options?: PipelinesUpdateOptionalParams, + ): Promise { + const poller = await this.beginUpdate(resourceGroupName, pipelineName, properties, options); + return poller.pollUntilDone(); + } + + /** + * Deletes the pipeline resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + pipelineName: string, + options?: PipelinesDeleteOptionalParams, + ): Promise, PipelinesDeleteResponse>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, pipelineName, options }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + PipelinesDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Deletes the pipeline resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + pipelineName: string, + options?: PipelinesDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete(resourceGroupName, pipelineName, options); + return poller.pollUntilDone(); + } + + /** + * Approves the specified connection in a pipeline. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param body Connection body + * @param options The options parameters. + */ + async beginApproveConnection( + resourceGroupName: string, + pipelineName: string, + body: ResourceBody, + options?: PipelinesApproveConnectionOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + PipelinesApproveConnectionResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, pipelineName, body, options }, + spec: approveConnectionOperationSpec, + }); + const poller = await createHttpPoller< + PipelinesApproveConnectionResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Approves the specified connection in a pipeline. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param body Connection body + * @param options The options parameters. + */ + async beginApproveConnectionAndWait( + resourceGroupName: string, + pipelineName: string, + body: ResourceBody, + options?: PipelinesApproveConnectionOptionalParams, + ): Promise { + const poller = await this.beginApproveConnection( + resourceGroupName, + pipelineName, + body, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Executes a privileged action for a pipeline. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param body Action to execute + * @param options The options parameters. + */ + async beginExecuteAction( + resourceGroupName: string, + pipelineName: string, + body: Action, + options?: PipelinesExecuteActionOptionalParams, + ): Promise< + SimplePollerLike, PipelinesExecuteActionResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, pipelineName, body, options }, + spec: executeActionOperationSpec, + }); + const poller = await createHttpPoller< + PipelinesExecuteActionResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Executes a privileged action for a pipeline. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param body Action to execute + * @param options The options parameters. + */ + async beginExecuteActionAndWait( + resourceGroupName: string, + pipelineName: string, + body: Action, + options?: PipelinesExecuteActionOptionalParams, + ): Promise { + const poller = await this.beginExecuteAction(resourceGroupName, pipelineName, body, options); + return poller.pollUntilDone(); + } + + /** + * Lists the flows in a pipeline. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + pipelineName: string, + options?: PipelinesListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, pipelineName, options }, + listOperationSpec, + ); + } + + /** + * Lists the schemas for the specified connection in a pipeline. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param body Schema(s) to retrieve + * @param options The options parameters. + */ + listSchemasList( + resourceGroupName: string, + pipelineName: string, + body: Schema, + options?: PipelinesListSchemasListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, pipelineName, body, options }, + listSchemasListOperationSpec, + ); + } + + /** + * Rejects the specified connection in a pipeline. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param body Connection body + * @param options The options parameters. + */ + async beginRejectConnection( + resourceGroupName: string, + pipelineName: string, + body: ResourceBody, + options?: PipelinesRejectConnectionOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + PipelinesRejectConnectionResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, pipelineName, body, options }, + spec: rejectConnectionOperationSpec, + }); + const poller = await createHttpPoller< + PipelinesRejectConnectionResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Rejects the specified connection in a pipeline. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param body Connection body + * @param options The options parameters. + */ + async beginRejectConnectionAndWait( + resourceGroupName: string, + pipelineName: string, + body: ResourceBody, + options?: PipelinesRejectConnectionOptionalParams, + ): Promise { + const poller = await this.beginRejectConnection(resourceGroupName, pipelineName, body, options); + return poller.pollUntilDone(); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: PipelinesListBySubscriptionNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec, + ); + } + + /** + * 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?: PipelinesListByResourceGroupNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.AzureDataTransfer/pipelines", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PipelineListResult, + }, + 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.AzureDataTransfer/pipelines", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PipelineListResult, + }, + 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.AzureDataTransfer/pipelines/{pipelineName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Pipeline, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.pipelineName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Pipeline, + }, + 201: { + bodyMapper: Mappers.Pipeline, + }, + 202: { + bodyMapper: Mappers.Pipeline, + }, + 204: { + bodyMapper: Mappers.Pipeline, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.resource1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.pipelineName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.Pipeline, + }, + 201: { + bodyMapper: Mappers.Pipeline, + }, + 202: { + bodyMapper: Mappers.Pipeline, + }, + 204: { + bodyMapper: Mappers.Pipeline, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.properties1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.pipelineName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.PipelinesDeleteHeaders, + }, + 201: { + headersMapper: Mappers.PipelinesDeleteHeaders, + }, + 202: { + headersMapper: Mappers.PipelinesDeleteHeaders, + }, + 204: { + headersMapper: Mappers.PipelinesDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.pipelineName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const approveConnectionOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/approveConnection", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.Connection, + }, + 201: { + bodyMapper: Mappers.Connection, + }, + 202: { + bodyMapper: Mappers.Connection, + }, + 204: { + bodyMapper: Mappers.Connection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.body2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.pipelineName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const executeActionOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/executeAction", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.Pipeline, + }, + 201: { + bodyMapper: Mappers.Pipeline, + }, + 202: { + bodyMapper: Mappers.Pipeline, + }, + 204: { + bodyMapper: Mappers.Pipeline, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.body3, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.pipelineName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/listFlows", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ListFlowsByPipelineResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.connections, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.pipelineName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const listSchemasListOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/listSchemas", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.SchemasListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.body1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.pipelineName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const rejectConnectionOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/rejectConnection", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.Connection, + }, + 201: { + bodyMapper: Mappers.Connection, + }, + 202: { + bodyMapper: Mappers.Connection, + }, + 204: { + bodyMapper: Mappers.Connection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.body2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.pipelineName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PipelineListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer, +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PipelineListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/src/operationsInterfaces/azureDataTransfer.ts b/sdk/azuredatatransfer/arm-azuredatatransfer/src/operationsInterfaces/azureDataTransfer.ts new file mode 100644 index 000000000000..be4d3b89e026 --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/src/operationsInterfaces/azureDataTransfer.ts @@ -0,0 +1,38 @@ +/* + * 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 { + ListApprovedSchemasRequest, + AzureDataTransferListApprovedSchemasOptionalParams, + AzureDataTransferListApprovedSchemasResponse, + Schema, + AzureDataTransferValidateSchemaOptionalParams, + AzureDataTransferValidateSchemaResponse, +} from "../models/index.js"; + +/** Interface representing a AzureDataTransfer. */ +export interface AzureDataTransfer { + /** + * Lists approved schemas for Azure Data Transfer. + * @param body The request body + * @param options The options parameters. + */ + listApprovedSchemas( + body: ListApprovedSchemasRequest, + options?: AzureDataTransferListApprovedSchemasOptionalParams, + ): Promise; + /** + * Validates a schema for Azure Data Transfer. + * @param body The request body + * @param options The options parameters. + */ + validateSchema( + body: Schema, + options?: AzureDataTransferValidateSchemaOptionalParams, + ): Promise; +} diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/src/operationsInterfaces/connections.ts b/sdk/azuredatatransfer/arm-azuredatatransfer/src/operationsInterfaces/connections.ts new file mode 100644 index 000000000000..04cac45b4461 --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/src/operationsInterfaces/connections.ts @@ -0,0 +1,176 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + Connection, + ConnectionsListBySubscriptionOptionalParams, + ConnectionsListByResourceGroupOptionalParams, + PendingConnection, + ConnectionsListOptionalParams, + PendingFlow, + ConnectionsListPendingFlowsListOptionalParams, + ConnectionsGetOptionalParams, + ConnectionsGetResponse, + ConnectionsCreateOrUpdateOptionalParams, + ConnectionsCreateOrUpdateResponse, + ConnectionsPatch, + ConnectionsUpdateOptionalParams, + ConnectionsUpdateResponse, + ConnectionsDeleteOptionalParams, + ConnectionsDeleteResponse, + ResourceBody, + ConnectionsLinkOptionalParams, + ConnectionsLinkResponse, +} from "../models/index.js"; + +/// +/** Interface representing a Connections. */ +export interface Connections { + /** + * Gets connections in a subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: ConnectionsListBySubscriptionOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Gets connections in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: ConnectionsListByResourceGroupOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Lists all pending connections for a connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + connectionName: string, + options?: ConnectionsListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Lists all pending flows for a connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param options The options parameters. + */ + listPendingFlowsList( + resourceGroupName: string, + connectionName: string, + options?: ConnectionsListPendingFlowsListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Gets connection resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + connectionName: string, + options?: ConnectionsGetOptionalParams, + ): Promise; + /** + * Creates or updates the connection resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param resource Connection body + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + connectionName: string, + resource: Connection, + options?: ConnectionsCreateOrUpdateOptionalParams, + ): Promise; + /** + * Updates the connection resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param properties Connection body + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + connectionName: string, + properties: ConnectionsPatch, + options?: ConnectionsUpdateOptionalParams, + ): Promise< + SimplePollerLike, ConnectionsUpdateResponse> + >; + /** + * Updates the connection resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param properties Connection body + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + connectionName: string, + properties: ConnectionsPatch, + options?: ConnectionsUpdateOptionalParams, + ): Promise; + /** + * Deletes the connection resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + connectionName: string, + options?: ConnectionsDeleteOptionalParams, + ): Promise< + SimplePollerLike, ConnectionsDeleteResponse> + >; + /** + * Deletes the connection resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + connectionName: string, + options?: ConnectionsDeleteOptionalParams, + ): Promise; + /** + * Links the connection to its pending connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param body Connection body + * @param options The options parameters. + */ + beginLink( + resourceGroupName: string, + connectionName: string, + body: ResourceBody, + options?: ConnectionsLinkOptionalParams, + ): Promise, ConnectionsLinkResponse>>; + /** + * Links the connection to its pending connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param body Connection body + * @param options The options parameters. + */ + beginLinkAndWait( + resourceGroupName: string, + connectionName: string, + body: ResourceBody, + options?: ConnectionsLinkOptionalParams, + ): Promise; +} diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/src/operationsInterfaces/flows.ts b/sdk/azuredatatransfer/arm-azuredatatransfer/src/operationsInterfaces/flows.ts new file mode 100644 index 000000000000..3f8e508bb0fc --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/src/operationsInterfaces/flows.ts @@ -0,0 +1,454 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + Flow, + FlowsListByConnectionOptionalParams, + FlowsGetOptionalParams, + FlowsGetResponse, + FlowsCreateOrUpdateOptionalParams, + FlowsCreateOrUpdateResponse, + FlowsPatch, + FlowsUpdateOptionalParams, + FlowsUpdateResponse, + FlowsDeleteOptionalParams, + FlowsDeleteResponse, + FlowsDisableOptionalParams, + FlowsDisableResponse, + FlowsEnableOptionalParams, + FlowsEnableResponse, + FlowsGeneratePassphraseOptionalParams, + FlowsGeneratePassphraseResponse, + FlowsGetDestinationEndpointPortsOptionalParams, + FlowsGetDestinationEndpointPortsResponse, + FlowsGetDestinationEndpointsOptionalParams, + FlowsGetDestinationEndpointsResponse, + FlowsGetSourceAddressesOptionalParams, + FlowsGetSourceAddressesResponse, + FlowsGetStreamConnectionStringOptionalParams, + FlowsGetStreamConnectionStringResponse, + ResourceBody, + FlowsLinkOptionalParams, + FlowsLinkResponse, + SetDestinationEndpointPorts, + FlowsSetDestinationEndpointPortsOptionalParams, + FlowsSetDestinationEndpointPortsResponse, + SetDestinationEndpoints, + FlowsSetDestinationEndpointsOptionalParams, + FlowsSetDestinationEndpointsResponse, + SetStreamPassphrase, + FlowsSetPassphraseOptionalParams, + FlowsSetPassphraseResponse, + SetSourceAddresses, + FlowsSetSourceAddressesOptionalParams, + FlowsSetSourceAddressesResponse, +} from "../models/index.js"; + +/// +/** Interface representing a Flows. */ +export interface Flows { + /** + * Gets flows in a connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param options The options parameters. + */ + listByConnection( + resourceGroupName: string, + connectionName: string, + options?: FlowsListByConnectionOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Gets flow resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + connectionName: string, + flowName: string, + options?: FlowsGetOptionalParams, + ): Promise; + /** + * Creates or updates the flow resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param resource Flow body + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + connectionName: string, + flowName: string, + resource: Flow, + options?: FlowsCreateOrUpdateOptionalParams, + ): Promise; + /** + * Updates the flow resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param properties Flow body + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + connectionName: string, + flowName: string, + properties: FlowsPatch, + options?: FlowsUpdateOptionalParams, + ): Promise, FlowsUpdateResponse>>; + /** + * Updates the flow resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param properties Flow body + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + connectionName: string, + flowName: string, + properties: FlowsPatch, + options?: FlowsUpdateOptionalParams, + ): Promise; + /** + * Deletes the flow resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + connectionName: string, + flowName: string, + options?: FlowsDeleteOptionalParams, + ): Promise, FlowsDeleteResponse>>; + /** + * Deletes the flow resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + connectionName: string, + flowName: string, + options?: FlowsDeleteOptionalParams, + ): Promise; + /** + * Disables the specified flow + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param options The options parameters. + */ + beginDisable( + resourceGroupName: string, + connectionName: string, + flowName: string, + options?: FlowsDisableOptionalParams, + ): Promise, FlowsDisableResponse>>; + /** + * Disables the specified flow + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param options The options parameters. + */ + beginDisableAndWait( + resourceGroupName: string, + connectionName: string, + flowName: string, + options?: FlowsDisableOptionalParams, + ): Promise; + /** + * Enables the specified flow. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param options The options parameters. + */ + beginEnable( + resourceGroupName: string, + connectionName: string, + flowName: string, + options?: FlowsEnableOptionalParams, + ): Promise, FlowsEnableResponse>>; + /** + * Enables the specified flow. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param options The options parameters. + */ + beginEnableAndWait( + resourceGroupName: string, + connectionName: string, + flowName: string, + options?: FlowsEnableOptionalParams, + ): Promise; + /** + * Generate a compliant passphrase for the specified flow. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param options The options parameters. + */ + beginGeneratePassphrase( + resourceGroupName: string, + connectionName: string, + flowName: string, + options?: FlowsGeneratePassphraseOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + FlowsGeneratePassphraseResponse + > + >; + /** + * Generate a compliant passphrase for the specified flow. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param options The options parameters. + */ + beginGeneratePassphraseAndWait( + resourceGroupName: string, + connectionName: string, + flowName: string, + options?: FlowsGeneratePassphraseOptionalParams, + ): Promise; + /** + * Get the destination endpoint ports for the specified flow and stream ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param options The options parameters. + */ + getDestinationEndpointPorts( + resourceGroupName: string, + connectionName: string, + flowName: string, + options?: FlowsGetDestinationEndpointPortsOptionalParams, + ): Promise; + /** + * Get the destination endpoints for the specified flow and stream ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param options The options parameters. + */ + getDestinationEndpoints( + resourceGroupName: string, + connectionName: string, + flowName: string, + options?: FlowsGetDestinationEndpointsOptionalParams, + ): Promise; + /** + * Get the source addresses for the specified flow. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param options The options parameters. + */ + getSourceAddresses( + resourceGroupName: string, + connectionName: string, + flowName: string, + options?: FlowsGetSourceAddressesOptionalParams, + ): Promise; + /** + * Get the connection string for the specified flow. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param options The options parameters. + */ + getStreamConnectionString( + resourceGroupName: string, + connectionName: string, + flowName: string, + options?: FlowsGetStreamConnectionStringOptionalParams, + ): Promise; + /** + * Links the specified flow. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param body Flow body + * @param options The options parameters. + */ + beginLink( + resourceGroupName: string, + connectionName: string, + flowName: string, + body: ResourceBody, + options?: FlowsLinkOptionalParams, + ): Promise, FlowsLinkResponse>>; + /** + * Links the specified flow. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param body Flow body + * @param options The options parameters. + */ + beginLinkAndWait( + resourceGroupName: string, + connectionName: string, + flowName: string, + body: ResourceBody, + options?: FlowsLinkOptionalParams, + ): Promise; + /** + * Set the destination endpoint ports for the specified flow and stream ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param body Stream ID destination endpoint ports wanted + * @param options The options parameters. + */ + beginSetDestinationEndpointPorts( + resourceGroupName: string, + connectionName: string, + flowName: string, + body: SetDestinationEndpointPorts, + options?: FlowsSetDestinationEndpointPortsOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + FlowsSetDestinationEndpointPortsResponse + > + >; + /** + * Set the destination endpoint ports for the specified flow and stream ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param body Stream ID destination endpoint ports wanted + * @param options The options parameters. + */ + beginSetDestinationEndpointPortsAndWait( + resourceGroupName: string, + connectionName: string, + flowName: string, + body: SetDestinationEndpointPorts, + options?: FlowsSetDestinationEndpointPortsOptionalParams, + ): Promise; + /** + * Set the destination endpoints for the specified flow and stream ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param body Stream ID destination endpoints wanted + * @param options The options parameters. + */ + beginSetDestinationEndpoints( + resourceGroupName: string, + connectionName: string, + flowName: string, + body: SetDestinationEndpoints, + options?: FlowsSetDestinationEndpointsOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + FlowsSetDestinationEndpointsResponse + > + >; + /** + * Set the destination endpoints for the specified flow and stream ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param body Stream ID destination endpoints wanted + * @param options The options parameters. + */ + beginSetDestinationEndpointsAndWait( + resourceGroupName: string, + connectionName: string, + flowName: string, + body: SetDestinationEndpoints, + options?: FlowsSetDestinationEndpointsOptionalParams, + ): Promise; + /** + * Sets the passphrase of the specified flow. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param body Passphrase to set + * @param options The options parameters. + */ + beginSetPassphrase( + resourceGroupName: string, + connectionName: string, + flowName: string, + body: SetStreamPassphrase, + options?: FlowsSetPassphraseOptionalParams, + ): Promise< + SimplePollerLike, FlowsSetPassphraseResponse> + >; + /** + * Sets the passphrase of the specified flow. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param body Passphrase to set + * @param options The options parameters. + */ + beginSetPassphraseAndWait( + resourceGroupName: string, + connectionName: string, + flowName: string, + body: SetStreamPassphrase, + options?: FlowsSetPassphraseOptionalParams, + ): Promise; + /** + * Set the source addresses for the specified flow. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param body Source addresses wanted + * @param options The options parameters. + */ + beginSetSourceAddresses( + resourceGroupName: string, + connectionName: string, + flowName: string, + body: SetSourceAddresses, + options?: FlowsSetSourceAddressesOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + FlowsSetSourceAddressesResponse + > + >; + /** + * Set the source addresses for the specified flow. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectionName The name for the connection that is to be requested. + * @param flowName The name for the flow that is to be onboarded. + * @param body Source addresses wanted + * @param options The options parameters. + */ + beginSetSourceAddressesAndWait( + resourceGroupName: string, + connectionName: string, + flowName: string, + body: SetSourceAddresses, + options?: FlowsSetSourceAddressesOptionalParams, + ): Promise; +} diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/src/operationsInterfaces/index.ts b/sdk/azuredatatransfer/arm-azuredatatransfer/src/operationsInterfaces/index.ts new file mode 100644 index 000000000000..fd12fe9469f7 --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/src/operationsInterfaces/index.ts @@ -0,0 +1,13 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export * from "./azureDataTransfer.js"; +export * from "./operations.js"; +export * from "./connections.js"; +export * from "./pipelines.js"; +export * from "./flows.js"; diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/src/operationsInterfaces/operations.ts b/sdk/azuredatatransfer/arm-azuredatatransfer/src/operationsInterfaces/operations.ts new file mode 100644 index 000000000000..a3957b6a87d0 --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/src/operationsInterfaces/operations.ts @@ -0,0 +1,20 @@ +/* + * 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/index.js"; + +/// +/** Interface representing a Operations. */ +export interface Operations { + /** + * List the operations for the provider + * @param options The options parameters. + */ + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +} diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/src/operationsInterfaces/pipelines.ts b/sdk/azuredatatransfer/arm-azuredatatransfer/src/operationsInterfaces/pipelines.ts new file mode 100644 index 000000000000..7bf87dfc37f6 --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/src/operationsInterfaces/pipelines.ts @@ -0,0 +1,262 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + Pipeline, + PipelinesListBySubscriptionOptionalParams, + PipelinesListByResourceGroupOptionalParams, + PipelinesGetOptionalParams, + PipelinesGetResponse, + PipelinesCreateOrUpdateOptionalParams, + PipelinesCreateOrUpdateResponse, + PipelinesPatch, + PipelinesUpdateOptionalParams, + PipelinesUpdateResponse, + PipelinesDeleteOptionalParams, + PipelinesDeleteResponse, + ResourceBody, + PipelinesApproveConnectionOptionalParams, + PipelinesApproveConnectionResponse, + Action, + PipelinesExecuteActionOptionalParams, + PipelinesExecuteActionResponse, + PipelinesListOptionalParams, + PipelinesListResponse, + Schema, + PipelinesListSchemasListOptionalParams, + PipelinesListSchemasListResponse, + PipelinesRejectConnectionOptionalParams, + PipelinesRejectConnectionResponse, +} from "../models/index.js"; + +/// +/** Interface representing a Pipelines. */ +export interface Pipelines { + /** + * Gets pipelines in a subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: PipelinesListBySubscriptionOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Gets pipelines in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: PipelinesListByResourceGroupOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Gets pipeline resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + pipelineName: string, + options?: PipelinesGetOptionalParams, + ): Promise; + /** + * Creates or updates the pipeline resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param resource Pipeline body + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + pipelineName: string, + resource: Pipeline, + options?: PipelinesCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + PipelinesCreateOrUpdateResponse + > + >; + /** + * Creates or updates the pipeline resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param resource Pipeline body + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + pipelineName: string, + resource: Pipeline, + options?: PipelinesCreateOrUpdateOptionalParams, + ): Promise; + /** + * Updates the pipeline resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param properties Pipeline body + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + pipelineName: string, + properties: PipelinesPatch, + options?: PipelinesUpdateOptionalParams, + ): Promise, PipelinesUpdateResponse>>; + /** + * Updates the pipeline resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param properties Pipeline body + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + pipelineName: string, + properties: PipelinesPatch, + options?: PipelinesUpdateOptionalParams, + ): Promise; + /** + * Deletes the pipeline resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + pipelineName: string, + options?: PipelinesDeleteOptionalParams, + ): Promise, PipelinesDeleteResponse>>; + /** + * Deletes the pipeline resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + pipelineName: string, + options?: PipelinesDeleteOptionalParams, + ): Promise; + /** + * Approves the specified connection in a pipeline. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param body Connection body + * @param options The options parameters. + */ + beginApproveConnection( + resourceGroupName: string, + pipelineName: string, + body: ResourceBody, + options?: PipelinesApproveConnectionOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + PipelinesApproveConnectionResponse + > + >; + /** + * Approves the specified connection in a pipeline. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param body Connection body + * @param options The options parameters. + */ + beginApproveConnectionAndWait( + resourceGroupName: string, + pipelineName: string, + body: ResourceBody, + options?: PipelinesApproveConnectionOptionalParams, + ): Promise; + /** + * Executes a privileged action for a pipeline. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param body Action to execute + * @param options The options parameters. + */ + beginExecuteAction( + resourceGroupName: string, + pipelineName: string, + body: Action, + options?: PipelinesExecuteActionOptionalParams, + ): Promise< + SimplePollerLike, PipelinesExecuteActionResponse> + >; + /** + * Executes a privileged action for a pipeline. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param body Action to execute + * @param options The options parameters. + */ + beginExecuteActionAndWait( + resourceGroupName: string, + pipelineName: string, + body: Action, + options?: PipelinesExecuteActionOptionalParams, + ): Promise; + /** + * Lists the flows in a pipeline. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + pipelineName: string, + options?: PipelinesListOptionalParams, + ): Promise; + /** + * Lists the schemas for the specified connection in a pipeline. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param body Schema(s) to retrieve + * @param options The options parameters. + */ + listSchemasList( + resourceGroupName: string, + pipelineName: string, + body: Schema, + options?: PipelinesListSchemasListOptionalParams, + ): Promise; + /** + * Rejects the specified connection in a pipeline. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param body Connection body + * @param options The options parameters. + */ + beginRejectConnection( + resourceGroupName: string, + pipelineName: string, + body: ResourceBody, + options?: PipelinesRejectConnectionOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + PipelinesRejectConnectionResponse + > + >; + /** + * Rejects the specified connection in a pipeline. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pipelineName The name for the pipeline that is to be requested. + * @param body Connection body + * @param options The options parameters. + */ + beginRejectConnectionAndWait( + resourceGroupName: string, + pipelineName: string, + body: ResourceBody, + options?: PipelinesRejectConnectionOptionalParams, + ): Promise; +} diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/src/pagingHelper.ts b/sdk/azuredatatransfer/arm-azuredatatransfer/src/pagingHelper.ts new file mode 100644 index 000000000000..e362819bdfc4 --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/src/pagingHelper.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export interface PageInfo { + continuationToken?: string; +} + +const pageMap = new WeakMap(); + +/** + * Given the last `.value` produced by the `byPage` iterator, + * returns a continuation token that can be used to begin paging from + * that point later. + * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. + * @returns The continuation token that can be passed into byPage() during future calls. + */ +export function getContinuationToken(page: unknown): string | undefined { + if (typeof page !== "object" || page === null) { + return undefined; + } + return pageMap.get(page)?.continuationToken; +} + +export function setContinuationToken(page: unknown, continuationToken: string | undefined): void { + if (typeof page !== "object" || page === null || !continuationToken) { + return; + } + const pageInfo = pageMap.get(page) ?? {}; + pageInfo.continuationToken = continuationToken; + pageMap.set(page, pageInfo); +} diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/test/sampleTest.spec.ts b/sdk/azuredatatransfer/arm-azuredatatransfer/test/sampleTest.spec.ts new file mode 100644 index 000000000000..90b3c8a868b4 --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/test/sampleTest.spec.ts @@ -0,0 +1,38 @@ +/* + * 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 } from "@azure-tools/test-recorder"; +import { afterEach, beforeEach, describe, it, assert } from "vitest"; + +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 () => { + recorder = new Recorder(); + await recorder.start(recorderOptions); + }); + + afterEach(async () => { + await recorder.stop(); + }); + + it("sample test", async () => { + assert(true); + }); +}); diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/test/snippets.spec.ts b/sdk/azuredatatransfer/arm-azuredatatransfer/test/snippets.spec.ts new file mode 100644 index 000000000000..5219fdb2e206 --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/test/snippets.spec.ts @@ -0,0 +1,32 @@ +/* + * 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 { Azuredatatransferrp } from "../src/index.js"; +import { DefaultAzureCredential, InteractiveBrowserCredential } from "@azure/identity"; +import { setLogLevel } from "@azure/logger"; +import { describe, it } from "vitest"; + +describe("snippets", () => { + it("ReadmeSampleCreateClient_Node", async () => { + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new Azuredatatransferrp(new DefaultAzureCredential(), subscriptionId); + }); + + it("ReadmeSampleCreateClient_Browser", async () => { + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const credential = new InteractiveBrowserCredential({ + tenantId: "", + clientId: "", + }); + const client = new Azuredatatransferrp(credential, subscriptionId); + }); + + it("SetLogLevel", async () => { + setLogLevel("info"); + }); +}); diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/tsconfig.browser.config.json b/sdk/azuredatatransfer/arm-azuredatatransfer/tsconfig.browser.config.json new file mode 100644 index 000000000000..75871518e3a0 --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/tsconfig.browser.config.json @@ -0,0 +1,3 @@ +{ + "extends": ["./tsconfig.test.json", "../../../tsconfig.browser.base.json"] +} diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/tsconfig.json b/sdk/azuredatatransfer/arm-azuredatatransfer/tsconfig.json new file mode 100644 index 000000000000..59ea83c046bf --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/tsconfig.json @@ -0,0 +1,10 @@ +{ + "references": [ + { + "path": "./tsconfig.src.json" + }, + { + "path": "./tsconfig.test.json" + } + ] +} \ No newline at end of file diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/tsconfig.samples.json b/sdk/azuredatatransfer/arm-azuredatatransfer/tsconfig.samples.json new file mode 100644 index 000000000000..19c2252b5ca1 --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/tsconfig.samples.json @@ -0,0 +1,8 @@ +{ + "extends": "../../../tsconfig.samples.base.json", + "compilerOptions": { + "paths": { + "@azure/arm-azuredatatransfer": ["./dist/esm"] + } + } +} diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/tsconfig.src.json b/sdk/azuredatatransfer/arm-azuredatatransfer/tsconfig.src.json new file mode 100644 index 000000000000..bae70752dd38 --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/tsconfig.src.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../tsconfig.lib.json" +} diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/tsconfig.test.json b/sdk/azuredatatransfer/arm-azuredatatransfer/tsconfig.test.json new file mode 100644 index 000000000000..290ca214aebc --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/tsconfig.test.json @@ -0,0 +1,3 @@ +{ + "extends": ["./tsconfig.src.json", "../../../tsconfig.test.base.json"] +} diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/vitest.browser.config.ts b/sdk/azuredatatransfer/arm-azuredatatransfer/vitest.browser.config.ts new file mode 100644 index 000000000000..182729ab5ce9 --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/vitest.browser.config.ts @@ -0,0 +1,17 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.browser.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + include: ["dist-test/browser/test/**/*.spec.js",], + testTimeout: 1200000, + hookTimeout: 1200000, + }, + }), +); diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/vitest.config.ts b/sdk/azuredatatransfer/arm-azuredatatransfer/vitest.config.ts new file mode 100644 index 000000000000..40e031385dd8 --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/vitest.config.ts @@ -0,0 +1,16 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + testTimeout: 1200000, + hookTimeout: 1200000, + }, + }), +); diff --git a/sdk/azuredatatransfer/arm-azuredatatransfer/vitest.esm.config.ts b/sdk/azuredatatransfer/arm-azuredatatransfer/vitest.esm.config.ts new file mode 100644 index 000000000000..a70127279fc9 --- /dev/null +++ b/sdk/azuredatatransfer/arm-azuredatatransfer/vitest.esm.config.ts @@ -0,0 +1,12 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { mergeConfig } from "vitest/config"; +import vitestConfig from "./vitest.config.ts"; +import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; + +export default mergeConfig( + vitestConfig, + vitestEsmConfig +); diff --git a/sdk/azuredatatransfer/ci.mgmt.yml b/sdk/azuredatatransfer/ci.mgmt.yml new file mode 100644 index 000000000000..ddebffb7f492 --- /dev/null +++ b/sdk/azuredatatransfer/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/azuredatatransfer/arm-azuredatatransfer + - sdk/azuredatatransfer/ci.mgmt.yml + +pr: + branches: + include: + - main + - feature/* + - release/* + - hotfix/* + exclude: + - feature/v4 + paths: + include: + - sdk/azuredatatransfer/arm-azuredatatransfer + - sdk/azuredatatransfer/ci.mgmt.yml + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: azuredatatransfer + Artifacts: + - name: azure-arm-azuredatatransfer + safeName: azurearmazuredatatransfer + \ No newline at end of file