From 7ec59215f11508f65e236d5acb820b822038a424 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 6 Feb 2024 08:14:06 +0000 Subject: [PATCH] CodeGen from PR 3208 in test-repo-billy/azure-rest-api-specs Merge 37829aa540066376fb0b9fd0749b2f78bd1f4b8e into 2a3aeccebd978831771083e30bb5bbce3c2e485a --- common/config/rush/pnpm-lock.yaml | 75 +- .../arm-servicelinker/CHANGELOG.md | 126 +- sdk/servicelinker/arm-servicelinker/LICENSE | 2 +- sdk/servicelinker/arm-servicelinker/README.md | 2 +- .../arm-servicelinker/_meta.json | 12 +- .../arm-servicelinker/package.json | 31 +- .../review/arm-servicelinker.api.md | 526 +++++- .../arm-servicelinker/src/lroImpl.ts | 54 +- .../arm-servicelinker/src/models/index.ts | 860 +++++++-- .../arm-servicelinker/src/models/mappers.ts | 1558 +++++++++++++---- .../src/models/parameters.ts | 167 +- .../src/operations/configurationNames.ts | 155 ++ .../src/operations/connector.ts | 1433 +++++++++++++++ .../arm-servicelinker/src/operations/index.ts | 3 + .../src/operations/linker.ts | 351 ++-- .../src/operations/linkers.ts | 558 ++++++ .../src/operations/operations.ts | 32 +- .../configurationNames.ts | 26 + .../src/operationsInterfaces/connector.ts | 349 ++++ .../src/operationsInterfaces/index.ts | 3 + .../src/operationsInterfaces/linker.ts | 59 +- .../src/operationsInterfaces/linkers.ts | 141 ++ .../src/operationsInterfaces/operations.ts | 2 +- .../arm-servicelinker/src/pagingHelper.ts | 2 +- .../src/serviceLinkerManagementClient.ts | 53 +- .../arm-servicelinker/test/sampleTest.ts | 12 +- .../arm-servicelinker/tsconfig.json | 10 +- 27 files changed, 5747 insertions(+), 855 deletions(-) create mode 100644 sdk/servicelinker/arm-servicelinker/src/operations/configurationNames.ts create mode 100644 sdk/servicelinker/arm-servicelinker/src/operations/connector.ts create mode 100644 sdk/servicelinker/arm-servicelinker/src/operations/linkers.ts create mode 100644 sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/configurationNames.ts create mode 100644 sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/connector.ts create mode 100644 sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/linkers.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 99321d0907bc..77729bf5a405 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1,7 +1,7 @@ lockfileVersion: '6.0' settings: - autoInstallPeers: true + autoInstallPeers: false excludeLinksFromLockfile: false dependencies: @@ -3554,6 +3554,13 @@ packages: requiresBuild: true dev: false + /autorest@3.7.1: + resolution: {integrity: sha512-6q17NtosQZPqBkIOUnaOPedf3PDIBF7Ha1iEGRhTqZF6TG2Q/1E3ID/D+ePIIzZDKvW01p/2pENq/oiBWH9IGQ==} + engines: {node: '>=12.0.0'} + hasBin: true + requiresBuild: true + dev: false + /available-typed-arrays@1.0.5: resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} engines: {node: '>= 0.4'} @@ -4495,7 +4502,7 @@ packages: dependencies: semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.3.0-dev.20231030 + typescript: 5.4.0-dev.20240206 dev: false /eastasianwidth@0.2.0: @@ -9261,8 +9268,14 @@ packages: hasBin: true dev: false - /typescript@5.3.0-dev.20231030: - resolution: {integrity: sha512-azWrF0lAiu8cBHNr6yq3RDkU/DtQScvT48ea3Ngq6oXJ/GPO0n96wCFSRQA5UbZlVVf3fAAqsUfvOdohRbrPVg==} + /typescript@5.3.3: + resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} + engines: {node: '>=14.17'} + hasBin: true + dev: false + + /typescript@5.4.0-dev.20240206: + resolution: {integrity: sha512-8P1XYxDbG/AyGE5tB8+JpeiQfS5ye1BTvIVDZaHhoK9nJuCn4nkB0L66lvfwYB+46hA4rLo3vE3WkIToSYtqQA==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -9894,7 +9907,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -9940,7 +9953,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -10170,7 +10183,7 @@ packages: dependencies: '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 dotenv: 8.6.0 eslint: 8.52.0 @@ -10242,7 +10255,7 @@ packages: '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -10334,7 +10347,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -10814,7 +10827,7 @@ packages: '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -11474,7 +11487,7 @@ packages: '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -11694,7 +11707,7 @@ packages: '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -13963,7 +13976,7 @@ packages: '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -15245,7 +15258,7 @@ packages: '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -15306,20 +15319,22 @@ packages: dev: false file:projects/arm-servicelinker.tgz: - resolution: {integrity: sha512-udECqWC7AR8a+LQyDFyjHN/2bdy4xCXgJNElaRUKiLajilsr5yoVpdjaKA2f6+BRuOKMSKtZD1wvGmOFJ1gviA==, tarball: file:projects/arm-servicelinker.tgz} + resolution: {integrity: sha512-V+HHcUJcge9Fxp7YIVHUVRaD/ai+Uhf/Dq4u7T8FxuV/6ms1kw5SvVCkLZ/qcprrwu6ZOjFyvBEe96ycumzYPg==, tarball: file:projects/arm-servicelinker.tgz} name: '@rush-temp/arm-servicelinker' version: 0.0.0 dependencies: '@azure/identity': 3.3.2 '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 + '@types/mocha': 10.0.3 '@types/node': 18.18.7 chai: 4.3.10 cross-env: 7.0.3 dotenv: 16.3.1 - mkdirp: 1.0.4 + esm: 3.2.25 + mkdirp: 2.1.6 mocha: 10.2.0 - rimraf: 3.0.2 + rimraf: 5.0.5 ts-node: 10.9.1(@types/node@18.18.7)(typescript@5.2.2) tslib: 2.6.2 typescript: 5.2.2 @@ -16440,7 +16455,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 chai: 4.3.10 cross-env: 7.0.3 dotenv: 16.3.1 @@ -17603,7 +17618,7 @@ packages: name: '@rush-temp/dev-tool' version: 0.0.0 dependencies: - '@_ts/max': /typescript@5.2.2 + '@_ts/max': /typescript@5.3.3 '@_ts/min': /typescript@4.2.4 '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@rollup/plugin-commonjs': 25.0.7(rollup@3.29.4) @@ -17669,7 +17684,7 @@ packages: '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18075,7 +18090,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18120,7 +18135,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18623,7 +18638,7 @@ packages: '@types/mocha': 10.0.3 '@types/node': 18.18.7 '@types/uuid': 8.3.4 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18732,7 +18747,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18778,7 +18793,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18824,7 +18839,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18870,7 +18885,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -19998,7 +20013,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -20043,7 +20058,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -20375,7 +20390,7 @@ packages: dev: false file:projects/storage-blob-changefeed.tgz: - resolution: {integrity: sha512-2LtIcl6t12irIaBaBSP/ytxkJA5VSRJ2RUg08UJEi/NVLHhjpx+NQQn/a/ebeAwpa2DefdSkfHRhgh7zn8Qzzg==, tarball: file:projects/storage-blob-changefeed.tgz} + resolution: {integrity: sha512-nBVNUHVbjsSyKfoA2uJNvG+jlJEW9Oq12K9Oha1C6GVY1rZhEpcWrkob0RJe/sCDdrMo0MBUnvL7+PkUsvhR8w==, tarball: file:projects/storage-blob-changefeed.tgz} name: '@rush-temp/storage-blob-changefeed' version: 0.0.0 dependencies: diff --git a/sdk/servicelinker/arm-servicelinker/CHANGELOG.md b/sdk/servicelinker/arm-servicelinker/CHANGELOG.md index b2b4092ccc22..980ae6e20d54 100644 --- a/sdk/servicelinker/arm-servicelinker/CHANGELOG.md +++ b/sdk/servicelinker/arm-servicelinker/CHANGELOG.md @@ -1,15 +1,123 @@ # Release History + +## 3.0.0-beta.1 (2024-02-06) + +**Features** -## 2.1.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added operation group ConfigurationNames + - Added operation group Connector + - Added operation group Linkers + - Added Interface AccessKeyInfoBase + - Added Interface BasicErrorDryrunPrerequisiteResult + - Added Interface ConfigurationInfo + - Added Interface ConfigurationName + - Added Interface ConfigurationNameItem + - Added Interface ConfigurationNameResult + - Added Interface ConfigurationNamesListNextOptionalParams + - Added Interface ConfigurationNamesListOptionalParams + - Added Interface ConfigurationResult + - Added Interface ConnectorCreateDryrunOptionalParams + - Added Interface ConnectorCreateOrUpdateOptionalParams + - Added Interface ConnectorDeleteDryrunOptionalParams + - Added Interface ConnectorDeleteOptionalParams + - Added Interface ConnectorGenerateConfigurationsOptionalParams + - Added Interface ConnectorGetDryrunOptionalParams + - Added Interface ConnectorGetOptionalParams + - Added Interface ConnectorListDryrunNextOptionalParams + - Added Interface ConnectorListDryrunOptionalParams + - Added Interface ConnectorListNextOptionalParams + - Added Interface ConnectorListOptionalParams + - Added Interface ConnectorUpdateDryrunOptionalParams + - Added Interface ConnectorUpdateOptionalParams + - Added Interface ConnectorValidateOptionalParams + - Added Interface CreateOrUpdateDryrunParameters + - Added Interface DaprMetadata + - Added Interface DaprProperties + - Added Interface DatabaseAadAuthInfo + - Added Interface DryrunList + - Added Interface DryrunOperationPreview + - Added Interface DryrunParameters + - Added Interface DryrunPatch + - Added Interface DryrunPrerequisiteResult + - Added Interface DryrunResource + - Added Interface FirewallRules + - Added Interface LinkerProperties + - Added Interface LinkersCreateDryrunOptionalParams + - Added Interface LinkersDeleteDryrunOptionalParams + - Added Interface LinkersGenerateConfigurationsOptionalParams + - Added Interface LinkersGetDryrunOptionalParams + - Added Interface LinkersListDryrunNextOptionalParams + - Added Interface LinkersListDryrunOptionalParams + - Added Interface LinkersUpdateDryrunOptionalParams + - Added Interface PermissionsMissingDryrunPrerequisiteResult + - Added Interface PublicNetworkSolution + - Added Interface ResourceList + - Added Interface SelfHostedServer + - Added Interface UserAccountAuthInfo + - Added Type Alias AccessKeyPermissions + - Added Type Alias AllowType + - Added Type Alias ConfigurationNamesListNextResponse + - Added Type Alias ConfigurationNamesListResponse + - Added Type Alias ConnectorCreateDryrunResponse + - Added Type Alias ConnectorCreateOrUpdateResponse + - Added Type Alias ConnectorGenerateConfigurationsResponse + - Added Type Alias ConnectorGetDryrunResponse + - Added Type Alias ConnectorGetResponse + - Added Type Alias ConnectorListDryrunNextResponse + - Added Type Alias ConnectorListDryrunResponse + - Added Type Alias ConnectorListNextResponse + - Added Type Alias ConnectorListResponse + - Added Type Alias ConnectorUpdateDryrunResponse + - Added Type Alias ConnectorUpdateResponse + - Added Type Alias ConnectorValidateResponse + - Added Type Alias DeleteOrUpdateBehavior + - Added Type Alias DryrunActionName + - Added Type Alias DryrunParametersUnion + - Added Type Alias DryrunPrerequisiteResultType + - Added Type Alias DryrunPrerequisiteResultUnion + - Added Type Alias DryrunPreviewOperationType + - Added Type Alias LinkersCreateDryrunResponse + - Added Type Alias LinkersGenerateConfigurationsResponse + - Added Type Alias LinkersGetDryrunResponse + - Added Type Alias LinkersListDryrunNextResponse + - Added Type Alias LinkersListDryrunResponse + - Added Type Alias LinkersUpdateDryrunResponse + - Interface LinkerPatch has a new optional parameter configurationInfo + - Interface LinkerPatch has a new optional parameter publicNetworkSolution + - Interface LinkerResource has a new optional parameter configurationInfo + - Interface LinkerResource has a new optional parameter publicNetworkSolution + - Interface Resource has a new optional parameter systemData + - Interface SecretStore has a new optional parameter keyVaultSecretName + - Interface ServicePrincipalCertificateAuthInfo has a new optional parameter deleteOrUpdateBehavior + - Interface ServicePrincipalCertificateAuthInfo has a new optional parameter roles + - Interface ServicePrincipalSecretAuthInfo has a new optional parameter deleteOrUpdateBehavior + - Interface ServicePrincipalSecretAuthInfo has a new optional parameter roles + - Interface SystemAssignedIdentityAuthInfo has a new optional parameter deleteOrUpdateBehavior + - Interface SystemAssignedIdentityAuthInfo has a new optional parameter roles + - Interface UserAssignedIdentityAuthInfo has a new optional parameter deleteOrUpdateBehavior + - Interface UserAssignedIdentityAuthInfo has a new optional parameter roles + - Interface VNetSolution has a new optional parameter deleteOrUpdateBehavior + - Type of parameter authType of interface AuthInfoBase is changed from "secret" | "userAssignedIdentity" | "systemAssignedIdentity" | "servicePrincipalSecret" | "servicePrincipalCertificate" to "accessKey" | "secret" | "userAssignedIdentity" | "systemAssignedIdentity" | "servicePrincipalSecret" | "servicePrincipalCertificate" | "userAccount" + - Type of parameter type of interface TargetServiceBase is changed from "AzureResource" | "ConfluentBootstrapServer" | "ConfluentSchemaRegistry" to "AzureResource" | "ConfluentBootstrapServer" | "SelfHostedServer" | "ConfluentSchemaRegistry" + - Added Enum KnownAccessKeyPermissions + - Added Enum KnownAllowType + - Added Enum KnownDeleteOrUpdateBehavior + - Added Enum KnownDryrunActionName + - Added Enum KnownDryrunPrerequisiteResultType + - Added Enum KnownDryrunPreviewOperationType + - Enum KnownActionType has a new value Enable + - Enum KnownActionType has a new value OptOut + - Enum KnownAuthType has a new value AccessKey + - Enum KnownAuthType has a new value UserAccount + - Enum KnownClientType has a new value Dapr + - Enum KnownClientType has a new value KafkaSpringBoot + - Enum KnownTargetServiceType has a new value SelfHostedServer -### Other Changes +**Breaking Changes** + - Interface LinkerResource no longer has parameter systemData + + ## 2.1.0 (2022-12-16) **Features** @@ -45,4 +153,4 @@ ## 1.0.0 (2022-04-27) -The package of @azure/arm-servicelinker is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ). +The package of @azure/arm-servicelinker is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/servicelinker/arm-servicelinker/LICENSE b/sdk/servicelinker/arm-servicelinker/LICENSE index 5d1d36e0af80..7d5934740965 100644 --- a/sdk/servicelinker/arm-servicelinker/LICENSE +++ b/sdk/servicelinker/arm-servicelinker/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2024 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/servicelinker/arm-servicelinker/README.md b/sdk/servicelinker/arm-servicelinker/README.md index bd1e958daa3d..9ddc56018a64 100644 --- a/sdk/servicelinker/arm-servicelinker/README.md +++ b/sdk/servicelinker/arm-servicelinker/README.md @@ -6,7 +6,7 @@ Microsoft.ServiceLinker provider [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/servicelinker/arm-servicelinker) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-servicelinker) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-servicelinker) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-servicelinker?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/servicelinker/arm-servicelinker/_meta.json b/sdk/servicelinker/arm-servicelinker/_meta.json index a88461956128..c8982c842a5c 100644 --- a/sdk/servicelinker/arm-servicelinker/_meta.json +++ b/sdk/servicelinker/arm-servicelinker/_meta.json @@ -1,8 +1,8 @@ { - "commit": "eeb81e9f8a12ad473e8df3a71f2d58682741bcd2", - "readme": "specification\\servicelinker\\resource-manager\\readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\servicelinker\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.5.20221215.1 --generate-sample=true", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.5.4", - "use": "@autorest/typescript@6.0.0-rc.5.20221215.1" + "commit": "e7dda828d1cda568ec04590ac2923aba63f312c3", + "readme": "specification/servicelinker/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/servicelinker/resource-manager/readme.md --use=@autorest/typescript@^6.0.11", + "repository_url": "https://github.com/test-repo-billy/azure-rest-api-specs.git", + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.4", + "use": "@autorest/typescript@^6.0.11" } \ No newline at end of file diff --git a/sdk/servicelinker/arm-servicelinker/package.json b/sdk/servicelinker/arm-servicelinker/package.json index 09f7d83e3866..32c7caf2e308 100644 --- a/sdk/servicelinker/arm-servicelinker/package.json +++ b/sdk/servicelinker/arm-servicelinker/package.json @@ -3,17 +3,17 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ServiceLinkerManagementClient.", - "version": "2.1.1", + "version": "3.0.0-beta.1", "engines": { "node": ">=18.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.4", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.6.1", + "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.8.0", + "@azure/core-rest-pipeline": "^1.12.0", "tslib": "^2.2.0" }, "keywords": [ @@ -29,20 +29,22 @@ "types": "./types/arm-servicelinker.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.31.1", - "mkdirp": "^1.0.4", + "mkdirp": "^2.1.2", "typescript": "~5.2.0", "uglify-js": "^3.4.9", - "rimraf": "^3.0.0", + "rimraf": "^5.0.0", "dotenv": "^16.0.0", + "@azure/dev-tool": "^1.0.0", "@azure/identity": "^3.3.0", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", "mocha": "^10.0.0", + "@types/mocha": "^10.0.0", + "esm": "^3.2.18", "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", "@types/node": "^18.0.0", - "@azure/dev-tool": "^1.0.0", "ts-node": "^10.0.0" }, "repository": { @@ -76,8 +78,7 @@ "pack": "npm pack 2>&1", "extract-api": "api-extractor run --local", "lint": "echo skipped", - "audit": "echo skipped", - "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", "build:browser": "echo skipped", "build:test": "echo skipped", @@ -105,13 +106,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/servicelinker/arm-servicelinker", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-servicelinker?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/servicelinker/arm-servicelinker" +} \ No newline at end of file diff --git a/sdk/servicelinker/arm-servicelinker/review/arm-servicelinker.api.md b/sdk/servicelinker/arm-servicelinker/review/arm-servicelinker.api.md index 0d160013a145..c132788b35b5 100644 --- a/sdk/servicelinker/arm-servicelinker/review/arm-servicelinker.api.md +++ b/sdk/servicelinker/arm-servicelinker/review/arm-servicelinker.api.md @@ -6,20 +6,32 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { PollerLike } from '@azure/core-lro'; -import { PollOperationState } from '@azure/core-lro'; +import { SimplePollerLike } from '@azure/core-lro'; + +// @public +export interface AccessKeyInfoBase extends AuthInfoBase { + authType: "accessKey"; + permissions?: AccessKeyPermissions[]; +} + +// @public +export type AccessKeyPermissions = string; // @public export type ActionType = string; +// @public +export type AllowType = string; + // @public export interface AuthInfoBase { - authType: "secret" | "userAssignedIdentity" | "systemAssignedIdentity" | "servicePrincipalSecret" | "servicePrincipalCertificate"; + authType: "accessKey" | "secret" | "userAssignedIdentity" | "systemAssignedIdentity" | "servicePrincipalSecret" | "servicePrincipalCertificate" | "userAccount"; } // @public (undocumented) -export type AuthInfoBaseUnion = AuthInfoBase | SecretAuthInfo | UserAssignedIdentityAuthInfo | SystemAssignedIdentityAuthInfo | ServicePrincipalSecretAuthInfo | ServicePrincipalCertificateAuthInfo; +export type AuthInfoBaseUnion = AuthInfoBase | AccessKeyInfoBase | SecretAuthInfo | UserAssignedIdentityAuthInfo | SystemAssignedIdentityAuthInfo | ServicePrincipalSecretAuthInfo | ServicePrincipalCertificateAuthInfo | UserAccountAuthInfo; // @public export type AuthType = string; @@ -48,9 +60,78 @@ export type AzureResourcePropertiesBaseUnion = AzureResourcePropertiesBase | Azu // @public export type AzureResourceType = string; +// @public +export interface BasicErrorDryrunPrerequisiteResult extends DryrunPrerequisiteResult { + code?: string; + message?: string; + type: "basicError"; +} + // @public export type ClientType = string; +// @public +export interface ConfigurationInfo { + action?: ActionType; + additionalConfigurations?: { + [propertyName: string]: string; + }; + customizedKeys?: { + [propertyName: string]: string; + }; + daprProperties?: DaprProperties; + deleteOrUpdateBehavior?: DeleteOrUpdateBehavior; +} + +// @public +export interface ConfigurationName { + description?: string; + required?: boolean; + // (undocumented) + value?: string; +} + +// @public (undocumented) +export interface ConfigurationNameItem { + authType?: AuthType; + clientType?: ClientType; + daprProperties?: DaprProperties; + names?: ConfigurationName[]; + targetService?: string; +} + +// @public +export interface ConfigurationNameResult { + readonly nextLink?: string; + value?: ConfigurationNameItem[]; +} + +// @public +export interface ConfigurationNames { + list(options?: ConfigurationNamesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ConfigurationNamesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConfigurationNamesListNextResponse = ConfigurationNameResult; + +// @public +export interface ConfigurationNamesListOptionalParams extends coreClient.OperationOptions { + filter?: string; + skipToken?: string; +} + +// @public +export type ConfigurationNamesListResponse = ConfigurationNameResult; + +// @public +export interface ConfigurationResult { + configurations?: SourceConfiguration[]; +} + // @public export interface ConfluentBootstrapServer extends TargetServiceBase { endpoint?: string; @@ -63,9 +144,221 @@ export interface ConfluentSchemaRegistry extends TargetServiceBase { type: "ConfluentSchemaRegistry"; } +// @public +export interface Connector { + beginCreateDryrun(subscriptionId: string, resourceGroupName: string, location: string, dryrunName: string, parameters: DryrunResource, options?: ConnectorCreateDryrunOptionalParams): Promise, ConnectorCreateDryrunResponse>>; + beginCreateDryrunAndWait(subscriptionId: string, resourceGroupName: string, location: string, dryrunName: string, parameters: DryrunResource, options?: ConnectorCreateDryrunOptionalParams): Promise; + beginCreateOrUpdate(subscriptionId: string, resourceGroupName: string, location: string, connectorName: string, parameters: LinkerResource, options?: ConnectorCreateOrUpdateOptionalParams): Promise, ConnectorCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(subscriptionId: string, resourceGroupName: string, location: string, connectorName: string, parameters: LinkerResource, options?: ConnectorCreateOrUpdateOptionalParams): Promise; + beginDelete(subscriptionId: string, resourceGroupName: string, location: string, connectorName: string, options?: ConnectorDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(subscriptionId: string, resourceGroupName: string, location: string, connectorName: string, options?: ConnectorDeleteOptionalParams): Promise; + beginUpdate(subscriptionId: string, resourceGroupName: string, location: string, connectorName: string, parameters: LinkerPatch, options?: ConnectorUpdateOptionalParams): Promise, ConnectorUpdateResponse>>; + beginUpdateAndWait(subscriptionId: string, resourceGroupName: string, location: string, connectorName: string, parameters: LinkerPatch, options?: ConnectorUpdateOptionalParams): Promise; + beginUpdateDryrun(subscriptionId: string, resourceGroupName: string, location: string, dryrunName: string, parameters: DryrunPatch, options?: ConnectorUpdateDryrunOptionalParams): Promise, ConnectorUpdateDryrunResponse>>; + beginUpdateDryrunAndWait(subscriptionId: string, resourceGroupName: string, location: string, dryrunName: string, parameters: DryrunPatch, options?: ConnectorUpdateDryrunOptionalParams): Promise; + beginValidate(subscriptionId: string, resourceGroupName: string, location: string, connectorName: string, options?: ConnectorValidateOptionalParams): Promise, ConnectorValidateResponse>>; + beginValidateAndWait(subscriptionId: string, resourceGroupName: string, location: string, connectorName: string, options?: ConnectorValidateOptionalParams): Promise; + deleteDryrun(subscriptionId: string, resourceGroupName: string, location: string, dryrunName: string, options?: ConnectorDeleteDryrunOptionalParams): Promise; + generateConfigurations(subscriptionId: string, resourceGroupName: string, location: string, connectorName: string, options?: ConnectorGenerateConfigurationsOptionalParams): Promise; + get(subscriptionId: string, resourceGroupName: string, location: string, connectorName: string, options?: ConnectorGetOptionalParams): Promise; + getDryrun(subscriptionId: string, resourceGroupName: string, location: string, dryrunName: string, options?: ConnectorGetDryrunOptionalParams): Promise; + list(subscriptionId: string, resourceGroupName: string, location: string, options?: ConnectorListOptionalParams): PagedAsyncIterableIterator; + listDryrun(subscriptionId: string, resourceGroupName: string, location: string, options?: ConnectorListDryrunOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ConnectorCreateDryrunOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ConnectorCreateDryrunResponse = DryrunResource; + +// @public +export interface ConnectorCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ConnectorCreateOrUpdateResponse = LinkerResource; + +// @public +export interface ConnectorDeleteDryrunOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ConnectorDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ConnectorGenerateConfigurationsOptionalParams extends coreClient.OperationOptions { + parameters?: ConfigurationInfo; +} + +// @public +export type ConnectorGenerateConfigurationsResponse = ConfigurationResult; + +// @public +export interface ConnectorGetDryrunOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectorGetDryrunResponse = DryrunResource; + +// @public +export interface ConnectorGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectorGetResponse = LinkerResource; + +// @public +export interface ConnectorListDryrunNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectorListDryrunNextResponse = DryrunList; + +// @public +export interface ConnectorListDryrunOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectorListDryrunResponse = DryrunList; + +// @public +export interface ConnectorListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectorListNextResponse = ResourceList; + +// @public +export interface ConnectorListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectorListResponse = ResourceList; + +// @public +export interface ConnectorUpdateDryrunOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ConnectorUpdateDryrunResponse = DryrunResource; + +// @public +export interface ConnectorUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ConnectorUpdateResponse = LinkerResource; + +// @public +export interface ConnectorValidateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ConnectorValidateResponse = ValidateOperationResult; + // @public export type CreatedByType = string; +// @public +export interface CreateOrUpdateDryrunParameters extends DryrunParameters, LinkerProperties { + actionName: "createOrUpdate"; +} + +// @public +export interface DaprMetadata { + name?: string; + secretRef?: string; + value?: string; +} + +// @public +export interface DaprProperties { + componentType?: string; + metadata?: DaprMetadata[]; + scopes?: string[]; + secretStoreComponent?: string; + version?: string; +} + +// @public +export interface DatabaseAadAuthInfo { + userName?: string; +} + +// @public +export type DeleteOrUpdateBehavior = string; + +// @public +export type DryrunActionName = string; + +// @public +export interface DryrunList { + nextLink?: string; + value?: DryrunResource[]; +} + +// @public +export interface DryrunOperationPreview { + action?: string; + description?: string; + name?: string; + operationType?: DryrunPreviewOperationType; + scope?: string; +} + +// @public +export interface DryrunParameters { + actionName: "createOrUpdate"; +} + +// @public (undocumented) +export type DryrunParametersUnion = DryrunParameters | CreateOrUpdateDryrunParameters; + +// @public +export interface DryrunPatch { + readonly operationPreviews?: DryrunOperationPreview[]; + parameters?: DryrunParametersUnion; + readonly prerequisiteResults?: DryrunPrerequisiteResultUnion[]; + readonly provisioningState?: string; +} + +// @public +export interface DryrunPrerequisiteResult { + type: "basicError" | "permissionsMissing"; +} + +// @public +export type DryrunPrerequisiteResultType = string; + +// @public (undocumented) +export type DryrunPrerequisiteResultUnion = DryrunPrerequisiteResult | BasicErrorDryrunPrerequisiteResult | PermissionsMissingDryrunPrerequisiteResult; + +// @public +export type DryrunPreviewOperationType = string; + +// @public +export interface DryrunResource extends ProxyResource { + readonly operationPreviews?: DryrunOperationPreview[]; + parameters?: DryrunParametersUnion; + readonly prerequisiteResults?: DryrunPrerequisiteResultUnion[]; + readonly provisioningState?: string; +} + // @public export interface ErrorAdditionalInfo { readonly info?: Record; @@ -86,6 +379,13 @@ export interface ErrorResponse { error?: ErrorDetail; } +// @public +export interface FirewallRules { + azureServices?: AllowType; + callerClientIP?: AllowType; + ipRanges?: string[]; +} + // @public export function getContinuationToken(page: unknown): string | undefined; @@ -102,17 +402,36 @@ export interface KeyVaultSecretUriSecretInfo extends SecretInfoBase { value?: string; } +// @public +export enum KnownAccessKeyPermissions { + Listen = "Listen", + Manage = "Manage", + Read = "Read", + Send = "Send", + Write = "Write" +} + // @public export enum KnownActionType { - Internal = "Internal" + Enable = "enable", + Internal = "Internal", + OptOut = "optOut" +} + +// @public +export enum KnownAllowType { + False = "false", + True = "true" } // @public export enum KnownAuthType { + AccessKey = "accessKey", Secret = "secret", ServicePrincipalCertificate = "servicePrincipalCertificate", ServicePrincipalSecret = "servicePrincipalSecret", SystemAssignedIdentity = "systemAssignedIdentity", + UserAccount = "userAccount", UserAssignedIdentity = "userAssignedIdentity" } @@ -123,10 +442,12 @@ export enum KnownAzureResourceType { // @public export enum KnownClientType { + Dapr = "dapr", Django = "django", Dotnet = "dotnet", Go = "go", Java = "java", + KafkaSpringBoot = "kafka-springBoot", Nodejs = "nodejs", None = "none", Php = "php", @@ -143,6 +464,30 @@ export enum KnownCreatedByType { User = "User" } +// @public +export enum KnownDeleteOrUpdateBehavior { + Default = "Default", + ForcedCleanup = "ForcedCleanup" +} + +// @public +export enum KnownDryrunActionName { + CreateOrUpdate = "createOrUpdate" +} + +// @public +export enum KnownDryrunPrerequisiteResultType { + BasicError = "basicError", + PermissionsMissing = "permissionsMissing" +} + +// @public +export enum KnownDryrunPreviewOperationType { + ConfigAuth = "configAuth", + ConfigConnection = "configConnection", + ConfigNetwork = "configNetwork" +} + // @public export enum KnownOrigin { System = "system", @@ -161,7 +506,8 @@ export enum KnownSecretType { export enum KnownTargetServiceType { AzureResource = "AzureResource", ConfluentBootstrapServer = "ConfluentBootstrapServer", - ConfluentSchemaRegistry = "ConfluentSchemaRegistry" + ConfluentSchemaRegistry = "ConfluentSchemaRegistry", + SelfHostedServer = "SelfHostedServer" } // @public @@ -179,13 +525,13 @@ export enum KnownVNetSolutionType { // @public export interface Linker { - beginCreateOrUpdate(resourceUri: string, linkerName: string, parameters: LinkerResource, options?: LinkerCreateOrUpdateOptionalParams): Promise, LinkerCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceUri: string, linkerName: string, parameters: LinkerResource, options?: LinkerCreateOrUpdateOptionalParams): Promise, LinkerCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceUri: string, linkerName: string, parameters: LinkerResource, options?: LinkerCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceUri: string, linkerName: string, options?: LinkerDeleteOptionalParams): Promise, void>>; + beginDelete(resourceUri: string, linkerName: string, options?: LinkerDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceUri: string, linkerName: string, options?: LinkerDeleteOptionalParams): Promise; - beginUpdate(resourceUri: string, linkerName: string, parameters: LinkerPatch, options?: LinkerUpdateOptionalParams): Promise, LinkerUpdateResponse>>; + beginUpdate(resourceUri: string, linkerName: string, parameters: LinkerPatch, options?: LinkerUpdateOptionalParams): Promise, LinkerUpdateResponse>>; beginUpdateAndWait(resourceUri: string, linkerName: string, parameters: LinkerPatch, options?: LinkerUpdateOptionalParams): Promise; - beginValidate(resourceUri: string, linkerName: string, options?: LinkerValidateOptionalParams): Promise, LinkerValidateResponse>>; + beginValidate(resourceUri: string, linkerName: string, options?: LinkerValidateOptionalParams): Promise, LinkerValidateResponse>>; beginValidateAndWait(resourceUri: string, linkerName: string, options?: LinkerValidateOptionalParams): Promise; get(resourceUri: string, linkerName: string, options?: LinkerGetOptionalParams): Promise; list(resourceUri: string, options?: LinkerListOptionalParams): PagedAsyncIterableIterator; @@ -214,38 +560,47 @@ export interface LinkerGetOptionalParams extends coreClient.OperationOptions { // @public export type LinkerGetResponse = LinkerResource; -// @public -export interface LinkerList { - nextLink?: string; - value?: LinkerResource[]; -} - // @public export interface LinkerListConfigurationsOptionalParams extends coreClient.OperationOptions { } // @public -export type LinkerListConfigurationsResponse = SourceConfigurationResult; +export type LinkerListConfigurationsResponse = ConfigurationResult; // @public export interface LinkerListNextOptionalParams extends coreClient.OperationOptions { } // @public -export type LinkerListNextResponse = LinkerList; +export type LinkerListNextResponse = ResourceList; // @public export interface LinkerListOptionalParams extends coreClient.OperationOptions { } // @public -export type LinkerListResponse = LinkerList; +export type LinkerListResponse = ResourceList; // @public export interface LinkerPatch { authInfo?: AuthInfoBaseUnion; clientType?: ClientType; + configurationInfo?: ConfigurationInfo; + readonly provisioningState?: string; + publicNetworkSolution?: PublicNetworkSolution; + scope?: string; + secretStore?: SecretStore; + targetService?: TargetServiceBaseUnion; + vNetSolution?: VNetSolution; +} + +// @public +export interface LinkerProperties { + authInfo?: AuthInfoBaseUnion; + clientType?: ClientType; + configurationInfo?: ConfigurationInfo; readonly provisioningState?: string; + publicNetworkSolution?: PublicNetworkSolution; scope?: string; secretStore?: SecretStore; targetService?: TargetServiceBaseUnion; @@ -256,14 +611,78 @@ export interface LinkerPatch { export interface LinkerResource extends ProxyResource { authInfo?: AuthInfoBaseUnion; clientType?: ClientType; + configurationInfo?: ConfigurationInfo; readonly provisioningState?: string; + publicNetworkSolution?: PublicNetworkSolution; scope?: string; secretStore?: SecretStore; - readonly systemData?: SystemData; targetService?: TargetServiceBaseUnion; vNetSolution?: VNetSolution; } +// @public +export interface Linkers { + beginCreateDryrun(resourceUri: string, dryrunName: string, parameters: DryrunResource, options?: LinkersCreateDryrunOptionalParams): Promise, LinkersCreateDryrunResponse>>; + beginCreateDryrunAndWait(resourceUri: string, dryrunName: string, parameters: DryrunResource, options?: LinkersCreateDryrunOptionalParams): Promise; + beginUpdateDryrun(resourceUri: string, dryrunName: string, parameters: DryrunPatch, options?: LinkersUpdateDryrunOptionalParams): Promise, LinkersUpdateDryrunResponse>>; + beginUpdateDryrunAndWait(resourceUri: string, dryrunName: string, parameters: DryrunPatch, options?: LinkersUpdateDryrunOptionalParams): Promise; + deleteDryrun(resourceUri: string, dryrunName: string, options?: LinkersDeleteDryrunOptionalParams): Promise; + generateConfigurations(resourceUri: string, linkerName: string, options?: LinkersGenerateConfigurationsOptionalParams): Promise; + getDryrun(resourceUri: string, dryrunName: string, options?: LinkersGetDryrunOptionalParams): Promise; + listDryrun(resourceUri: string, options?: LinkersListDryrunOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface LinkersCreateDryrunOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type LinkersCreateDryrunResponse = DryrunResource; + +// @public +export interface LinkersDeleteDryrunOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface LinkersGenerateConfigurationsOptionalParams extends coreClient.OperationOptions { + parameters?: ConfigurationInfo; +} + +// @public +export type LinkersGenerateConfigurationsResponse = ConfigurationResult; + +// @public +export interface LinkersGetDryrunOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LinkersGetDryrunResponse = DryrunResource; + +// @public +export interface LinkersListDryrunNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LinkersListDryrunNextResponse = DryrunList; + +// @public +export interface LinkersListDryrunOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LinkersListDryrunResponse = DryrunList; + +// @public +export interface LinkersUpdateDryrunOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type LinkersUpdateDryrunResponse = DryrunResource; + // @public export interface LinkerUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -327,17 +746,39 @@ export type OperationsListResponse = OperationListResult; // @public export type Origin = string; +// @public +export interface PermissionsMissingDryrunPrerequisiteResult extends DryrunPrerequisiteResult { + permissions?: string[]; + recommendedRole?: string; + scope?: string; + type: "permissionsMissing"; +} + // @public export interface ProxyResource extends Resource { } +// @public +export interface PublicNetworkSolution { + action?: ActionType; + deleteOrUpdateBehavior?: DeleteOrUpdateBehavior; + firewallRules?: FirewallRules; +} + // @public export interface Resource { readonly id?: string; readonly name?: string; + readonly systemData?: SystemData; readonly type?: string; } +// @public +export interface ResourceList { + nextLink?: string; + value?: LinkerResource[]; +} + // @public export interface SecretAuthInfo extends AuthInfoBase { authType: "secret"; @@ -356,11 +797,18 @@ export type SecretInfoBaseUnion = SecretInfoBase | ValueSecretInfo | KeyVaultSec // @public export interface SecretStore { keyVaultId?: string; + keyVaultSecretName?: string; } // @public export type SecretType = string; +// @public +export interface SelfHostedServer extends TargetServiceBase { + endpoint?: string; + type: "SelfHostedServer"; +} + // @public (undocumented) export class ServiceLinkerManagementClient extends coreClient.ServiceClient { // (undocumented) @@ -369,8 +817,14 @@ export class ServiceLinkerManagementClient extends coreClient.ServiceClient { // (undocumented) apiVersion: string; // (undocumented) + configurationNames: ConfigurationNames; + // (undocumented) + connector: Connector; + // (undocumented) linker: Linker; // (undocumented) + linkers: Linkers; + // (undocumented) operations: Operations; } @@ -386,14 +840,18 @@ export interface ServicePrincipalCertificateAuthInfo extends AuthInfoBase { authType: "servicePrincipalCertificate"; certificate: string; clientId: string; + deleteOrUpdateBehavior?: DeleteOrUpdateBehavior; principalId: string; + roles?: string[]; } // @public -export interface ServicePrincipalSecretAuthInfo extends AuthInfoBase { +export interface ServicePrincipalSecretAuthInfo extends AuthInfoBase, DatabaseAadAuthInfo { authType: "servicePrincipalSecret"; clientId: string; + deleteOrUpdateBehavior?: DeleteOrUpdateBehavior; principalId: string; + roles?: string[]; secret: string; } @@ -404,13 +862,10 @@ export interface SourceConfiguration { } // @public -export interface SourceConfigurationResult { - configurations?: SourceConfiguration[]; -} - -// @public -export interface SystemAssignedIdentityAuthInfo extends AuthInfoBase { +export interface SystemAssignedIdentityAuthInfo extends AuthInfoBase, DatabaseAadAuthInfo { authType: "systemAssignedIdentity"; + deleteOrUpdateBehavior?: DeleteOrUpdateBehavior; + roles?: string[]; } // @public @@ -425,19 +880,29 @@ export interface SystemData { // @public export interface TargetServiceBase { - type: "AzureResource" | "ConfluentBootstrapServer" | "ConfluentSchemaRegistry"; + type: "AzureResource" | "ConfluentBootstrapServer" | "SelfHostedServer" | "ConfluentSchemaRegistry"; } // @public (undocumented) -export type TargetServiceBaseUnion = TargetServiceBase | AzureResource | ConfluentBootstrapServer | ConfluentSchemaRegistry; +export type TargetServiceBaseUnion = TargetServiceBase | AzureResource | ConfluentBootstrapServer | SelfHostedServer | ConfluentSchemaRegistry; // @public export type TargetServiceType = string; // @public -export interface UserAssignedIdentityAuthInfo extends AuthInfoBase { +export interface UserAccountAuthInfo extends AuthInfoBase, DatabaseAadAuthInfo { + authType: "userAccount"; + deleteOrUpdateBehavior?: DeleteOrUpdateBehavior; + principalId?: string; + roles?: string[]; +} + +// @public +export interface UserAssignedIdentityAuthInfo extends AuthInfoBase, DatabaseAadAuthInfo { authType: "userAssignedIdentity"; clientId?: string; + deleteOrUpdateBehavior?: DeleteOrUpdateBehavior; + roles?: string[]; subscriptionId?: string; } @@ -475,6 +940,7 @@ export interface ValueSecretInfo extends SecretInfoBase { // @public export interface VNetSolution { + deleteOrUpdateBehavior?: DeleteOrUpdateBehavior; type?: VNetSolutionType; } diff --git a/sdk/servicelinker/arm-servicelinker/src/lroImpl.ts b/sdk/servicelinker/arm-servicelinker/src/lroImpl.ts index 518d5f053b4e..b27f5ac7209b 100644 --- a/sdk/servicelinker/arm-servicelinker/src/lroImpl.ts +++ b/sdk/servicelinker/arm-servicelinker/src/lroImpl.ts @@ -6,29 +6,37 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortSignalLike } from "@azure/abort-controller"; import { LongRunningOperation, LroResponse } from "@azure/core-lro"; -export class LroImpl implements LongRunningOperation { - constructor( - private sendOperationFn: (args: any, spec: any) => Promise>, - private args: Record, - private spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record, - public requestPath: string = spec.path!, - public requestMethod: string = spec.httpMethod - ) {} - public async sendInitialRequest(): Promise> { - return this.sendOperationFn(this.args, this.spec); - } - public async sendPollRequest(path: string): Promise> { - const { requestBody, ...restSpec } = this.spec; - return this.sendOperationFn(this.args, { - ...restSpec, - path, - httpMethod: "GET" - }); - } +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: ( + path: string, + options?: { abortSignal?: AbortSignalLike }, + ) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal, + }); + }, + }; } diff --git a/sdk/servicelinker/arm-servicelinker/src/models/index.ts b/sdk/servicelinker/arm-servicelinker/src/models/index.ts index 709e0b5102bc..db01fb4e453b 100644 --- a/sdk/servicelinker/arm-servicelinker/src/models/index.ts +++ b/sdk/servicelinker/arm-servicelinker/src/models/index.ts @@ -8,18 +8,28 @@ import * as coreClient from "@azure/core-client"; +export type DryrunParametersUnion = + | DryrunParameters + | CreateOrUpdateDryrunParameters; +export type DryrunPrerequisiteResultUnion = + | DryrunPrerequisiteResult + | BasicErrorDryrunPrerequisiteResult + | PermissionsMissingDryrunPrerequisiteResult; export type TargetServiceBaseUnion = | TargetServiceBase | AzureResource | ConfluentBootstrapServer + | SelfHostedServer | ConfluentSchemaRegistry; export type AuthInfoBaseUnion = | AuthInfoBase + | AccessKeyInfoBase | SecretAuthInfo | UserAssignedIdentityAuthInfo | SystemAssignedIdentityAuthInfo | ServicePrincipalSecretAuthInfo - | ServicePrincipalCertificateAuthInfo; + | ServicePrincipalCertificateAuthInfo + | UserAccountAuthInfo; export type AzureResourcePropertiesBaseUnion = | AzureResourcePropertiesBase | AzureKeyVaultProperties; @@ -29,60 +39,38 @@ export type SecretInfoBaseUnion = | KeyVaultSecretReferenceSecretInfo | KeyVaultSecretUriSecretInfo; -/** The list of Linker. */ -export interface LinkerList { - /** The link used to get the next page of Linker list. */ +/** The list of dryrun. */ +export interface DryrunList { + /** The link used to get the next page of dryrun list. */ nextLink?: string; - /** The list of Linkers. */ - value?: LinkerResource[]; + /** The list of dryrun. */ + value?: DryrunResource[]; } -/** The target service properties */ -export interface TargetServiceBase { +/** The parameters of the dryrun */ +export interface DryrunParameters { /** Polymorphic discriminator, which specifies the different types this object can be */ - type: - | "AzureResource" - | "ConfluentBootstrapServer" - | "ConfluentSchemaRegistry"; + actionName: "createOrUpdate"; } -/** The authentication info */ -export interface AuthInfoBase { +/** A result of dryrun */ +export interface DryrunPrerequisiteResult { /** Polymorphic discriminator, which specifies the different types this object can be */ - authType: - | "secret" - | "userAssignedIdentity" - | "systemAssignedIdentity" - | "servicePrincipalSecret" - | "servicePrincipalCertificate"; -} - -/** The VNet solution for linker */ -export interface VNetSolution { - /** Type of VNet solution. */ - type?: VNetSolutionType; -} - -/** An option to store secret value in secure place */ -export interface SecretStore { - /** The key vault id to store secret */ - keyVaultId?: string; + type: "basicError" | "permissionsMissing"; } -/** 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 preview of the operations for creation */ +export interface DryrunOperationPreview { + /** The operation name */ + name?: string; + /** The operation type */ + operationType?: DryrunPreviewOperationType; + /** The description of the operation */ + description?: string; + /** The action defined by RBAC, refer https://docs.microsoft.com/azure/role-based-access-control/role-definitions#actions-format */ + action?: string; + /** The scope of the operation, refer https://docs.microsoft.com/azure/role-based-access-control/scope-overview */ + scope?: string; } /** Common fields that are returned in the response for all Azure Resource Manager resources */ @@ -102,6 +90,27 @@ export interface Resource { * 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; } /** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ @@ -153,7 +162,158 @@ export interface ErrorAdditionalInfo { readonly info?: Record; } -/** A linker to be updated. */ +/** a dryrun job to be updated. */ +export interface DryrunPatch { + /** The parameters of the dryrun */ + parameters?: DryrunParametersUnion; + /** + * the result of the dryrun + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly prerequisiteResults?: DryrunPrerequisiteResultUnion[]; + /** + * the preview of the operations for creation + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operationPreviews?: DryrunOperationPreview[]; + /** + * The provisioning state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; +} + +/** The list of Linker. */ +export interface ResourceList { + /** The Linker used to get the next page of Linker list. */ + nextLink?: string; + /** The list of Linkers. */ + value?: LinkerResource[]; +} + +/** The properties of the Linker. */ +export interface LinkerProperties { + /** The target service properties */ + targetService?: TargetServiceBaseUnion; + /** The authentication type. */ + authInfo?: AuthInfoBaseUnion; + /** The application client type */ + clientType?: ClientType; + /** + * The provisioning state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** The VNet solution. */ + vNetSolution?: VNetSolution; + /** An option to store secret value in secure place */ + secretStore?: SecretStore; + /** connection scope in source service. */ + scope?: string; + /** The network solution. */ + publicNetworkSolution?: PublicNetworkSolution; + /** The connection information consumed by applications, including secrets, connection strings. */ + configurationInfo?: ConfigurationInfo; +} + +/** The target service properties */ +export interface TargetServiceBase { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: + | "AzureResource" + | "ConfluentBootstrapServer" + | "SelfHostedServer" + | "ConfluentSchemaRegistry"; +} + +/** The authentication info */ +export interface AuthInfoBase { + /** Polymorphic discriminator, which specifies the different types this object can be */ + authType: + | "accessKey" + | "secret" + | "userAssignedIdentity" + | "systemAssignedIdentity" + | "servicePrincipalSecret" + | "servicePrincipalCertificate" + | "userAccount"; +} + +/** The VNet solution for linker */ +export interface VNetSolution { + /** Type of VNet solution. */ + type?: VNetSolutionType; + /** Indicates whether to clean up previous operation when Linker is updating or deleting */ + deleteOrUpdateBehavior?: DeleteOrUpdateBehavior; +} + +/** An option to store secret value in secure place */ +export interface SecretStore { + /** The key vault id to store secret */ + keyVaultId?: string; + /** The key vault secret name to store secret, only valid when storing one secret */ + keyVaultSecretName?: string; +} + +/** Indicates public network solution, include firewall rules */ +export interface PublicNetworkSolution { + /** Indicates whether to clean up previous operation(such as firewall rules) when Linker is updating or deleting */ + deleteOrUpdateBehavior?: DeleteOrUpdateBehavior; + /** Optional. Indicates public network solution. If enable, enable public network access of target service with best try. Default is enable. If optOut, opt out public network access configuration. */ + action?: ActionType; + /** Describe firewall rules of target service to make sure source application could connect to the target. */ + firewallRules?: FirewallRules; +} + +/** Target service's firewall rules. to allow connections from source service. */ +export interface FirewallRules { + /** This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. */ + ipRanges?: string[]; + /** Allow Azure services to access the target service if true. */ + azureServices?: AllowType; + /** Allow caller client IP to access the target service if true. the property is used when connecting local application to target service. */ + callerClientIP?: AllowType; +} + +/** The configuration information, used to generate configurations or save to applications */ +export interface ConfigurationInfo { + /** Indicates whether to clean up previous operation when Linker is updating or deleting */ + deleteOrUpdateBehavior?: DeleteOrUpdateBehavior; + /** Optional, indicate whether to apply configurations on source application. If enable, generate configurations and applied to the source application. Default is enable. If optOut, no configuration change will be made on source. */ + action?: ActionType; + /** Optional. A dictionary of default key name and customized key name mapping. If not specified, default key name will be used for generate configurations */ + customizedKeys?: { [propertyName: string]: string }; + /** Indicates some additional properties for dapr client type */ + daprProperties?: DaprProperties; + /** A dictionary of additional configurations to be added. Service will auto generate a set of basic configurations and this property is to full fill more customized configurations */ + additionalConfigurations?: { [propertyName: string]: string }; +} + +/** Indicates some additional properties for dapr client type */ +export interface DaprProperties { + /** The dapr component version */ + version?: string; + /** The dapr component type */ + componentType?: string; + /** The name of a secret store dapr to retrieve secret */ + secretStoreComponent?: string; + /** Additional dapr metadata */ + metadata?: DaprMetadata[]; + /** The dapr component scopes */ + scopes?: string[]; +} + +/** The dapr component metadata. */ +export interface DaprMetadata { + /** Metadata property name. */ + name?: string; + /** Metadata property value. */ + value?: string; + /** The secret name where dapr could get value */ + secretRef?: string; +} + +/** A Linker to be updated. */ export interface LinkerPatch { /** The target service properties */ targetService?: TargetServiceBaseUnion; @@ -172,11 +332,15 @@ export interface LinkerPatch { secretStore?: SecretStore; /** connection scope in source service. */ scope?: string; + /** The network solution. */ + publicNetworkSolution?: PublicNetworkSolution; + /** The connection information consumed by applications, including secrets, connection strings. */ + configurationInfo?: ConfigurationInfo; } -/** The validation operation result for a linker. */ +/** The validation operation result for a Linker. */ export interface ValidateOperationResult { - /** Validated linker id. */ + /** Validated Linker id. */ resourceId?: string; /** Validation operation status. */ status?: string; @@ -188,7 +352,7 @@ export interface ValidateOperationResult { reportStartTimeUtc?: Date; /** The end time of the validation report. */ reportEndTimeUtc?: Date; - /** The resource id of the linker source application. */ + /** The resource id of the Linker source application. */ sourceId?: string; /** The resource Id of target service. */ targetId?: string; @@ -198,7 +362,7 @@ export interface ValidateOperationResult { validationDetail?: ValidationResultItem[]; } -/** The validation item for a linker. */ +/** The validation item for a Linker. */ export interface ValidationResultItem { /** The validation item name. */ name?: string; @@ -213,7 +377,7 @@ export interface ValidationResultItem { } /** Configurations for source resource, include appSettings, connectionString and serviceBindings */ -export interface SourceConfigurationResult { +export interface ConfigurationResult { /** The configuration properties for source resource. */ configurations?: SourceConfiguration[]; } @@ -290,6 +454,39 @@ export interface OperationDisplay { readonly description?: string; } +/** Configuration Name list which will be set based on different target resource, client type, auth type. */ +export interface ConfigurationNameResult { + /** Expected configuration names for each target service. */ + value?: ConfigurationNameItem[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +export interface ConfigurationNameItem { + /** The target service provider name and resource name. */ + targetService?: string; + /** The client type for configuration names. */ + clientType?: ClientType; + /** The auth type. */ + authType?: AuthType; + /** Indicates some additional properties for dapr client type */ + daprProperties?: DaprProperties; + /** The configuration names to be set in compute service environment. */ + names?: ConfigurationName[]; +} + +/** The configuration names. */ +export interface ConfigurationName { + value?: string; + /** Description for the configuration name. */ + description?: string; + /** Represent the configuration is required or not */ + required?: boolean; +} + /** The azure resource properties */ export interface AzureResourcePropertiesBase { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -302,6 +499,47 @@ export interface SecretInfoBase { secretType: "rawValue" | "keyVaultSecretReference" | "keyVaultSecretUri"; } +/** The extra auth info required by Database AAD authentication. */ +export interface DatabaseAadAuthInfo { + /** Username created in the database which is mapped to a user in AAD. */ + userName?: string; +} + +/** The dryrun parameters for creation or update a linker */ +export interface CreateOrUpdateDryrunParameters + extends DryrunParameters, + LinkerProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + actionName: "createOrUpdate"; +} + +/** The represent of basic error */ +export interface BasicErrorDryrunPrerequisiteResult + extends DryrunPrerequisiteResult { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "basicError"; + /** The error code. */ + code?: string; + /** The error message. */ + message?: string; +} + +/** The represent of missing permissions */ +export interface PermissionsMissingDryrunPrerequisiteResult + extends DryrunPrerequisiteResult { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "permissionsMissing"; + /** The permission scope */ + scope?: string; + /** The permission list */ + permissions?: string[]; + /** The recommended role to resolve permissions missing */ + recommendedRole?: string; +} + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface ProxyResource extends Resource {} + /** The azure resource info when target service type is AzureResource */ export interface AzureResource extends TargetServiceBase { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -320,6 +558,14 @@ export interface ConfluentBootstrapServer extends TargetServiceBase { endpoint?: string; } +/** The service properties when target service type is SelfHostedServer */ +export interface SelfHostedServer extends TargetServiceBase { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "SelfHostedServer"; + /** The endpoint of service. */ + endpoint?: string; +} + /** The service properties when target service type is ConfluentSchemaRegistry */ export interface ConfluentSchemaRegistry extends TargetServiceBase { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -328,6 +574,14 @@ export interface ConfluentSchemaRegistry extends TargetServiceBase { endpoint?: string; } +/** The access key directly from target resource properties, which target service is Azure Resource, such as Microsoft.Storage */ +export interface AccessKeyInfoBase extends AuthInfoBase { + /** Polymorphic discriminator, which specifies the different types this object can be */ + authType: "accessKey"; + /** Permissions of the accessKey. `Read` and `Write` are for Azure Cosmos DB and Azure App Configuration, `Listen`, `Send` and `Manage` are for Azure Event Hub and Azure Service Bus. */ + permissions?: AccessKeyPermissions[]; +} + /** The authentication info when authType is secret */ export interface SecretAuthInfo extends AuthInfoBase { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -339,23 +593,37 @@ export interface SecretAuthInfo extends AuthInfoBase { } /** The authentication info when authType is userAssignedIdentity */ -export interface UserAssignedIdentityAuthInfo extends AuthInfoBase { +export interface UserAssignedIdentityAuthInfo + extends AuthInfoBase, + DatabaseAadAuthInfo { /** Polymorphic discriminator, which specifies the different types this object can be */ authType: "userAssignedIdentity"; /** Client Id for userAssignedIdentity. */ clientId?: string; /** Subscription id for userAssignedIdentity. */ subscriptionId?: string; + /** Indicates whether to clean up previous operation when Linker is updating or deleting */ + deleteOrUpdateBehavior?: DeleteOrUpdateBehavior; + /** Optional, this value specifies the Azure role to be assigned */ + roles?: string[]; } /** The authentication info when authType is systemAssignedIdentity */ -export interface SystemAssignedIdentityAuthInfo extends AuthInfoBase { +export interface SystemAssignedIdentityAuthInfo + extends AuthInfoBase, + DatabaseAadAuthInfo { /** Polymorphic discriminator, which specifies the different types this object can be */ authType: "systemAssignedIdentity"; + /** Indicates whether to clean up previous operation when Linker is updating or deleting */ + deleteOrUpdateBehavior?: DeleteOrUpdateBehavior; + /** Optional, this value specifies the Azure role to be assigned */ + roles?: string[]; } /** The authentication info when authType is servicePrincipal secret */ -export interface ServicePrincipalSecretAuthInfo extends AuthInfoBase { +export interface ServicePrincipalSecretAuthInfo + extends AuthInfoBase, + DatabaseAadAuthInfo { /** Polymorphic discriminator, which specifies the different types this object can be */ authType: "servicePrincipalSecret"; /** ServicePrincipal application clientId for servicePrincipal auth. */ @@ -364,6 +632,10 @@ export interface ServicePrincipalSecretAuthInfo extends AuthInfoBase { principalId: string; /** Secret for servicePrincipal auth. */ secret: string; + /** Indicates whether to clean up previous operation when Linker is updating or deleting */ + deleteOrUpdateBehavior?: DeleteOrUpdateBehavior; + /** Optional, this value specifies the Azure roles to be assigned. Automatically */ + roles?: string[]; } /** The authentication info when authType is servicePrincipal certificate */ @@ -376,10 +648,23 @@ export interface ServicePrincipalCertificateAuthInfo extends AuthInfoBase { principalId: string; /** ServicePrincipal certificate for servicePrincipal auth. */ certificate: string; + /** Indicates whether to clean up previous operation when Linker is updating or deleting */ + deleteOrUpdateBehavior?: DeleteOrUpdateBehavior; + /** Optional, this value specifies the Azure roles to be assigned. Automatically */ + roles?: string[]; } -/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export interface ProxyResource extends Resource {} +/** The authentication info when authType is user account */ +export interface UserAccountAuthInfo extends AuthInfoBase, DatabaseAadAuthInfo { + /** Polymorphic discriminator, which specifies the different types this object can be */ + authType: "userAccount"; + /** Principal Id for user account. */ + principalId?: string; + /** Indicates whether to clean up previous operation when Linker is updating or deleting */ + deleteOrUpdateBehavior?: DeleteOrUpdateBehavior; + /** Optional, this value specifies the Azure roles to be assigned. Automatically */ + roles?: string[]; +} /** The resource properties when type is Azure Key Vault */ export interface AzureKeyVaultProperties extends AzureResourcePropertiesBase { @@ -415,13 +700,29 @@ export interface KeyVaultSecretUriSecretInfo extends SecretInfoBase { value?: string; } -/** Linker of source and target resource */ -export interface LinkerResource extends ProxyResource { +/** a dryrun job resource */ +export interface DryrunResource extends ProxyResource { + /** The parameters of the dryrun */ + parameters?: DryrunParametersUnion; /** - * The system data. + * the result of the dryrun * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; + readonly prerequisiteResults?: DryrunPrerequisiteResultUnion[]; + /** + * the preview of the operations for creation + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operationPreviews?: DryrunOperationPreview[]; + /** + * The provisioning state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; +} + +/** Linker of source and target resource */ +export interface LinkerResource extends ProxyResource { /** The target service properties */ targetService?: TargetServiceBaseUnion; /** The authentication type. */ @@ -439,8 +740,90 @@ export interface LinkerResource extends ProxyResource { secretStore?: SecretStore; /** connection scope in source service. */ scope?: string; + /** The network solution. */ + publicNetworkSolution?: PublicNetworkSolution; + /** The connection information consumed by applications, including secrets, connection strings. */ + configurationInfo?: ConfigurationInfo; +} + +/** Known values of {@link DryrunActionName} that the service accepts. */ +export enum KnownDryrunActionName { + /** CreateOrUpdate */ + CreateOrUpdate = "createOrUpdate", } +/** + * Defines values for DryrunActionName. \ + * {@link KnownDryrunActionName} can be used interchangeably with DryrunActionName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **createOrUpdate** + */ +export type DryrunActionName = string; + +/** Known values of {@link DryrunPrerequisiteResultType} that the service accepts. */ +export enum KnownDryrunPrerequisiteResultType { + /** BasicError */ + BasicError = "basicError", + /** PermissionsMissing */ + PermissionsMissing = "permissionsMissing", +} + +/** + * Defines values for DryrunPrerequisiteResultType. \ + * {@link KnownDryrunPrerequisiteResultType} can be used interchangeably with DryrunPrerequisiteResultType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **basicError** \ + * **permissionsMissing** + */ +export type DryrunPrerequisiteResultType = string; + +/** Known values of {@link DryrunPreviewOperationType} that the service accepts. */ +export enum KnownDryrunPreviewOperationType { + /** ConfigConnection */ + ConfigConnection = "configConnection", + /** ConfigNetwork */ + ConfigNetwork = "configNetwork", + /** ConfigAuth */ + ConfigAuth = "configAuth", +} + +/** + * Defines values for DryrunPreviewOperationType. \ + * {@link KnownDryrunPreviewOperationType} can be used interchangeably with DryrunPreviewOperationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **configConnection** \ + * **configNetwork** \ + * **configAuth** + */ +export type DryrunPreviewOperationType = 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 TargetServiceType} that the service accepts. */ export enum KnownTargetServiceType { /** AzureResource */ @@ -448,7 +831,9 @@ export enum KnownTargetServiceType { /** ConfluentBootstrapServer */ ConfluentBootstrapServer = "ConfluentBootstrapServer", /** ConfluentSchemaRegistry */ - ConfluentSchemaRegistry = "ConfluentSchemaRegistry" + ConfluentSchemaRegistry = "ConfluentSchemaRegistry", + /** SelfHostedServer */ + SelfHostedServer = "SelfHostedServer", } /** @@ -458,7 +843,8 @@ export enum KnownTargetServiceType { * ### Known values supported by the service * **AzureResource** \ * **ConfluentBootstrapServer** \ - * **ConfluentSchemaRegistry** + * **ConfluentSchemaRegistry** \ + * **SelfHostedServer** */ export type TargetServiceType = string; @@ -473,7 +859,11 @@ export enum KnownAuthType { /** ServicePrincipalCertificate */ ServicePrincipalCertificate = "servicePrincipalCertificate", /** Secret */ - Secret = "secret" + Secret = "secret", + /** AccessKey */ + AccessKey = "accessKey", + /** UserAccount */ + UserAccount = "userAccount", } /** @@ -485,7 +875,9 @@ export enum KnownAuthType { * **userAssignedIdentity** \ * **servicePrincipalSecret** \ * **servicePrincipalCertificate** \ - * **secret** + * **secret** \ + * **accessKey** \ + * **userAccount** */ export type AuthType = string; @@ -510,7 +902,11 @@ export enum KnownClientType { /** Nodejs */ Nodejs = "nodejs", /** SpringBoot */ - SpringBoot = "springBoot" + SpringBoot = "springBoot", + /** KafkaSpringBoot */ + KafkaSpringBoot = "kafka-springBoot", + /** Dapr */ + Dapr = "dapr", } /** @@ -527,7 +923,9 @@ export enum KnownClientType { * **ruby** \ * **django** \ * **nodejs** \ - * **springBoot** + * **springBoot** \ + * **kafka-springBoot** \ + * **dapr** */ export type ClientType = string; @@ -536,7 +934,7 @@ export enum KnownVNetSolutionType { /** ServiceEndpoint */ ServiceEndpoint = "serviceEndpoint", /** PrivateLink */ - PrivateLink = "privateLink" + PrivateLink = "privateLink", } /** @@ -549,29 +947,62 @@ export enum KnownVNetSolutionType { */ export type VNetSolutionType = 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" +/** Known values of {@link DeleteOrUpdateBehavior} that the service accepts. */ +export enum KnownDeleteOrUpdateBehavior { + /** Default */ + Default = "Default", + /** ForcedCleanup */ + ForcedCleanup = "ForcedCleanup", } /** - * Defines values for CreatedByType. \ - * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * Defines values for DeleteOrUpdateBehavior. \ + * {@link KnownDeleteOrUpdateBehavior} can be used interchangeably with DeleteOrUpdateBehavior, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **User** \ - * **Application** \ - * **ManagedIdentity** \ - * **Key** + * **Default** \ + * **ForcedCleanup** */ -export type CreatedByType = string; +export type DeleteOrUpdateBehavior = string; + +/** Known values of {@link ActionType} that the service accepts. */ +export enum KnownActionType { + /** Internal */ + Internal = "Internal", + /** Enable */ + Enable = "enable", + /** OptOut */ + OptOut = "optOut", +} + +/** + * 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** \ + * **enable** \ + * **optOut** + */ +export type ActionType = string; + +/** Known values of {@link AllowType} that the service accepts. */ +export enum KnownAllowType { + /** True */ + True = "true", + /** False */ + False = "false", +} + +/** + * Defines values for AllowType. \ + * {@link KnownAllowType} can be used interchangeably with AllowType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **true** \ + * **false** + */ +export type AllowType = string; /** Known values of {@link ValidationResultStatus} that the service accepts. */ export enum KnownValidationResultStatus { @@ -580,7 +1011,7 @@ export enum KnownValidationResultStatus { /** Failure */ Failure = "failure", /** Warning */ - Warning = "warning" + Warning = "warning", } /** @@ -601,7 +1032,7 @@ export enum KnownOrigin { /** System */ System = "system", /** UserSystem */ - UserSystem = "user,system" + UserSystem = "user,system", } /** @@ -615,25 +1046,10 @@ export enum KnownOrigin { */ 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 AzureResourceType} that the service accepts. */ export enum KnownAzureResourceType { /** KeyVault */ - KeyVault = "KeyVault" + KeyVault = "KeyVault", } /** @@ -652,7 +1068,7 @@ export enum KnownSecretType { /** KeyVaultSecretUri */ KeyVaultSecretUri = "keyVaultSecretUri", /** KeyVaultSecretReference */ - KeyVaultSecretReference = "keyVaultSecretReference" + KeyVaultSecretReference = "keyVaultSecretReference", } /** @@ -666,11 +1082,163 @@ export enum KnownSecretType { */ export type SecretType = string; +/** Known values of {@link AccessKeyPermissions} that the service accepts. */ +export enum KnownAccessKeyPermissions { + /** Read */ + Read = "Read", + /** Write */ + Write = "Write", + /** Listen */ + Listen = "Listen", + /** Send */ + Send = "Send", + /** Manage */ + Manage = "Manage", +} + +/** + * Defines values for AccessKeyPermissions. \ + * {@link KnownAccessKeyPermissions} can be used interchangeably with AccessKeyPermissions, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Read** \ + * **Write** \ + * **Listen** \ + * **Send** \ + * **Manage** + */ +export type AccessKeyPermissions = string; + +/** Optional parameters. */ +export interface ConnectorListDryrunOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listDryrun operation. */ +export type ConnectorListDryrunResponse = DryrunList; + +/** Optional parameters. */ +export interface ConnectorGetDryrunOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getDryrun operation. */ +export type ConnectorGetDryrunResponse = DryrunResource; + +/** Optional parameters. */ +export interface ConnectorCreateDryrunOptionalParams + 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 createDryrun operation. */ +export type ConnectorCreateDryrunResponse = DryrunResource; + +/** Optional parameters. */ +export interface ConnectorUpdateDryrunOptionalParams + 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 updateDryrun operation. */ +export type ConnectorUpdateDryrunResponse = DryrunResource; + +/** Optional parameters. */ +export interface ConnectorDeleteDryrunOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ConnectorListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ConnectorListResponse = ResourceList; + +/** Optional parameters. */ +export interface ConnectorGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ConnectorGetResponse = LinkerResource; + +/** Optional parameters. */ +export interface ConnectorCreateOrUpdateOptionalParams + 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 ConnectorCreateOrUpdateResponse = LinkerResource; + +/** Optional parameters. */ +export interface ConnectorDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface ConnectorUpdateOptionalParams + 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 ConnectorUpdateResponse = LinkerResource; + +/** Optional parameters. */ +export interface ConnectorValidateOptionalParams + 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 validate operation. */ +export type ConnectorValidateResponse = ValidateOperationResult; + +/** Optional parameters. */ +export interface ConnectorGenerateConfigurationsOptionalParams + extends coreClient.OperationOptions { + /** Connection Info, including format, secret store, etc */ + parameters?: ConfigurationInfo; +} + +/** Contains response data for the generateConfigurations operation. */ +export type ConnectorGenerateConfigurationsResponse = ConfigurationResult; + +/** Optional parameters. */ +export interface ConnectorListDryrunNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listDryrunNext operation. */ +export type ConnectorListDryrunNextResponse = DryrunList; + +/** Optional parameters. */ +export interface ConnectorListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ConnectorListNextResponse = ResourceList; + /** Optional parameters. */ export interface LinkerListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ -export type LinkerListResponse = LinkerList; +export type LinkerListResponse = ResourceList; /** Optional parameters. */ export interface LinkerGetOptionalParams extends coreClient.OperationOptions {} @@ -728,14 +1296,73 @@ export interface LinkerListConfigurationsOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listConfigurations operation. */ -export type LinkerListConfigurationsResponse = SourceConfigurationResult; +export type LinkerListConfigurationsResponse = ConfigurationResult; /** Optional parameters. */ export interface LinkerListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type LinkerListNextResponse = LinkerList; +export type LinkerListNextResponse = ResourceList; + +/** Optional parameters. */ +export interface LinkersListDryrunOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listDryrun operation. */ +export type LinkersListDryrunResponse = DryrunList; + +/** Optional parameters. */ +export interface LinkersGetDryrunOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getDryrun operation. */ +export type LinkersGetDryrunResponse = DryrunResource; + +/** Optional parameters. */ +export interface LinkersCreateDryrunOptionalParams + 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 createDryrun operation. */ +export type LinkersCreateDryrunResponse = DryrunResource; + +/** Optional parameters. */ +export interface LinkersUpdateDryrunOptionalParams + 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 updateDryrun operation. */ +export type LinkersUpdateDryrunResponse = DryrunResource; + +/** Optional parameters. */ +export interface LinkersDeleteDryrunOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface LinkersGenerateConfigurationsOptionalParams + extends coreClient.OperationOptions { + /** Connection Info, including format, secret store, etc */ + parameters?: ConfigurationInfo; +} + +/** Contains response data for the generateConfigurations operation. */ +export type LinkersGenerateConfigurationsResponse = ConfigurationResult; + +/** Optional parameters. */ +export interface LinkersListDryrunNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listDryrunNext operation. */ +export type LinkersListDryrunNextResponse = DryrunList; /** Optional parameters. */ export interface OperationsListOptionalParams @@ -751,6 +1378,25 @@ export interface OperationsListNextOptionalParams /** Contains response data for the listNext operation. */ export type OperationsListNextResponse = OperationListResult; +/** Optional parameters. */ +export interface ConfigurationNamesListOptionalParams + extends coreClient.OperationOptions { + /** OData filter options. */ + filter?: string; + /** OData skipToken option for pagination. */ + skipToken?: string; +} + +/** Contains response data for the list operation. */ +export type ConfigurationNamesListResponse = ConfigurationNameResult; + +/** Optional parameters. */ +export interface ConfigurationNamesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ConfigurationNamesListNextResponse = ConfigurationNameResult; + /** Optional parameters. */ export interface ServiceLinkerManagementClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/servicelinker/arm-servicelinker/src/models/mappers.ts b/sdk/servicelinker/arm-servicelinker/src/models/mappers.ts index 606d95ae720c..197a250054c6 100644 --- a/sdk/servicelinker/arm-servicelinker/src/models/mappers.ts +++ b/sdk/servicelinker/arm-servicelinker/src/models/mappers.ts @@ -8,17 +8,17 @@ import * as coreClient from "@azure/core-client"; -export const LinkerList: coreClient.CompositeMapper = { +export const DryrunList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LinkerList", + className: "DryrunList", modelProperties: { nextLink: { serializedName: "nextLink", nullable: true, type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", @@ -27,87 +27,131 @@ export const LinkerList: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "LinkerResource" - } - } - } - } - } - } + className: "DryrunResource", + }, + }, + }, + }, + }, + }, }; -export const TargetServiceBase: coreClient.CompositeMapper = { +export const DryrunParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TargetServiceBase", - uberParent: "TargetServiceBase", + className: "DryrunParameters", + uberParent: "DryrunParameters", polymorphicDiscriminator: { - serializedName: "type", - clientName: "type" + serializedName: "actionName", + clientName: "actionName", }, modelProperties: { - type: { - serializedName: "type", + actionName: { + serializedName: "actionName", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; -export const AuthInfoBase: coreClient.CompositeMapper = { +export const DryrunPrerequisiteResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AuthInfoBase", - uberParent: "AuthInfoBase", + className: "DryrunPrerequisiteResult", + uberParent: "DryrunPrerequisiteResult", polymorphicDiscriminator: { - serializedName: "authType", - clientName: "authType" + serializedName: "type", + clientName: "type", }, modelProperties: { - authType: { - serializedName: "authType", + type: { + serializedName: "type", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; -export const VNetSolution: coreClient.CompositeMapper = { +export const DryrunOperationPreview: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VNetSolution", + className: "DryrunOperationPreview", modelProperties: { - type: { - serializedName: "type", - nullable: true, + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + operationType: { + serializedName: "operationType", + type: { + name: "String", + }, + }, + description: { + serializedName: "description", + type: { + name: "String", + }, + }, + action: { + serializedName: "action", + type: { + name: "String", + }, + }, + scope: { + serializedName: "scope", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; -export const SecretStore: coreClient.CompositeMapper = { +export const Resource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SecretStore", + className: "Resource", modelProperties: { - keyVaultId: { - serializedName: "keyVaultId", - nullable: true, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + type: { + serializedName: "type", + readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + }, + }, + }, + }, }; export const SystemData: coreClient.CompositeMapper = { @@ -118,71 +162,41 @@ export const SystemData: coreClient.CompositeMapper = { createdBy: { serializedName: "createdBy", type: { - name: "String" - } + name: "String", + }, }, createdByType: { serializedName: "createdByType", type: { - name: "String" - } + name: "String", + }, }, createdAt: { serializedName: "createdAt", type: { - name: "DateTime" - } + name: "DateTime", + }, }, lastModifiedBy: { serializedName: "lastModifiedBy", type: { - name: "String" - } + name: "String", + }, }, lastModifiedByType: { serializedName: "lastModifiedByType", type: { - name: "String" - } + name: "String", + }, }, lastModifiedAt: { serializedName: "lastModifiedAt", type: { - name: "DateTime" - } - } - } - } -}; - -export const Resource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Resource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } + name: "DateTime", + }, }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - } - } - } + }, + }, }; export const ErrorResponse: coreClient.CompositeMapper = { @@ -194,11 +208,11 @@ export const ErrorResponse: coreClient.CompositeMapper = { serializedName: "error", type: { name: "Composite", - className: "ErrorDetail" - } - } - } - } + className: "ErrorDetail", + }, + }, + }, + }, }; export const ErrorDetail: coreClient.CompositeMapper = { @@ -210,22 +224,22 @@ export const ErrorDetail: coreClient.CompositeMapper = { serializedName: "code", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, message: { serializedName: "message", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, target: { serializedName: "target", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, details: { serializedName: "details", @@ -235,10 +249,10 @@ export const ErrorDetail: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ErrorDetail" - } - } - } + className: "ErrorDetail", + }, + }, + }, }, additionalInfo: { serializedName: "additionalInfo", @@ -248,13 +262,13 @@ export const ErrorDetail: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ErrorAdditionalInfo" - } - } - } - } - } - } + className: "ErrorAdditionalInfo", + }, + }, + }, + }, + }, + }, }; export const ErrorAdditionalInfo: coreClient.CompositeMapper = { @@ -266,19 +280,436 @@ export const ErrorAdditionalInfo: coreClient.CompositeMapper = { serializedName: "type", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, info: { serializedName: "info", readOnly: true, type: { name: "Dictionary", - value: { type: { name: "any" } } - } - } - } - } + value: { type: { name: "any" } }, + }, + }, + }, + }, +}; + +export const DryrunPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DryrunPatch", + modelProperties: { + parameters: { + serializedName: "properties.parameters", + type: { + name: "Composite", + className: "DryrunParameters", + }, + }, + prerequisiteResults: { + serializedName: "properties.prerequisiteResults", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DryrunPrerequisiteResult", + }, + }, + }, + }, + operationPreviews: { + serializedName: "properties.operationPreviews", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DryrunOperationPreview", + }, + }, + }, + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ResourceList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceList", + modelProperties: { + nextLink: { + serializedName: "nextLink", + nullable: true, + type: { + name: "String", + }, + }, + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LinkerResource", + }, + }, + }, + }, + }, + }, +}; + +export const LinkerProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LinkerProperties", + modelProperties: { + targetService: { + serializedName: "targetService", + type: { + name: "Composite", + className: "TargetServiceBase", + }, + }, + authInfo: { + serializedName: "authInfo", + type: { + name: "Composite", + className: "AuthInfoBase", + }, + }, + clientType: { + serializedName: "clientType", + type: { + name: "String", + }, + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String", + }, + }, + vNetSolution: { + serializedName: "vNetSolution", + type: { + name: "Composite", + className: "VNetSolution", + }, + }, + secretStore: { + serializedName: "secretStore", + type: { + name: "Composite", + className: "SecretStore", + }, + }, + scope: { + serializedName: "scope", + nullable: true, + type: { + name: "String", + }, + }, + publicNetworkSolution: { + serializedName: "publicNetworkSolution", + type: { + name: "Composite", + className: "PublicNetworkSolution", + }, + }, + configurationInfo: { + serializedName: "configurationInfo", + type: { + name: "Composite", + className: "ConfigurationInfo", + }, + }, + }, + }, +}; + +export const TargetServiceBase: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TargetServiceBase", + uberParent: "TargetServiceBase", + polymorphicDiscriminator: { + serializedName: "type", + clientName: "type", + }, + modelProperties: { + type: { + serializedName: "type", + required: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const AuthInfoBase: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AuthInfoBase", + uberParent: "AuthInfoBase", + polymorphicDiscriminator: { + serializedName: "authType", + clientName: "authType", + }, + modelProperties: { + authType: { + serializedName: "authType", + required: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const VNetSolution: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VNetSolution", + modelProperties: { + type: { + serializedName: "type", + nullable: true, + type: { + name: "String", + }, + }, + deleteOrUpdateBehavior: { + serializedName: "deleteOrUpdateBehavior", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const SecretStore: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecretStore", + modelProperties: { + keyVaultId: { + serializedName: "keyVaultId", + nullable: true, + type: { + name: "String", + }, + }, + keyVaultSecretName: { + serializedName: "keyVaultSecretName", + nullable: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const PublicNetworkSolution: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PublicNetworkSolution", + modelProperties: { + deleteOrUpdateBehavior: { + serializedName: "deleteOrUpdateBehavior", + type: { + name: "String", + }, + }, + action: { + serializedName: "action", + type: { + name: "String", + }, + }, + firewallRules: { + serializedName: "firewallRules", + type: { + name: "Composite", + className: "FirewallRules", + }, + }, + }, + }, +}; + +export const FirewallRules: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FirewallRules", + modelProperties: { + ipRanges: { + serializedName: "ipRanges", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + azureServices: { + serializedName: "azureServices", + type: { + name: "String", + }, + }, + callerClientIP: { + serializedName: "callerClientIP", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ConfigurationInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfigurationInfo", + modelProperties: { + deleteOrUpdateBehavior: { + serializedName: "deleteOrUpdateBehavior", + type: { + name: "String", + }, + }, + action: { + serializedName: "action", + type: { + name: "String", + }, + }, + customizedKeys: { + serializedName: "customizedKeys", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + daprProperties: { + serializedName: "daprProperties", + type: { + name: "Composite", + className: "DaprProperties", + }, + }, + additionalConfigurations: { + serializedName: "additionalConfigurations", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + }, + }, +}; + +export const DaprProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DaprProperties", + modelProperties: { + version: { + serializedName: "version", + nullable: true, + type: { + name: "String", + }, + }, + componentType: { + serializedName: "componentType", + nullable: true, + type: { + name: "String", + }, + }, + secretStoreComponent: { + serializedName: "secretStoreComponent", + nullable: true, + type: { + name: "String", + }, + }, + metadata: { + serializedName: "metadata", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DaprMetadata", + }, + }, + }, + }, + scopes: { + serializedName: "scopes", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const DaprMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DaprMetadata", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + value: { + serializedName: "value", + type: { + name: "String", + }, + }, + secretRef: { + serializedName: "secretRef", + type: { + name: "String", + }, + }, + }, + }, }; export const LinkerPatch: coreClient.CompositeMapper = { @@ -290,52 +721,66 @@ export const LinkerPatch: coreClient.CompositeMapper = { serializedName: "properties.targetService", type: { name: "Composite", - className: "TargetServiceBase" - } + className: "TargetServiceBase", + }, }, authInfo: { serializedName: "properties.authInfo", type: { name: "Composite", - className: "AuthInfoBase" - } + className: "AuthInfoBase", + }, }, clientType: { serializedName: "properties.clientType", type: { - name: "String" - } + name: "String", + }, }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, vNetSolution: { serializedName: "properties.vNetSolution", type: { name: "Composite", - className: "VNetSolution" - } + className: "VNetSolution", + }, }, secretStore: { serializedName: "properties.secretStore", type: { name: "Composite", - className: "SecretStore" - } + className: "SecretStore", + }, }, scope: { serializedName: "properties.scope", nullable: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + publicNetworkSolution: { + serializedName: "properties.publicNetworkSolution", + type: { + name: "Composite", + className: "PublicNetworkSolution", + }, + }, + configurationInfo: { + serializedName: "properties.configurationInfo", + type: { + name: "Composite", + className: "ConfigurationInfo", + }, + }, + }, + }, }; export const ValidateOperationResult: coreClient.CompositeMapper = { @@ -347,64 +792,64 @@ export const ValidateOperationResult: coreClient.CompositeMapper = { serializedName: "resourceId", nullable: true, type: { - name: "String" - } + name: "String", + }, }, status: { serializedName: "status", nullable: true, type: { - name: "String" - } + name: "String", + }, }, linkerName: { serializedName: "properties.linkerName", nullable: true, type: { - name: "String" - } + name: "String", + }, }, isConnectionAvailable: { serializedName: "properties.isConnectionAvailable", nullable: true, type: { - name: "Boolean" - } + name: "Boolean", + }, }, reportStartTimeUtc: { serializedName: "properties.reportStartTimeUtc", nullable: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, reportEndTimeUtc: { serializedName: "properties.reportEndTimeUtc", nullable: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, sourceId: { serializedName: "properties.sourceId", nullable: true, type: { - name: "String" - } + name: "String", + }, }, targetId: { serializedName: "properties.targetId", nullable: true, type: { - name: "String" - } + name: "String", + }, }, authType: { serializedName: "properties.authType", nullable: true, type: { - name: "String" - } + name: "String", + }, }, validationDetail: { serializedName: "properties.validationDetail", @@ -414,13 +859,13 @@ export const ValidateOperationResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ValidationResultItem" - } - } - } - } - } - } + className: "ValidationResultItem", + }, + }, + }, + }, + }, + }, }; export const ValidationResultItem: coreClient.CompositeMapper = { @@ -431,45 +876,45 @@ export const ValidationResultItem: coreClient.CompositeMapper = { name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, description: { serializedName: "description", nullable: true, type: { - name: "String" - } + name: "String", + }, }, result: { serializedName: "result", nullable: true, type: { - name: "String" - } + name: "String", + }, }, errorMessage: { serializedName: "errorMessage", nullable: true, type: { - name: "String" - } + name: "String", + }, }, errorCode: { serializedName: "errorCode", nullable: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; -export const SourceConfigurationResult: coreClient.CompositeMapper = { +export const ConfigurationResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SourceConfigurationResult", + className: "ConfigurationResult", modelProperties: { configurations: { serializedName: "configurations", @@ -478,13 +923,13 @@ export const SourceConfigurationResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SourceConfiguration" - } - } - } - } - } - } + className: "SourceConfiguration", + }, + }, + }, + }, + }, + }, }; export const SourceConfiguration: coreClient.CompositeMapper = { @@ -495,18 +940,18 @@ export const SourceConfiguration: coreClient.CompositeMapper = { name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", nullable: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const OperationListResult: coreClient.CompositeMapper = { @@ -522,20 +967,20 @@ export const OperationListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Operation" - } - } - } + className: "Operation", + }, + }, + }, }, nextLink: { serializedName: "nextLink", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const Operation: coreClient.CompositeMapper = { @@ -547,39 +992,39 @@ export const Operation: coreClient.CompositeMapper = { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, isDataAction: { serializedName: "isDataAction", readOnly: true, type: { - name: "Boolean" - } + name: "Boolean", + }, }, display: { serializedName: "display", type: { name: "Composite", - className: "OperationDisplay" - } + className: "OperationDisplay", + }, }, origin: { serializedName: "origin", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, actionType: { serializedName: "actionType", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const OperationDisplay: coreClient.CompositeMapper = { @@ -591,32 +1036,137 @@ export const OperationDisplay: coreClient.CompositeMapper = { serializedName: "provider", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, resource: { serializedName: "resource", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, operation: { serializedName: "operation", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, description: { serializedName: "description", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, +}; + +export const ConfigurationNameResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfigurationNameResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConfigurationNameItem", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ConfigurationNameItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfigurationNameItem", + modelProperties: { + targetService: { + serializedName: "properties.targetService", + nullable: true, + type: { + name: "String", + }, + }, + clientType: { + serializedName: "properties.clientType", + nullable: true, + type: { + name: "String", + }, + }, + authType: { + serializedName: "properties.authType", + nullable: true, + type: { + name: "String", + }, + }, + daprProperties: { + serializedName: "properties.daprProperties", + type: { + name: "Composite", + className: "DaprProperties", + }, + }, + names: { + serializedName: "properties.names", + nullable: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConfigurationName", + }, + }, + }, + }, + }, + }, +}; + +export const ConfigurationName: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConfigurationName", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "String", + }, + }, + description: { + serializedName: "description", + type: { + name: "String", + }, + }, + required: { + serializedName: "required", + type: { + name: "Boolean", + }, + }, + }, + }, }; export const AzureResourcePropertiesBase: coreClient.CompositeMapper = { @@ -626,18 +1176,18 @@ export const AzureResourcePropertiesBase: coreClient.CompositeMapper = { uberParent: "AzureResourcePropertiesBase", polymorphicDiscriminator: { serializedName: "type", - clientName: "type" + clientName: "type", }, modelProperties: { type: { serializedName: "type", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const SecretInfoBase: coreClient.CompositeMapper = { @@ -647,18 +1197,122 @@ export const SecretInfoBase: coreClient.CompositeMapper = { uberParent: "SecretInfoBase", polymorphicDiscriminator: { serializedName: "secretType", - clientName: "secretType" + clientName: "secretType", }, modelProperties: { secretType: { serializedName: "secretType", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, +}; + +export const DatabaseAadAuthInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabaseAadAuthInfo", + modelProperties: { + userName: { + serializedName: "userName", + nullable: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const CreateOrUpdateDryrunParameters: coreClient.CompositeMapper = { + serializedName: "createOrUpdate", + type: { + name: "Composite", + className: "CreateOrUpdateDryrunParameters", + uberParent: "DryrunParameters", + polymorphicDiscriminator: DryrunParameters.type.polymorphicDiscriminator, + modelProperties: { + ...DryrunParameters.type.modelProperties, + ...LinkerProperties.type.modelProperties, + }, + }, +}; + +export const BasicErrorDryrunPrerequisiteResult: coreClient.CompositeMapper = { + serializedName: "basicError", + type: { + name: "Composite", + className: "BasicErrorDryrunPrerequisiteResult", + uberParent: "DryrunPrerequisiteResult", + polymorphicDiscriminator: + DryrunPrerequisiteResult.type.polymorphicDiscriminator, + modelProperties: { + ...DryrunPrerequisiteResult.type.modelProperties, + code: { + serializedName: "code", + type: { + name: "String", + }, + }, + message: { + serializedName: "message", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const PermissionsMissingDryrunPrerequisiteResult: coreClient.CompositeMapper = + { + serializedName: "permissionsMissing", + type: { + name: "Composite", + className: "PermissionsMissingDryrunPrerequisiteResult", + uberParent: "DryrunPrerequisiteResult", + polymorphicDiscriminator: + DryrunPrerequisiteResult.type.polymorphicDiscriminator, + modelProperties: { + ...DryrunPrerequisiteResult.type.modelProperties, + scope: { + serializedName: "scope", + type: { + name: "String", + }, + }, + permissions: { + serializedName: "permissions", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + recommendedRole: { + serializedName: "recommendedRole", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties, + }, + }, }; export const AzureResource: coreClient.CompositeMapper = { @@ -673,18 +1327,18 @@ export const AzureResource: coreClient.CompositeMapper = { id: { serializedName: "id", type: { - name: "String" - } + name: "String", + }, }, resourceProperties: { serializedName: "resourceProperties", type: { name: "Composite", - className: "AzureResourcePropertiesBase" - } - } - } - } + className: "AzureResourcePropertiesBase", + }, + }, + }, + }, }; export const ConfluentBootstrapServer: coreClient.CompositeMapper = { @@ -699,11 +1353,30 @@ export const ConfluentBootstrapServer: coreClient.CompositeMapper = { endpoint: { serializedName: "endpoint", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, +}; + +export const SelfHostedServer: coreClient.CompositeMapper = { + serializedName: "SelfHostedServer", + type: { + name: "Composite", + className: "SelfHostedServer", + uberParent: "TargetServiceBase", + polymorphicDiscriminator: TargetServiceBase.type.polymorphicDiscriminator, + modelProperties: { + ...TargetServiceBase.type.modelProperties, + endpoint: { + serializedName: "endpoint", + type: { + name: "String", + }, + }, + }, + }, }; export const ConfluentSchemaRegistry: coreClient.CompositeMapper = { @@ -718,11 +1391,35 @@ export const ConfluentSchemaRegistry: coreClient.CompositeMapper = { endpoint: { serializedName: "endpoint", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, +}; + +export const AccessKeyInfoBase: coreClient.CompositeMapper = { + serializedName: "accessKey", + type: { + name: "Composite", + className: "AccessKeyInfoBase", + uberParent: "AuthInfoBase", + polymorphicDiscriminator: AuthInfoBase.type.polymorphicDiscriminator, + modelProperties: { + ...AuthInfoBase.type.modelProperties, + permissions: { + serializedName: "permissions", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, }; export const SecretAuthInfo: coreClient.CompositeMapper = { @@ -738,18 +1435,18 @@ export const SecretAuthInfo: coreClient.CompositeMapper = { serializedName: "name", nullable: true, type: { - name: "String" - } + name: "String", + }, }, secretInfo: { serializedName: "secretInfo", type: { name: "Composite", - className: "SecretInfoBase" - } - } - } - } + className: "SecretInfoBase", + }, + }, + }, + }, }; export const UserAssignedIdentityAuthInfo: coreClient.CompositeMapper = { @@ -761,20 +1458,38 @@ export const UserAssignedIdentityAuthInfo: coreClient.CompositeMapper = { polymorphicDiscriminator: AuthInfoBase.type.polymorphicDiscriminator, modelProperties: { ...AuthInfoBase.type.modelProperties, + ...DatabaseAadAuthInfo.type.modelProperties, clientId: { serializedName: "clientId", type: { - name: "String" - } + name: "String", + }, }, subscriptionId: { serializedName: "subscriptionId", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + deleteOrUpdateBehavior: { + serializedName: "deleteOrUpdateBehavior", + type: { + name: "String", + }, + }, + roles: { + serializedName: "roles", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, }; export const SystemAssignedIdentityAuthInfo: coreClient.CompositeMapper = { @@ -785,9 +1500,27 @@ export const SystemAssignedIdentityAuthInfo: coreClient.CompositeMapper = { uberParent: "AuthInfoBase", polymorphicDiscriminator: AuthInfoBase.type.polymorphicDiscriminator, modelProperties: { - ...AuthInfoBase.type.modelProperties - } - } + ...AuthInfoBase.type.modelProperties, + ...DatabaseAadAuthInfo.type.modelProperties, + deleteOrUpdateBehavior: { + serializedName: "deleteOrUpdateBehavior", + type: { + name: "String", + }, + }, + roles: { + serializedName: "roles", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, }; export const ServicePrincipalSecretAuthInfo: coreClient.CompositeMapper = { @@ -799,29 +1532,47 @@ export const ServicePrincipalSecretAuthInfo: coreClient.CompositeMapper = { polymorphicDiscriminator: AuthInfoBase.type.polymorphicDiscriminator, modelProperties: { ...AuthInfoBase.type.modelProperties, + ...DatabaseAadAuthInfo.type.modelProperties, clientId: { serializedName: "clientId", required: true, type: { - name: "String" - } + name: "String", + }, }, principalId: { serializedName: "principalId", required: true, type: { - name: "String" - } + name: "String", + }, }, secret: { serializedName: "secret", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + deleteOrUpdateBehavior: { + serializedName: "deleteOrUpdateBehavior", + type: { + name: "String", + }, + }, + roles: { + serializedName: "roles", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, }; export const ServicePrincipalCertificateAuthInfo: coreClient.CompositeMapper = { @@ -837,35 +1588,79 @@ export const ServicePrincipalCertificateAuthInfo: coreClient.CompositeMapper = { serializedName: "clientId", required: true, type: { - name: "String" - } + name: "String", + }, }, principalId: { serializedName: "principalId", required: true, type: { - name: "String" - } + name: "String", + }, }, certificate: { serializedName: "certificate", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + deleteOrUpdateBehavior: { + serializedName: "deleteOrUpdateBehavior", + type: { + name: "String", + }, + }, + roles: { + serializedName: "roles", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, }; -export const ProxyResource: coreClient.CompositeMapper = { +export const UserAccountAuthInfo: coreClient.CompositeMapper = { + serializedName: "userAccount", type: { name: "Composite", - className: "ProxyResource", + className: "UserAccountAuthInfo", + uberParent: "AuthInfoBase", + polymorphicDiscriminator: AuthInfoBase.type.polymorphicDiscriminator, modelProperties: { - ...Resource.type.modelProperties - } - } + ...AuthInfoBase.type.modelProperties, + ...DatabaseAadAuthInfo.type.modelProperties, + principalId: { + serializedName: "principalId", + type: { + name: "String", + }, + }, + deleteOrUpdateBehavior: { + serializedName: "deleteOrUpdateBehavior", + type: { + name: "String", + }, + }, + roles: { + serializedName: "roles", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, }; export const AzureKeyVaultProperties: coreClient.CompositeMapper = { @@ -882,11 +1677,11 @@ export const AzureKeyVaultProperties: coreClient.CompositeMapper = { serializedName: "connectAsKubernetesCsiDriver", nullable: true, type: { - name: "Boolean" - } - } - } - } + name: "Boolean", + }, + }, + }, + }, }; export const ValueSecretInfo: coreClient.CompositeMapper = { @@ -902,11 +1697,11 @@ export const ValueSecretInfo: coreClient.CompositeMapper = { serializedName: "value", nullable: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const KeyVaultSecretReferenceSecretInfo: coreClient.CompositeMapper = { @@ -921,18 +1716,18 @@ export const KeyVaultSecretReferenceSecretInfo: coreClient.CompositeMapper = { name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, version: { serializedName: "version", nullable: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const KeyVaultSecretUriSecretInfo: coreClient.CompositeMapper = { @@ -947,93 +1742,160 @@ export const KeyVaultSecretUriSecretInfo: coreClient.CompositeMapper = { value: { serializedName: "value", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; -export const LinkerResource: coreClient.CompositeMapper = { +export const DryrunResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LinkerResource", + className: "DryrunResource", modelProperties: { ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", + parameters: { + serializedName: "properties.parameters", type: { name: "Composite", - className: "SystemData" - } + className: "DryrunParameters", + }, + }, + prerequisiteResults: { + serializedName: "properties.prerequisiteResults", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DryrunPrerequisiteResult", + }, + }, + }, + }, + operationPreviews: { + serializedName: "properties.operationPreviews", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DryrunOperationPreview", + }, + }, + }, + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String", + }, }, + }, + }, +}; + +export const LinkerResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LinkerResource", + modelProperties: { + ...ProxyResource.type.modelProperties, targetService: { serializedName: "properties.targetService", type: { name: "Composite", - className: "TargetServiceBase" - } + className: "TargetServiceBase", + }, }, authInfo: { serializedName: "properties.authInfo", type: { name: "Composite", - className: "AuthInfoBase" - } + className: "AuthInfoBase", + }, }, clientType: { serializedName: "properties.clientType", type: { - name: "String" - } + name: "String", + }, }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, vNetSolution: { serializedName: "properties.vNetSolution", type: { name: "Composite", - className: "VNetSolution" - } + className: "VNetSolution", + }, }, secretStore: { serializedName: "properties.secretStore", type: { name: "Composite", - className: "SecretStore" - } + className: "SecretStore", + }, }, scope: { serializedName: "properties.scope", nullable: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + publicNetworkSolution: { + serializedName: "properties.publicNetworkSolution", + type: { + name: "Composite", + className: "PublicNetworkSolution", + }, + }, + configurationInfo: { + serializedName: "properties.configurationInfo", + type: { + name: "Composite", + className: "ConfigurationInfo", + }, + }, + }, + }, }; export let discriminators = { + DryrunParameters: DryrunParameters, + DryrunPrerequisiteResult: DryrunPrerequisiteResult, TargetServiceBase: TargetServiceBase, AuthInfoBase: AuthInfoBase, AzureResourcePropertiesBase: AzureResourcePropertiesBase, SecretInfoBase: SecretInfoBase, + "DryrunParameters.createOrUpdate": CreateOrUpdateDryrunParameters, + "DryrunPrerequisiteResult.basicError": BasicErrorDryrunPrerequisiteResult, + "DryrunPrerequisiteResult.permissionsMissing": + PermissionsMissingDryrunPrerequisiteResult, "TargetServiceBase.AzureResource": AzureResource, "TargetServiceBase.ConfluentBootstrapServer": ConfluentBootstrapServer, + "TargetServiceBase.SelfHostedServer": SelfHostedServer, "TargetServiceBase.ConfluentSchemaRegistry": ConfluentSchemaRegistry, + "AuthInfoBase.accessKey": AccessKeyInfoBase, "AuthInfoBase.secret": SecretAuthInfo, "AuthInfoBase.userAssignedIdentity": UserAssignedIdentityAuthInfo, "AuthInfoBase.systemAssignedIdentity": SystemAssignedIdentityAuthInfo, "AuthInfoBase.servicePrincipalSecret": ServicePrincipalSecretAuthInfo, - "AuthInfoBase.servicePrincipalCertificate": ServicePrincipalCertificateAuthInfo, + "AuthInfoBase.servicePrincipalCertificate": + ServicePrincipalCertificateAuthInfo, + "AuthInfoBase.userAccount": UserAccountAuthInfo, "AzureResourcePropertiesBase.KeyVault": AzureKeyVaultProperties, "SecretInfoBase.rawValue": ValueSecretInfo, "SecretInfoBase.keyVaultSecretReference": KeyVaultSecretReferenceSecretInfo, - "SecretInfoBase.keyVaultSecretUri": KeyVaultSecretUriSecretInfo + "SecretInfoBase.keyVaultSecretUri": KeyVaultSecretUriSecretInfo, }; diff --git a/sdk/servicelinker/arm-servicelinker/src/models/parameters.ts b/sdk/servicelinker/arm-servicelinker/src/models/parameters.ts index ab0e3f41bd86..7a9b57e2c9a4 100644 --- a/sdk/servicelinker/arm-servicelinker/src/models/parameters.ts +++ b/sdk/servicelinker/arm-servicelinker/src/models/parameters.ts @@ -9,11 +9,14 @@ import { OperationParameter, OperationURLParameter, - OperationQueryParameter + OperationQueryParameter, } from "@azure/core-client"; import { + DryrunResource as DryrunResourceMapper, + DryrunPatch as DryrunPatchMapper, LinkerResource as LinkerResourceMapper, - LinkerPatch as LinkerPatchMapper + LinkerPatch as LinkerPatchMapper, + ConfigurationInfo as ConfigurationInfoMapper, } from "../models/mappers"; export const accept: OperationParameter = { @@ -23,9 +26,9 @@ export const accept: OperationParameter = { isConstant: true, serializedName: "Accept", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const $host: OperationURLParameter = { @@ -34,45 +37,76 @@ export const $host: OperationURLParameter = { serializedName: "$host", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; -export const resourceUri: OperationURLParameter = { - parameterPath: "resourceUri", +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", mapper: { - serializedName: "resourceUri", + constraints: { + MinLength: 1, + }, + serializedName: "subscriptionId", + required: true, + type: { + name: "String", + }, + }, +}; + +export const resourceGroupName: OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + constraints: { + MaxLength: 90, + MinLength: 1, + }, + serializedName: "resourceGroupName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const location: OperationURLParameter = { + parameterPath: "location", + mapper: { + constraints: { + MinLength: 1, + }, + serializedName: "location", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true }; export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-05-01", + defaultValue: "2022-11-01-preview", isConstant: true, serializedName: "api-version", type: { - name: "String" - } - } + name: "String", + }, + }, }; -export const linkerName: OperationURLParameter = { - parameterPath: "linkerName", +export const dryrunName: OperationURLParameter = { + parameterPath: "dryrunName", mapper: { - serializedName: "linkerName", + serializedName: "dryrunName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const contentType: OperationParameter = { @@ -82,19 +116,45 @@ export const contentType: OperationParameter = { isConstant: true, serializedName: "Content-Type", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const parameters: OperationParameter = { parameterPath: "parameters", - mapper: LinkerResourceMapper + mapper: DryrunResourceMapper, }; export const parameters1: OperationParameter = { parameterPath: "parameters", - mapper: LinkerPatchMapper + mapper: DryrunPatchMapper, +}; + +export const connectorName: OperationURLParameter = { + parameterPath: "connectorName", + mapper: { + serializedName: "connectorName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const parameters2: OperationParameter = { + parameterPath: "parameters", + mapper: LinkerResourceMapper, +}; + +export const parameters3: OperationParameter = { + parameterPath: "parameters", + mapper: LinkerPatchMapper, +}; + +export const parameters4: OperationParameter = { + parameterPath: ["options", "parameters"], + mapper: ConfigurationInfoMapper, }; export const nextLink: OperationURLParameter = { @@ -103,8 +163,51 @@ export const nextLink: OperationURLParameter = { serializedName: "nextLink", required: true, type: { - name: "String" - } + name: "String", + }, + }, + skipEncoding: true, +}; + +export const resourceUri: OperationURLParameter = { + parameterPath: "resourceUri", + mapper: { + serializedName: "resourceUri", + required: true, + type: { + name: "String", + }, + }, + skipEncoding: true, +}; + +export const linkerName: OperationURLParameter = { + parameterPath: "linkerName", + mapper: { + serializedName: "linkerName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const filter: OperationQueryParameter = { + parameterPath: ["options", "filter"], + mapper: { + serializedName: "$filter", + type: { + name: "String", + }, + }, +}; + +export const skipToken: OperationQueryParameter = { + parameterPath: ["options", "skipToken"], + mapper: { + serializedName: "$skipToken", + type: { + name: "String", + }, }, - skipEncoding: true }; diff --git a/sdk/servicelinker/arm-servicelinker/src/operations/configurationNames.ts b/sdk/servicelinker/arm-servicelinker/src/operations/configurationNames.ts new file mode 100644 index 000000000000..0c7ba509d5cb --- /dev/null +++ b/sdk/servicelinker/arm-servicelinker/src/operations/configurationNames.ts @@ -0,0 +1,155 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ConfigurationNames } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ServiceLinkerManagementClient } from "../serviceLinkerManagementClient"; +import { + ConfigurationNameItem, + ConfigurationNamesListNextOptionalParams, + ConfigurationNamesListOptionalParams, + ConfigurationNamesListResponse, + ConfigurationNamesListNextResponse, +} from "../models"; + +/// +/** Class containing ConfigurationNames operations. */ +export class ConfigurationNamesImpl implements ConfigurationNames { + private readonly client: ServiceLinkerManagementClient; + + /** + * Initialize a new instance of the class ConfigurationNames class. + * @param client Reference to the service client + */ + constructor(client: ServiceLinkerManagementClient) { + this.client = client; + } + + /** + * Lists the configuration names generated by Service Connector for all target, client types, auth + * types. + * @param options The options parameters. + */ + public list( + options?: ConfigurationNamesListOptionalParams, + ): 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?: ConfigurationNamesListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ConfigurationNamesListResponse; + 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?: ConfigurationNamesListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Lists the configuration names generated by Service Connector for all target, client types, auth + * types. + * @param options The options parameters. + */ + private _list( + options?: ConfigurationNamesListOptionalParams, + ): 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?: ConfigurationNamesListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.ServiceLinker/configurationNames", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConfigurationNameResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.skipToken, + ], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConfigurationNameResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [Parameters.$host, Parameters.nextLink], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/servicelinker/arm-servicelinker/src/operations/connector.ts b/sdk/servicelinker/arm-servicelinker/src/operations/connector.ts new file mode 100644 index 000000000000..eff61fe321db --- /dev/null +++ b/sdk/servicelinker/arm-servicelinker/src/operations/connector.ts @@ -0,0 +1,1433 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Connector } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ServiceLinkerManagementClient } from "../serviceLinkerManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + DryrunResource, + ConnectorListDryrunNextOptionalParams, + ConnectorListDryrunOptionalParams, + ConnectorListDryrunResponse, + LinkerResource, + ConnectorListNextOptionalParams, + ConnectorListOptionalParams, + ConnectorListResponse, + ConnectorGetDryrunOptionalParams, + ConnectorGetDryrunResponse, + ConnectorCreateDryrunOptionalParams, + ConnectorCreateDryrunResponse, + DryrunPatch, + ConnectorUpdateDryrunOptionalParams, + ConnectorUpdateDryrunResponse, + ConnectorDeleteDryrunOptionalParams, + ConnectorGetOptionalParams, + ConnectorGetResponse, + ConnectorCreateOrUpdateOptionalParams, + ConnectorCreateOrUpdateResponse, + ConnectorDeleteOptionalParams, + LinkerPatch, + ConnectorUpdateOptionalParams, + ConnectorUpdateResponse, + ConnectorValidateOptionalParams, + ConnectorValidateResponse, + ConnectorGenerateConfigurationsOptionalParams, + ConnectorGenerateConfigurationsResponse, + ConnectorListDryrunNextResponse, + ConnectorListNextResponse, +} from "../models"; + +/// +/** Class containing Connector operations. */ +export class ConnectorImpl implements Connector { + private readonly client: ServiceLinkerManagementClient; + + /** + * Initialize a new instance of the class Connector class. + * @param client Reference to the service client + */ + constructor(client: ServiceLinkerManagementClient) { + this.client = client; + } + + /** + * list dryrun jobs + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param options The options parameters. + */ + public listDryrun( + subscriptionId: string, + resourceGroupName: string, + location: string, + options?: ConnectorListDryrunOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listDryrunPagingAll( + subscriptionId, + resourceGroupName, + location, + 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.listDryrunPagingPage( + subscriptionId, + resourceGroupName, + location, + options, + settings, + ); + }, + }; + } + + private async *listDryrunPagingPage( + subscriptionId: string, + resourceGroupName: string, + location: string, + options?: ConnectorListDryrunOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ConnectorListDryrunResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listDryrun( + subscriptionId, + resourceGroupName, + location, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listDryrunNext( + subscriptionId, + resourceGroupName, + location, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listDryrunPagingAll( + subscriptionId: string, + resourceGroupName: string, + location: string, + options?: ConnectorListDryrunOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listDryrunPagingPage( + subscriptionId, + resourceGroupName, + location, + options, + )) { + yield* page; + } + } + + /** + * Returns list of connector which connects to the resource, which supports to config the target + * service during the resource provision. + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param options The options parameters. + */ + public list( + subscriptionId: string, + resourceGroupName: string, + location: string, + options?: ConnectorListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + subscriptionId, + resourceGroupName, + location, + 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( + subscriptionId, + resourceGroupName, + location, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + subscriptionId: string, + resourceGroupName: string, + location: string, + options?: ConnectorListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ConnectorListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + subscriptionId, + resourceGroupName, + location, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + subscriptionId, + resourceGroupName, + location, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + subscriptionId: string, + resourceGroupName: string, + location: string, + options?: ConnectorListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + subscriptionId, + resourceGroupName, + location, + options, + )) { + yield* page; + } + } + + /** + * list dryrun jobs + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param options The options parameters. + */ + private _listDryrun( + subscriptionId: string, + resourceGroupName: string, + location: string, + options?: ConnectorListDryrunOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { subscriptionId, resourceGroupName, location, options }, + listDryrunOperationSpec, + ); + } + + /** + * get a dryrun job + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param dryrunName The name of dryrun. + * @param options The options parameters. + */ + getDryrun( + subscriptionId: string, + resourceGroupName: string, + location: string, + dryrunName: string, + options?: ConnectorGetDryrunOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { subscriptionId, resourceGroupName, location, dryrunName, options }, + getDryrunOperationSpec, + ); + } + + /** + * create a dryrun job to do necessary check before actual creation + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param dryrunName The name of dryrun. + * @param parameters dryrun resource. + * @param options The options parameters. + */ + async beginCreateDryrun( + subscriptionId: string, + resourceGroupName: string, + location: string, + dryrunName: string, + parameters: DryrunResource, + options?: ConnectorCreateDryrunOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ConnectorCreateDryrunResponse + > + > { + 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: { + subscriptionId, + resourceGroupName, + location, + dryrunName, + parameters, + options, + }, + spec: createDryrunOperationSpec, + }); + const poller = await createHttpPoller< + ConnectorCreateDryrunResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * create a dryrun job to do necessary check before actual creation + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param dryrunName The name of dryrun. + * @param parameters dryrun resource. + * @param options The options parameters. + */ + async beginCreateDryrunAndWait( + subscriptionId: string, + resourceGroupName: string, + location: string, + dryrunName: string, + parameters: DryrunResource, + options?: ConnectorCreateDryrunOptionalParams, + ): Promise { + const poller = await this.beginCreateDryrun( + subscriptionId, + resourceGroupName, + location, + dryrunName, + parameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * update a dryrun job to do necessary check before actual creation + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param dryrunName The name of dryrun. + * @param parameters dryrun resource. + * @param options The options parameters. + */ + async beginUpdateDryrun( + subscriptionId: string, + resourceGroupName: string, + location: string, + dryrunName: string, + parameters: DryrunPatch, + options?: ConnectorUpdateDryrunOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ConnectorUpdateDryrunResponse + > + > { + 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: { + subscriptionId, + resourceGroupName, + location, + dryrunName, + parameters, + options, + }, + spec: updateDryrunOperationSpec, + }); + const poller = await createHttpPoller< + ConnectorUpdateDryrunResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * update a dryrun job to do necessary check before actual creation + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param dryrunName The name of dryrun. + * @param parameters dryrun resource. + * @param options The options parameters. + */ + async beginUpdateDryrunAndWait( + subscriptionId: string, + resourceGroupName: string, + location: string, + dryrunName: string, + parameters: DryrunPatch, + options?: ConnectorUpdateDryrunOptionalParams, + ): Promise { + const poller = await this.beginUpdateDryrun( + subscriptionId, + resourceGroupName, + location, + dryrunName, + parameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * delete a dryrun job + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param dryrunName The name of dryrun. + * @param options The options parameters. + */ + deleteDryrun( + subscriptionId: string, + resourceGroupName: string, + location: string, + dryrunName: string, + options?: ConnectorDeleteDryrunOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { subscriptionId, resourceGroupName, location, dryrunName, options }, + deleteDryrunOperationSpec, + ); + } + + /** + * Returns list of connector which connects to the resource, which supports to config the target + * service during the resource provision. + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param options The options parameters. + */ + private _list( + subscriptionId: string, + resourceGroupName: string, + location: string, + options?: ConnectorListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { subscriptionId, resourceGroupName, location, options }, + listOperationSpec, + ); + } + + /** + * Returns Connector resource for a given name. + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param connectorName The name of resource. + * @param options The options parameters. + */ + get( + subscriptionId: string, + resourceGroupName: string, + location: string, + connectorName: string, + options?: ConnectorGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { subscriptionId, resourceGroupName, location, connectorName, options }, + getOperationSpec, + ); + } + + /** + * Create or update Connector resource. + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param connectorName The name of resource. + * @param parameters Connector details. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + subscriptionId: string, + resourceGroupName: string, + location: string, + connectorName: string, + parameters: LinkerResource, + options?: ConnectorCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ConnectorCreateOrUpdateResponse + > + > { + 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: { + subscriptionId, + resourceGroupName, + location, + connectorName, + parameters, + options, + }, + spec: createOrUpdateOperationSpec, + }); + const poller = await createHttpPoller< + ConnectorCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * Create or update Connector resource. + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param connectorName The name of resource. + * @param parameters Connector details. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + subscriptionId: string, + resourceGroupName: string, + location: string, + connectorName: string, + parameters: LinkerResource, + options?: ConnectorCreateOrUpdateOptionalParams, + ): Promise { + const poller = await this.beginCreateOrUpdate( + subscriptionId, + resourceGroupName, + location, + connectorName, + parameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Delete a Connector. + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param connectorName The name of resource. + * @param options The options parameters. + */ + async beginDelete( + subscriptionId: string, + resourceGroupName: string, + location: string, + connectorName: string, + options?: ConnectorDeleteOptionalParams, + ): Promise, void>> { + 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: { + subscriptionId, + resourceGroupName, + location, + connectorName, + options, + }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * Delete a Connector. + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param connectorName The name of resource. + * @param options The options parameters. + */ + async beginDeleteAndWait( + subscriptionId: string, + resourceGroupName: string, + location: string, + connectorName: string, + options?: ConnectorDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + subscriptionId, + resourceGroupName, + location, + connectorName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Operation to update an existing Connector. + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param connectorName The name of resource. + * @param parameters Connector details. + * @param options The options parameters. + */ + async beginUpdate( + subscriptionId: string, + resourceGroupName: string, + location: string, + connectorName: string, + parameters: LinkerPatch, + options?: ConnectorUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ConnectorUpdateResponse + > + > { + 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: { + subscriptionId, + resourceGroupName, + location, + connectorName, + parameters, + options, + }, + spec: updateOperationSpec, + }); + const poller = await createHttpPoller< + ConnectorUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * Operation to update an existing Connector. + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param connectorName The name of resource. + * @param parameters Connector details. + * @param options The options parameters. + */ + async beginUpdateAndWait( + subscriptionId: string, + resourceGroupName: string, + location: string, + connectorName: string, + parameters: LinkerPatch, + options?: ConnectorUpdateOptionalParams, + ): Promise { + const poller = await this.beginUpdate( + subscriptionId, + resourceGroupName, + location, + connectorName, + parameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Validate a Connector. + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param connectorName The name of resource. + * @param options The options parameters. + */ + async beginValidate( + subscriptionId: string, + resourceGroupName: string, + location: string, + connectorName: string, + options?: ConnectorValidateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ConnectorValidateResponse + > + > { + 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: { + subscriptionId, + resourceGroupName, + location, + connectorName, + options, + }, + spec: validateOperationSpec, + }); + const poller = await createHttpPoller< + ConnectorValidateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Validate a Connector. + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param connectorName The name of resource. + * @param options The options parameters. + */ + async beginValidateAndWait( + subscriptionId: string, + resourceGroupName: string, + location: string, + connectorName: string, + options?: ConnectorValidateOptionalParams, + ): Promise { + const poller = await this.beginValidate( + subscriptionId, + resourceGroupName, + location, + connectorName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Generate configurations for a Connector. + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param connectorName The name of resource. + * @param options The options parameters. + */ + generateConfigurations( + subscriptionId: string, + resourceGroupName: string, + location: string, + connectorName: string, + options?: ConnectorGenerateConfigurationsOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { subscriptionId, resourceGroupName, location, connectorName, options }, + generateConfigurationsOperationSpec, + ); + } + + /** + * ListDryrunNext + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param nextLink The nextLink from the previous successful call to the ListDryrun method. + * @param options The options parameters. + */ + private _listDryrunNext( + subscriptionId: string, + resourceGroupName: string, + location: string, + nextLink: string, + options?: ConnectorListDryrunNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { subscriptionId, resourceGroupName, location, nextLink, options }, + listDryrunNextOperationSpec, + ); + } + + /** + * ListNext + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + subscriptionId: string, + resourceGroupName: string, + location: string, + nextLink: string, + options?: ConnectorListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { subscriptionId, resourceGroupName, location, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listDryrunOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/dryruns", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DryrunList, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.location, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getDryrunOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/dryruns/{dryrunName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DryrunResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.location, + Parameters.dryrunName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createDryrunOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/dryruns/{dryrunName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DryrunResource, + }, + 201: { + bodyMapper: Mappers.DryrunResource, + }, + 202: { + bodyMapper: Mappers.DryrunResource, + }, + 204: { + bodyMapper: Mappers.DryrunResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.parameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.location, + Parameters.dryrunName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const updateDryrunOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/dryruns/{dryrunName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.DryrunResource, + }, + 201: { + bodyMapper: Mappers.DryrunResource, + }, + 202: { + bodyMapper: Mappers.DryrunResource, + }, + 204: { + bodyMapper: Mappers.DryrunResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.parameters1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.location, + Parameters.dryrunName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteDryrunOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/dryruns/{dryrunName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.location, + Parameters.dryrunName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ResourceList, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.location, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LinkerResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.location, + Parameters.connectorName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.LinkerResource, + }, + 201: { + bodyMapper: Mappers.LinkerResource, + }, + 202: { + bodyMapper: Mappers.LinkerResource, + }, + 204: { + bodyMapper: Mappers.LinkerResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.parameters2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.location, + Parameters.connectorName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.location, + Parameters.connectorName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.LinkerResource, + }, + 201: { + bodyMapper: Mappers.LinkerResource, + }, + 202: { + bodyMapper: Mappers.LinkerResource, + }, + 204: { + bodyMapper: Mappers.LinkerResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.parameters3, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.location, + Parameters.connectorName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const validateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}/validate", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ValidateOperationResult, + }, + 201: { + bodyMapper: Mappers.ValidateOperationResult, + }, + 202: { + bodyMapper: Mappers.ValidateOperationResult, + }, + 204: { + bodyMapper: Mappers.ValidateOperationResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.location, + Parameters.connectorName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const generateConfigurationsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}/generateConfigurations", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ConfigurationResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.parameters4, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.location, + Parameters.connectorName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const listDryrunNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DryrunList, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.location, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ResourceList, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.location, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/servicelinker/arm-servicelinker/src/operations/index.ts b/sdk/servicelinker/arm-servicelinker/src/operations/index.ts index 8ef3ff9c3dd7..252585bf1ea0 100644 --- a/sdk/servicelinker/arm-servicelinker/src/operations/index.ts +++ b/sdk/servicelinker/arm-servicelinker/src/operations/index.ts @@ -6,5 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +export * from "./connector"; export * from "./linker"; +export * from "./linkers"; export * from "./operations"; +export * from "./configurationNames"; diff --git a/sdk/servicelinker/arm-servicelinker/src/operations/linker.ts b/sdk/servicelinker/arm-servicelinker/src/operations/linker.ts index 9c6a50a0e00a..8cf99fbcbbcd 100644 --- a/sdk/servicelinker/arm-servicelinker/src/operations/linker.ts +++ b/sdk/servicelinker/arm-servicelinker/src/operations/linker.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ServiceLinkerManagementClient } from "../serviceLinkerManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { LinkerResource, LinkerListNextOptionalParams, @@ -32,7 +36,7 @@ import { LinkerValidateResponse, LinkerListConfigurationsOptionalParams, LinkerListConfigurationsResponse, - LinkerListNextResponse + LinkerListNextResponse, } from "../models"; /// @@ -49,14 +53,15 @@ export class LinkerImpl implements Linker { } /** - * Returns list of Linkers which connects to the resource. + * Returns list of Linkers which connects to the resource. which supports to config both application + * and target service during the resource provision. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be * connected. * @param options The options parameters. */ public list( resourceUri: string, - options?: LinkerListOptionalParams + options?: LinkerListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(resourceUri, options); return { @@ -71,14 +76,14 @@ export class LinkerImpl implements Linker { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(resourceUri, options, settings); - } + }, }; } private async *listPagingPage( resourceUri: string, options?: LinkerListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: LinkerListResponse; let continuationToken = settings?.continuationToken; @@ -100,7 +105,7 @@ export class LinkerImpl implements Linker { private async *listPagingAll( resourceUri: string, - options?: LinkerListOptionalParams + options?: LinkerListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(resourceUri, options)) { yield* page; @@ -108,18 +113,19 @@ export class LinkerImpl implements Linker { } /** - * Returns list of Linkers which connects to the resource. + * Returns list of Linkers which connects to the resource. which supports to config both application + * and target service during the resource provision. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be * connected. * @param options The options parameters. */ private _list( resourceUri: string, - options?: LinkerListOptionalParams + options?: LinkerListOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceUri, options }, - listOperationSpec + listOperationSpec, ); } @@ -133,16 +139,16 @@ export class LinkerImpl implements Linker { get( resourceUri: string, linkerName: string, - options?: LinkerGetOptionalParams + options?: LinkerGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceUri, linkerName, options }, - getOperationSpec + getOperationSpec, ); } /** - * Create or update linker resource. + * Create or update Linker resource. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be * connected. * @param linkerName The name Linker resource. @@ -153,30 +159,29 @@ export class LinkerImpl implements Linker { resourceUri: string, linkerName: string, parameters: LinkerResource, - options?: LinkerCreateOrUpdateOptionalParams + options?: LinkerCreateOrUpdateOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, LinkerCreateOrUpdateResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -185,8 +190,8 @@ export class LinkerImpl implements Linker { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -194,27 +199,30 @@ export class LinkerImpl implements Linker { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { resourceUri, linkerName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceUri, linkerName, parameters, options }, + spec: createOrUpdateOperationSpec, + }); + const poller = await createHttpPoller< + LinkerCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation", }); await poller.poll(); return poller; } /** - * Create or update linker resource. + * Create or update Linker resource. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be * connected. * @param linkerName The name Linker resource. @@ -225,19 +233,19 @@ export class LinkerImpl implements Linker { resourceUri: string, linkerName: string, parameters: LinkerResource, - options?: LinkerCreateOrUpdateOptionalParams + options?: LinkerCreateOrUpdateOptionalParams, ): Promise { const poller = await this.beginCreateOrUpdate( resourceUri, linkerName, parameters, - options + options, ); return poller.pollUntilDone(); } /** - * Delete a link. + * Delete a Linker. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be * connected. * @param linkerName The name Linker resource. @@ -246,25 +254,24 @@ export class LinkerImpl implements Linker { async beginDelete( resourceUri: string, linkerName: string, - options?: LinkerDeleteOptionalParams - ): Promise, void>> { + options?: LinkerDeleteOptionalParams, + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -273,8 +280,8 @@ export class LinkerImpl implements Linker { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -282,27 +289,27 @@ export class LinkerImpl implements Linker { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { resourceUri, linkerName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceUri, linkerName, options }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation", }); await poller.poll(); return poller; } /** - * Delete a link. + * Delete a Linker. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be * connected. * @param linkerName The name Linker resource. @@ -311,14 +318,14 @@ export class LinkerImpl implements Linker { async beginDeleteAndWait( resourceUri: string, linkerName: string, - options?: LinkerDeleteOptionalParams + options?: LinkerDeleteOptionalParams, ): Promise { const poller = await this.beginDelete(resourceUri, linkerName, options); return poller.pollUntilDone(); } /** - * Operation to update an existing link. + * Operation to update an existing Linker. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be * connected. * @param linkerName The name Linker resource. @@ -329,27 +336,26 @@ export class LinkerImpl implements Linker { resourceUri: string, linkerName: string, parameters: LinkerPatch, - options?: LinkerUpdateOptionalParams + options?: LinkerUpdateOptionalParams, ): Promise< - PollerLike, LinkerUpdateResponse> + SimplePollerLike, LinkerUpdateResponse> > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -358,8 +364,8 @@ export class LinkerImpl implements Linker { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -367,27 +373,30 @@ export class LinkerImpl implements Linker { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { resourceUri, linkerName, parameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceUri, linkerName, parameters, options }, + spec: updateOperationSpec, + }); + const poller = await createHttpPoller< + LinkerUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation", }); await poller.poll(); return poller; } /** - * Operation to update an existing link. + * Operation to update an existing Linker. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be * connected. * @param linkerName The name Linker resource. @@ -398,19 +407,19 @@ export class LinkerImpl implements Linker { resourceUri: string, linkerName: string, parameters: LinkerPatch, - options?: LinkerUpdateOptionalParams + options?: LinkerUpdateOptionalParams, ): Promise { const poller = await this.beginUpdate( resourceUri, linkerName, parameters, - options + options, ); return poller.pollUntilDone(); } /** - * Validate a link. + * Validate a Linker. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be * connected. * @param linkerName The name Linker resource. @@ -419,30 +428,29 @@ export class LinkerImpl implements Linker { async beginValidate( resourceUri: string, linkerName: string, - options?: LinkerValidateOptionalParams + options?: LinkerValidateOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, LinkerValidateResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -451,8 +459,8 @@ export class LinkerImpl implements Linker { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -460,27 +468,30 @@ export class LinkerImpl implements Linker { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { resourceUri, linkerName, options }, - validateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceUri, linkerName, options }, + spec: validateOperationSpec, + }); + const poller = await createHttpPoller< + LinkerValidateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "location", }); await poller.poll(); return poller; } /** - * Validate a link. + * Validate a Linker. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be * connected. * @param linkerName The name Linker resource. @@ -489,14 +500,14 @@ export class LinkerImpl implements Linker { async beginValidateAndWait( resourceUri: string, linkerName: string, - options?: LinkerValidateOptionalParams + options?: LinkerValidateOptionalParams, ): Promise { const poller = await this.beginValidate(resourceUri, linkerName, options); return poller.pollUntilDone(); } /** - * list source configurations for a linker. + * list source configurations for a Linker. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be * connected. * @param linkerName The name Linker resource. @@ -505,11 +516,11 @@ export class LinkerImpl implements Linker { listConfigurations( resourceUri: string, linkerName: string, - options?: LinkerListConfigurationsOptionalParams + options?: LinkerListConfigurationsOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceUri, linkerName, options }, - listConfigurationsOperationSpec + listConfigurationsOperationSpec, ); } @@ -523,11 +534,11 @@ export class LinkerImpl implements Linker { private _listNext( resourceUri: string, nextLink: string, - options?: LinkerListNextOptionalParams + options?: LinkerListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceUri, nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } } @@ -539,67 +550,67 @@ const listOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.LinkerList + bodyMapper: Mappers.ResourceList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.resourceUri], headerParameters: [Parameters.accept], - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { path: "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.LinkerResource + bodyMapper: Mappers.LinkerResource, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceUri, - Parameters.linkerName + Parameters.linkerName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.LinkerResource + bodyMapper: Mappers.LinkerResource, }, 201: { - bodyMapper: Mappers.LinkerResource + bodyMapper: Mappers.LinkerResource, }, 202: { - bodyMapper: Mappers.LinkerResource + bodyMapper: Mappers.LinkerResource, }, 204: { - bodyMapper: Mappers.LinkerResource + bodyMapper: Mappers.LinkerResource, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - requestBody: Parameters.parameters, + requestBody: Parameters.parameters2, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceUri, - Parameters.linkerName + Parameters.linkerName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { path: "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", @@ -610,116 +621,114 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceUri, - Parameters.linkerName + Parameters.linkerName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const updateOperationSpec: coreClient.OperationSpec = { path: "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.LinkerResource + bodyMapper: Mappers.LinkerResource, }, 201: { - bodyMapper: Mappers.LinkerResource + bodyMapper: Mappers.LinkerResource, }, 202: { - bodyMapper: Mappers.LinkerResource + bodyMapper: Mappers.LinkerResource, }, 204: { - bodyMapper: Mappers.LinkerResource + bodyMapper: Mappers.LinkerResource, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - requestBody: Parameters.parameters1, + requestBody: Parameters.parameters3, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceUri, - Parameters.linkerName + Parameters.linkerName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const validateOperationSpec: coreClient.OperationSpec = { - path: - "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}/validateLinker", + path: "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}/validateLinker", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.ValidateOperationResult + bodyMapper: Mappers.ValidateOperationResult, }, 201: { - bodyMapper: Mappers.ValidateOperationResult + bodyMapper: Mappers.ValidateOperationResult, }, 202: { - bodyMapper: Mappers.ValidateOperationResult + bodyMapper: Mappers.ValidateOperationResult, }, 204: { - bodyMapper: Mappers.ValidateOperationResult + bodyMapper: Mappers.ValidateOperationResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceUri, - Parameters.linkerName + Parameters.linkerName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listConfigurationsOperationSpec: coreClient.OperationSpec = { - path: - "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}/listConfigurations", + path: "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}/listConfigurations", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.SourceConfigurationResult + bodyMapper: Mappers.ConfigurationResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceUri, - Parameters.linkerName + Parameters.linkerName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.LinkerList + bodyMapper: Mappers.ResourceList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, + Parameters.nextLink, Parameters.resourceUri, - Parameters.nextLink ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/servicelinker/arm-servicelinker/src/operations/linkers.ts b/sdk/servicelinker/arm-servicelinker/src/operations/linkers.ts new file mode 100644 index 000000000000..959fc7e74066 --- /dev/null +++ b/sdk/servicelinker/arm-servicelinker/src/operations/linkers.ts @@ -0,0 +1,558 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Linkers } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ServiceLinkerManagementClient } from "../serviceLinkerManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + DryrunResource, + LinkersListDryrunNextOptionalParams, + LinkersListDryrunOptionalParams, + LinkersListDryrunResponse, + LinkersGetDryrunOptionalParams, + LinkersGetDryrunResponse, + LinkersCreateDryrunOptionalParams, + LinkersCreateDryrunResponse, + DryrunPatch, + LinkersUpdateDryrunOptionalParams, + LinkersUpdateDryrunResponse, + LinkersDeleteDryrunOptionalParams, + LinkersGenerateConfigurationsOptionalParams, + LinkersGenerateConfigurationsResponse, + LinkersListDryrunNextResponse, +} from "../models"; + +/// +/** Class containing Linkers operations. */ +export class LinkersImpl implements Linkers { + private readonly client: ServiceLinkerManagementClient; + + /** + * Initialize a new instance of the class Linkers class. + * @param client Reference to the service client + */ + constructor(client: ServiceLinkerManagementClient) { + this.client = client; + } + + /** + * list dryrun jobs + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be + * connected. + * @param options The options parameters. + */ + public listDryrun( + resourceUri: string, + options?: LinkersListDryrunOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listDryrunPagingAll(resourceUri, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listDryrunPagingPage(resourceUri, options, settings); + }, + }; + } + + private async *listDryrunPagingPage( + resourceUri: string, + options?: LinkersListDryrunOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: LinkersListDryrunResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listDryrun(resourceUri, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listDryrunNext( + resourceUri, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listDryrunPagingAll( + resourceUri: string, + options?: LinkersListDryrunOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listDryrunPagingPage(resourceUri, options)) { + yield* page; + } + } + + /** + * list dryrun jobs + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be + * connected. + * @param options The options parameters. + */ + private _listDryrun( + resourceUri: string, + options?: LinkersListDryrunOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, options }, + listDryrunOperationSpec, + ); + } + + /** + * get a dryrun job + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be + * connected. + * @param dryrunName The name of dryrun. + * @param options The options parameters. + */ + getDryrun( + resourceUri: string, + dryrunName: string, + options?: LinkersGetDryrunOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, dryrunName, options }, + getDryrunOperationSpec, + ); + } + + /** + * create a dryrun job to do necessary check before actual creation + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be + * connected. + * @param dryrunName The name of dryrun. + * @param parameters dryrun resource. + * @param options The options parameters. + */ + async beginCreateDryrun( + resourceUri: string, + dryrunName: string, + parameters: DryrunResource, + options?: LinkersCreateDryrunOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + LinkersCreateDryrunResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceUri, dryrunName, parameters, options }, + spec: createDryrunOperationSpec, + }); + const poller = await createHttpPoller< + LinkersCreateDryrunResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * create a dryrun job to do necessary check before actual creation + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be + * connected. + * @param dryrunName The name of dryrun. + * @param parameters dryrun resource. + * @param options The options parameters. + */ + async beginCreateDryrunAndWait( + resourceUri: string, + dryrunName: string, + parameters: DryrunResource, + options?: LinkersCreateDryrunOptionalParams, + ): Promise { + const poller = await this.beginCreateDryrun( + resourceUri, + dryrunName, + parameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * add a dryrun job to do necessary check before actual creation + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be + * connected. + * @param dryrunName The name of dryrun. + * @param parameters dryrun resource. + * @param options The options parameters. + */ + async beginUpdateDryrun( + resourceUri: string, + dryrunName: string, + parameters: DryrunPatch, + options?: LinkersUpdateDryrunOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + LinkersUpdateDryrunResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceUri, dryrunName, parameters, options }, + spec: updateDryrunOperationSpec, + }); + const poller = await createHttpPoller< + LinkersUpdateDryrunResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * add a dryrun job to do necessary check before actual creation + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be + * connected. + * @param dryrunName The name of dryrun. + * @param parameters dryrun resource. + * @param options The options parameters. + */ + async beginUpdateDryrunAndWait( + resourceUri: string, + dryrunName: string, + parameters: DryrunPatch, + options?: LinkersUpdateDryrunOptionalParams, + ): Promise { + const poller = await this.beginUpdateDryrun( + resourceUri, + dryrunName, + parameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * delete a dryrun job + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be + * connected. + * @param dryrunName The name of dryrun. + * @param options The options parameters. + */ + deleteDryrun( + resourceUri: string, + dryrunName: string, + options?: LinkersDeleteDryrunOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, dryrunName, options }, + deleteDryrunOperationSpec, + ); + } + + /** + * Generate configurations for a Linker. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be + * connected. + * @param linkerName The name Linker resource. + * @param options The options parameters. + */ + generateConfigurations( + resourceUri: string, + linkerName: string, + options?: LinkersGenerateConfigurationsOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, linkerName, options }, + generateConfigurationsOperationSpec, + ); + } + + /** + * ListDryrunNext + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be + * connected. + * @param nextLink The nextLink from the previous successful call to the ListDryrun method. + * @param options The options parameters. + */ + private _listDryrunNext( + resourceUri: string, + nextLink: string, + options?: LinkersListDryrunNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceUri, nextLink, options }, + listDryrunNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listDryrunOperationSpec: coreClient.OperationSpec = { + path: "/{resourceUri}/providers/Microsoft.ServiceLinker/dryruns", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DryrunList, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], + serializer, +}; +const getDryrunOperationSpec: coreClient.OperationSpec = { + path: "/{resourceUri}/providers/Microsoft.ServiceLinker/dryruns/{dryrunName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DryrunResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.dryrunName, + Parameters.resourceUri, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createDryrunOperationSpec: coreClient.OperationSpec = { + path: "/{resourceUri}/providers/Microsoft.ServiceLinker/dryruns/{dryrunName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DryrunResource, + }, + 201: { + bodyMapper: Mappers.DryrunResource, + }, + 202: { + bodyMapper: Mappers.DryrunResource, + }, + 204: { + bodyMapper: Mappers.DryrunResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.parameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.dryrunName, + Parameters.resourceUri, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const updateDryrunOperationSpec: coreClient.OperationSpec = { + path: "/{resourceUri}/providers/Microsoft.ServiceLinker/dryruns/{dryrunName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.DryrunResource, + }, + 201: { + bodyMapper: Mappers.DryrunResource, + }, + 202: { + bodyMapper: Mappers.DryrunResource, + }, + 204: { + bodyMapper: Mappers.DryrunResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.parameters1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.dryrunName, + Parameters.resourceUri, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteDryrunOperationSpec: coreClient.OperationSpec = { + path: "/{resourceUri}/providers/Microsoft.ServiceLinker/dryruns/{dryrunName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.dryrunName, + Parameters.resourceUri, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const generateConfigurationsOperationSpec: coreClient.OperationSpec = { + path: "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}/generateConfigurations", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ConfigurationResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.parameters4, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceUri, + Parameters.linkerName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const listDryrunNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DryrunList, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.resourceUri, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/servicelinker/arm-servicelinker/src/operations/operations.ts b/sdk/servicelinker/arm-servicelinker/src/operations/operations.ts index 352d765c9ad9..2c1add98e777 100644 --- a/sdk/servicelinker/arm-servicelinker/src/operations/operations.ts +++ b/sdk/servicelinker/arm-servicelinker/src/operations/operations.ts @@ -18,7 +18,7 @@ import { OperationsListNextOptionalParams, OperationsListOptionalParams, OperationsListResponse, - OperationsListNextResponse + OperationsListNextResponse, } from "../models"; /// @@ -39,7 +39,7 @@ export class OperationsImpl implements Operations { * @param options The options parameters. */ public list( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { @@ -54,13 +54,13 @@ export class OperationsImpl implements Operations { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(options, settings); - } + }, }; } private async *listPagingPage( options?: OperationsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: OperationsListResponse; let continuationToken = settings?.continuationToken; @@ -81,7 +81,7 @@ export class OperationsImpl implements Operations { } private async *listPagingAll( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; @@ -93,7 +93,7 @@ export class OperationsImpl implements Operations { * @param options The options parameters. */ private _list( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } @@ -105,11 +105,11 @@ export class OperationsImpl implements Operations { */ private _listNext( nextLink: string, - options?: OperationsListNextOptionalParams + options?: OperationsListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } } @@ -121,29 +121,29 @@ const listOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.OperationListResult + bodyMapper: Mappers.OperationListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.OperationListResult + bodyMapper: Mappers.OperationListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/configurationNames.ts b/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/configurationNames.ts new file mode 100644 index 000000000000..c3dc6df3147a --- /dev/null +++ b/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/configurationNames.ts @@ -0,0 +1,26 @@ +/* + * 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 { + ConfigurationNameItem, + ConfigurationNamesListOptionalParams, +} from "../models"; + +/// +/** Interface representing a ConfigurationNames. */ +export interface ConfigurationNames { + /** + * Lists the configuration names generated by Service Connector for all target, client types, auth + * types. + * @param options The options parameters. + */ + list( + options?: ConfigurationNamesListOptionalParams, + ): PagedAsyncIterableIterator; +} diff --git a/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/connector.ts b/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/connector.ts new file mode 100644 index 000000000000..ba818175d833 --- /dev/null +++ b/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/connector.ts @@ -0,0 +1,349 @@ +/* + * 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 { + DryrunResource, + ConnectorListDryrunOptionalParams, + LinkerResource, + ConnectorListOptionalParams, + ConnectorGetDryrunOptionalParams, + ConnectorGetDryrunResponse, + ConnectorCreateDryrunOptionalParams, + ConnectorCreateDryrunResponse, + DryrunPatch, + ConnectorUpdateDryrunOptionalParams, + ConnectorUpdateDryrunResponse, + ConnectorDeleteDryrunOptionalParams, + ConnectorGetOptionalParams, + ConnectorGetResponse, + ConnectorCreateOrUpdateOptionalParams, + ConnectorCreateOrUpdateResponse, + ConnectorDeleteOptionalParams, + LinkerPatch, + ConnectorUpdateOptionalParams, + ConnectorUpdateResponse, + ConnectorValidateOptionalParams, + ConnectorValidateResponse, + ConnectorGenerateConfigurationsOptionalParams, + ConnectorGenerateConfigurationsResponse, +} from "../models"; + +/// +/** Interface representing a Connector. */ +export interface Connector { + /** + * list dryrun jobs + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param options The options parameters. + */ + listDryrun( + subscriptionId: string, + resourceGroupName: string, + location: string, + options?: ConnectorListDryrunOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Returns list of connector which connects to the resource, which supports to config the target + * service during the resource provision. + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param options The options parameters. + */ + list( + subscriptionId: string, + resourceGroupName: string, + location: string, + options?: ConnectorListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * get a dryrun job + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param dryrunName The name of dryrun. + * @param options The options parameters. + */ + getDryrun( + subscriptionId: string, + resourceGroupName: string, + location: string, + dryrunName: string, + options?: ConnectorGetDryrunOptionalParams, + ): Promise; + /** + * create a dryrun job to do necessary check before actual creation + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param dryrunName The name of dryrun. + * @param parameters dryrun resource. + * @param options The options parameters. + */ + beginCreateDryrun( + subscriptionId: string, + resourceGroupName: string, + location: string, + dryrunName: string, + parameters: DryrunResource, + options?: ConnectorCreateDryrunOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ConnectorCreateDryrunResponse + > + >; + /** + * create a dryrun job to do necessary check before actual creation + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param dryrunName The name of dryrun. + * @param parameters dryrun resource. + * @param options The options parameters. + */ + beginCreateDryrunAndWait( + subscriptionId: string, + resourceGroupName: string, + location: string, + dryrunName: string, + parameters: DryrunResource, + options?: ConnectorCreateDryrunOptionalParams, + ): Promise; + /** + * update a dryrun job to do necessary check before actual creation + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param dryrunName The name of dryrun. + * @param parameters dryrun resource. + * @param options The options parameters. + */ + beginUpdateDryrun( + subscriptionId: string, + resourceGroupName: string, + location: string, + dryrunName: string, + parameters: DryrunPatch, + options?: ConnectorUpdateDryrunOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ConnectorUpdateDryrunResponse + > + >; + /** + * update a dryrun job to do necessary check before actual creation + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param dryrunName The name of dryrun. + * @param parameters dryrun resource. + * @param options The options parameters. + */ + beginUpdateDryrunAndWait( + subscriptionId: string, + resourceGroupName: string, + location: string, + dryrunName: string, + parameters: DryrunPatch, + options?: ConnectorUpdateDryrunOptionalParams, + ): Promise; + /** + * delete a dryrun job + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param dryrunName The name of dryrun. + * @param options The options parameters. + */ + deleteDryrun( + subscriptionId: string, + resourceGroupName: string, + location: string, + dryrunName: string, + options?: ConnectorDeleteDryrunOptionalParams, + ): Promise; + /** + * Returns Connector resource for a given name. + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param connectorName The name of resource. + * @param options The options parameters. + */ + get( + subscriptionId: string, + resourceGroupName: string, + location: string, + connectorName: string, + options?: ConnectorGetOptionalParams, + ): Promise; + /** + * Create or update Connector resource. + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param connectorName The name of resource. + * @param parameters Connector details. + * @param options The options parameters. + */ + beginCreateOrUpdate( + subscriptionId: string, + resourceGroupName: string, + location: string, + connectorName: string, + parameters: LinkerResource, + options?: ConnectorCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ConnectorCreateOrUpdateResponse + > + >; + /** + * Create or update Connector resource. + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param connectorName The name of resource. + * @param parameters Connector details. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + subscriptionId: string, + resourceGroupName: string, + location: string, + connectorName: string, + parameters: LinkerResource, + options?: ConnectorCreateOrUpdateOptionalParams, + ): Promise; + /** + * Delete a Connector. + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param connectorName The name of resource. + * @param options The options parameters. + */ + beginDelete( + subscriptionId: string, + resourceGroupName: string, + location: string, + connectorName: string, + options?: ConnectorDeleteOptionalParams, + ): Promise, void>>; + /** + * Delete a Connector. + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param connectorName The name of resource. + * @param options The options parameters. + */ + beginDeleteAndWait( + subscriptionId: string, + resourceGroupName: string, + location: string, + connectorName: string, + options?: ConnectorDeleteOptionalParams, + ): Promise; + /** + * Operation to update an existing Connector. + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param connectorName The name of resource. + * @param parameters Connector details. + * @param options The options parameters. + */ + beginUpdate( + subscriptionId: string, + resourceGroupName: string, + location: string, + connectorName: string, + parameters: LinkerPatch, + options?: ConnectorUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ConnectorUpdateResponse + > + >; + /** + * Operation to update an existing Connector. + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param connectorName The name of resource. + * @param parameters Connector details. + * @param options The options parameters. + */ + beginUpdateAndWait( + subscriptionId: string, + resourceGroupName: string, + location: string, + connectorName: string, + parameters: LinkerPatch, + options?: ConnectorUpdateOptionalParams, + ): Promise; + /** + * Validate a Connector. + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param connectorName The name of resource. + * @param options The options parameters. + */ + beginValidate( + subscriptionId: string, + resourceGroupName: string, + location: string, + connectorName: string, + options?: ConnectorValidateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ConnectorValidateResponse + > + >; + /** + * Validate a Connector. + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param connectorName The name of resource. + * @param options The options parameters. + */ + beginValidateAndWait( + subscriptionId: string, + resourceGroupName: string, + location: string, + connectorName: string, + options?: ConnectorValidateOptionalParams, + ): Promise; + /** + * Generate configurations for a Connector. + * @param subscriptionId The ID of the target subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of Azure region. + * @param connectorName The name of resource. + * @param options The options parameters. + */ + generateConfigurations( + subscriptionId: string, + resourceGroupName: string, + location: string, + connectorName: string, + options?: ConnectorGenerateConfigurationsOptionalParams, + ): Promise; +} diff --git a/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/index.ts b/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/index.ts index 8ef3ff9c3dd7..252585bf1ea0 100644 --- a/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/index.ts +++ b/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/index.ts @@ -6,5 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +export * from "./connector"; export * from "./linker"; +export * from "./linkers"; export * from "./operations"; +export * from "./configurationNames"; diff --git a/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/linker.ts b/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/linker.ts index 2cb2e83ee1aa..e9a2b5b520a5 100644 --- a/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/linker.ts +++ b/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/linker.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { LinkerResource, LinkerListOptionalParams, @@ -22,21 +22,22 @@ import { LinkerValidateOptionalParams, LinkerValidateResponse, LinkerListConfigurationsOptionalParams, - LinkerListConfigurationsResponse + LinkerListConfigurationsResponse, } from "../models"; /// /** Interface representing a Linker. */ export interface Linker { /** - * Returns list of Linkers which connects to the resource. + * Returns list of Linkers which connects to the resource. which supports to config both application + * and target service during the resource provision. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be * connected. * @param options The options parameters. */ list( resourceUri: string, - options?: LinkerListOptionalParams + options?: LinkerListOptionalParams, ): PagedAsyncIterableIterator; /** * Returns Linker resource for a given name. @@ -48,10 +49,10 @@ export interface Linker { get( resourceUri: string, linkerName: string, - options?: LinkerGetOptionalParams + options?: LinkerGetOptionalParams, ): Promise; /** - * Create or update linker resource. + * Create or update Linker resource. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be * connected. * @param linkerName The name Linker resource. @@ -62,15 +63,15 @@ export interface Linker { resourceUri: string, linkerName: string, parameters: LinkerResource, - options?: LinkerCreateOrUpdateOptionalParams + options?: LinkerCreateOrUpdateOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, LinkerCreateOrUpdateResponse > >; /** - * Create or update linker resource. + * Create or update Linker resource. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be * connected. * @param linkerName The name Linker resource. @@ -81,10 +82,10 @@ export interface Linker { resourceUri: string, linkerName: string, parameters: LinkerResource, - options?: LinkerCreateOrUpdateOptionalParams + options?: LinkerCreateOrUpdateOptionalParams, ): Promise; /** - * Delete a link. + * Delete a Linker. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be * connected. * @param linkerName The name Linker resource. @@ -93,10 +94,10 @@ export interface Linker { beginDelete( resourceUri: string, linkerName: string, - options?: LinkerDeleteOptionalParams - ): Promise, void>>; + options?: LinkerDeleteOptionalParams, + ): Promise, void>>; /** - * Delete a link. + * Delete a Linker. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be * connected. * @param linkerName The name Linker resource. @@ -105,10 +106,10 @@ export interface Linker { beginDeleteAndWait( resourceUri: string, linkerName: string, - options?: LinkerDeleteOptionalParams + options?: LinkerDeleteOptionalParams, ): Promise; /** - * Operation to update an existing link. + * Operation to update an existing Linker. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be * connected. * @param linkerName The name Linker resource. @@ -119,12 +120,12 @@ export interface Linker { resourceUri: string, linkerName: string, parameters: LinkerPatch, - options?: LinkerUpdateOptionalParams + options?: LinkerUpdateOptionalParams, ): Promise< - PollerLike, LinkerUpdateResponse> + SimplePollerLike, LinkerUpdateResponse> >; /** - * Operation to update an existing link. + * Operation to update an existing Linker. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be * connected. * @param linkerName The name Linker resource. @@ -135,10 +136,10 @@ export interface Linker { resourceUri: string, linkerName: string, parameters: LinkerPatch, - options?: LinkerUpdateOptionalParams + options?: LinkerUpdateOptionalParams, ): Promise; /** - * Validate a link. + * Validate a Linker. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be * connected. * @param linkerName The name Linker resource. @@ -147,15 +148,15 @@ export interface Linker { beginValidate( resourceUri: string, linkerName: string, - options?: LinkerValidateOptionalParams + options?: LinkerValidateOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, LinkerValidateResponse > >; /** - * Validate a link. + * Validate a Linker. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be * connected. * @param linkerName The name Linker resource. @@ -164,10 +165,10 @@ export interface Linker { beginValidateAndWait( resourceUri: string, linkerName: string, - options?: LinkerValidateOptionalParams + options?: LinkerValidateOptionalParams, ): Promise; /** - * list source configurations for a linker. + * list source configurations for a Linker. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be * connected. * @param linkerName The name Linker resource. @@ -176,6 +177,6 @@ export interface Linker { listConfigurations( resourceUri: string, linkerName: string, - options?: LinkerListConfigurationsOptionalParams + options?: LinkerListConfigurationsOptionalParams, ): Promise; } diff --git a/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/linkers.ts b/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/linkers.ts new file mode 100644 index 000000000000..4bb043afa0a7 --- /dev/null +++ b/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/linkers.ts @@ -0,0 +1,141 @@ +/* + * 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 { + DryrunResource, + LinkersListDryrunOptionalParams, + LinkersGetDryrunOptionalParams, + LinkersGetDryrunResponse, + LinkersCreateDryrunOptionalParams, + LinkersCreateDryrunResponse, + DryrunPatch, + LinkersUpdateDryrunOptionalParams, + LinkersUpdateDryrunResponse, + LinkersDeleteDryrunOptionalParams, + LinkersGenerateConfigurationsOptionalParams, + LinkersGenerateConfigurationsResponse, +} from "../models"; + +/// +/** Interface representing a Linkers. */ +export interface Linkers { + /** + * list dryrun jobs + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be + * connected. + * @param options The options parameters. + */ + listDryrun( + resourceUri: string, + options?: LinkersListDryrunOptionalParams, + ): PagedAsyncIterableIterator; + /** + * get a dryrun job + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be + * connected. + * @param dryrunName The name of dryrun. + * @param options The options parameters. + */ + getDryrun( + resourceUri: string, + dryrunName: string, + options?: LinkersGetDryrunOptionalParams, + ): Promise; + /** + * create a dryrun job to do necessary check before actual creation + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be + * connected. + * @param dryrunName The name of dryrun. + * @param parameters dryrun resource. + * @param options The options parameters. + */ + beginCreateDryrun( + resourceUri: string, + dryrunName: string, + parameters: DryrunResource, + options?: LinkersCreateDryrunOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + LinkersCreateDryrunResponse + > + >; + /** + * create a dryrun job to do necessary check before actual creation + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be + * connected. + * @param dryrunName The name of dryrun. + * @param parameters dryrun resource. + * @param options The options parameters. + */ + beginCreateDryrunAndWait( + resourceUri: string, + dryrunName: string, + parameters: DryrunResource, + options?: LinkersCreateDryrunOptionalParams, + ): Promise; + /** + * add a dryrun job to do necessary check before actual creation + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be + * connected. + * @param dryrunName The name of dryrun. + * @param parameters dryrun resource. + * @param options The options parameters. + */ + beginUpdateDryrun( + resourceUri: string, + dryrunName: string, + parameters: DryrunPatch, + options?: LinkersUpdateDryrunOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + LinkersUpdateDryrunResponse + > + >; + /** + * add a dryrun job to do necessary check before actual creation + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be + * connected. + * @param dryrunName The name of dryrun. + * @param parameters dryrun resource. + * @param options The options parameters. + */ + beginUpdateDryrunAndWait( + resourceUri: string, + dryrunName: string, + parameters: DryrunPatch, + options?: LinkersUpdateDryrunOptionalParams, + ): Promise; + /** + * delete a dryrun job + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be + * connected. + * @param dryrunName The name of dryrun. + * @param options The options parameters. + */ + deleteDryrun( + resourceUri: string, + dryrunName: string, + options?: LinkersDeleteDryrunOptionalParams, + ): Promise; + /** + * Generate configurations for a Linker. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be + * connected. + * @param linkerName The name Linker resource. + * @param options The options parameters. + */ + generateConfigurations( + resourceUri: string, + linkerName: string, + options?: LinkersGenerateConfigurationsOptionalParams, + ): Promise; +} diff --git a/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/operations.ts b/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/operations.ts index 768cd0e6e86a..c66ecd5ef4fc 100644 --- a/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/operations.ts +++ b/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/operations.ts @@ -17,6 +17,6 @@ export interface Operations { * @param options The options parameters. */ list( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): PagedAsyncIterableIterator; } diff --git a/sdk/servicelinker/arm-servicelinker/src/pagingHelper.ts b/sdk/servicelinker/arm-servicelinker/src/pagingHelper.ts index 269a2b9814b5..205cccc26592 100644 --- a/sdk/servicelinker/arm-servicelinker/src/pagingHelper.ts +++ b/sdk/servicelinker/arm-servicelinker/src/pagingHelper.ts @@ -28,7 +28,7 @@ export function getContinuationToken(page: unknown): string | undefined { export function setContinuationToken( page: unknown, - continuationToken: string | undefined + continuationToken: string | undefined, ): void { if (typeof page !== "object" || page === null || !continuationToken) { return; diff --git a/sdk/servicelinker/arm-servicelinker/src/serviceLinkerManagementClient.ts b/sdk/servicelinker/arm-servicelinker/src/serviceLinkerManagementClient.ts index abd984510750..5526fe8197e4 100644 --- a/sdk/servicelinker/arm-servicelinker/src/serviceLinkerManagementClient.ts +++ b/sdk/servicelinker/arm-servicelinker/src/serviceLinkerManagementClient.ts @@ -11,11 +11,23 @@ import * as coreRestPipeline from "@azure/core-rest-pipeline"; import { PipelineRequest, PipelineResponse, - SendRequest + SendRequest, } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; -import { LinkerImpl, OperationsImpl } from "./operations"; -import { Linker, Operations } from "./operationsInterfaces"; +import { + ConnectorImpl, + LinkerImpl, + LinkersImpl, + OperationsImpl, + ConfigurationNamesImpl, +} from "./operations"; +import { + Connector, + Linker, + Linkers, + Operations, + ConfigurationNames, +} from "./operationsInterfaces"; import { ServiceLinkerManagementClientOptionalParams } from "./models"; export class ServiceLinkerManagementClient extends coreClient.ServiceClient { @@ -29,7 +41,7 @@ export class ServiceLinkerManagementClient extends coreClient.ServiceClient { */ constructor( credentials: coreAuth.TokenCredential, - options?: ServiceLinkerManagementClientOptionalParams + options?: ServiceLinkerManagementClientOptionalParams, ) { if (credentials === undefined) { throw new Error("'credentials' cannot be null"); @@ -41,10 +53,10 @@ export class ServiceLinkerManagementClient extends coreClient.ServiceClient { } const defaults: ServiceLinkerManagementClientOptionalParams = { requestContentType: "application/json; charset=utf-8", - credential: credentials + credential: credentials, }; - const packageDetails = `azsdk-js-arm-servicelinker/2.1.1`; + const packageDetails = `azsdk-js-arm-servicelinker/3.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -54,20 +66,21 @@ export class ServiceLinkerManagementClient extends coreClient.ServiceClient { ...defaults, ...options, userAgentOptions: { - userAgentPrefix + userAgentPrefix, }, endpoint: - options.endpoint ?? options.baseUri ?? "https://management.azure.com" + 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(); + const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = + options.pipeline.getOrderedPolicies(); bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => pipelinePolicy.name === - coreRestPipeline.bearerTokenAuthenticationPolicyName + coreRestPipeline.bearerTokenAuthenticationPolicyName, ); } if ( @@ -77,7 +90,7 @@ export class ServiceLinkerManagementClient extends coreClient.ServiceClient { !bearerTokenAuthenticationPolicyFound ) { this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName + name: coreRestPipeline.bearerTokenAuthenticationPolicyName, }); this.pipeline.addPolicy( coreRestPipeline.bearerTokenAuthenticationPolicy({ @@ -87,17 +100,20 @@ export class ServiceLinkerManagementClient extends coreClient.ServiceClient { `${optionsWithDefaults.endpoint}/.default`, challengeCallbacks: { authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) + coreClient.authorizeRequestOnClaimChallenge, + }, + }), ); } // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-05-01"; + this.apiVersion = options.apiVersion || "2022-11-01-preview"; + this.connector = new ConnectorImpl(this); this.linker = new LinkerImpl(this); + this.linkers = new LinkersImpl(this); this.operations = new OperationsImpl(this); + this.configurationNames = new ConfigurationNamesImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -110,7 +126,7 @@ export class ServiceLinkerManagementClient extends coreClient.ServiceClient { name: "CustomApiVersionPolicy", async sendRequest( request: PipelineRequest, - next: SendRequest + next: SendRequest, ): Promise { const param = request.url.split("?"); if (param.length > 1) { @@ -124,11 +140,14 @@ export class ServiceLinkerManagementClient extends coreClient.ServiceClient { request.url = param[0] + "?" + newParams.join("&"); } return next(request); - } + }, }; this.pipeline.addPolicy(apiVersionPolicy); } + connector: Connector; linker: Linker; + linkers: Linkers; operations: Operations; + configurationNames: ConfigurationNames; } diff --git a/sdk/servicelinker/arm-servicelinker/test/sampleTest.ts b/sdk/servicelinker/arm-servicelinker/test/sampleTest.ts index 25aeb3ebcc36..d64be981b694 100644 --- a/sdk/servicelinker/arm-servicelinker/test/sampleTest.ts +++ b/sdk/servicelinker/arm-servicelinker/test/sampleTest.ts @@ -9,7 +9,7 @@ import { Recorder, RecorderStartOptions, - env + env, } from "@azure-tools/test-recorder"; import { assert } from "chai"; import { Context } from "mocha"; @@ -18,26 +18,26 @@ 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" + SUBSCRIPTION_ID: "azure_subscription_id", }; const recorderOptions: RecorderStartOptions = { - envSetupForPlayback: replaceableVariables + envSetupForPlayback: replaceableVariables, }; describe("My test", () => { let recorder: Recorder; - beforeEach(async function(this: Context) { + beforeEach(async function (this: Context) { recorder = new Recorder(this.currentTest); await recorder.start(recorderOptions); }); - afterEach(async function() { + afterEach(async function () { await recorder.stop(); }); - it("sample test", async function() { + it("sample test", async function () { console.log("Hi, I'm a test!"); }); }); diff --git a/sdk/servicelinker/arm-servicelinker/tsconfig.json b/sdk/servicelinker/arm-servicelinker/tsconfig.json index 5c861ab691f6..3e6ae96443f3 100644 --- a/sdk/servicelinker/arm-servicelinker/tsconfig.json +++ b/sdk/servicelinker/arm-servicelinker/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-servicelinker": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"