diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index effaa47f703e..b46c943bf015 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1021,9 +1021,6 @@ importers: '@rush-temp/iot-modelsrepository': specifier: file:./projects/iot-modelsrepository.tgz version: file:projects/iot-modelsrepository.tgz(@types/debug@4.1.12)(tsx@4.19.4)(vite@6.3.5(@types/node@22.7.9)(tsx@4.19.4)(yaml@2.7.1))(yaml@2.7.1) - '@rush-temp/mcp-server': - specifier: file:./projects/mcp-server.tgz - version: file:projects/mcp-server.tgz(@types/debug@4.1.12)(@vitest/browser@3.1.2)(yaml@2.7.1) '@rush-temp/keyvault-admin': specifier: file:./projects/keyvault-admin.tgz version: file:projects/keyvault-admin.tgz(@types/debug@4.1.12)(tsx@4.19.4)(vite@6.3.5(@types/node@22.7.9)(tsx@4.19.4)(yaml@2.7.1))(yaml@2.7.1) @@ -1063,6 +1060,9 @@ importers: '@rush-temp/maps-timezone': specifier: file:./projects/maps-timezone.tgz version: file:projects/maps-timezone.tgz(@types/debug@4.1.12)(tsx@4.19.4)(vite@6.3.5(@types/node@22.7.9)(tsx@4.19.4)(yaml@2.7.1))(yaml@2.7.1) + '@rush-temp/mcp-server': + specifier: file:./projects/mcp-server.tgz + version: file:projects/mcp-server.tgz(@types/debug@4.1.12)(@vitest/browser@3.1.2)(yaml@2.7.1) '@rush-temp/microsoft-playwright-testing': specifier: file:./projects/microsoft-playwright-testing.tgz version: file:projects/microsoft-playwright-testing.tgz(tsx@4.19.4)(vite@6.3.5(@types/node@22.7.9)(tsx@4.19.4)(yaml@2.7.1))(yaml@2.7.1) @@ -2794,7 +2794,7 @@ packages: version: 0.0.0 '@rush-temp/arm-eventhub@file:projects/arm-eventhub.tgz': - resolution: {integrity: sha512-01qcODjBU80j+iz1CMgBUqN7wFU8huK3hU9312JJu8/7ZTppVEmw9r359idY2J/k5mwD0mq0jcv6Gl3Uxoc+ig==, tarball: file:projects/arm-eventhub.tgz} + resolution: {integrity: sha512-N3ThbtI5r7ydbOg3Qv2EHhNdSpWn7ZUrOExgD6R3SpUeL54Hm9G+bMI/loGHPLOpU7t03DBSnnWb5f7m09tIjQ==, tarball: file:projects/arm-eventhub.tgz} version: 0.0.0 '@rush-temp/arm-extendedlocation@file:projects/arm-extendedlocation.tgz': @@ -3669,10 +3669,6 @@ packages: resolution: {integrity: sha512-nVEawKXIhltEp1Zvua0E46Gdg0Hs5JJDFD7WPgqFBycYtQjRVsw60x49ZTi8ZxYXPJGQBJC2xLvj1fg/A5uhyQ==, tarball: file:projects/iot-modelsrepository.tgz} version: 0.0.0 - '@rush-temp/mcp-server@file:projects/mcp-server.tgz': - resolution: {integrity: sha512-DuCikdWUz6hleAR8EjUp7JD4VAGR1YMfNRAshvzJ7W20qAMV10dscYCo2wq8Eqt5TtEwLOrJFFfnbHwGIhNTZQ==, tarball: file:projects/mcp-server.tgz} - version: 0.0.0 - '@rush-temp/keyvault-admin@file:projects/keyvault-admin.tgz': resolution: {integrity: sha512-+pLp6hMMbEHRNWIWBJHEb3ovy65MoQthJRuwfDYdXDDYMYgiazL7j3CLleRz+WpDlI5kJ8gyD24pIqCoVZvQqg==, tarball: file:projects/keyvault-admin.tgz} version: 0.0.0 @@ -3725,6 +3721,10 @@ packages: resolution: {integrity: sha512-LLoNu/hOKIZ5/eLQ0io6I6kDPrnkiI1C3rDtG0DEQlP097B9CoeeaQ2E+qbGYUAPvvyo6QththExkcmgUENgEg==, tarball: file:projects/maps-timezone.tgz} version: 0.0.0 + '@rush-temp/mcp-server@file:projects/mcp-server.tgz': + resolution: {integrity: sha512-xVj0UA/iOcFZso/cQiQ1Ug5juexp+mJOhFwNBANfNb0bzXo9BRrgR2/0DxaTIIS0lest23qzU0nMQUiZPPetpA==, tarball: file:projects/mcp-server.tgz} + version: 0.0.0 + '@rush-temp/microsoft-playwright-testing@file:projects/microsoft-playwright-testing.tgz': resolution: {integrity: sha512-sVU4AhYy8i4VhihEGOHMZLmUggC15w2JvBfGUC+i+q7nxmE3sIbO+EzicltK811tg0QQML6lAzKonojrK4FO6g==, tarball: file:projects/microsoft-playwright-testing.tgz} version: 0.0.0 @@ -12686,7 +12686,6 @@ snapshots: '@rush-temp/arm-eventhub@file:projects/arm-eventhub.tgz(@types/debug@4.1.12)(tsx@4.19.4)(vite@6.3.5(@types/node@22.7.9)(tsx@4.19.4)(yaml@2.7.1))(yaml@2.7.1)': dependencies: - '@azure/arm-network': 32.2.0 '@azure/core-lro': 2.7.2 '@types/node': 18.19.87 '@vitest/browser': 3.1.2(playwright@1.52.0)(vite@6.3.5(@types/node@22.7.9)(tsx@4.19.4)(yaml@2.7.1))(vitest@3.1.2) @@ -12694,7 +12693,7 @@ snapshots: dotenv: 16.5.0 playwright: 1.52.0 tslib: 2.8.1 - typescript: 5.6.3 + typescript: 5.8.3 vitest: 3.1.2(@types/debug@4.1.12)(@types/node@18.19.87)(@vitest/browser@3.1.2)(tsx@4.19.4)(yaml@2.7.1) transitivePeerDependencies: - '@edge-runtime/vm' @@ -20462,37 +20461,6 @@ snapshots: - webdriverio - yaml - '@rush-temp/mcp-server@file:projects/mcp-server.tgz(@types/debug@4.1.12)(@vitest/browser@3.1.2)(yaml@2.7.1)': - dependencies: - '@modelcontextprotocol/sdk': 1.11.0 - '@types/node': 18.19.87 - '@vitest/coverage-istanbul': 3.1.2(vitest@3.1.2) - '@vitest/expect': 3.1.2 - dotenv: 16.5.0 - eslint: 9.26.0 - tsx: 4.19.3 - typescript: 5.8.3 - vitest: 3.1.2(@types/debug@4.1.12)(@types/node@18.19.87)(@vitest/browser@3.1.2)(tsx@4.19.3)(yaml@2.7.1) - zod: 3.24.4 - transitivePeerDependencies: - - '@edge-runtime/vm' - - '@types/debug' - - '@vitest/browser' - - '@vitest/ui' - - happy-dom - - jiti - - jsdom - - less - - lightningcss - - msw - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - yaml - '@rush-temp/keyvault-admin@file:projects/keyvault-admin.tgz(@types/debug@4.1.12)(tsx@4.19.4)(vite@6.3.5(@types/node@22.7.9)(tsx@4.19.4)(yaml@2.7.1))(yaml@2.7.1)': dependencies: '@azure/keyvault-keys': 4.9.0 @@ -20962,6 +20930,37 @@ snapshots: - webdriverio - yaml + '@rush-temp/mcp-server@file:projects/mcp-server.tgz(@types/debug@4.1.12)(@vitest/browser@3.1.2)(yaml@2.7.1)': + dependencies: + '@modelcontextprotocol/sdk': 1.11.0 + '@types/node': 18.19.87 + '@vitest/coverage-istanbul': 3.1.2(vitest@3.1.2) + '@vitest/expect': 3.1.2 + dotenv: 16.5.0 + eslint: 9.26.0 + tsx: 4.19.3 + typescript: 5.8.3 + vitest: 3.1.2(@types/debug@4.1.12)(@types/node@18.19.87)(@vitest/browser@3.1.2)(tsx@4.19.3)(yaml@2.7.1) + zod: 3.24.4 + transitivePeerDependencies: + - '@edge-runtime/vm' + - '@types/debug' + - '@vitest/browser' + - '@vitest/ui' + - happy-dom + - jiti + - jsdom + - less + - lightningcss + - msw + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - yaml + '@rush-temp/microsoft-playwright-testing@file:projects/microsoft-playwright-testing.tgz(tsx@4.19.4)(vite@6.3.5(@types/node@22.7.9)(tsx@4.19.4)(yaml@2.7.1))(yaml@2.7.1)': dependencies: '@playwright/test': 1.52.0 diff --git a/sdk/eventhub/arm-eventhub/CHANGELOG.md b/sdk/eventhub/arm-eventhub/CHANGELOG.md index b1863a997a99..e57b42d6f4dd 100644 --- a/sdk/eventhub/arm-eventhub/CHANGELOG.md +++ b/sdk/eventhub/arm-eventhub/CHANGELOG.md @@ -1,5 +1,32 @@ # Release History +## 5.3.0-beta.2 (2025-05-08) +Compared with version 5.2.0 + +### Features Added + + - Added operation Namespaces.beginFailover + - Added operation Namespaces.beginFailoverAndWait + - Added Interface FailOver + - Added Interface GeoDataReplicationProperties + - Added Interface MessageTimestampDescription + - Added Interface NamespaceReplicaLocation + - Added Interface NamespacesFailoverHeaders + - Added Interface NamespacesFailoverOptionalParams + - Added Type Alias GeoDRRoleType + - Added Type Alias NamespacesFailoverResponse + - Added Type Alias TimestampType + - Interface EHNamespace has a new optional parameter geoDataReplication + - Interface Eventhub has a new optional parameter identifier + - Interface Eventhub has a new optional parameter messageTimestampDescription + - Interface RetentionDescription has a new optional parameter minCompactionLagInMins + - Added Enum KnownGeoDRRoleType + - Added Enum KnownTimestampType + - Enum KnownCleanupPolicyRetentionDescription has a new value DeleteOrCompact + - Enum KnownSchemaType has a new value Json + - Enum KnownSchemaType has a new value ProtoBuf + + ## 5.3.0-beta.1 (2025-02-12) Compared with version 5.2.0 diff --git a/sdk/eventhub/arm-eventhub/LICENSE b/sdk/eventhub/arm-eventhub/LICENSE index b2f52a2bad4e..63447fd8bbbf 100644 --- a/sdk/eventhub/arm-eventhub/LICENSE +++ b/sdk/eventhub/arm-eventhub/LICENSE @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +SOFTWARE. \ No newline at end of file diff --git a/sdk/eventhub/arm-eventhub/README.md b/sdk/eventhub/arm-eventhub/README.md index 171369d9c663..1b3b528a8863 100644 --- a/sdk/eventhub/arm-eventhub/README.md +++ b/sdk/eventhub/arm-eventhub/README.md @@ -63,16 +63,14 @@ For browser environments, use the `InteractiveBrowserCredential` from the `@azur import { InteractiveBrowserCredential } from "@azure/identity"; import { EventHubManagementClient } from "@azure/arm-eventhub"; -const subscriptionId = "00000000-0000-0000-0000-000000000000"; const credential = new InteractiveBrowserCredential({ tenantId: "", - clientId: "", -}); + clientId: "" + }); const client = new EventHubManagementClient(credential, subscriptionId); ``` ### JavaScript Bundle - To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). ## Key concepts @@ -108,7 +106,6 @@ If you'd like to contribute to this library, please read the [contributing guide - [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) - [azure_cli]: https://learn.microsoft.com/cli/azure [azure_sub]: https://azure.microsoft.com/free/ [azure_sub]: https://azure.microsoft.com/free/ diff --git a/sdk/eventhub/arm-eventhub/_meta.json b/sdk/eventhub/arm-eventhub/_meta.json index 7e48719b8030..dc3c721dba9c 100644 --- a/sdk/eventhub/arm-eventhub/_meta.json +++ b/sdk/eventhub/arm-eventhub/_meta.json @@ -1,8 +1,8 @@ { - "commit": "20efe6fd4db8a494eab1852a8541fbabe5de569c", + "commit": "05c4bb95063cb2b1c7d73235837d49f3dcd0a9a5", "readme": "specification/eventhub/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=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\eventhub\\resource-manager\\readme.md --use=@autorest/typescript@6.0.34 --generate-sample=true", + "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/eventhub/resource-manager/readme.md --use=@autorest/typescript@^6.0.12", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.19", - "use": "@autorest/typescript@6.0.34" -} \ No newline at end of file + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.26", + "use": "@autorest/typescript@^6.0.12" +} diff --git a/sdk/eventhub/arm-eventhub/api-extractor.json b/sdk/eventhub/arm-eventhub/api-extractor.json index 76a8dc49b5c7..8d49be3d508f 100644 --- a/sdk/eventhub/arm-eventhub/api-extractor.json +++ b/sdk/eventhub/arm-eventhub/api-extractor.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "mainEntryPointFilePath": "dist/esm/index.d.ts", "docModel": { "enabled": true }, @@ -11,7 +11,7 @@ "dtsRollup": { "enabled": true, "untrimmedFilePath": "", - "publicTrimmedFilePath": "./types/arm-eventhub.d.ts" + "publicTrimmedFilePath": "dist/arm-eventhub.d.ts" }, "messages": { "tsdocMessageReporting": { diff --git a/sdk/eventhub/arm-eventhub/package.json b/sdk/eventhub/arm-eventhub/package.json index 04059dd747a6..2e76bcf30ca9 100644 --- a/sdk/eventhub/arm-eventhub/package.json +++ b/sdk/eventhub/arm-eventhub/package.json @@ -3,17 +3,17 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for EventHubManagementClient.", - "version": "5.3.0-beta.1", + "version": "5.3.0-beta.2", "engines": { "node": ">=18.0.0" }, "dependencies": { "@azure/abort-controller": "^2.1.2", "@azure/core-auth": "^1.9.0", - "@azure/core-client": "^1.9.2", + "@azure/core-client": "^1.9.4", "@azure/core-lro": "^2.5.4", "@azure/core-paging": "^1.6.2", - "@azure/core-rest-pipeline": "^1.19.0", + "@azure/core-rest-pipeline": "^1.20.0", "tslib": "^2.8.1" }, "keywords": [ @@ -21,32 +21,30 @@ "azure", "typescript", "browser", - "isomorphic" + "isomorphic", + "cloud" ], "license": "MIT", "main": "./dist/commonjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/commonjs/index.d.ts", + "type": "module", "devDependencies": { "@azure-tools/test-credential": "^2.0.0", "@azure-tools/test-recorder": "^4.1.0", "@azure-tools/test-utils-vitest": "^1.0.0", - "@azure/arm-network": "^32.2.0", - "@azure/arm-storage": "^18.0.0", "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.6.0", + "@azure/identity": "^4.9.1", + "@azure/logger": "^1.2.0", "@types/node": "^18.0.0", "@vitest/browser": "^3.0.9", "@vitest/coverage-istanbul": "^3.0.9", "dotenv": "^16.0.0", - "playwright": "^1.50.1", - "typescript": "~5.6.2", + "playwright": "^1.52.0", + "typescript": "~5.8.2", "vitest": "^3.0.9" }, - "repository": { - "type": "git", - "url": "https://github.com/Azure/azure-sdk-for-js.git" - }, + "repository": "github:Azure/azure-sdk-for-js", "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, @@ -59,20 +57,30 @@ ], "scripts": { "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api", + "build:browser": "echo skipped", + "build:node": "echo skipped", "build:samples": "echo skipped.", - "check-format": "echo skipped", + "build:test": "echo skipped", + "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "execute:samples": "echo skipped", "extract-api": "dev-tool run extract-api", - "format": "echo skipped", + "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:browser": "echo skipped", + "integration-test:node": "dev-tool run test:vitest --esm", "lint": "echo skipped", + "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", "pack": "npm pack 2>&1", "prepack": "npm run build", - "test": "npm run test:node && npm run test:browser", + "test": "npm run integration-test", "test:browser": "echo skipped", "test:node": "dev-tool run test:vitest", - "test:node:esm": "dev-tool run test:vitest --esm", - "update-snippets": "dev-tool run update-snippets" + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:browser": "echo skipped", + "unit-test:node": "dev-tool run test:vitest", + "update-snippets": "dev-tool run update-snippets", + "test:node:esm": "dev-tool run test:vitest --esm" }, "sideEffects": false, "//metadata": { @@ -84,16 +92,9 @@ ] }, "autoPublish": true, + "browser": "./dist/browser/index.js", + "react-native": "./dist/react-native/index.js", "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventhub/arm-eventhub", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-eventhub?view=azure-node-preview" - }, - "type": "module", "tshy": { "project": "./tsconfig.src.json", "exports": { @@ -110,8 +111,6 @@ ], "selfLink": false }, - "browser": "./dist/browser/index.js", - "react-native": "./dist/react-native/index.js", "exports": { "./package.json": "./package.json", ".": { @@ -133,4 +132,4 @@ } } } -} +} \ No newline at end of file diff --git a/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts b/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts index 10e4c77acd1e..f85b81a2b09b 100644 --- a/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts +++ b/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts @@ -8,11 +8,7 @@ import * as coreClient from "@azure/core-client"; import * as coreRestPipeline from "@azure/core-rest-pipeline"; -import { - PipelineRequest, - PipelineResponse, - SendRequest, -} from "@azure/core-rest-pipeline"; +import { PipelineRequest, PipelineResponse, SendRequest } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { ClustersImpl, @@ -79,7 +75,7 @@ export class EventHubManagementClient extends coreClient.ServiceClient { credential: credentials, }; - const packageDetails = `azsdk-js-arm-eventhub/5.3.0-beta.1`; + const packageDetails = `azsdk-js-arm-eventhub/5.3.0-beta.2`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -91,8 +87,7 @@ export class EventHubManagementClient extends coreClient.ServiceClient { userAgentOptions: { userAgentPrefix, }, - endpoint: - options.endpoint ?? options.baseUri ?? "https://management.azure.com", + endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com", }; super(optionsWithDefaults); @@ -102,8 +97,7 @@ export class EventHubManagementClient extends coreClient.ServiceClient { options.pipeline.getOrderedPolicies(); bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => - pipelinePolicy.name === - coreRestPipeline.bearerTokenAuthenticationPolicyName, + pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName, ); } if ( @@ -119,11 +113,9 @@ export class EventHubManagementClient extends coreClient.ServiceClient { coreRestPipeline.bearerTokenAuthenticationPolicy({ credential: credentials, scopes: - optionsWithDefaults.credentialScopes ?? - `${optionsWithDefaults.endpoint}/.default`, + optionsWithDefaults.credentialScopes ?? `${optionsWithDefaults.endpoint}/.default`, challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge, + authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge, }, }), ); @@ -140,8 +132,9 @@ export class EventHubManagementClient extends coreClient.ServiceClient { this.privateLinkResources = new PrivateLinkResourcesImpl(this); this.networkSecurityPerimeterConfigurationOperations = new NetworkSecurityPerimeterConfigurationOperationsImpl(this); - this.networkSecurityPerimeterConfigurations = - new NetworkSecurityPerimeterConfigurationsImpl(this); + this.networkSecurityPerimeterConfigurations = new NetworkSecurityPerimeterConfigurationsImpl( + this, + ); this.configuration = new ConfigurationImpl(this); this.disasterRecoveryConfigs = new DisasterRecoveryConfigsImpl(this); this.eventHubs = new EventHubsImpl(this); @@ -159,10 +152,7 @@ export class EventHubManagementClient extends coreClient.ServiceClient { } const apiVersionPolicy = { name: "CustomApiVersionPolicy", - async sendRequest( - request: PipelineRequest, - next: SendRequest, - ): Promise { + async sendRequest(request: PipelineRequest, next: SendRequest): Promise { const param = request.url.split("?"); if (param.length > 1) { const newParams = param[1].split("&").map((item) => { diff --git a/sdk/eventhub/arm-eventhub/src/lroImpl.ts b/sdk/eventhub/arm-eventhub/src/lroImpl.ts index 5f88efab981b..1b3a95e6c540 100644 --- a/sdk/eventhub/arm-eventhub/src/lroImpl.ts +++ b/sdk/eventhub/arm-eventhub/src/lroImpl.ts @@ -6,9 +6,6 @@ * 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"; @@ -26,10 +23,7 @@ export function createLroSpec(inputs: { requestMethod: spec.httpMethod, requestPath: spec.path!, sendInitialRequest: () => sendOperationFn(args, spec), - sendPollRequest: ( - path: string, - options?: { abortSignal?: AbortSignalLike }, - ) => { + sendPollRequest: (path: string, options?: { abortSignal?: AbortSignalLike }) => { const { requestBody, ...restSpec } = spec; return sendOperationFn(args, { ...restSpec, diff --git a/sdk/eventhub/arm-eventhub/src/models/index.ts b/sdk/eventhub/arm-eventhub/src/models/index.ts index 1d327828a914..6f23fc4e0f98 100644 --- a/sdk/eventhub/arm-eventhub/src/models/index.ts +++ b/sdk/eventhub/arm-eventhub/src/models/index.ts @@ -8,9 +8,7 @@ import * as coreClient from "@azure/core-client"; -export type ApplicationGroupPolicyUnion = - | ApplicationGroupPolicy - | ThrottlingPolicy; +export type ApplicationGroupPolicyUnion = ApplicationGroupPolicy | ThrottlingPolicy; /** The response of the List Available Clusters operation. */ export interface AvailableClustersList { @@ -1597,10 +1595,7 @@ export type UnavailableReason = /** Defines values for ProvisioningStateDR. */ export type ProvisioningStateDR = "Accepted" | "Succeeded" | "Failed"; /** Defines values for RoleDisasterRecovery. */ -export type RoleDisasterRecovery = - | "Primary" - | "PrimaryNotReplicating" - | "Secondary"; +export type RoleDisasterRecovery = "Primary" | "PrimaryNotReplicating" | "Secondary"; /** Defines values for EntityStatus. */ export type EntityStatus = | "Active" @@ -1625,29 +1620,25 @@ export interface ClustersListAvailableClusterRegionOptionalParams export type ClustersListAvailableClusterRegionResponse = AvailableClustersList; /** Optional parameters. */ -export interface ClustersListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} +export interface ClustersListBySubscriptionOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listBySubscription operation. */ export type ClustersListBySubscriptionResponse = ClusterListResult; /** Optional parameters. */ -export interface ClustersListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} +export interface ClustersListByResourceGroupOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroup operation. */ export type ClustersListByResourceGroupResponse = ClusterListResult; /** Optional parameters. */ -export interface ClustersGetOptionalParams - extends coreClient.OperationOptions {} +export interface ClustersGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ export type ClustersGetResponse = Cluster; /** Optional parameters. */ -export interface ClustersCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { +export interface ClustersCreateOrUpdateOptionalParams 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. */ @@ -1658,8 +1649,7 @@ export interface ClustersCreateOrUpdateOptionalParams export type ClustersCreateOrUpdateResponse = Cluster; /** Optional parameters. */ -export interface ClustersUpdateOptionalParams - extends coreClient.OperationOptions { +export interface ClustersUpdateOptionalParams 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. */ @@ -1670,8 +1660,7 @@ export interface ClustersUpdateOptionalParams export type ClustersUpdateResponse = Cluster; /** Optional parameters. */ -export interface ClustersDeleteOptionalParams - extends coreClient.OperationOptions { +export interface ClustersDeleteOptionalParams 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. */ @@ -1679,15 +1668,13 @@ export interface ClustersDeleteOptionalParams } /** Optional parameters. */ -export interface ClustersListNamespacesOptionalParams - extends coreClient.OperationOptions {} +export interface ClustersListNamespacesOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNamespaces operation. */ export type ClustersListNamespacesResponse = EHNamespaceIdListResult; /** Optional parameters. */ -export interface ClustersListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} +export interface ClustersListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listBySubscriptionNext operation. */ export type ClustersListBySubscriptionNextResponse = ClusterListResult; @@ -1700,22 +1687,19 @@ export interface ClustersListByResourceGroupNextOptionalParams export type ClustersListByResourceGroupNextResponse = ClusterListResult; /** Optional parameters. */ -export interface NamespacesListOptionalParams - extends coreClient.OperationOptions {} +export interface NamespacesListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ export type NamespacesListResponse = EHNamespaceListResult; /** Optional parameters. */ -export interface NamespacesListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} +export interface NamespacesListByResourceGroupOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroup operation. */ export type NamespacesListByResourceGroupResponse = EHNamespaceListResult; /** Optional parameters. */ -export interface NamespacesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { +export interface NamespacesCreateOrUpdateOptionalParams 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. */ @@ -1726,8 +1710,7 @@ export interface NamespacesCreateOrUpdateOptionalParams export type NamespacesCreateOrUpdateResponse = EHNamespace; /** Optional parameters. */ -export interface NamespacesDeleteOptionalParams - extends coreClient.OperationOptions { +export interface NamespacesDeleteOptionalParams 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. */ @@ -1735,22 +1718,19 @@ export interface NamespacesDeleteOptionalParams } /** Optional parameters. */ -export interface NamespacesGetOptionalParams - extends coreClient.OperationOptions {} +export interface NamespacesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ export type NamespacesGetResponse = EHNamespace; /** Optional parameters. */ -export interface NamespacesUpdateOptionalParams - extends coreClient.OperationOptions {} +export interface NamespacesUpdateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the update operation. */ export type NamespacesUpdateResponse = EHNamespace; /** Optional parameters. */ -export interface NamespacesFailoverOptionalParams - extends coreClient.OperationOptions { +export interface NamespacesFailoverOptionalParams 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. */ @@ -1768,15 +1748,13 @@ export interface NamespacesCreateOrUpdateNetworkRuleSetOptionalParams export type NamespacesCreateOrUpdateNetworkRuleSetResponse = NetworkRuleSet; /** Optional parameters. */ -export interface NamespacesGetNetworkRuleSetOptionalParams - extends coreClient.OperationOptions {} +export interface NamespacesGetNetworkRuleSetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the getNetworkRuleSet operation. */ export type NamespacesGetNetworkRuleSetResponse = NetworkRuleSet; /** Optional parameters. */ -export interface NamespacesListNetworkRuleSetOptionalParams - extends coreClient.OperationOptions {} +export interface NamespacesListNetworkRuleSetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNetworkRuleSet operation. */ export type NamespacesListNetworkRuleSetResponse = NetworkRuleSetListResult; @@ -1786,38 +1764,33 @@ export interface NamespacesListAuthorizationRulesOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listAuthorizationRules operation. */ -export type NamespacesListAuthorizationRulesResponse = - AuthorizationRuleListResult; +export type NamespacesListAuthorizationRulesResponse = AuthorizationRuleListResult; /** Optional parameters. */ export interface NamespacesCreateOrUpdateAuthorizationRuleOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdateAuthorizationRule operation. */ -export type NamespacesCreateOrUpdateAuthorizationRuleResponse = - AuthorizationRule; +export type NamespacesCreateOrUpdateAuthorizationRuleResponse = AuthorizationRule; /** Optional parameters. */ export interface NamespacesDeleteAuthorizationRuleOptionalParams extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface NamespacesGetAuthorizationRuleOptionalParams - extends coreClient.OperationOptions {} +export interface NamespacesGetAuthorizationRuleOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the getAuthorizationRule operation. */ export type NamespacesGetAuthorizationRuleResponse = AuthorizationRule; /** Optional parameters. */ -export interface NamespacesListKeysOptionalParams - extends coreClient.OperationOptions {} +export interface NamespacesListKeysOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listKeys operation. */ export type NamespacesListKeysResponse = AccessKeys; /** Optional parameters. */ -export interface NamespacesRegenerateKeysOptionalParams - extends coreClient.OperationOptions {} +export interface NamespacesRegenerateKeysOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the regenerateKeys operation. */ export type NamespacesRegenerateKeysResponse = AccessKeys; @@ -1827,12 +1800,10 @@ export interface NamespacesCheckNameAvailabilityOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the checkNameAvailability operation. */ -export type NamespacesCheckNameAvailabilityResponse = - CheckNameAvailabilityResult; +export type NamespacesCheckNameAvailabilityResponse = CheckNameAvailabilityResult; /** Optional parameters. */ -export interface NamespacesListNextOptionalParams - extends coreClient.OperationOptions {} +export interface NamespacesListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type NamespacesListNextResponse = EHNamespaceListResult; @@ -1849,24 +1820,20 @@ export interface NamespacesListAuthorizationRulesNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listAuthorizationRulesNext operation. */ -export type NamespacesListAuthorizationRulesNextResponse = - AuthorizationRuleListResult; +export type NamespacesListAuthorizationRulesNextResponse = AuthorizationRuleListResult; /** Optional parameters. */ -export interface PrivateEndpointConnectionsListOptionalParams - extends coreClient.OperationOptions {} +export interface PrivateEndpointConnectionsListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ -export type PrivateEndpointConnectionsListResponse = - PrivateEndpointConnectionListResult; +export type PrivateEndpointConnectionsListResponse = PrivateEndpointConnectionListResult; /** Optional parameters. */ export interface PrivateEndpointConnectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ -export type PrivateEndpointConnectionsCreateOrUpdateResponse = - PrivateEndpointConnection; +export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection; /** Optional parameters. */ export interface PrivateEndpointConnectionsDeleteOptionalParams @@ -1878,8 +1845,7 @@ export interface PrivateEndpointConnectionsDeleteOptionalParams } /** Optional parameters. */ -export interface PrivateEndpointConnectionsGetOptionalParams - extends coreClient.OperationOptions {} +export interface PrivateEndpointConnectionsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection; @@ -1889,12 +1855,10 @@ export interface PrivateEndpointConnectionsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type PrivateEndpointConnectionsListNextResponse = - PrivateEndpointConnectionListResult; +export type PrivateEndpointConnectionsListNextResponse = PrivateEndpointConnectionListResult; /** Optional parameters. */ -export interface PrivateLinkResourcesGetOptionalParams - extends coreClient.OperationOptions {} +export interface PrivateLinkResourcesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ export type PrivateLinkResourcesGetResponse = PrivateLinkResourcesListResult; @@ -1917,15 +1881,13 @@ export interface NetworkSecurityPerimeterConfigurationsCreateOrUpdateOptionalPar } /** Optional parameters. */ -export interface ConfigurationPatchOptionalParams - extends coreClient.OperationOptions {} +export interface ConfigurationPatchOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the patch operation. */ export type ConfigurationPatchResponse = ClusterQuotaConfigurationProperties; /** Optional parameters. */ -export interface ConfigurationGetOptionalParams - extends coreClient.OperationOptions {} +export interface ConfigurationGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ export type ConfigurationGetResponse = ClusterQuotaConfigurationProperties; @@ -1935,16 +1897,14 @@ export interface DisasterRecoveryConfigsListAuthorizationRulesOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listAuthorizationRules operation. */ -export type DisasterRecoveryConfigsListAuthorizationRulesResponse = - AuthorizationRuleListResult; +export type DisasterRecoveryConfigsListAuthorizationRulesResponse = AuthorizationRuleListResult; /** Optional parameters. */ export interface DisasterRecoveryConfigsGetAuthorizationRuleOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the getAuthorizationRule operation. */ -export type DisasterRecoveryConfigsGetAuthorizationRuleResponse = - AuthorizationRule; +export type DisasterRecoveryConfigsGetAuthorizationRuleResponse = AuthorizationRule; /** Optional parameters. */ export interface DisasterRecoveryConfigsListKeysOptionalParams @@ -1958,12 +1918,10 @@ export interface DisasterRecoveryConfigsCheckNameAvailabilityOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the checkNameAvailability operation. */ -export type DisasterRecoveryConfigsCheckNameAvailabilityResponse = - CheckNameAvailabilityResult; +export type DisasterRecoveryConfigsCheckNameAvailabilityResponse = CheckNameAvailabilityResult; /** Optional parameters. */ -export interface DisasterRecoveryConfigsListOptionalParams - extends coreClient.OperationOptions {} +export interface DisasterRecoveryConfigsListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ export type DisasterRecoveryConfigsListResponse = ArmDisasterRecoveryListResult; @@ -1976,12 +1934,10 @@ export interface DisasterRecoveryConfigsCreateOrUpdateOptionalParams export type DisasterRecoveryConfigsCreateOrUpdateResponse = ArmDisasterRecovery; /** Optional parameters. */ -export interface DisasterRecoveryConfigsDeleteOptionalParams - extends coreClient.OperationOptions {} +export interface DisasterRecoveryConfigsDeleteOptionalParams extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface DisasterRecoveryConfigsGetOptionalParams - extends coreClient.OperationOptions {} +export interface DisasterRecoveryConfigsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ export type DisasterRecoveryConfigsGetResponse = ArmDisasterRecovery; @@ -1999,36 +1955,31 @@ export interface DisasterRecoveryConfigsListAuthorizationRulesNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listAuthorizationRulesNext operation. */ -export type DisasterRecoveryConfigsListAuthorizationRulesNextResponse = - AuthorizationRuleListResult; +export type DisasterRecoveryConfigsListAuthorizationRulesNextResponse = AuthorizationRuleListResult; /** Optional parameters. */ export interface DisasterRecoveryConfigsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type DisasterRecoveryConfigsListNextResponse = - ArmDisasterRecoveryListResult; +export type DisasterRecoveryConfigsListNextResponse = ArmDisasterRecoveryListResult; /** Optional parameters. */ export interface EventHubsListAuthorizationRulesOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listAuthorizationRules operation. */ -export type EventHubsListAuthorizationRulesResponse = - AuthorizationRuleListResult; +export type EventHubsListAuthorizationRulesResponse = AuthorizationRuleListResult; /** Optional parameters. */ export interface EventHubsCreateOrUpdateAuthorizationRuleOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdateAuthorizationRule operation. */ -export type EventHubsCreateOrUpdateAuthorizationRuleResponse = - AuthorizationRule; +export type EventHubsCreateOrUpdateAuthorizationRuleResponse = AuthorizationRule; /** Optional parameters. */ -export interface EventHubsGetAuthorizationRuleOptionalParams - extends coreClient.OperationOptions {} +export interface EventHubsGetAuthorizationRuleOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the getAuthorizationRule operation. */ export type EventHubsGetAuthorizationRuleResponse = AuthorizationRule; @@ -2038,22 +1989,19 @@ export interface EventHubsDeleteAuthorizationRuleOptionalParams extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface EventHubsListKeysOptionalParams - extends coreClient.OperationOptions {} +export interface EventHubsListKeysOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listKeys operation. */ export type EventHubsListKeysResponse = AccessKeys; /** Optional parameters. */ -export interface EventHubsRegenerateKeysOptionalParams - extends coreClient.OperationOptions {} +export interface EventHubsRegenerateKeysOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the regenerateKeys operation. */ export type EventHubsRegenerateKeysResponse = AccessKeys; /** Optional parameters. */ -export interface EventHubsListByNamespaceOptionalParams - extends coreClient.OperationOptions { +export interface EventHubsListByNamespaceOptionalParams extends coreClient.OperationOptions { /** Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. */ skip?: number; /** May be used to limit the number of results to the most recent N usageDetails. */ @@ -2064,19 +2012,16 @@ export interface EventHubsListByNamespaceOptionalParams export type EventHubsListByNamespaceResponse = EventHubListResult; /** Optional parameters. */ -export interface EventHubsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} +export interface EventHubsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ export type EventHubsCreateOrUpdateResponse = Eventhub; /** Optional parameters. */ -export interface EventHubsDeleteOptionalParams - extends coreClient.OperationOptions {} +export interface EventHubsDeleteOptionalParams extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface EventHubsGetOptionalParams - extends coreClient.OperationOptions {} +export interface EventHubsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ export type EventHubsGetResponse = Eventhub; @@ -2086,37 +2031,31 @@ export interface EventHubsListAuthorizationRulesNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listAuthorizationRulesNext operation. */ -export type EventHubsListAuthorizationRulesNextResponse = - AuthorizationRuleListResult; +export type EventHubsListAuthorizationRulesNextResponse = AuthorizationRuleListResult; /** Optional parameters. */ -export interface EventHubsListByNamespaceNextOptionalParams - extends coreClient.OperationOptions {} +export interface EventHubsListByNamespaceNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByNamespaceNext operation. */ export type EventHubsListByNamespaceNextResponse = EventHubListResult; /** Optional parameters. */ -export interface ConsumerGroupsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} +export interface ConsumerGroupsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ export type ConsumerGroupsCreateOrUpdateResponse = ConsumerGroup; /** Optional parameters. */ -export interface ConsumerGroupsDeleteOptionalParams - extends coreClient.OperationOptions {} +export interface ConsumerGroupsDeleteOptionalParams extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface ConsumerGroupsGetOptionalParams - extends coreClient.OperationOptions {} +export interface ConsumerGroupsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ export type ConsumerGroupsGetResponse = ConsumerGroup; /** Optional parameters. */ -export interface ConsumerGroupsListByEventHubOptionalParams - extends coreClient.OperationOptions { +export interface ConsumerGroupsListByEventHubOptionalParams extends coreClient.OperationOptions { /** Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. */ skip?: number; /** May be used to limit the number of results to the most recent N usageDetails. */ @@ -2134,22 +2073,19 @@ export interface ConsumerGroupsListByEventHubNextOptionalParams export type ConsumerGroupsListByEventHubNextResponse = ConsumerGroupListResult; /** Optional parameters. */ -export interface OperationsListOptionalParams - extends coreClient.OperationOptions {} +export interface OperationsListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ export type OperationsListResponse = OperationListResult; /** Optional parameters. */ -export interface OperationsListNextOptionalParams - extends coreClient.OperationOptions {} +export interface OperationsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type OperationsListNextResponse = OperationListResult; /** Optional parameters. */ -export interface SchemaRegistryListByNamespaceOptionalParams - extends coreClient.OperationOptions { +export interface SchemaRegistryListByNamespaceOptionalParams extends coreClient.OperationOptions { /** Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. */ skip?: number; /** May be used to limit the number of results to the most recent N usageDetails. */ @@ -2160,19 +2096,16 @@ export interface SchemaRegistryListByNamespaceOptionalParams export type SchemaRegistryListByNamespaceResponse = SchemaGroupListResult; /** Optional parameters. */ -export interface SchemaRegistryCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} +export interface SchemaRegistryCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ export type SchemaRegistryCreateOrUpdateResponse = SchemaGroup; /** Optional parameters. */ -export interface SchemaRegistryDeleteOptionalParams - extends coreClient.OperationOptions {} +export interface SchemaRegistryDeleteOptionalParams extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface SchemaRegistryGetOptionalParams - extends coreClient.OperationOptions {} +export interface SchemaRegistryGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ export type SchemaRegistryGetResponse = SchemaGroup; @@ -2189,24 +2122,20 @@ export interface ApplicationGroupListByNamespaceOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByNamespace operation. */ -export type ApplicationGroupListByNamespaceResponse = - ApplicationGroupListResult; +export type ApplicationGroupListByNamespaceResponse = ApplicationGroupListResult; /** Optional parameters. */ export interface ApplicationGroupCreateOrUpdateApplicationGroupOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdateApplicationGroup operation. */ -export type ApplicationGroupCreateOrUpdateApplicationGroupResponse = - ApplicationGroup; +export type ApplicationGroupCreateOrUpdateApplicationGroupResponse = ApplicationGroup; /** Optional parameters. */ -export interface ApplicationGroupDeleteOptionalParams - extends coreClient.OperationOptions {} +export interface ApplicationGroupDeleteOptionalParams extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface ApplicationGroupGetOptionalParams - extends coreClient.OperationOptions {} +export interface ApplicationGroupGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ export type ApplicationGroupGetResponse = ApplicationGroup; @@ -2216,12 +2145,10 @@ export interface ApplicationGroupListByNamespaceNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByNamespaceNext operation. */ -export type ApplicationGroupListByNamespaceNextResponse = - ApplicationGroupListResult; +export type ApplicationGroupListByNamespaceNextResponse = ApplicationGroupListResult; /** Optional parameters. */ -export interface EventHubManagementClientOptionalParams - extends coreClient.ServiceClientOptions { +export interface EventHubManagementClientOptionalParams extends coreClient.ServiceClientOptions { /** server parameter */ $host?: string; /** Api Version */ diff --git a/sdk/eventhub/arm-eventhub/src/models/mappers.ts b/sdk/eventhub/arm-eventhub/src/models/mappers.ts index b5831f064b0b..e7dad7a26ec1 100644 --- a/sdk/eventhub/arm-eventhub/src/models/mappers.ts +++ b/sdk/eventhub/arm-eventhub/src/models/mappers.ts @@ -384,12 +384,7 @@ export const Identity: coreClient.CompositeMapper = { serializedName: "type", type: { name: "Enum", - allowedValues: [ - "SystemAssigned", - "UserAssigned", - "SystemAssigned, UserAssigned", - "None", - ], + allowedValues: ["SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", "None"], }, }, userAssignedIdentities: { @@ -776,28 +771,27 @@ export const PrivateLinkResource: coreClient.CompositeMapper = { }, }; -export const NetworkSecurityPerimeterConfigurationList: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "NetworkSecurityPerimeterConfigurationList", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkSecurityPerimeterConfiguration", - }, +export const NetworkSecurityPerimeterConfigurationList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkSecurityPerimeterConfigurationList", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkSecurityPerimeterConfiguration", }, }, }, }, }, - }; + }, +}; export const ProvisioningIssue: coreClient.CompositeMapper = { type: { @@ -873,8 +867,7 @@ export const NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation: { type: { name: "Composite", - className: - "NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation", + className: "NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation", modelProperties: { name: { serializedName: "name", @@ -892,39 +885,38 @@ export const NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation: }, }; -export const NetworkSecurityPerimeterConfigurationPropertiesProfile: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "NetworkSecurityPerimeterConfigurationPropertiesProfile", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, +export const NetworkSecurityPerimeterConfigurationPropertiesProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkSecurityPerimeterConfigurationPropertiesProfile", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", }, - accessRulesVersion: { - serializedName: "accessRulesVersion", - type: { - name: "String", - }, + }, + accessRulesVersion: { + serializedName: "accessRulesVersion", + type: { + name: "String", }, - accessRules: { - serializedName: "accessRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NspAccessRule", - }, + }, + accessRules: { + serializedName: "accessRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NspAccessRule", }, }, }, }, }, - }; + }, +}; export const NspAccessRule: coreClient.CompositeMapper = { type: { @@ -1023,21 +1015,20 @@ export const NspAccessRuleProperties: coreClient.CompositeMapper = { }, }; -export const NspAccessRulePropertiesSubscriptionsItem: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "NspAccessRulePropertiesSubscriptionsItem", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, +export const NspAccessRulePropertiesSubscriptionsItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NspAccessRulePropertiesSubscriptionsItem", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String", }, }, }, - }; + }, +}; export const ClusterQuotaConfigurationProperties: coreClient.CompositeMapper = { type: { @@ -1807,89 +1798,87 @@ export const PrivateEndpointConnection: coreClient.CompositeMapper = { }, }; -export const NetworkSecurityPerimeterConfiguration: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "NetworkSecurityPerimeterConfiguration", - modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - type: { - name: "String", - }, +export const NetworkSecurityPerimeterConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkSecurityPerimeterConfiguration", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + type: { + name: "String", }, - provisioningIssues: { - serializedName: "properties.provisioningIssues", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ProvisioningIssue", - }, + }, + provisioningIssues: { + serializedName: "properties.provisioningIssues", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ProvisioningIssue", }, }, }, - networkSecurityPerimeter: { - serializedName: "properties.networkSecurityPerimeter", - type: { - name: "Composite", - className: "NetworkSecurityPerimeter", - }, + }, + networkSecurityPerimeter: { + serializedName: "properties.networkSecurityPerimeter", + type: { + name: "Composite", + className: "NetworkSecurityPerimeter", }, - resourceAssociation: { - serializedName: "properties.resourceAssociation", - type: { - name: "Composite", - className: - "NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation", - }, + }, + resourceAssociation: { + serializedName: "properties.resourceAssociation", + type: { + name: "Composite", + className: "NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation", }, - profile: { - serializedName: "properties.profile", - type: { - name: "Composite", - className: "NetworkSecurityPerimeterConfigurationPropertiesProfile", - }, + }, + profile: { + serializedName: "properties.profile", + type: { + name: "Composite", + className: "NetworkSecurityPerimeterConfigurationPropertiesProfile", }, - isBackingResource: { - serializedName: "properties.isBackingResource", - readOnly: true, - type: { - name: "Boolean", - }, + }, + isBackingResource: { + serializedName: "properties.isBackingResource", + readOnly: true, + type: { + name: "Boolean", }, - applicableFeatures: { - serializedName: "properties.applicableFeatures", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, + }, + applicableFeatures: { + serializedName: "properties.applicableFeatures", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", }, }, }, - parentAssociationName: { - serializedName: "properties.parentAssociationName", - readOnly: true, - type: { - name: "String", - }, + }, + parentAssociationName: { + serializedName: "properties.parentAssociationName", + readOnly: true, + type: { + name: "String", }, - sourceResourceId: { - serializedName: "properties.sourceResourceId", - readOnly: true, - type: { - name: "String", - }, + }, + sourceResourceId: { + serializedName: "properties.sourceResourceId", + readOnly: true, + type: { + name: "String", }, }, }, - }; + }, +}; export const NetworkRuleSet: coreClient.CompositeMapper = { type: { @@ -2284,8 +2273,7 @@ export const ThrottlingPolicy: coreClient.CompositeMapper = { name: "Composite", className: "ThrottlingPolicy", uberParent: "ApplicationGroupPolicy", - polymorphicDiscriminator: - ApplicationGroupPolicy.type.polymorphicDiscriminator, + polymorphicDiscriminator: ApplicationGroupPolicy.type.polymorphicDiscriminator, modelProperties: { ...ApplicationGroupPolicy.type.modelProperties, rateLimitThreshold: { diff --git a/sdk/eventhub/arm-eventhub/src/operations/applicationGroupOperations.ts b/sdk/eventhub/arm-eventhub/src/operations/applicationGroupOperations.ts index 0728be6ccacd..734431a61a5a 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/applicationGroupOperations.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/applicationGroupOperations.ts @@ -28,9 +28,7 @@ import { /// /** Class containing ApplicationGroupOperations operations. */ -export class ApplicationGroupOperationsImpl - implements ApplicationGroupOperations -{ +export class ApplicationGroupOperationsImpl implements ApplicationGroupOperations { private readonly client: EventHubManagementClient; /** @@ -52,11 +50,7 @@ export class ApplicationGroupOperationsImpl namespaceName: string, options?: ApplicationGroupListByNamespaceOptionalParams, ): PagedAsyncIterableIterator { - const iter = this.listByNamespacePagingAll( - resourceGroupName, - namespaceName, - options, - ); + const iter = this.listByNamespacePagingAll(resourceGroupName, namespaceName, options); return { next() { return iter.next(); @@ -68,12 +62,7 @@ export class ApplicationGroupOperationsImpl if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listByNamespacePagingPage( - resourceGroupName, - namespaceName, - options, - settings, - ); + return this.listByNamespacePagingPage(resourceGroupName, namespaceName, options, settings); }, }; } @@ -87,11 +76,7 @@ export class ApplicationGroupOperationsImpl let result: ApplicationGroupListByNamespaceResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listByNamespace( - resourceGroupName, - namespaceName, - options, - ); + result = await this._listByNamespace(resourceGroupName, namespaceName, options); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); diff --git a/sdk/eventhub/arm-eventhub/src/operations/clusters.ts b/sdk/eventhub/arm-eventhub/src/operations/clusters.ts index 8156aef580d8..82a2b1e9aa3b 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/clusters.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/clusters.ts @@ -13,11 +13,7 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers.js"; import * as Parameters from "../models/parameters.js"; import { EventHubManagementClient } from "../eventHubManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; +import { SimplePollerLike, OperationState, createHttpPoller } from "@azure/core-lro"; import { createLroSpec } from "../lroImpl.js"; import { Cluster, @@ -130,11 +126,7 @@ export class ClustersImpl implements Clusters { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listByResourceGroupPagingPage( - resourceGroupName, - options, - settings, - ); + return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); }, }; } @@ -154,11 +146,7 @@ export class ClustersImpl implements Clusters { yield page; } while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - continuationToken, - options, - ); + result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); continuationToken = result.nextLink; let page = result.value || []; setContinuationToken(page, continuationToken); @@ -170,10 +158,7 @@ export class ClustersImpl implements Clusters { resourceGroupName: string, options?: ClustersListByResourceGroupOptionalParams, ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options, - )) { + for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { yield* page; } } @@ -185,10 +170,7 @@ export class ClustersImpl implements Clusters { listAvailableClusterRegion( options?: ClustersListAvailableClusterRegionOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { options }, - listAvailableClusterRegionOperationSpec, - ); + return this.client.sendOperationRequest({ options }, listAvailableClusterRegionOperationSpec); } /** @@ -198,10 +180,7 @@ export class ClustersImpl implements Clusters { private _listBySubscription( options?: ClustersListBySubscriptionOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec, - ); + return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec); } /** @@ -249,10 +228,7 @@ export class ClustersImpl implements Clusters { parameters: Cluster, options?: ClustersCreateOrUpdateOptionalParams, ): Promise< - SimplePollerLike< - OperationState, - ClustersCreateOrUpdateResponse - > + SimplePollerLike, ClustersCreateOrUpdateResponse> > { const directSendOperation = async ( args: coreClient.OperationArguments, @@ -264,8 +240,7 @@ export class ClustersImpl implements Clusters { args: coreClient.OperationArguments, 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, @@ -342,12 +317,7 @@ export class ClustersImpl implements Clusters { clusterName: string, parameters: Cluster, options?: ClustersUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ClustersUpdateResponse - > - > { + ): Promise, ClustersUpdateResponse>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec, @@ -358,8 +328,7 @@ export class ClustersImpl implements Clusters { args: coreClient.OperationArguments, 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, @@ -415,12 +384,7 @@ export class ClustersImpl implements Clusters { parameters: Cluster, options?: ClustersUpdateOptionalParams, ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - clusterName, - parameters, - options, - ); + const poller = await this.beginUpdate(resourceGroupName, clusterName, parameters, options); return poller.pollUntilDone(); } @@ -445,8 +409,7 @@ export class ClustersImpl implements Clusters { args: coreClient.OperationArguments, 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, @@ -497,11 +460,7 @@ export class ClustersImpl implements Clusters { clusterName: string, options?: ClustersDeleteOptionalParams, ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - clusterName, - options, - ); + const poller = await this.beginDelete(resourceGroupName, clusterName, options); return poller.pollUntilDone(); } @@ -601,11 +560,7 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { }, }, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], + urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName], headerParameters: [Parameters.accept], serializer, }; @@ -748,11 +703,7 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse, }, }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - ], + urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], headerParameters: [Parameters.accept], serializer, }; diff --git a/sdk/eventhub/arm-eventhub/src/operations/consumerGroups.ts b/sdk/eventhub/arm-eventhub/src/operations/consumerGroups.ts index c74e762b4dd9..772b2130c99b 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/consumerGroups.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/consumerGroups.ts @@ -91,12 +91,7 @@ export class ConsumerGroupsImpl implements ConsumerGroups { let result: ConsumerGroupsListByEventHubResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listByEventHub( - resourceGroupName, - namespaceName, - eventHubName, - options, - ); + result = await this._listByEventHub(resourceGroupName, namespaceName, eventHubName, options); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); diff --git a/sdk/eventhub/arm-eventhub/src/operations/disasterRecoveryConfigs.ts b/sdk/eventhub/arm-eventhub/src/operations/disasterRecoveryConfigs.ts index 106edf9dad8a..fa792366ea8b 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/disasterRecoveryConfigs.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/disasterRecoveryConfigs.ts @@ -104,12 +104,7 @@ export class DisasterRecoveryConfigsImpl implements DisasterRecoveryConfigs { let result: DisasterRecoveryConfigsListAuthorizationRulesResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listAuthorizationRules( - resourceGroupName, - namespaceName, - alias, - options, - ); + result = await this._listAuthorizationRules(resourceGroupName, namespaceName, alias, options); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); @@ -169,12 +164,7 @@ export class DisasterRecoveryConfigsImpl implements DisasterRecoveryConfigs { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listPagingPage( - resourceGroupName, - namespaceName, - options, - settings, - ); + return this.listPagingPage(resourceGroupName, namespaceName, options, settings); }, }; } @@ -195,12 +185,7 @@ export class DisasterRecoveryConfigsImpl implements DisasterRecoveryConfigs { yield page; } while (continuationToken) { - result = await this._listNext( - resourceGroupName, - namespaceName, - continuationToken, - options, - ); + result = await this._listNext(resourceGroupName, namespaceName, continuationToken, options); continuationToken = result.nextLink; let page = result.value || []; setContinuationToken(page, continuationToken); @@ -213,11 +198,7 @@ export class DisasterRecoveryConfigsImpl implements DisasterRecoveryConfigs { namespaceName: string, options?: DisasterRecoveryConfigsListOptionalParams, ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - namespaceName, - options, - )) { + for await (const page of this.listPagingPage(resourceGroupName, namespaceName, options)) { yield* page; } } diff --git a/sdk/eventhub/arm-eventhub/src/operations/eventHubs.ts b/sdk/eventhub/arm-eventhub/src/operations/eventHubs.ts index 18339a79c6f5..88d3ee5da9d4 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/eventHubs.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/eventHubs.ts @@ -158,11 +158,7 @@ export class EventHubsImpl implements EventHubs { namespaceName: string, options?: EventHubsListByNamespaceOptionalParams, ): PagedAsyncIterableIterator { - const iter = this.listByNamespacePagingAll( - resourceGroupName, - namespaceName, - options, - ); + const iter = this.listByNamespacePagingAll(resourceGroupName, namespaceName, options); return { next() { return iter.next(); @@ -174,12 +170,7 @@ export class EventHubsImpl implements EventHubs { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listByNamespacePagingPage( - resourceGroupName, - namespaceName, - options, - settings, - ); + return this.listByNamespacePagingPage(resourceGroupName, namespaceName, options, settings); }, }; } @@ -193,11 +184,7 @@ export class EventHubsImpl implements EventHubs { let result: EventHubsListByNamespaceResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listByNamespace( - resourceGroupName, - namespaceName, - options, - ); + result = await this._listByNamespace(resourceGroupName, namespaceName, options); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); diff --git a/sdk/eventhub/arm-eventhub/src/operations/namespaces.ts b/sdk/eventhub/arm-eventhub/src/operations/namespaces.ts index d6bd06cc84b0..40368cff085c 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/namespaces.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/namespaces.ts @@ -13,11 +13,7 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers.js"; import * as Parameters from "../models/parameters.js"; import { EventHubManagementClient } from "../eventHubManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; +import { SimplePollerLike, OperationState, createHttpPoller } from "@azure/core-lro"; import { createLroSpec } from "../lroImpl.js"; import { EHNamespace, @@ -83,9 +79,7 @@ export class NamespacesImpl implements Namespaces { * Lists all the available Namespaces within a subscription, irrespective of the resource groups. * @param options The options parameters. */ - public list( - options?: NamespacesListOptionalParams, - ): PagedAsyncIterableIterator { + public list(options?: NamespacesListOptionalParams): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { next() { @@ -154,11 +148,7 @@ export class NamespacesImpl implements Namespaces { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listByResourceGroupPagingPage( - resourceGroupName, - options, - settings, - ); + return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); }, }; } @@ -178,11 +168,7 @@ export class NamespacesImpl implements Namespaces { yield page; } while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - continuationToken, - options, - ); + result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); continuationToken = result.nextLink; let page = result.value || []; setContinuationToken(page, continuationToken); @@ -194,10 +180,7 @@ export class NamespacesImpl implements Namespaces { resourceGroupName: string, options?: NamespacesListByResourceGroupOptionalParams, ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options, - )) { + for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { yield* page; } } @@ -213,11 +196,7 @@ export class NamespacesImpl implements Namespaces { namespaceName: string, options?: NamespacesListAuthorizationRulesOptionalParams, ): PagedAsyncIterableIterator { - const iter = this.listAuthorizationRulesPagingAll( - resourceGroupName, - namespaceName, - options, - ); + const iter = this.listAuthorizationRulesPagingAll(resourceGroupName, namespaceName, options); return { next() { return iter.next(); @@ -248,11 +227,7 @@ export class NamespacesImpl implements Namespaces { let result: NamespacesListAuthorizationRulesResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listAuthorizationRules( - resourceGroupName, - namespaceName, - options, - ); + result = await this._listAuthorizationRules(resourceGroupName, namespaceName, options); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); @@ -290,9 +265,7 @@ export class NamespacesImpl implements Namespaces { * Lists all the available Namespaces within a subscription, irrespective of the resource groups. * @param options The options parameters. */ - private _list( - options?: NamespacesListOptionalParams, - ): Promise { + private _list(options?: NamespacesListOptionalParams): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } @@ -340,8 +313,7 @@ export class NamespacesImpl implements Namespaces { args: coreClient.OperationArguments, 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, @@ -430,8 +402,7 @@ export class NamespacesImpl implements Namespaces { args: coreClient.OperationArguments, 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, @@ -484,11 +455,7 @@ export class NamespacesImpl implements Namespaces { namespaceName: string, options?: NamespacesDeleteOptionalParams, ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - namespaceName, - options, - ); + const poller = await this.beginDelete(resourceGroupName, namespaceName, options); return poller.pollUntilDone(); } @@ -542,10 +509,7 @@ export class NamespacesImpl implements Namespaces { parameters: FailOver, options?: NamespacesFailoverOptionalParams, ): Promise< - SimplePollerLike< - OperationState, - NamespacesFailoverResponse - > + SimplePollerLike, NamespacesFailoverResponse> > { const directSendOperation = async ( args: coreClient.OperationArguments, @@ -557,8 +521,7 @@ export class NamespacesImpl implements Namespaces { args: coreClient.OperationArguments, 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, @@ -615,12 +578,7 @@ export class NamespacesImpl implements Namespaces { parameters: FailOver, options?: NamespacesFailoverOptionalParams, ): Promise { - const poller = await this.beginFailover( - resourceGroupName, - namespaceName, - parameters, - options, - ); + const poller = await this.beginFailover(resourceGroupName, namespaceName, parameters, options); return poller.pollUntilDone(); } @@ -829,10 +787,7 @@ export class NamespacesImpl implements Namespaces { nextLink: string, options?: NamespacesListNextOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec, - ); + return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); } /** @@ -902,11 +857,7 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { }, }, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], + urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName], headerParameters: [Parameters.accept], serializer, }; @@ -1272,11 +1223,7 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse, }, }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - ], + urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.nextLink], headerParameters: [Parameters.accept], serializer, }; diff --git a/sdk/eventhub/arm-eventhub/src/operations/networkSecurityPerimeterConfigurations.ts b/sdk/eventhub/arm-eventhub/src/operations/networkSecurityPerimeterConfigurations.ts index 410f3da9118e..5fbd87069fdb 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/networkSecurityPerimeterConfigurations.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/networkSecurityPerimeterConfigurations.ts @@ -11,11 +11,7 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers.js"; import * as Parameters from "../models/parameters.js"; import { EventHubManagementClient } from "../eventHubManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; +import { SimplePollerLike, OperationState, createHttpPoller } from "@azure/core-lro"; import { createLroSpec } from "../lroImpl.js"; import { NetworkSecurityPerimeterConfigurationsCreateOrUpdateOptionalParams } from "../models/index.js"; @@ -56,8 +52,7 @@ export class NetworkSecurityPerimeterConfigurationsImpl args: coreClient.OperationArguments, 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, diff --git a/sdk/eventhub/arm-eventhub/src/operations/operations.ts b/sdk/eventhub/arm-eventhub/src/operations/operations.ts index a4d4c25037a1..e0dcac4f3dfb 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/operations.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/operations.ts @@ -38,9 +38,7 @@ export class OperationsImpl implements Operations { * Lists all of the available Event Hub REST API operations. * @param options The options parameters. */ - public list( - options?: OperationsListOptionalParams, - ): PagedAsyncIterableIterator { + public list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { next() { @@ -92,9 +90,7 @@ export class OperationsImpl implements Operations { * Lists all of the available Event Hub REST API operations. * @param options The options parameters. */ - private _list( - options?: OperationsListOptionalParams, - ): Promise { + private _list(options?: OperationsListOptionalParams): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } @@ -107,10 +103,7 @@ export class OperationsImpl implements Operations { nextLink: string, options?: OperationsListNextOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec, - ); + return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); } } // Operation Specifications diff --git a/sdk/eventhub/arm-eventhub/src/operations/privateEndpointConnections.ts b/sdk/eventhub/arm-eventhub/src/operations/privateEndpointConnections.ts index 64fb98eef13e..a61a9e71437f 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/privateEndpointConnections.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/privateEndpointConnections.ts @@ -13,11 +13,7 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers.js"; import * as Parameters from "../models/parameters.js"; import { EventHubManagementClient } from "../eventHubManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; +import { SimplePollerLike, OperationState, createHttpPoller } from "@azure/core-lro"; import { createLroSpec } from "../lroImpl.js"; import { PrivateEndpointConnection, @@ -34,9 +30,7 @@ import { /// /** Class containing PrivateEndpointConnections operations. */ -export class PrivateEndpointConnectionsImpl - implements PrivateEndpointConnections -{ +export class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections { private readonly client: EventHubManagementClient; /** @@ -70,12 +64,7 @@ export class PrivateEndpointConnectionsImpl if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listPagingPage( - resourceGroupName, - namespaceName, - options, - settings, - ); + return this.listPagingPage(resourceGroupName, namespaceName, options, settings); }, }; } @@ -96,12 +85,7 @@ export class PrivateEndpointConnectionsImpl yield page; } while (continuationToken) { - result = await this._listNext( - resourceGroupName, - namespaceName, - continuationToken, - options, - ); + result = await this._listNext(resourceGroupName, namespaceName, continuationToken, options); continuationToken = result.nextLink; let page = result.value || []; setContinuationToken(page, continuationToken); @@ -114,11 +98,7 @@ export class PrivateEndpointConnectionsImpl namespaceName: string, options?: PrivateEndpointConnectionsListOptionalParams, ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - namespaceName, - options, - )) { + for await (const page of this.listPagingPage(resourceGroupName, namespaceName, options)) { yield* page; } } @@ -192,8 +172,7 @@ export class PrivateEndpointConnectionsImpl args: coreClient.OperationArguments, 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, diff --git a/sdk/eventhub/arm-eventhub/src/operations/schemaRegistry.ts b/sdk/eventhub/arm-eventhub/src/operations/schemaRegistry.ts index 1fe32fc818e0..4d6e27f7d155 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/schemaRegistry.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/schemaRegistry.ts @@ -50,11 +50,7 @@ export class SchemaRegistryImpl implements SchemaRegistry { namespaceName: string, options?: SchemaRegistryListByNamespaceOptionalParams, ): PagedAsyncIterableIterator { - const iter = this.listByNamespacePagingAll( - resourceGroupName, - namespaceName, - options, - ); + const iter = this.listByNamespacePagingAll(resourceGroupName, namespaceName, options); return { next() { return iter.next(); @@ -66,12 +62,7 @@ export class SchemaRegistryImpl implements SchemaRegistry { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listByNamespacePagingPage( - resourceGroupName, - namespaceName, - options, - settings, - ); + return this.listByNamespacePagingPage(resourceGroupName, namespaceName, options, settings); }, }; } @@ -85,11 +76,7 @@ export class SchemaRegistryImpl implements SchemaRegistry { let result: SchemaRegistryListByNamespaceResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listByNamespace( - resourceGroupName, - namespaceName, - options, - ); + result = await this._listByNamespace(resourceGroupName, namespaceName, options); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); diff --git a/sdk/eventhub/arm-eventhub/src/operationsInterfaces/clusters.ts b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/clusters.ts index 1c68acc5bdea..dc1f4c71ec0e 100644 --- a/sdk/eventhub/arm-eventhub/src/operationsInterfaces/clusters.ts +++ b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/clusters.ts @@ -75,10 +75,7 @@ export interface Clusters { parameters: Cluster, options?: ClustersCreateOrUpdateOptionalParams, ): Promise< - SimplePollerLike< - OperationState, - ClustersCreateOrUpdateResponse - > + SimplePollerLike, ClustersCreateOrUpdateResponse> >; /** * Creates or updates an instance of an Event Hubs Cluster. @@ -105,12 +102,7 @@ export interface Clusters { clusterName: string, parameters: Cluster, options?: ClustersUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ClustersUpdateResponse - > - >; + ): Promise, ClustersUpdateResponse>>; /** * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. * @param resourceGroupName Name of the resource group within the azure subscription. diff --git a/sdk/eventhub/arm-eventhub/src/operationsInterfaces/namespaces.ts b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/namespaces.ts index c472af2ce87f..3bcd1b18bbac 100644 --- a/sdk/eventhub/arm-eventhub/src/operationsInterfaces/namespaces.ts +++ b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/namespaces.ts @@ -53,9 +53,7 @@ export interface Namespaces { * Lists all the available Namespaces within a subscription, irrespective of the resource groups. * @param options The options parameters. */ - list( - options?: NamespacesListOptionalParams, - ): PagedAsyncIterableIterator; + list(options?: NamespacesListOptionalParams): PagedAsyncIterableIterator; /** * Lists the available Namespaces within a resource group. * @param resourceGroupName Name of the resource group within the azure subscription. @@ -171,10 +169,7 @@ export interface Namespaces { parameters: FailOver, options?: NamespacesFailoverOptionalParams, ): Promise< - SimplePollerLike< - OperationState, - NamespacesFailoverResponse - > + SimplePollerLike, NamespacesFailoverResponse> >; /** * GeoDR Failover diff --git a/sdk/eventhub/arm-eventhub/src/operationsInterfaces/operations.ts b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/operations.ts index bb25a00e0569..294d374cdb87 100644 --- a/sdk/eventhub/arm-eventhub/src/operationsInterfaces/operations.ts +++ b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/operations.ts @@ -16,7 +16,5 @@ export interface Operations { * Lists all of the available Event Hub REST API operations. * @param options The options parameters. */ - list( - options?: OperationsListOptionalParams, - ): PagedAsyncIterableIterator; + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; } diff --git a/sdk/eventhub/arm-eventhub/src/pagingHelper.ts b/sdk/eventhub/arm-eventhub/src/pagingHelper.ts index 205cccc26592..e362819bdfc4 100644 --- a/sdk/eventhub/arm-eventhub/src/pagingHelper.ts +++ b/sdk/eventhub/arm-eventhub/src/pagingHelper.ts @@ -26,10 +26,7 @@ export function getContinuationToken(page: unknown): string | undefined { return pageMap.get(page)?.continuationToken; } -export function setContinuationToken( - page: unknown, - continuationToken: string | undefined, -): void { +export function setContinuationToken(page: unknown, continuationToken: string | undefined): void { if (typeof page !== "object" || page === null || !continuationToken) { return; } diff --git a/sdk/eventhub/arm-eventhub/test/sampleTest.spec.ts b/sdk/eventhub/arm-eventhub/test/sampleTest.spec.ts new file mode 100644 index 000000000000..90b3c8a868b4 --- /dev/null +++ b/sdk/eventhub/arm-eventhub/test/sampleTest.spec.ts @@ -0,0 +1,38 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { Recorder, RecorderStartOptions } from "@azure-tools/test-recorder"; +import { afterEach, beforeEach, describe, it, assert } from "vitest"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id", +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables, +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async () => { + recorder = new Recorder(); + await recorder.start(recorderOptions); + }); + + afterEach(async () => { + await recorder.stop(); + }); + + it("sample test", async () => { + assert(true); + }); +}); diff --git a/sdk/eventhub/arm-eventhub/test/snippets.spec.ts b/sdk/eventhub/arm-eventhub/test/snippets.spec.ts index 642bb5979f4c..668a368edf31 100644 --- a/sdk/eventhub/arm-eventhub/test/snippets.spec.ts +++ b/sdk/eventhub/arm-eventhub/test/snippets.spec.ts @@ -1,5 +1,10 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. +/* + * 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 { EventHubManagementClient } from "../src/index.js"; import { DefaultAzureCredential, InteractiveBrowserCredential } from "@azure/identity"; diff --git a/sdk/eventhub/arm-eventhub/tsconfig.browser.config.json b/sdk/eventhub/arm-eventhub/tsconfig.browser.config.json index 0c8bafa97126..75871518e3a0 100644 --- a/sdk/eventhub/arm-eventhub/tsconfig.browser.config.json +++ b/sdk/eventhub/arm-eventhub/tsconfig.browser.config.json @@ -1,6 +1,3 @@ { - "extends": [ - "./tsconfig.test.json", - "../../../tsconfig.browser.base.json" - ] + "extends": ["./tsconfig.test.json", "../../../tsconfig.browser.base.json"] } diff --git a/sdk/eventhub/arm-eventhub/tsconfig.json b/sdk/eventhub/arm-eventhub/tsconfig.json index 19ceb382b521..59ea83c046bf 100644 --- a/sdk/eventhub/arm-eventhub/tsconfig.json +++ b/sdk/eventhub/arm-eventhub/tsconfig.json @@ -3,11 +3,8 @@ { "path": "./tsconfig.src.json" }, - { - "path": "./tsconfig.samples.json" - }, { "path": "./tsconfig.test.json" } ] -} +} \ No newline at end of file diff --git a/sdk/eventhub/arm-eventhub/tsconfig.samples.json b/sdk/eventhub/arm-eventhub/tsconfig.samples.json index 6a56cdfd90c2..3e0565fab4b2 100644 --- a/sdk/eventhub/arm-eventhub/tsconfig.samples.json +++ b/sdk/eventhub/arm-eventhub/tsconfig.samples.json @@ -2,9 +2,7 @@ "extends": "../../../tsconfig.samples.base.json", "compilerOptions": { "paths": { - "@azure/arm-eventhub": [ - "./dist/esm" - ] + "@azure/arm-eventhub": ["./dist/esm"] } } } diff --git a/sdk/eventhub/arm-eventhub/tsconfig.test.json b/sdk/eventhub/arm-eventhub/tsconfig.test.json index 3c2b783a8c1b..290ca214aebc 100644 --- a/sdk/eventhub/arm-eventhub/tsconfig.test.json +++ b/sdk/eventhub/arm-eventhub/tsconfig.test.json @@ -1,6 +1,3 @@ { - "extends": [ - "./tsconfig.src.json", - "../../../tsconfig.test.base.json" - ] + "extends": ["./tsconfig.src.json", "../../../tsconfig.test.base.json"] }