From e14050c24063442e52647eeb53b92e6623562116 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Apr 2026 01:27:17 +0000 Subject: [PATCH 1/8] chore: update node.js dependencies for http-client-java Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/f40aa9b9-39e5-4bb7-bdbd-756b78c3668b Co-authored-by: weidongxu-microsoft <53292327+weidongxu-microsoft@users.noreply.github.com> --- .../package.json | 34 +- .../http-client-generator-test/package.json | 34 +- packages/http-client-java/package-lock.json | 982 +++++++++--------- packages/http-client-java/package.json | 66 +- 4 files changed, 544 insertions(+), 572 deletions(-) diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/package.json b/packages/http-client-java/generator/http-client-generator-clientcore-test/package.json index 1b3fa3ebf80..05844969f6a 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/package.json +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/package.json @@ -12,27 +12,27 @@ "spector-stop": "tsp-spector server stop" }, "dependencies": { - "@typespec/spector": "0.1.0-alpha.24", - "@typespec/spec-api": "0.1.0-alpha.13", - "@typespec/http-specs": "0.1.0-alpha.35", - "@typespec/json-schema": "1.10.0", + "@typespec/spector": "0.1.0-alpha.25", + "@typespec/spec-api": "0.1.0-alpha.14", + "@typespec/http-specs": "0.1.0-alpha.36", + "@typespec/json-schema": "1.11.0", "@typespec/http-client-java": "file:../../typespec-http-client-java-0.7.0.tgz", "@typespec/http-client-java-tests": "file:" }, "overrides": { - "@typespec/compiler": "1.10.0", - "@typespec/http": "1.10.0", - "@typespec/rest": "0.80.0", - "@typespec/versioning": "0.80.0", - "@typespec/openapi": "1.10.0", - "@typespec/xml": "0.80.0", - "@typespec/events": "0.80.0", - "@typespec/sse": "0.80.0", - "@typespec/streams": "0.80.0", - "@azure-tools/typespec-azure-core": "0.66.1", - "@azure-tools/typespec-client-generator-core": "0.66.4", - "@azure-tools/typespec-azure-resource-manager": "0.66.1", - "@azure-tools/typespec-autorest": "0.66.2" + "@typespec/compiler": "1.11.0", + "@typespec/http": "1.11.0", + "@typespec/rest": "0.81.0", + "@typespec/versioning": "0.81.0", + "@typespec/openapi": "1.11.0", + "@typespec/xml": "0.81.0", + "@typespec/events": "0.81.0", + "@typespec/sse": "0.81.0", + "@typespec/streams": "0.81.0", + "@azure-tools/typespec-azure-core": "0.67.0", + "@azure-tools/typespec-client-generator-core": "0.67.0", + "@azure-tools/typespec-azure-resource-manager": "0.67.0", + "@azure-tools/typespec-autorest": "0.67.0" }, "private": true } diff --git a/packages/http-client-java/generator/http-client-generator-test/package.json b/packages/http-client-java/generator/http-client-generator-test/package.json index 215b82517ac..bf58040b56a 100644 --- a/packages/http-client-java/generator/http-client-generator-test/package.json +++ b/packages/http-client-java/generator/http-client-generator-test/package.json @@ -12,27 +12,27 @@ "spector-stop": "tsp-spector server stop" }, "dependencies": { - "@typespec/spector": "0.1.0-alpha.24", - "@typespec/spec-api": "0.1.0-alpha.13", - "@typespec/http-specs": "0.1.0-alpha.35", - "@azure-tools/azure-http-specs": "0.1.0-alpha.38", + "@typespec/spector": "0.1.0-alpha.25", + "@typespec/spec-api": "0.1.0-alpha.14", + "@typespec/http-specs": "0.1.0-alpha.36", + "@azure-tools/azure-http-specs": "0.1.0-alpha.39", "@typespec/http-client-java": "file:../../typespec-http-client-java-0.7.0.tgz", "@typespec/http-client-java-tests": "file:" }, "overrides": { - "@typespec/compiler": "1.10.0", - "@typespec/http": "1.10.0", - "@typespec/rest": "0.80.0", - "@typespec/versioning": "0.80.0", - "@typespec/openapi": "1.10.0", - "@typespec/xml": "0.80.0", - "@typespec/events": "0.80.0", - "@typespec/sse": "0.80.0", - "@typespec/streams": "0.80.0", - "@azure-tools/typespec-azure-core": "0.66.1", - "@azure-tools/typespec-client-generator-core": "0.66.4", - "@azure-tools/typespec-azure-resource-manager": "0.66.1", - "@azure-tools/typespec-autorest": "0.66.2" + "@typespec/compiler": "1.11.0", + "@typespec/http": "1.11.0", + "@typespec/rest": "0.81.0", + "@typespec/versioning": "0.81.0", + "@typespec/openapi": "1.11.0", + "@typespec/xml": "0.81.0", + "@typespec/events": "0.81.0", + "@typespec/sse": "0.81.0", + "@typespec/streams": "0.81.0", + "@azure-tools/typespec-azure-core": "0.67.0", + "@azure-tools/typespec-client-generator-core": "0.67.0", + "@azure-tools/typespec-azure-resource-manager": "0.67.0", + "@azure-tools/typespec-autorest": "0.67.0" }, "private": true } diff --git a/packages/http-client-java/package-lock.json b/packages/http-client-java/package-lock.json index 9173d32e1c5..e9229d98f5d 100644 --- a/packages/http-client-java/package-lock.json +++ b/packages/http-client-java/package-lock.json @@ -14,50 +14,50 @@ "lodash": "~4.18.1" }, "devDependencies": { - "@azure-tools/typespec-autorest": "0.66.2", - "@azure-tools/typespec-azure-core": "0.66.1", - "@azure-tools/typespec-azure-resource-manager": "0.66.1", - "@azure-tools/typespec-azure-rulesets": "0.66.0", - "@azure-tools/typespec-client-generator-core": "0.66.4", - "@microsoft/api-extractor": "^7.58.0", + "@azure-tools/typespec-autorest": "0.67.0", + "@azure-tools/typespec-azure-core": "0.67.0", + "@azure-tools/typespec-azure-resource-manager": "0.67.0", + "@azure-tools/typespec-azure-rulesets": "0.67.0", + "@azure-tools/typespec-client-generator-core": "0.67.0", + "@microsoft/api-extractor": "^7.58.1", "@microsoft/api-extractor-model": "^7.33.5", "@types/js-yaml": "~4.0.9", "@types/lodash": "~4.17.24", - "@types/node": "~25.5.0", - "@typespec/compiler": "1.10.0", - "@typespec/events": "0.80.0", - "@typespec/http": "1.10.0", - "@typespec/openapi": "1.10.0", - "@typespec/rest": "0.80.0", - "@typespec/spector": "0.1.0-alpha.24", - "@typespec/sse": "0.80.0", - "@typespec/streams": "0.80.0", - "@typespec/versioning": "0.80.0", - "@typespec/xml": "0.80.0", - "@vitest/coverage-v8": "^4.1.2", - "@vitest/ui": "^4.1.2", + "@types/node": "~25.5.2", + "@typespec/compiler": "1.11.0", + "@typespec/events": "0.81.0", + "@typespec/http": "1.11.0", + "@typespec/openapi": "1.11.0", + "@typespec/rest": "0.81.0", + "@typespec/spector": "0.1.0-alpha.25", + "@typespec/sse": "0.81.0", + "@typespec/streams": "0.81.0", + "@typespec/versioning": "0.81.0", + "@typespec/xml": "0.81.0", + "@vitest/coverage-v8": "^4.1.3", + "@vitest/ui": "^4.1.3", "c8": "~11.0.0", "rimraf": "~6.1.3", "typescript": "~6.0.2", - "vitest": "^4.1.2" + "vitest": "^4.1.3" }, "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-autorest": ">=0.66.2 <1.0.0", - "@azure-tools/typespec-azure-core": ">=0.66.1 <1.0.0", - "@azure-tools/typespec-azure-resource-manager": ">=0.66.1 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.66.4 <1.0.0", - "@typespec/compiler": "^1.10.0", - "@typespec/events": ">=0.80.0 <1.0.0", - "@typespec/http": "^1.10.0", - "@typespec/openapi": "^1.10.0", - "@typespec/rest": ">=0.80.0 <1.0.0", - "@typespec/sse": ">=0.80.0 <1.0.0", - "@typespec/streams": ">=0.80.0 <1.0.0", - "@typespec/versioning": ">=0.80.0 <1.0.0", - "@typespec/xml": ">=0.80.0 <1.0.0" + "@azure-tools/typespec-autorest": ">=0.67.0 <1.0.0", + "@azure-tools/typespec-azure-core": ">=0.67.0 <1.0.0", + "@azure-tools/typespec-azure-resource-manager": ">=0.67.0 <1.0.0", + "@azure-tools/typespec-client-generator-core": ">=0.67.0 <1.0.0", + "@typespec/compiler": "^1.11.0", + "@typespec/events": ">=0.81.0 <1.0.0", + "@typespec/http": "^1.11.0", + "@typespec/openapi": "^1.11.0", + "@typespec/rest": ">=0.81.0 <1.0.0", + "@typespec/sse": ">=0.81.0 <1.0.0", + "@typespec/streams": ">=0.81.0 <1.0.0", + "@typespec/versioning": ">=0.81.0 <1.0.0", + "@typespec/xml": ">=0.81.0 <1.0.0" } }, "node_modules/@autorest/codemodel": { @@ -110,24 +110,24 @@ } }, "node_modules/@azure-tools/typespec-autorest": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.66.2.tgz", - "integrity": "sha512-KPloSDZvY7c2PkDCGeWPoWJ3NL+0n5GPQKiospILLE5pCof6g5a20NM8mJLqTE+NMgzbNzgoYE5wXEFFpe3A+A==", + "version": "0.67.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.67.0.tgz", + "integrity": "sha512-RP0TZB46tnYGfN5FKaaXDP5/rDff0PEERKz4epoYsm4RmXeRDYXVcOjw7DXLbcgFpMLTLBf/w/5dqJZBx03KpQ==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.66.1", - "@azure-tools/typespec-azure-resource-manager": "^0.66.1", - "@azure-tools/typespec-client-generator-core": "^0.66.4", - "@typespec/compiler": "^1.10.0", - "@typespec/http": "^1.10.0", - "@typespec/openapi": "^1.10.0", - "@typespec/rest": "^0.80.0", - "@typespec/versioning": "^0.80.0", - "@typespec/xml": "^0.80.0" + "@azure-tools/typespec-azure-core": "^0.67.0", + "@azure-tools/typespec-azure-resource-manager": "^0.67.0", + "@azure-tools/typespec-client-generator-core": "^0.67.0", + "@typespec/compiler": "^1.11.0", + "@typespec/http": "^1.11.0", + "@typespec/openapi": "^1.11.0", + "@typespec/rest": "^0.81.0", + "@typespec/versioning": "^0.81.0", + "@typespec/xml": "^0.81.0" }, "peerDependenciesMeta": { "@typespec/xml": { @@ -136,24 +136,24 @@ } }, "node_modules/@azure-tools/typespec-azure-core": { - "version": "0.66.1", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.66.1.tgz", - "integrity": "sha512-i8lMegL4s0I6xQT61zIIhmN1aA6iYFoH+7owSl/msOD0yVWx3Khf3ETULX53yHFd7OoUDAjmFx7+8j9atWXzHQ==", + "version": "0.67.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.67.0.tgz", + "integrity": "sha512-6DO/fOlVihMlPG0oDXrgURf5MNF4iBzPx5SMA5aaFDx/fW6MjiD+TN9Yy9O+l9mVNh1XaEMjhjA8/lmnHZ/U0g==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.10.0", - "@typespec/http": "^1.10.0", - "@typespec/rest": "^0.80.0" + "@typespec/compiler": "^1.11.0", + "@typespec/http": "^1.11.0", + "@typespec/rest": "^0.81.0" } }, "node_modules/@azure-tools/typespec-azure-resource-manager": { - "version": "0.66.1", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.66.1.tgz", - "integrity": "sha512-LExgmD3oK7iaX0bIdQsoxBYLCMKwPPBHYmLMhNW/GseMF1Dqi1Ne/VP7rmMP0dhrZNFh22LaZI2lTyCKm08DFQ==", + "version": "0.67.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.67.0.tgz", + "integrity": "sha512-NFE1O4zlpo6Y+Lkh3XCo59g+7r141+oBomYib1LncbbpqoGDakHvBH4sLelt9ZCMnYAxlKGbjXrO9E6jd53P2Q==", "dev": true, "license": "MIT", "dependencies": { @@ -164,34 +164,34 @@ "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.66.1", - "@typespec/compiler": "^1.10.0", - "@typespec/http": "^1.10.0", - "@typespec/openapi": "^1.10.0", - "@typespec/rest": "^0.80.0", - "@typespec/versioning": "^0.80.0" + "@azure-tools/typespec-azure-core": "^0.67.0", + "@typespec/compiler": "^1.11.0", + "@typespec/http": "^1.11.0", + "@typespec/openapi": "^1.11.0", + "@typespec/rest": "^0.81.0", + "@typespec/versioning": "^0.81.0" } }, "node_modules/@azure-tools/typespec-azure-rulesets": { - "version": "0.66.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.66.0.tgz", - "integrity": "sha512-Wf0SpphmKDDzHgaqpxl68DpP65VUWjpD3mrnZ3Lw4Pdtt8BcZf7+LKgFF06gPRnh15hR0VbjAERCzxI/qGY4ag==", + "version": "0.67.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.67.0.tgz", + "integrity": "sha512-YCkyTm090xQR0Gb3CnIdbEd+SbVUY1TRtuPXrBPTsNu3MJwvlaESnkJ7bt9zkP94mAFTNoSTuZlAUKDfPrFaFA==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.66.0", - "@azure-tools/typespec-azure-resource-manager": "^0.66.0", - "@azure-tools/typespec-client-generator-core": "^0.66.1", - "@typespec/compiler": "^1.10.0" + "@azure-tools/typespec-azure-core": "^0.67.0", + "@azure-tools/typespec-azure-resource-manager": "^0.67.0", + "@azure-tools/typespec-client-generator-core": "^0.67.0", + "@typespec/compiler": "^1.11.0" } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.66.4", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.66.4.tgz", - "integrity": "sha512-KRMWLvojku2qFnPpUiZNTa/nm49IjSsGVhPmFhQ5a01KwI2T7zT+Ga39/xLTLHHT4aIgBaMWxD4ioZa2ZhbEKw==", + "version": "0.67.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.67.0.tgz", + "integrity": "sha512-cJZHRDnSSNhx8DpHudUMDpajpDQD3+lsAXI633dsQYIKdTuP10UEgRUgIKSkF0+ck0kJOeI25r/TBH2P+V/k6Q==", "dev": true, "license": "MIT", "dependencies": { @@ -203,16 +203,16 @@ "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.66.1", - "@typespec/compiler": "^1.10.0", - "@typespec/events": "^0.80.0", - "@typespec/http": "^1.10.0", - "@typespec/openapi": "^1.10.0", - "@typespec/rest": "^0.80.0", - "@typespec/sse": "^0.80.0", - "@typespec/streams": "^0.80.0", - "@typespec/versioning": "^0.80.0", - "@typespec/xml": "^0.80.0" + "@azure-tools/typespec-azure-core": "^0.67.0", + "@typespec/compiler": "^1.11.0", + "@typespec/events": "^0.81.0", + "@typespec/http": "^1.11.0", + "@typespec/openapi": "^1.11.0", + "@typespec/rest": "^0.81.0", + "@typespec/sse": "^0.81.0", + "@typespec/streams": "^0.81.0", + "@typespec/versioning": "^0.81.0", + "@typespec/xml": "^0.81.0" } }, "node_modules/@azure/abort-controller": { @@ -573,7 +573,6 @@ "dev": true, "license": "MIT", "optional": true, - "peer": true, "dependencies": { "@emnapi/wasi-threads": "1.2.0", "tslib": "^2.4.0" @@ -586,7 +585,6 @@ "dev": true, "license": "MIT", "optional": true, - "peer": true, "dependencies": { "tslib": "^2.4.0" } @@ -598,15 +596,14 @@ "dev": true, "license": "MIT", "optional": true, - "peer": true, "dependencies": { "tslib": "^2.4.0" } }, "node_modules/@inquirer/ansi": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-2.0.2.tgz", - "integrity": "sha512-SYLX05PwJVnW+WVegZt1T4Ip1qba1ik+pNJPDiqvk6zS5Y/i8PhRzLpGEtVd7sW0G8cMtkD8t4AZYhQwm8vnww==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-2.0.5.tgz", + "integrity": "sha512-doc2sWgJpbFQ64UflSVd17ibMGDuxO1yKgOgLMwavzESnXjFWJqUeG8saYosqKpHp4kWiM5x1nXvEjbpx90gzw==", "dev": true, "license": "MIT", "engines": { @@ -614,16 +611,16 @@ } }, "node_modules/@inquirer/checkbox": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-5.0.2.tgz", - "integrity": "sha512-iTPV4tMMct7iOpwer5qmTP7gjnk1VQJjsNfAaC2b8Q3qiuHM3K2yjjDr5u1MKfkrvp2JD4Flf8sIPpF21pmZmw==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-5.1.3.tgz", + "integrity": "sha512-+G7I8CT+EHv/hasNfUl3P37DVoMoZfpA+2FXmM54dA8MxYle1YqucxbacxHalw1iAFSdKNEDTGNV7F+j1Ldqcg==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/ansi": "^2.0.2", - "@inquirer/core": "^11.0.2", - "@inquirer/figures": "^2.0.2", - "@inquirer/type": "^4.0.2" + "@inquirer/ansi": "^2.0.5", + "@inquirer/core": "^11.1.8", + "@inquirer/figures": "^2.0.5", + "@inquirer/type": "^4.0.5" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -638,14 +635,14 @@ } }, "node_modules/@inquirer/confirm": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-6.0.2.tgz", - "integrity": "sha512-A0/13Wyi+8iFeNDX6D4zZYKPoBLIEbE4K/219qHcnpXMer2weWvaTo63+2c7mQPPA206DEMSYVOPnEw3meOlCw==", + "version": "6.0.11", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-6.0.11.tgz", + "integrity": "sha512-pTpHjg0iEIRMYV/7oCZUMf27/383E6Wyhfc/MY+AVQGEoUobffIYWOK9YLP2XFRGz/9i6WlTQh1CkFVIo2Y7XA==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^11.0.2", - "@inquirer/type": "^4.0.2" + "@inquirer/core": "^11.1.8", + "@inquirer/type": "^4.0.5" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -660,19 +657,19 @@ } }, "node_modules/@inquirer/core": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-11.0.2.tgz", - "integrity": "sha512-lgMRx/n02ciiNELBvFLHtmcjbV5tf5D/I0UYfCg2YbTZWmBZ10/niLd3IjWBxz8LtM27xP+4oLEa06Slmb7p7A==", + "version": "11.1.8", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-11.1.8.tgz", + "integrity": "sha512-/u+yJk2pOKNDOh1ZgdUH2RQaRx6OOH4I0uwL95qPvTFTIL38YBsuSC4r1yXBB3Q6JvNqFFc202gk0Ew79rrcjA==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/ansi": "^2.0.2", - "@inquirer/figures": "^2.0.2", - "@inquirer/type": "^4.0.2", + "@inquirer/ansi": "^2.0.5", + "@inquirer/figures": "^2.0.5", + "@inquirer/type": "^4.0.5", "cli-width": "^4.1.0", + "fast-wrap-ansi": "^0.2.0", "mute-stream": "^3.0.0", - "signal-exit": "^4.1.0", - "wrap-ansi": "^9.0.2" + "signal-exit": "^4.1.0" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -686,101 +683,16 @@ } } }, - "node_modules/@inquirer/core/node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@inquirer/core/node_modules/ansi-styles": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@inquirer/core/node_modules/emoji-regex": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", - "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", - "dev": true, - "license": "MIT" - }, - "node_modules/@inquirer/core/node_modules/string-width": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", - "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@inquirer/core/node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/@inquirer/core/node_modules/wrap-ansi": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", - "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.2.1", - "string-width": "^7.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/@inquirer/editor": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-5.0.2.tgz", - "integrity": "sha512-pXQ4Nf0qmFcJuYB6NlcIIxH6l6zKOwNg1Jh/ZRdKd2dTqBB4OXKUFbFwR2K4LVXVtq15ZFFatBVT+rerYR8hWQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-5.1.0.tgz", + "integrity": "sha512-6wlkYl65Qfayy48gPCfU4D7li6KCAGN79mLXa/tYHZH99OfZ820yY+HA+DgE88r8YwwgeuY6PQgNqMeK6LuMmw==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^11.0.2", - "@inquirer/external-editor": "^2.0.2", - "@inquirer/type": "^4.0.2" + "@inquirer/core": "^11.1.8", + "@inquirer/external-editor": "^3.0.0", + "@inquirer/type": "^4.0.5" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -795,14 +707,14 @@ } }, "node_modules/@inquirer/expand": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-5.0.2.tgz", - "integrity": "sha512-siFG1swxfjFIOxIcehtZkh+KUNB/YCpyfHNEGu+nC/SBXIbgUWibvThLn/WesSxLRGOeSKdNKoTm+GQCKFm6Ww==", + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-5.0.12.tgz", + "integrity": "sha512-vOfrB33b7YIZfDauXS8vNNz2Z86FozTZLIt7e+7/dCaPJ1RXZsHCuI9TlcERzEUq57vkM+UdnBgxP0rFd23JYQ==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^11.0.2", - "@inquirer/type": "^4.0.2" + "@inquirer/core": "^11.1.8", + "@inquirer/type": "^4.0.5" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -817,14 +729,14 @@ } }, "node_modules/@inquirer/external-editor": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-2.0.2.tgz", - "integrity": "sha512-X/fMXK7vXomRWEex1j8mnj7s1mpnTeP4CO/h2gysJhHLT2WjBnLv4ZQEGpm/kcYI8QfLZ2fgW+9kTKD+jeopLg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-3.0.0.tgz", + "integrity": "sha512-lDSwMgg+M5rq6JKBYaJwSX6T9e/HK2qqZ1oxmOwn4AQoJE5D+7TumsxLGC02PWS//rkIVqbZv3XA3ejsc9FYvg==", "dev": true, "license": "MIT", "dependencies": { "chardet": "^2.1.1", - "iconv-lite": "^0.7.0" + "iconv-lite": "^0.7.2" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -839,9 +751,9 @@ } }, "node_modules/@inquirer/figures": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-2.0.2.tgz", - "integrity": "sha512-qXm6EVvQx/FmnSrCWCIGtMHwqeLgxABP8XgcaAoywsL0NFga9gD5kfG0gXiv80GjK9Hsoz4pgGwF/+CjygyV9A==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-2.0.5.tgz", + "integrity": "sha512-NsSs4kzfm12lNetHwAn3GEuH317IzpwrMCbOuMIVytpjnJ90YYHNwdRgYGuKmVxwuIqSgqk3M5qqQt1cDk0tGQ==", "dev": true, "license": "MIT", "engines": { @@ -849,14 +761,14 @@ } }, "node_modules/@inquirer/input": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-5.0.2.tgz", - "integrity": "sha512-hN2YRo1QiEc9lD3mK+CPnTS4TK2RhCMmMmP4nCWwTkmQL2vx9jPJWYk+rbUZpwR1D583ZJk1FI3i9JZXIpi/qg==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-5.0.11.tgz", + "integrity": "sha512-twUWidn4ocPO8qi6fRM7tNWt7W1FOnOZqQ+/+PsfLUacMR5rFLDPK9ql0nBPwxi0oELbo8T5NhRs8B2+qQEqFQ==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^11.0.2", - "@inquirer/type": "^4.0.2" + "@inquirer/core": "^11.1.8", + "@inquirer/type": "^4.0.5" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -871,14 +783,14 @@ } }, "node_modules/@inquirer/number": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-4.0.2.tgz", - "integrity": "sha512-4McnjTSYrlthNW1ojkkmP75WLRYhQs7GXm6pDDoIrHqJuV5uUYwfdbB0geHdaKMarAqJQgoOVjzIT0jdWCsKew==", + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-4.0.11.tgz", + "integrity": "sha512-Vscmim9TCksQsfjPtka/JwPUcbLhqWYrgfPf1cHrCm24X/F2joFwnageD50yMKsaX14oNGOyKf/RNXAFkNjWpA==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^11.0.2", - "@inquirer/type": "^4.0.2" + "@inquirer/core": "^11.1.8", + "@inquirer/type": "^4.0.5" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -893,15 +805,15 @@ } }, "node_modules/@inquirer/password": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-5.0.2.tgz", - "integrity": "sha512-oSDziMKiw4G2e4zS+0JRfxuPFFGh6N/9yUaluMgEHp2/Yyj2JGwfDO7XbwtOrxVrz+XsP/iaGyWXdQb9d8A0+g==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-5.0.11.tgz", + "integrity": "sha512-9KZFeRaNHIcejtPb0wN4ddFc7EvobVoAFa049eS3LrDZFxI8O7xUXiITEOinBzkZFAIwY5V4yzQae/QfO9cbbg==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/ansi": "^2.0.2", - "@inquirer/core": "^11.0.2", - "@inquirer/type": "^4.0.2" + "@inquirer/ansi": "^2.0.5", + "@inquirer/core": "^11.1.8", + "@inquirer/type": "^4.0.5" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -916,22 +828,22 @@ } }, "node_modules/@inquirer/prompts": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-8.0.2.tgz", - "integrity": "sha512-2zK5zY48fZcl6+gG4eqOC/UzZsJckHCRvjXoLuW4D8LKOCVGdcJiSKkLnumSZjR/6PXPINDGOrGHqNxb+sxJDg==", + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-8.4.1.tgz", + "integrity": "sha512-AH5xPQ997K7e0F0vulPlteIHke2awMkFi8F0dBemrDfmvtPmHJo82mdHbONC4F/t8d1NHwrbI5cGVI+RbLWdoQ==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/checkbox": "^5.0.2", - "@inquirer/confirm": "^6.0.2", - "@inquirer/editor": "^5.0.2", - "@inquirer/expand": "^5.0.2", - "@inquirer/input": "^5.0.2", - "@inquirer/number": "^4.0.2", - "@inquirer/password": "^5.0.2", - "@inquirer/rawlist": "^5.0.2", - "@inquirer/search": "^4.0.2", - "@inquirer/select": "^5.0.2" + "@inquirer/checkbox": "^5.1.3", + "@inquirer/confirm": "^6.0.11", + "@inquirer/editor": "^5.1.0", + "@inquirer/expand": "^5.0.12", + "@inquirer/input": "^5.0.11", + "@inquirer/number": "^4.0.11", + "@inquirer/password": "^5.0.11", + "@inquirer/rawlist": "^5.2.7", + "@inquirer/search": "^4.1.7", + "@inquirer/select": "^5.1.3" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -946,14 +858,14 @@ } }, "node_modules/@inquirer/rawlist": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-5.0.2.tgz", - "integrity": "sha512-AcNALEdQKUQDeJcpC1a3YC53m1MLv+sMUS+vRZ8Qigs1Yg3Dcdtmi82rscJplogKOY8CXkKW4wvVwHS2ZjCIBQ==", + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-5.2.7.tgz", + "integrity": "sha512-AqRMiD9+uE1lskDPrdqHwrV/EUmxKEBLX44SR7uxK3vD2413AmVfE5EQaPeNzYf5Pq5SitHJDYUFVF0poIr09w==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^11.0.2", - "@inquirer/type": "^4.0.2" + "@inquirer/core": "^11.1.8", + "@inquirer/type": "^4.0.5" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -968,15 +880,15 @@ } }, "node_modules/@inquirer/search": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-4.0.2.tgz", - "integrity": "sha512-hg63w5toohdzE65S3LiGhdfIL0kT+yisbZARf7zw65PvyMUTutTN3eMAvD/B6y/25z88vTrB7kSB45Vz5CbrXg==", + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-4.1.7.tgz", + "integrity": "sha512-1y7+0N65AWk5RdlXH/Kn13txf3IjIQ7OEfhCEkDTU+h5wKMLq8DUF3P6z+/kLSxDGDtQT1dRBWEUC3o/VvImsQ==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^11.0.2", - "@inquirer/figures": "^2.0.2", - "@inquirer/type": "^4.0.2" + "@inquirer/core": "^11.1.8", + "@inquirer/figures": "^2.0.5", + "@inquirer/type": "^4.0.5" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -991,16 +903,16 @@ } }, "node_modules/@inquirer/select": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-5.0.2.tgz", - "integrity": "sha512-JygTohvQxSNnvt7IKANVlg/eds+yN5sLRilYeGc4ri/9Aqi/2QPoXBMV5Cz/L1VtQv63SnTbPXJZeCK2pSwsOA==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-5.1.3.tgz", + "integrity": "sha512-zYyqWgGQi3NhBcNq4Isc5rB3oEdQEh1Q/EcAnOW0FK4MpnXWkvSBYgA4cYrTM4A9UB573omouZbnL9JJ74Mq3A==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/ansi": "^2.0.2", - "@inquirer/core": "^11.0.2", - "@inquirer/figures": "^2.0.2", - "@inquirer/type": "^4.0.2" + "@inquirer/ansi": "^2.0.5", + "@inquirer/core": "^11.1.8", + "@inquirer/figures": "^2.0.5", + "@inquirer/type": "^4.0.5" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -1015,9 +927,9 @@ } }, "node_modules/@inquirer/type": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-4.0.2.tgz", - "integrity": "sha512-cae7mzluplsjSdgFA6ACLygb5jC8alO0UUnFPyu0E7tNRPrL+q/f8VcSXp+cjZQ7l5CMpDpi2G1+IQvkOiL1Lw==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-4.0.5.tgz", + "integrity": "sha512-aetVUNeKNc/VriqXlw1NRSW0zhMBB0W4bNbWRJgzRl/3d0QNDQFfk0GO5SDdtjMZVg6o8ZKEiadd7SCCzoOn5Q==", "dev": true, "license": "MIT", "engines": { @@ -1083,9 +995,9 @@ } }, "node_modules/@microsoft/api-extractor": { - "version": "7.58.0", - "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.58.0.tgz", - "integrity": "sha512-XcHlDylX5GblbGbs1eBoexjVyvdJMioTPuBCgCorE2rqijzTYxi6eudXyez3xACRxtH9aDtahoL9fYM4XTvQmg==", + "version": "7.58.1", + "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.58.1.tgz", + "integrity": "sha512-kF3GFME4lN22O5zbnXk2RP4y/4PDQdps0xKiYTipMYprkwCmmpsWLZt/N2Fkbil540cSLfJX0BW7LkHzgMVUYg==", "dev": true, "license": "MIT", "dependencies": { @@ -1097,7 +1009,7 @@ "@rushstack/terminal": "0.22.4", "@rushstack/ts-command-line": "5.3.4", "diff": "~8.0.2", - "lodash": "~4.17.23", + "lodash": "~4.18.1", "minimatch": "10.2.3", "resolve": "~1.22.1", "semver": "~7.5.4", @@ -1120,13 +1032,6 @@ "@rushstack/node-core-library": "5.21.0" } }, - "node_modules/@microsoft/api-extractor/node_modules/lodash": { - "version": "4.17.23", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", - "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", - "dev": true, - "license": "MIT" - }, "node_modules/@microsoft/api-extractor/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -1246,9 +1151,9 @@ } }, "node_modules/@oxc-project/types": { - "version": "0.122.0", - "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.122.0.tgz", - "integrity": "sha512-oLAl5kBpV4w69UtFZ9xqcmTi+GENWOcPF7FCrczTiBbmC0ibXxCwyvZGbO39rCVEuLGAZM84DH0pUIyyv/YJzA==", + "version": "0.123.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.123.0.tgz", + "integrity": "sha512-YtECP/y8Mj1lSHiUWGSRzy/C6teUKlS87dEfuVKT09LgQbUsBW1rNg+MiJ4buGu3yuADV60gbIvo9/HplA56Ew==", "dev": true, "license": "MIT", "funding": { @@ -1263,9 +1168,9 @@ "license": "MIT" }, "node_modules/@rolldown/binding-android-arm64": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.0-rc.12.tgz", - "integrity": "sha512-pv1y2Fv0JybcykuiiD3qBOBdz6RteYojRFY1d+b95WVuzx211CRh+ytI/+9iVyWQ6koTh5dawe4S/yRfOFjgaA==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.0-rc.13.tgz", + "integrity": "sha512-5ZiiecKH2DXAVJTNN13gNMUcCDg4Jy8ZjbXEsPnqa248wgOVeYRX0iqXXD5Jz4bI9BFHgKsI2qmyJynstbmr+g==", "cpu": [ "arm64" ], @@ -1280,9 +1185,9 @@ } }, "node_modules/@rolldown/binding-darwin-arm64": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.0-rc.12.tgz", - "integrity": "sha512-cFYr6zTG/3PXXF3pUO+umXxt1wkRK/0AYT8lDwuqvRC+LuKYWSAQAQZjCWDQpAH172ZV6ieYrNnFzVVcnSflAg==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.0-rc.13.tgz", + "integrity": "sha512-tz/v/8G77seu8zAB3A5sK3UFoOl06zcshEzhUO62sAEtrEuW/H1CcyoupOrD+NbQJytYgA4CppXPzlrmp4JZKA==", "cpu": [ "arm64" ], @@ -1297,9 +1202,9 @@ } }, "node_modules/@rolldown/binding-darwin-x64": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.0-rc.12.tgz", - "integrity": "sha512-ZCsYknnHzeXYps0lGBz8JrF37GpE9bFVefrlmDrAQhOEi4IOIlcoU1+FwHEtyXGx2VkYAvhu7dyBf75EJQffBw==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.0-rc.13.tgz", + "integrity": "sha512-8DakphqOz8JrMYWTJmWA+vDJxut6LijZ8Xcdc4flOlAhU7PNVwo2MaWBF9iXjJAPo5rC/IxEFZDhJ3GC7NHvug==", "cpu": [ "x64" ], @@ -1314,9 +1219,9 @@ } }, "node_modules/@rolldown/binding-freebsd-x64": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.0-rc.12.tgz", - "integrity": "sha512-dMLeprcVsyJsKolRXyoTH3NL6qtsT0Y2xeuEA8WQJquWFXkEC4bcu1rLZZSnZRMtAqwtrF/Ib9Ddtpa/Gkge9Q==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.0-rc.13.tgz", + "integrity": "sha512-4wBQFfjDuXYN/SVI8inBF3Aa+isq40rc6VMFbk5jcpolUBTe5cYnMsHZ51nFWsx3PVyyNN3vgoESki0Hmr/4BA==", "cpu": [ "x64" ], @@ -1331,9 +1236,9 @@ } }, "node_modules/@rolldown/binding-linux-arm-gnueabihf": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.0-rc.12.tgz", - "integrity": "sha512-YqWjAgGC/9M1lz3GR1r1rP79nMgo3mQiiA+Hfo+pvKFK1fAJ1bCi0ZQVh8noOqNacuY1qIcfyVfP6HoyBRZ85Q==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.0-rc.13.tgz", + "integrity": "sha512-JW/e4yPIXLms+jmnbwwy5LA/LxVwZUWLN8xug+V200wzaVi5TEGIWQlh8o91gWYFxW609euI98OCCemmWGuPrw==", "cpu": [ "arm" ], @@ -1348,13 +1253,16 @@ } }, "node_modules/@rolldown/binding-linux-arm64-gnu": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.0-rc.12.tgz", - "integrity": "sha512-/I5AS4cIroLpslsmzXfwbe5OmWvSsrFuEw3mwvbQ1kDxJ822hFHIx+vsN/TAzNVyepI/j/GSzrtCIwQPeKCLIg==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.0-rc.13.tgz", + "integrity": "sha512-ZfKWpXiUymDnavepCaM6KG/uGydJ4l2nBmMxg60Ci4CbeefpqjPWpfaZM7PThOhk2dssqBAcwLc6rAyr0uTdXg==", "cpu": [ "arm64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1365,13 +1273,16 @@ } }, "node_modules/@rolldown/binding-linux-arm64-musl": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.0-rc.12.tgz", - "integrity": "sha512-V6/wZztnBqlx5hJQqNWwFdxIKN0m38p8Jas+VoSfgH54HSj9tKTt1dZvG6JRHcjh6D7TvrJPWFGaY9UBVOaWPw==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.0-rc.13.tgz", + "integrity": "sha512-bmRg3O6Z0gq9yodKKWCIpnlH051sEfdVwt+6m5UDffAQMUUqU0xjnQqqAUm+Gu7ofAAly9DqiQDtKu2nPDEABA==", "cpu": [ "arm64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -1382,13 +1293,16 @@ } }, "node_modules/@rolldown/binding-linux-ppc64-gnu": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.0-rc.12.tgz", - "integrity": "sha512-AP3E9BpcUYliZCxa3w5Kwj9OtEVDYK6sVoUzy4vTOJsjPOgdaJZKFmN4oOlX0Wp0RPV2ETfmIra9x1xuayFB7g==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.0-rc.13.tgz", + "integrity": "sha512-8Wtnbw4k7pMYN9B/mOEAsQ8HOiq7AZ31Ig4M9BKn2So4xRaFEhtCSa4ZJaOutOWq50zpgR4N5+L/opnlaCx8wQ==", "cpu": [ "ppc64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1399,13 +1313,16 @@ } }, "node_modules/@rolldown/binding-linux-s390x-gnu": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.0-rc.12.tgz", - "integrity": "sha512-nWwpvUSPkoFmZo0kQazZYOrT7J5DGOJ/+QHHzjvNlooDZED8oH82Yg67HvehPPLAg5fUff7TfWFHQS8IV1n3og==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.0-rc.13.tgz", + "integrity": "sha512-D/0Nlo8mQuxSMohNJUF2lDXWRsFDsHldfRRgD9bRgktj+EndGPj4DOV37LqDKPYS+osdyhZEH7fTakTAEcW7qg==", "cpu": [ "s390x" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1416,13 +1333,16 @@ } }, "node_modules/@rolldown/binding-linux-x64-gnu": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.0-rc.12.tgz", - "integrity": "sha512-RNrafz5bcwRy+O9e6P8Z/OCAJW/A+qtBczIqVYwTs14pf4iV1/+eKEjdOUta93q2TsT/FI0XYDP3TCky38LMAg==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.0-rc.13.tgz", + "integrity": "sha512-eRrPvat2YaVQcwwKi/JzOP6MKf1WRnOCr+VaI3cTWz3ZoLcP/654z90lVCJ4dAuMEpPdke0n+qyAqXDZdIC4rA==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1433,13 +1353,16 @@ } }, "node_modules/@rolldown/binding-linux-x64-musl": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.0-rc.12.tgz", - "integrity": "sha512-Jpw/0iwoKWx3LJ2rc1yjFrj+T7iHZn2JDg1Yny1ma0luviFS4mhAIcd1LFNxK3EYu3DHWCps0ydXQ5i/rrJ2ig==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.0-rc.13.tgz", + "integrity": "sha512-PsdONiFRp8hR8KgVjTWjZ9s7uA3uueWL0t74/cKHfM4dR5zXYv4AjB8BvA+QDToqxAFg4ZkcVEqeu5F7inoz5w==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -1450,9 +1373,9 @@ } }, "node_modules/@rolldown/binding-openharmony-arm64": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.0-rc.12.tgz", - "integrity": "sha512-vRugONE4yMfVn0+7lUKdKvN4D5YusEiPilaoO2sgUWpCvrncvWgPMzK00ZFFJuiPgLwgFNP5eSiUlv2tfc+lpA==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.0-rc.13.tgz", + "integrity": "sha512-hCNXgC5dI3TVOLrPT++PKFNZ+1EtS0mLQwfXXXSUD/+rGlB65gZDwN/IDuxLpQP4x8RYYHqGomlUXzpO8aVI2w==", "cpu": [ "arm64" ], @@ -1467,9 +1390,9 @@ } }, "node_modules/@rolldown/binding-wasm32-wasi": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.0-rc.12.tgz", - "integrity": "sha512-ykGiLr/6kkiHc0XnBfmFJuCjr5ZYKKofkx+chJWDjitX+KsJuAmrzWhwyOMSHzPhzOHOy7u9HlFoa5MoAOJ/Zg==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.0-rc.13.tgz", + "integrity": "sha512-viLS5C5et8NFtLWw9Sw3M/w4vvnVkbWkO7wSNh3C+7G1+uCkGpr6PcjNDSFcNtmXY/4trjPBqUfcOL+P3sWy/g==", "cpu": [ "wasm32" ], @@ -1477,16 +1400,18 @@ "license": "MIT", "optional": true, "dependencies": { - "@napi-rs/wasm-runtime": "^1.1.1" + "@emnapi/core": "1.9.1", + "@emnapi/runtime": "1.9.1", + "@napi-rs/wasm-runtime": "^1.1.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@rolldown/binding-win32-arm64-msvc": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.0-rc.12.tgz", - "integrity": "sha512-5eOND4duWkwx1AzCxadcOrNeighiLwMInEADT0YM7xeEOOFcovWZCq8dadXgcRHSf3Ulh1kFo/qvzoFiCLOL1Q==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.0-rc.13.tgz", + "integrity": "sha512-Fqa3Tlt1xL4wzmAYxGNFV36Hb+VfPc9PYU+E25DAnswXv3ODDu/yyWjQDbXMo5AGWkQVjLgQExuVu8I/UaZhPQ==", "cpu": [ "arm64" ], @@ -1501,9 +1426,9 @@ } }, "node_modules/@rolldown/binding-win32-x64-msvc": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.0-rc.12.tgz", - "integrity": "sha512-PyqoipaswDLAZtot351MLhrlrh6lcZPo2LSYE+VDxbVk24LVKAGOuE4hb8xZQmrPAuEtTZW8E6D2zc5EUZX4Lw==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.0-rc.13.tgz", + "integrity": "sha512-/pLI5kPkGEi44TDlnbio3St/5gUFeN51YWNAk/Gnv6mEQBOahRBh52qVFVBpmrnU01n2yysvBML9Ynu7K4kGAQ==", "cpu": [ "x64" ], @@ -1518,9 +1443,9 @@ } }, "node_modules/@rolldown/pluginutils": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.12.tgz", - "integrity": "sha512-HHMwmarRKvoFsJorqYlFeFRzXZqCt2ETQlEDOb9aqssrnVBB1/+xgTGtuTrIk5vzLNX1MjMtTf7W9z3tsSbrxw==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.13.tgz", + "integrity": "sha512-3ngTAv6F/Py35BsYbeeLeecvhMKdsKm4AoOETVhAA+Qc8nrA2I0kF7oa93mE9qnIurngOSpMnQ0x2nQY2FPviA==", "dev": true, "license": "MIT" }, @@ -1730,9 +1655,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "25.5.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.5.0.tgz", - "integrity": "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==", + "version": "25.5.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.5.2.tgz", + "integrity": "sha512-tO4ZIRKNC+MDWV4qKVZe3Ql/woTnmHDr5JD8UI5hn2pwBrHEwOEMZK7WlNb5RKB6EoJ02gwmQS9OrjuFnZYdpg==", "dev": true, "license": "MIT", "dependencies": { @@ -1747,25 +1672,25 @@ "license": "MIT" }, "node_modules/@typespec/compiler": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-1.10.0.tgz", - "integrity": "sha512-R6BATDkughntPpaxeESJF+wxma5PEjgmnnKvH0/ByqUH8VyhIckQWE9kkP0Uc/EJ0o0VYhe8qCwWQvV70k5lTw==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-1.11.0.tgz", + "integrity": "sha512-4vuWtoepc4rYJ81K+P7xn2ByXIRhBM40rfzAGnpagNuGSVHuKEC6lqJqs3ePvhCpnxiYAC8XWpaOi+BEDzyhnQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "~7.29.0", - "@inquirer/prompts": "^8.0.1", + "@inquirer/prompts": "^8.3.0", "ajv": "~8.18.0", "change-case": "~5.4.4", "env-paths": "^4.0.0", - "globby": "~16.1.0", + "globby": "~16.1.1", "is-unicode-supported": "^2.1.0", "mustache": "~4.2.0", "picocolors": "~1.1.1", - "prettier": "~3.8.0", - "semver": "^7.7.1", - "tar": "^7.5.2", - "temporal-polyfill": "^0.3.0", + "prettier": "~3.8.1", + "semver": "^7.7.4", + "tar": "^7.5.11", + "temporal-polyfill": "^0.3.2", "vscode-languageserver": "~9.0.1", "vscode-languageserver-textdocument": "~1.0.12", "yaml": "~2.8.2", @@ -1908,30 +1833,30 @@ } }, "node_modules/@typespec/events": { - "version": "0.80.0", - "resolved": "https://registry.npmjs.org/@typespec/events/-/events-0.80.0.tgz", - "integrity": "sha512-FrWEUwxhDNbE2YN4fyqV5Qrz9qFJbvPoiKrJM7dexkb7eyhepq3dbc5zZgAm/qFBQ+XxGQQVJ4swXxKT+338fw==", + "version": "0.81.0", + "resolved": "https://registry.npmjs.org/@typespec/events/-/events-0.81.0.tgz", + "integrity": "sha512-ee9QSBL+k6ccPlbJICZzaGt4iC1nTIl+J9sELY9yJNISvOvUEzY5MU8c7HaISB10cUESRJW+oaLWwyc8XjwHng==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.10.0" + "@typespec/compiler": "^1.11.0" } }, "node_modules/@typespec/http": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@typespec/http/-/http-1.10.0.tgz", - "integrity": "sha512-/fj55fmUj4m/FmNdfH0V52menVrmS2r5Xj9d1H+pnjQbxvvaxS906RSRcoF8kbg3PvlibP/Py5u82TAk53AyqA==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@typespec/http/-/http-1.11.0.tgz", + "integrity": "sha512-/DOkN2+MUZyLdmqYmSMZDjxikJTOuNxikTeOwG2fVOibnu8e6S1jzPAuN/mn6YyQBKeBCItMPmUOXIj61Wy8Bg==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.10.0", - "@typespec/streams": "^0.80.0" + "@typespec/compiler": "^1.11.0", + "@typespec/streams": "^0.81.0" }, "peerDependenciesMeta": { "@typespec/streams": { @@ -1940,41 +1865,41 @@ } }, "node_modules/@typespec/openapi": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-1.10.0.tgz", - "integrity": "sha512-tukmyp+c9CFlA2FdF61XfT9eTe5WXWz6J8pOrJ9+IYg0BcBwhJkvDj6BYpDD6SjxbRr1wO5ZL2Whe6MequsyVw==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-1.11.0.tgz", + "integrity": "sha512-xUQrHExKBh0XSP4cn+HcondDXjHJM5HCq2Xfy9tB1QflsFh5uP1JJt1+67g73VmHlhZVSUDcoFrnU95pfjyubg==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.10.0", - "@typespec/http": "^1.10.0" + "@typespec/compiler": "^1.11.0", + "@typespec/http": "^1.11.0" } }, "node_modules/@typespec/rest": { - "version": "0.80.0", - "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.80.0.tgz", - "integrity": "sha512-xczXLoB2akSIDner41gQYTS9CG6TdCN0QHYvXBT6ZrYEnBh+pMvdymW//5CSOTamZLOGo9AOJVJaFfwbFA4vQQ==", + "version": "0.81.0", + "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.81.0.tgz", + "integrity": "sha512-qQXZRKEvq5aNlDFEUqBiiXXPIFyr/+PWgBY0kIrnhyZzMjfUqPInkB12QgXpVp2O2Wm3jmETJD45SaLHTCYBbg==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.10.0", - "@typespec/http": "^1.10.0" + "@typespec/compiler": "^1.11.0", + "@typespec/http": "^1.11.0" } }, "node_modules/@typespec/spec-api": { - "version": "0.1.0-alpha.13", - "resolved": "https://registry.npmjs.org/@typespec/spec-api/-/spec-api-0.1.0-alpha.13.tgz", - "integrity": "sha512-ed0qqGM92vKuangmENUYMeDQZpSlsEMYdeH7+wMl+bIgXzfZ7yv07fNwcmROzSEJd0CzdCTgz+Hp+ifmR4USNQ==", + "version": "0.1.0-alpha.14", + "resolved": "https://registry.npmjs.org/@typespec/spec-api/-/spec-api-0.1.0-alpha.14.tgz", + "integrity": "sha512-MpLVtJZMsONMB9Di9aiXRbbihqa/+4MmbDHpuwd3ka39wtRhcA3sbFQY/+oU5zVEfEAldGgVkenFd2wnoI/xkQ==", "dev": true, "license": "MIT", "dependencies": { - "deep-equal": "^2.2.0", + "deep-equal": "^2.2.3", "express": "^5.2.1", "xml2js": "^0.6.2" }, @@ -2010,27 +1935,27 @@ } }, "node_modules/@typespec/spector": { - "version": "0.1.0-alpha.24", - "resolved": "https://registry.npmjs.org/@typespec/spector/-/spector-0.1.0-alpha.24.tgz", - "integrity": "sha512-POUSFunRZ4UbPEs+YLz0vE9tDoc6chQ/61moyiWO/k4hD2R1KTH0qlRHhuKW8/Y2wa8Jbuex39Ft/O3reHZSTQ==", + "version": "0.1.0-alpha.25", + "resolved": "https://registry.npmjs.org/@typespec/spector/-/spector-0.1.0-alpha.25.tgz", + "integrity": "sha512-KxMiwA/+XDWpZOdhr7TbnsR8ppXVi+edFa9hdUuerOGQzzALbSeQYUJLUr4RErRiHpqg2/P4FyJ2E0eiA2fTYA==", "dev": true, "license": "MIT", "dependencies": { "@azure/identity": "~4.13.0", - "@typespec/compiler": "^1.10.0", - "@typespec/http": "^1.10.0", - "@typespec/rest": "^0.80.0", - "@typespec/spec-api": "^0.1.0-alpha.13", + "@typespec/compiler": "^1.11.0", + "@typespec/http": "^1.11.0", + "@typespec/rest": "^0.81.0", + "@typespec/spec-api": "^0.1.0-alpha.14", "@typespec/spec-coverage-sdk": "^0.1.0-alpha.16", - "@typespec/versioning": "^0.80.0", + "@typespec/versioning": "^0.81.0", "ajv": "~8.18.0", - "body-parser": "^2.2.0", - "deep-equal": "^2.2.0", + "body-parser": "^2.2.2", + "deep-equal": "^2.2.3", "express": "^5.2.1", - "globby": "~16.1.0", + "globby": "~16.1.1", "micromatch": "^4.0.8", - "morgan": "^1.10.0", - "multer": "^2.0.1", + "morgan": "^1.10.1", + "multer": "^2.1.1", "picocolors": "~1.1.1", "source-map-support": "~0.5.21", "xml2js": "^0.6.2", @@ -2173,32 +2098,32 @@ } }, "node_modules/@typespec/sse": { - "version": "0.80.0", - "resolved": "https://registry.npmjs.org/@typespec/sse/-/sse-0.80.0.tgz", - "integrity": "sha512-/lxYgMaxgEcjBVhep9tf/VnFD2wnkZlkmjUHLeZL8Cuf+qip61Ren6Ml91YtNnnIFYsuuymDzRclrA073ZBR6Q==", + "version": "0.81.0", + "resolved": "https://registry.npmjs.org/@typespec/sse/-/sse-0.81.0.tgz", + "integrity": "sha512-VinoeN+5ClKlGXf77fWayAQna8SaYtvEBhnLR8t8FdvmMsL6ce1LghR2kAL3ARbNXfwMZRmQiq+ajKKebDLIng==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.10.0", - "@typespec/events": "^0.80.0", - "@typespec/http": "^1.10.0", - "@typespec/streams": "^0.80.0" + "@typespec/compiler": "^1.11.0", + "@typespec/events": "^0.81.0", + "@typespec/http": "^1.11.0", + "@typespec/streams": "^0.81.0" } }, "node_modules/@typespec/streams": { - "version": "0.80.0", - "resolved": "https://registry.npmjs.org/@typespec/streams/-/streams-0.80.0.tgz", - "integrity": "sha512-lNvzrvX/ZRIxRpxIBZu90XNsT+uWsMbLtxHd9edspHAiID3c9WKZbl2fnLcPqdR/60odqKve4yGzB9gF58GUDQ==", + "version": "0.81.0", + "resolved": "https://registry.npmjs.org/@typespec/streams/-/streams-0.81.0.tgz", + "integrity": "sha512-IIEKq18aqAtM65f8ZLs3Kzua97wjkr8fTehqPs/Q4neWo2UkDJp64LfA37iXJzaku8xMFSwXdVu4EW8wo+KV8w==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.10.0" + "@typespec/compiler": "^1.11.0" } }, "node_modules/@typespec/ts-http-runtime": { @@ -2217,40 +2142,40 @@ } }, "node_modules/@typespec/versioning": { - "version": "0.80.0", - "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.80.0.tgz", - "integrity": "sha512-WQCT0jN2lSRfwOy+Cd1KUYzenpKR5TdoX0uW6zQdvxQ9nQZIXoaSaReh9/ldhmSV4xv3p2dqF9oq1cdbVGfJTg==", + "version": "0.81.0", + "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.81.0.tgz", + "integrity": "sha512-5bha4t64xA85zLY8VGm/6jNd2kwPHzjPq/dlCUjtgGfGXv2R6Ow/YIukqhqZnwnIgNAIlZ7nguekRMRx+2oO2w==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.10.0" + "@typespec/compiler": "^1.11.0" } }, "node_modules/@typespec/xml": { - "version": "0.80.0", - "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.80.0.tgz", - "integrity": "sha512-Qfy5eyCcOF3xYOU/dejhpmmeY75U1Q9C8XBE+GvSZ3lakRfKBIpT+X6Q07qmKSAbGYJZKYLWCIAy/dgCuu/OAA==", + "version": "0.81.0", + "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.81.0.tgz", + "integrity": "sha512-4docnAcV1a8gE4c4TmYuirZf2PEzS4xHUH4QjHFU6hk6J2M6OMU6YG4iSq9tmlUzQ/2DraVcWNO/fsG8Lt383A==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.10.0" + "@typespec/compiler": "^1.11.0" } }, "node_modules/@vitest/coverage-v8": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-4.1.2.tgz", - "integrity": "sha512-sPK//PHO+kAkScb8XITeB1bf7fsk85Km7+rt4eeuRR3VS1/crD47cmV5wicisJmjNdfeokTZwjMk4Mj2d58Mgg==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-4.1.3.tgz", + "integrity": "sha512-/MBdrkA8t6hbdCWFKs09dPik774xvs4Z6L4bycdCxYNLHM8oZuRyosumQMG19LUlBsB6GeVpL1q4kFFazvyKGA==", "dev": true, "license": "MIT", "dependencies": { "@bcoe/v8-coverage": "^1.0.2", - "@vitest/utils": "4.1.2", + "@vitest/utils": "4.1.3", "ast-v8-to-istanbul": "^1.0.0", "istanbul-lib-coverage": "^3.2.2", "istanbul-lib-report": "^3.0.1", @@ -2264,8 +2189,8 @@ "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "@vitest/browser": "4.1.2", - "vitest": "4.1.2" + "@vitest/browser": "4.1.3", + "vitest": "4.1.3" }, "peerDependenciesMeta": { "@vitest/browser": { @@ -2274,16 +2199,16 @@ } }, "node_modules/@vitest/expect": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.2.tgz", - "integrity": "sha512-gbu+7B0YgUJ2nkdsRJrFFW6X7NTP44WlhiclHniUhxADQJH5Szt9mZ9hWnJPJ8YwOK5zUOSSlSvyzRf0u1DSBQ==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.3.tgz", + "integrity": "sha512-CW8Q9KMtXDGHj0vCsqui0M5KqRsu0zm0GNDW7Gd3U7nZ2RFpPKSCpeCXoT+/+5zr1TNlsoQRDEz+LzZUyq6gnQ==", "dev": true, "license": "MIT", "dependencies": { "@standard-schema/spec": "^1.1.0", "@types/chai": "^5.2.2", - "@vitest/spy": "4.1.2", - "@vitest/utils": "4.1.2", + "@vitest/spy": "4.1.3", + "@vitest/utils": "4.1.3", "chai": "^6.2.2", "tinyrainbow": "^3.1.0" }, @@ -2292,13 +2217,13 @@ } }, "node_modules/@vitest/mocker": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.2.tgz", - "integrity": "sha512-Ize4iQtEALHDttPRCmN+FKqOl2vxTiNUhzobQFFt/BM1lRUTG7zRCLOykG/6Vo4E4hnUdfVLo5/eqKPukcWW7Q==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.3.tgz", + "integrity": "sha512-XN3TrycitDQSzGRnec/YWgoofkYRhouyVQj4YNsJ5r/STCUFqMrP4+oxEv3e7ZbLi4og5kIHrZwekDJgw6hcjw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "4.1.2", + "@vitest/spy": "4.1.3", "estree-walker": "^3.0.3", "magic-string": "^0.30.21" }, @@ -2319,9 +2244,9 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.2.tgz", - "integrity": "sha512-dwQga8aejqeuB+TvXCMzSQemvV9hNEtDDpgUKDzOmNQayl2OG241PSWeJwKRH3CiC+sESrmoFd49rfnq7T4RnA==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.3.tgz", + "integrity": "sha512-hYqqwuMbpkkBodpRh4k4cQSOELxXky1NfMmQvOfKvV8zQHz8x8Dla+2wzElkMkBvSAJX5TRGHJAQvK0TcOafwg==", "dev": true, "license": "MIT", "dependencies": { @@ -2332,13 +2257,13 @@ } }, "node_modules/@vitest/runner": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.2.tgz", - "integrity": "sha512-Gr+FQan34CdiYAwpGJmQG8PgkyFVmARK8/xSijia3eTFgVfpcpztWLuP6FttGNfPLJhaZVP/euvujeNYar36OQ==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.3.tgz", + "integrity": "sha512-VwgOz5MmT0KhlUj40h02LWDpUBVpflZ/b7xZFA25F29AJzIrE+SMuwzFf0b7t4EXdwRNX61C3B6auIXQTR3ttA==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "4.1.2", + "@vitest/utils": "4.1.3", "pathe": "^2.0.3" }, "funding": { @@ -2346,14 +2271,14 @@ } }, "node_modules/@vitest/snapshot": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.2.tgz", - "integrity": "sha512-g7yfUmxYS4mNxk31qbOYsSt2F4m1E02LFqO53Xpzg3zKMhLAPZAjjfyl9e6z7HrW6LvUdTwAQR3HHfLjpko16A==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.3.tgz", + "integrity": "sha512-9l+k/J9KG5wPJDX9BcFFzhhwNjwkRb8RsnYhaT1vPY7OufxmQFc9sZzScRCPTiETzl37mrIWVY9zxzmdVeJwDQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "4.1.2", - "@vitest/utils": "4.1.2", + "@vitest/pretty-format": "4.1.3", + "@vitest/utils": "4.1.3", "magic-string": "^0.30.21", "pathe": "^2.0.3" }, @@ -2362,9 +2287,9 @@ } }, "node_modules/@vitest/spy": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.2.tgz", - "integrity": "sha512-DU4fBnbVCJGNBwVA6xSToNXrkZNSiw59H8tcuUspVMsBDBST4nfvsPsEHDHGtWRRnqBERBQu7TrTKskmjqTXKA==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.3.tgz", + "integrity": "sha512-ujj5Uwxagg4XUIfAUyRQxAg631BP6e9joRiN99mr48Bg9fRs+5mdUElhOoZ6rP5mBr8Bs3lmrREnkrQWkrsTCw==", "dev": true, "license": "MIT", "funding": { @@ -2372,13 +2297,13 @@ } }, "node_modules/@vitest/ui": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-4.1.2.tgz", - "integrity": "sha512-/irhyeAcKS2u6Zokagf9tqZJ0t8S6kMZq4ZG9BHZv7I+fkRrYfQX4w7geYeC2r6obThz39PDxvXQzZX+qXqGeg==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-4.1.3.tgz", + "integrity": "sha512-xBPy+43o1fgMLUDlufUXh7tlT/Es8uS5eiyBY2PyPfFYSGpApZskLw65DROoDz+rgYkPuAmb20Mv9Z9g1WQE7w==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "4.1.2", + "@vitest/utils": "4.1.3", "fflate": "^0.8.2", "flatted": "^3.4.2", "pathe": "^2.0.3", @@ -2390,17 +2315,17 @@ "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "vitest": "4.1.2" + "vitest": "4.1.3" } }, "node_modules/@vitest/utils": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.2.tgz", - "integrity": "sha512-xw2/TiX82lQHA06cgbqRKFb5lCAy3axQ4H4SoUFhUsg+wztiet+co86IAMDtF6Vm1hc7J6j09oh/rgDn+JdKIQ==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.3.tgz", + "integrity": "sha512-Pc/Oexse/khOWsGB+w3q4yzA4te7W4gpZZAvk+fr8qXfTURZUMj5i7kuxsNK5mP/dEB6ao3jfr0rs17fHhbHdw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "4.1.2", + "@vitest/pretty-format": "4.1.3", "convert-source-map": "^2.0.0", "tinyrainbow": "^3.1.0" }, @@ -2892,9 +2817,9 @@ } }, "node_modules/content-disposition": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz", - "integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.1.0.tgz", + "integrity": "sha512-5jRCH9Z/+DRP7rkvY83B+yGIGX96OYdJmzngqnw2SBSxqCFPd0w2km3s5iawpGX8krnwSGmF0FW5Nhr0Hfai3g==", "dev": true, "license": "MIT", "engines": { @@ -3364,12 +3289,39 @@ "node": ">=8.6.0" } }, + "node_modules/fast-string-truncated-width": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fast-string-truncated-width/-/fast-string-truncated-width-3.0.3.tgz", + "integrity": "sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-string-width": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/fast-string-width/-/fast-string-width-3.0.2.tgz", + "integrity": "sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-string-truncated-width": "^3.0.2" + } + }, "node_modules/fast-uri": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.1.tgz", "integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==", "dev": true }, + "node_modules/fast-wrap-ansi": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/fast-wrap-ansi/-/fast-wrap-ansi-0.2.0.tgz", + "integrity": "sha512-rLV8JHxTyhVmFYhBJuMujcrHqOT2cnO5Zxj37qROj23CP39GXubJRBUFF0z8KFK77Uc0SukZUf7JZhsVEQ6n8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-string-width": "^3.0.2" + } + }, "node_modules/fast-xml-builder": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.1.4.tgz", @@ -3677,9 +3629,9 @@ } }, "node_modules/globby": { - "version": "16.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-16.1.0.tgz", - "integrity": "sha512-+A4Hq7m7Ze592k9gZRy4gJ27DrXRNnC1vPjxTt1qQxEY8RxagBkBxivkCwg7FxSTG0iLLEMaUx13oOr0R2/qcQ==", + "version": "16.1.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-16.1.1.tgz", + "integrity": "sha512-dW7vl+yiAJSp6aCekaVnVJxurRv7DCOLyXqEG3RYMYUg7AuJ2jCqPkZTA8ooqC2vtnkaMcV5WfFBMuEnTu1OQg==", "dev": true, "license": "MIT", "dependencies": { @@ -3848,9 +3800,9 @@ } }, "node_modules/iconv-lite": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz", - "integrity": "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz", + "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==", "dev": true, "license": "MIT", "dependencies": { @@ -4609,6 +4561,9 @@ "arm64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MPL-2.0", "optional": true, "os": [ @@ -4630,6 +4585,9 @@ "arm64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MPL-2.0", "optional": true, "os": [ @@ -4651,6 +4609,9 @@ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MPL-2.0", "optional": true, "os": [ @@ -4672,6 +4633,9 @@ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MPL-2.0", "optional": true, "os": [ @@ -5377,9 +5341,9 @@ } }, "node_modules/path-to-regexp": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz", - "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.4.2.tgz", + "integrity": "sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==", "dev": true, "license": "MIT", "funding": { @@ -5402,9 +5366,9 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", "dev": true, "license": "MIT", "engines": { @@ -5434,9 +5398,9 @@ } }, "node_modules/postcss": { - "version": "8.5.8", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.8.tgz", - "integrity": "sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==", + "version": "8.5.9", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.9.tgz", + "integrity": "sha512-7a70Nsot+EMX9fFU3064K/kdHWZqGVY+BADLyXc8Dfv+mTLLVl6JzJpPaCZ2kQL9gIJvKXSLMHhqdRRjwQeFtw==", "dev": true, "funding": [ { @@ -5684,14 +5648,14 @@ } }, "node_modules/rolldown": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.0-rc.12.tgz", - "integrity": "sha512-yP4USLIMYrwpPHEFB5JGH1uxhcslv6/hL0OyvTuY+3qlOSJvZ7ntYnoWpehBxufkgN0cvXxppuTu5hHa/zPh+A==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.0-rc.13.tgz", + "integrity": "sha512-bvVj8YJmf0rq4pSFmH7laLa6pYrhghv3PRzrCdRAr23g66zOKVJ4wkvFtgohtPLWmthgg8/rkaqRHrpUEh0Zbw==", "dev": true, "license": "MIT", "dependencies": { - "@oxc-project/types": "=0.122.0", - "@rolldown/pluginutils": "1.0.0-rc.12" + "@oxc-project/types": "=0.123.0", + "@rolldown/pluginutils": "1.0.0-rc.13" }, "bin": { "rolldown": "bin/cli.mjs" @@ -5700,21 +5664,21 @@ "node": "^20.19.0 || >=22.12.0" }, "optionalDependencies": { - "@rolldown/binding-android-arm64": "1.0.0-rc.12", - "@rolldown/binding-darwin-arm64": "1.0.0-rc.12", - "@rolldown/binding-darwin-x64": "1.0.0-rc.12", - "@rolldown/binding-freebsd-x64": "1.0.0-rc.12", - "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-rc.12", - "@rolldown/binding-linux-arm64-gnu": "1.0.0-rc.12", - "@rolldown/binding-linux-arm64-musl": "1.0.0-rc.12", - "@rolldown/binding-linux-ppc64-gnu": "1.0.0-rc.12", - "@rolldown/binding-linux-s390x-gnu": "1.0.0-rc.12", - "@rolldown/binding-linux-x64-gnu": "1.0.0-rc.12", - "@rolldown/binding-linux-x64-musl": "1.0.0-rc.12", - "@rolldown/binding-openharmony-arm64": "1.0.0-rc.12", - "@rolldown/binding-wasm32-wasi": "1.0.0-rc.12", - "@rolldown/binding-win32-arm64-msvc": "1.0.0-rc.12", - "@rolldown/binding-win32-x64-msvc": "1.0.0-rc.12" + "@rolldown/binding-android-arm64": "1.0.0-rc.13", + "@rolldown/binding-darwin-arm64": "1.0.0-rc.13", + "@rolldown/binding-darwin-x64": "1.0.0-rc.13", + "@rolldown/binding-freebsd-x64": "1.0.0-rc.13", + "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-rc.13", + "@rolldown/binding-linux-arm64-gnu": "1.0.0-rc.13", + "@rolldown/binding-linux-arm64-musl": "1.0.0-rc.13", + "@rolldown/binding-linux-ppc64-gnu": "1.0.0-rc.13", + "@rolldown/binding-linux-s390x-gnu": "1.0.0-rc.13", + "@rolldown/binding-linux-x64-gnu": "1.0.0-rc.13", + "@rolldown/binding-linux-x64-musl": "1.0.0-rc.13", + "@rolldown/binding-openharmony-arm64": "1.0.0-rc.13", + "@rolldown/binding-wasm32-wasi": "1.0.0-rc.13", + "@rolldown/binding-win32-arm64-msvc": "1.0.0-rc.13", + "@rolldown/binding-win32-x64-msvc": "1.0.0-rc.13" } }, "node_modules/router": { @@ -5818,9 +5782,9 @@ "license": "MIT" }, "node_modules/sax": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.5.0.tgz", - "integrity": "sha512-21IYA3Q5cQf089Z6tgaUTr7lDAyzoTPx5HRtbhsME8Udispad8dC/+sziTNugOEx54ilvatQ9YCzl4KQLPcRHA==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.6.0.tgz", + "integrity": "sha512-6R3J5M4AcbtLUdZmRv2SygeVaM7IhrLXu9BmnOGmmACak8fiUtOsYNWUS4uK7upbmHIBbLBeFeI//477BKLBzA==", "dev": true, "license": "BlueOak-1.0.0", "engines": { @@ -5828,9 +5792,9 @@ } }, "node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -6286,19 +6250,19 @@ } }, "node_modules/temporal-polyfill": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/temporal-polyfill/-/temporal-polyfill-0.3.0.tgz", - "integrity": "sha512-qNsTkX9K8hi+FHDfHmf22e/OGuXmfBm9RqNismxBrnSmZVJKegQ+HYYXT+R7Ha8F/YSm2Y34vmzD4cxMu2u95g==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/temporal-polyfill/-/temporal-polyfill-0.3.2.tgz", + "integrity": "sha512-TzHthD/heRK947GNiSu3Y5gSPpeUDH34+LESnfsq8bqpFhsB79HFBX8+Z834IVX68P3EUyRPZK5bL/1fh437Eg==", "dev": true, "license": "MIT", "dependencies": { - "temporal-spec": "0.3.0" + "temporal-spec": "0.3.1" } }, "node_modules/temporal-spec": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/temporal-spec/-/temporal-spec-0.3.0.tgz", - "integrity": "sha512-n+noVpIqz4hYgFSMOSiINNOUOMFtV5cZQNCmmszA6GiVFVRt3G7AqVyhXjhCSmowvQn+NsGn+jMDMKJYHd3bSQ==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/temporal-spec/-/temporal-spec-0.3.1.tgz", + "integrity": "sha512-B4TUhezh9knfSIMwt7RVggApDRJZo73uZdj8AacL2mZ8RP5KtLianh2MXxL06GN9ESYiIsiuoLQhgVfwe55Yhw==", "dev": true, "license": "ISC" }, @@ -6341,9 +6305,9 @@ "license": "MIT" }, "node_modules/tinyexec": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.4.tgz", - "integrity": "sha512-u9r3uZC0bdpGOXtlxUIdwf9pkmvhqJdrVCH9fapQtgy/OeTTMZ1nqH7agtvEfmGui6e1XxjcdrlxvxJvc3sMqw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.1.1.tgz", + "integrity": "sha512-VKS/ZaQhhkKFMANmAOhhXVoIfBXblQxGX1myCQ2faQrfmobMftXeJPcZGp0gS07ocvGJWDLZGyOZDadDBqYIJg==", "dev": true, "license": "MIT", "engines": { @@ -6351,14 +6315,14 @@ } }, "node_modules/tinyglobby": { - "version": "0.2.15", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", - "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "version": "0.2.16", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz", + "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", "dev": true, "license": "MIT", "dependencies": { "fdir": "^6.5.0", - "picomatch": "^4.0.3" + "picomatch": "^4.0.4" }, "engines": { "node": ">=12.0.0" @@ -6566,16 +6530,16 @@ } }, "node_modules/vite": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.3.tgz", - "integrity": "sha512-B9ifbFudT1TFhfltfaIPgjo9Z3mDynBTJSUYxTjOQruf/zHH+ezCQKcoqO+h7a9Pw9Nm/OtlXAiGT1axBgwqrQ==", + "version": "8.0.7", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.7.tgz", + "integrity": "sha512-P1PbweD+2/udplnThz3btF4cf6AgPky7kk23RtHUkJIU5BIxwPprhRGmOAHs6FTI7UiGbTNrgNP6jSYD6JaRnw==", "dev": true, "license": "MIT", "dependencies": { "lightningcss": "^1.32.0", "picomatch": "^4.0.4", "postcss": "^8.5.8", - "rolldown": "1.0.0-rc.12", + "rolldown": "1.0.0-rc.13", "tinyglobby": "^0.2.15" }, "bin": { @@ -6593,7 +6557,7 @@ "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "@vitejs/devtools": "^0.1.0", - "esbuild": "^0.27.0", + "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", "sass": "^1.70.0", @@ -6657,19 +6621,19 @@ } }, "node_modules/vitest": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.2.tgz", - "integrity": "sha512-xjR1dMTVHlFLh98JE3i/f/WePqJsah4A0FK9cc8Ehp9Udk0AZk6ccpIZhh1qJ/yxVWRZ+Q54ocnD8TXmkhspGg==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.3.tgz", + "integrity": "sha512-DBc4Tx0MPNsqb9isoyOq00lHftVx/KIU44QOm2q59npZyLUkENn8TMFsuzuO+4U2FUa9rgbbPt3udrP25GcjXw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/expect": "4.1.2", - "@vitest/mocker": "4.1.2", - "@vitest/pretty-format": "4.1.2", - "@vitest/runner": "4.1.2", - "@vitest/snapshot": "4.1.2", - "@vitest/spy": "4.1.2", - "@vitest/utils": "4.1.2", + "@vitest/expect": "4.1.3", + "@vitest/mocker": "4.1.3", + "@vitest/pretty-format": "4.1.3", + "@vitest/runner": "4.1.3", + "@vitest/snapshot": "4.1.3", + "@vitest/spy": "4.1.3", + "@vitest/utils": "4.1.3", "es-module-lexer": "^2.0.0", "expect-type": "^1.3.0", "magic-string": "^0.30.21", @@ -6697,10 +6661,12 @@ "@edge-runtime/vm": "*", "@opentelemetry/api": "^1.9.0", "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", - "@vitest/browser-playwright": "4.1.2", - "@vitest/browser-preview": "4.1.2", - "@vitest/browser-webdriverio": "4.1.2", - "@vitest/ui": "4.1.2", + "@vitest/browser-playwright": "4.1.3", + "@vitest/browser-preview": "4.1.3", + "@vitest/browser-webdriverio": "4.1.3", + "@vitest/coverage-istanbul": "4.1.3", + "@vitest/coverage-v8": "4.1.3", + "@vitest/ui": "4.1.3", "happy-dom": "*", "jsdom": "*", "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" @@ -6724,6 +6690,12 @@ "@vitest/browser-webdriverio": { "optional": true }, + "@vitest/coverage-istanbul": { + "optional": true + }, + "@vitest/coverage-v8": { + "optional": true + }, "@vitest/ui": { "optional": true }, diff --git a/packages/http-client-java/package.json b/packages/http-client-java/package.json index 95d41f8803c..b9ace43bfce 100644 --- a/packages/http-client-java/package.json +++ b/packages/http-client-java/package.json @@ -49,19 +49,19 @@ "generator/http-client-generator/target/classes/PerfAutomation.jfc" ], "peerDependencies": { - "@azure-tools/typespec-autorest": ">=0.66.2 <1.0.0", - "@azure-tools/typespec-azure-core": ">=0.66.1 <1.0.0", - "@azure-tools/typespec-azure-resource-manager": ">=0.66.1 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.66.4 <1.0.0", - "@typespec/compiler": "^1.10.0", - "@typespec/events": ">=0.80.0 <1.0.0", - "@typespec/http": "^1.10.0", - "@typespec/openapi": "^1.10.0", - "@typespec/rest": ">=0.80.0 <1.0.0", - "@typespec/sse": ">=0.80.0 <1.0.0", - "@typespec/streams": ">=0.80.0 <1.0.0", - "@typespec/versioning": ">=0.80.0 <1.0.0", - "@typespec/xml": ">=0.80.0 <1.0.0" + "@azure-tools/typespec-autorest": ">=0.67.0 <1.0.0", + "@azure-tools/typespec-azure-core": ">=0.67.0 <1.0.0", + "@azure-tools/typespec-azure-resource-manager": ">=0.67.0 <1.0.0", + "@azure-tools/typespec-client-generator-core": ">=0.67.0 <1.0.0", + "@typespec/compiler": "^1.11.0", + "@typespec/events": ">=0.81.0 <1.0.0", + "@typespec/http": "^1.11.0", + "@typespec/openapi": "^1.11.0", + "@typespec/rest": ">=0.81.0 <1.0.0", + "@typespec/sse": ">=0.81.0 <1.0.0", + "@typespec/streams": ">=0.81.0 <1.0.0", + "@typespec/versioning": ">=0.81.0 <1.0.0", + "@typespec/xml": ">=0.81.0 <1.0.0" }, "dependencies": { "@autorest/codemodel": "~4.20.1", @@ -69,31 +69,31 @@ "lodash": "~4.18.1" }, "devDependencies": { - "@azure-tools/typespec-autorest": "0.66.2", - "@azure-tools/typespec-azure-core": "0.66.1", - "@azure-tools/typespec-azure-resource-manager": "0.66.1", - "@azure-tools/typespec-azure-rulesets": "0.66.0", - "@azure-tools/typespec-client-generator-core": "0.66.4", - "@microsoft/api-extractor": "^7.58.0", + "@azure-tools/typespec-autorest": "0.67.0", + "@azure-tools/typespec-azure-core": "0.67.0", + "@azure-tools/typespec-azure-resource-manager": "0.67.0", + "@azure-tools/typespec-azure-rulesets": "0.67.0", + "@azure-tools/typespec-client-generator-core": "0.67.0", + "@microsoft/api-extractor": "^7.58.1", "@microsoft/api-extractor-model": "^7.33.5", "@types/js-yaml": "~4.0.9", "@types/lodash": "~4.17.24", - "@types/node": "~25.5.0", - "@typespec/compiler": "1.10.0", - "@typespec/events": "0.80.0", - "@typespec/http": "1.10.0", - "@typespec/openapi": "1.10.0", - "@typespec/rest": "0.80.0", - "@typespec/spector": "0.1.0-alpha.24", - "@typespec/sse": "0.80.0", - "@typespec/streams": "0.80.0", - "@typespec/versioning": "0.80.0", - "@typespec/xml": "0.80.0", - "@vitest/coverage-v8": "^4.1.2", - "@vitest/ui": "^4.1.2", + "@types/node": "~25.5.2", + "@typespec/compiler": "1.11.0", + "@typespec/events": "0.81.0", + "@typespec/http": "1.11.0", + "@typespec/openapi": "1.11.0", + "@typespec/rest": "0.81.0", + "@typespec/spector": "0.1.0-alpha.25", + "@typespec/sse": "0.81.0", + "@typespec/streams": "0.81.0", + "@typespec/versioning": "0.81.0", + "@typespec/xml": "0.81.0", + "@vitest/coverage-v8": "^4.1.3", + "@vitest/ui": "^4.1.3", "c8": "~11.0.0", "rimraf": "~6.1.3", "typescript": "~6.0.2", - "vitest": "^4.1.2" + "vitest": "^4.1.3" } } From 0e2dcccfc2a08689d73c2fdd89675cd089f3828a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Apr 2026 01:52:34 +0000 Subject: [PATCH 2/8] chore: regenerate test sources after dependency update Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/f40aa9b9-39e5-4bb7-bdbd-756b78c3668b Co-authored-by: weidongxu-microsoft <53292327+weidongxu-microsoft@users.noreply.github.com> --- ...adFileMultipleContentTypesContentType.java | 52 +++ .../src/main/java/type/file/FileClient.java | 42 ++- .../type/file/implementation/BodiesImpl.java | 29 +- .../META-INF/type-file_metadata.json | 2 +- .../java/client/naming/HeaderAsyncClient.java | 109 ++++++ .../main/java/client/naming/HeaderClient.java | 105 ++++++ .../java/client/naming/NamingAsyncClient.java | 214 ----------- .../main/java/client/naming/NamingClient.java | 208 ---------- .../client/naming/NamingClientBuilder.java | 44 +++ .../client/naming/PropertyAsyncClient.java | 181 +++++++++ .../java/client/naming/PropertyClient.java | 175 +++++++++ .../naming/implementation/HeadersImpl.java | 158 ++++++++ .../implementation/NamingClientImpl.java | 354 ++---------------- .../naming/implementation/PropertiesImpl.java | 282 ++++++++++++++ .../subnamespace/package-info.java | 3 +- .../implementation/package-info.java | 3 +- .../clientoperationgroup/package-info.java | 3 +- .../implementation/package-info.java | 3 +- .../structure/multiclient/package-info.java | 3 +- .../implementation/package-info.java | 3 +- .../renamedoperation/package-info.java | 3 +- .../service/implementation/package-info.java | 3 +- .../service/models/package-info.java | 3 +- .../structure/service/package-info.java | 3 +- .../implementation/package-info.java | 3 +- .../twooperationgroup/package-info.java | 3 +- .../servicea/OperationsAsyncClient.java | 72 ++++ .../servicea/OperationsClient.java | 69 ++++ .../servicea/ServiceAClientBuilder.java | 333 ++++++++++++++++ .../servicea/ServiceAServiceVersion.java | 45 +++ .../servicea/ServiceBServiceVersion.java | 45 +++ .../servicea/SubNamespaceAsyncClient.java | 72 ++++ .../servicea/SubNamespaceClient.java | 69 ++++ .../implementation/OperationsImpl.java | 119 ++++++ .../OperationsOperationsImpl.java | 119 ++++++ .../implementation/ServiceAClientImpl.java | 142 +++++++ .../implementation/ServiceBClientImpl.java | 142 +++++++ .../implementation/SubNamespacesImpl.java | 119 ++++++ .../SubNamespacesOperationsImpl.java | 119 ++++++ .../servicea/implementation/package-info.java | 12 + .../servicea/package-info.java | 12 + .../serviceb/OperationsAsyncClient.java | 72 ++++ .../serviceb/OperationsClient.java | 69 ++++ .../serviceb/ServiceBClientBuilder.java | 334 +++++++++++++++++ .../serviceb/SubNamespaceAsyncClient.java | 72 ++++ .../serviceb/SubNamespaceClient.java | 69 ++++ .../serviceb/package-info.java | 12 + .../tsptest/response/ResponseAsyncClient.java | 7 +- .../java/tsptest/response/ResponseClient.java | 7 +- .../implementation/ResponseClientImpl.java | 4 +- .../models/GetUnionResponseContentType.java | 56 +++ .../main/java/type/file/FileAsyncClient.java | 56 ++- .../src/main/java/type/file/FileClient.java | 55 +-- .../type/file/implementation/BodiesImpl.java | 29 +- ...adFileMultipleContentTypesContentType.java | 56 +++ .../java/type/file/models/package-info.java | 11 + .../META-INF/client-naming_metadata.json | 2 +- ...ce-multipleservices-servicea_metadata.json | 1 + .../META-INF/tsptest-response_metadata.json | 2 +- .../META-INF/type-file_metadata.json | 2 +- ...rvice-multipleservices-servicea.properties | 2 + .../generated/NamingClientTestBase.java | 24 ++ .../generated/ServiceAClientTestBase.java | 71 ++++ 63 files changed, 3598 insertions(+), 895 deletions(-) create mode 100644 packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/file/DownloadFileMultipleContentTypesContentType.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/HeaderAsyncClient.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/HeaderClient.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/PropertyAsyncClient.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/PropertyClient.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/implementation/HeadersImpl.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/implementation/PropertiesImpl.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/OperationsAsyncClient.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/OperationsClient.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/ServiceAClientBuilder.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/ServiceAServiceVersion.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/ServiceBServiceVersion.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/SubNamespaceAsyncClient.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/SubNamespaceClient.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/OperationsImpl.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/OperationsOperationsImpl.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/ServiceAClientImpl.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/ServiceBClientImpl.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/SubNamespacesImpl.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/SubNamespacesOperationsImpl.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/package-info.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/package-info.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/OperationsAsyncClient.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/OperationsClient.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/ServiceBClientBuilder.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/SubNamespaceAsyncClient.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/SubNamespaceClient.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/package-info.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/response/models/GetUnionResponseContentType.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/type/file/models/DownloadFileMultipleContentTypesContentType.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/type/file/models/package-info.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/service-multipleservices-servicea_metadata.json create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/resources/service-multipleservices-servicea.properties create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/test/java/service/multipleservices/servicea/generated/ServiceAClientTestBase.java diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/file/DownloadFileMultipleContentTypesContentType.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/file/DownloadFileMultipleContentTypesContentType.java new file mode 100644 index 00000000000..2f1d4a2a657 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/file/DownloadFileMultipleContentTypesContentType.java @@ -0,0 +1,52 @@ +package type.file; + +/** + * Defines values for DownloadFileMultipleContentTypesContentType. + */ +public enum DownloadFileMultipleContentTypesContentType { + /** + * Enum value image/png. + */ + IMAGE_PNG("image/png"), + + /** + * Enum value image/jpeg. + */ + IMAGE_JPEG("image/jpeg"); + + /** + * The actual serialized value for a DownloadFileMultipleContentTypesContentType instance. + */ + private final String value; + + DownloadFileMultipleContentTypesContentType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DownloadFileMultipleContentTypesContentType instance. + * + * @param value the serialized value to parse. + * @return the parsed DownloadFileMultipleContentTypesContentType object, or null if unable to parse. + */ + public static DownloadFileMultipleContentTypesContentType fromString(String value) { + if (value == null) { + return null; + } + DownloadFileMultipleContentTypesContentType[] items = DownloadFileMultipleContentTypesContentType.values(); + for (DownloadFileMultipleContentTypesContentType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return this.value; + } +} diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/file/FileClient.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/file/FileClient.java index 69510b86d32..a87c2f875cb 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/file/FileClient.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/file/FileClient.java @@ -37,7 +37,6 @@ public final class FileClient { /** * The uploadFileSpecificContentType operation. * - * @param contentType Body parameter's content type. Known values are image/png. * @param file The file parameter. * @param contentLength The Content-Length header for the request. * @param requestContext The context to configure the HTTP request before HTTP client sends it. @@ -48,17 +47,16 @@ public final class FileClient { */ @Metadata(properties = { MetadataProperties.GENERATED }) @ServiceMethod(returns = ReturnType.SINGLE) - public Response uploadFileSpecificContentTypeWithResponse(String contentType, BinaryData file, - long contentLength, RequestContext requestContext) { + public Response uploadFileSpecificContentTypeWithResponse(BinaryData file, long contentLength, + RequestContext requestContext) { return this.instrumentation.instrumentWithResponse("Type.File.Body.uploadFileSpecificContentType", - requestContext, updatedContext -> this.serviceClient.uploadFileSpecificContentTypeWithResponse(contentType, - file, contentLength, updatedContext)); + requestContext, updatedContext -> this.serviceClient.uploadFileSpecificContentTypeWithResponse(file, + contentLength, updatedContext)); } /** * The uploadFileSpecificContentType operation. * - * @param contentType Body parameter's content type. Known values are image/png. * @param file The file parameter. * @param contentLength The Content-Length header for the request. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -67,8 +65,8 @@ public Response uploadFileSpecificContentTypeWithResponse(String contentTy */ @Metadata(properties = { MetadataProperties.GENERATED }) @ServiceMethod(returns = ReturnType.SINGLE) - public void uploadFileSpecificContentType(String contentType, BinaryData file, long contentLength) { - uploadFileSpecificContentTypeWithResponse(contentType, file, contentLength, RequestContext.none()); + public void uploadFileSpecificContentType(BinaryData file, long contentLength) { + uploadFileSpecificContentTypeWithResponse(file, contentLength, RequestContext.none()); } /** @@ -179,8 +177,11 @@ public BinaryData downloadFileSpecificContentType() { */ @Metadata(properties = { MetadataProperties.GENERATED }) @ServiceMethod(returns = ReturnType.SINGLE) - public Response uploadFileMultipleContentTypesWithResponse(String contentType, BinaryData file, - long contentLength, RequestContext requestContext) { + public Response uploadFileMultipleContentTypesWithResponse( + UploadFileMultipleContentTypesContentType contentType, BinaryData file, long contentLength, + RequestContext requestContext) { + // Operation 'uploadFileMultipleContentTypes' can be invoked with multiple content-type. It is difficult to form + // a correct method signature for convenience API, and hence the convenience API is not generated. return this.instrumentation.instrumentWithResponse("Type.File.Body.uploadFileMultipleContentTypes", requestContext, updatedContext -> this.serviceClient.uploadFileMultipleContentTypesWithResponse(contentType, file, contentLength, updatedContext)); @@ -198,7 +199,8 @@ public Response uploadFileMultipleContentTypesWithResponse(String contentT */ @Metadata(properties = { MetadataProperties.GENERATED }) @ServiceMethod(returns = ReturnType.SINGLE) - public void uploadFileMultipleContentTypes(String contentType, BinaryData file, long contentLength) { + public void uploadFileMultipleContentTypes(UploadFileMultipleContentTypesContentType contentType, BinaryData file, + long contentLength) { uploadFileMultipleContentTypesWithResponse(contentType, file, contentLength, RequestContext.none()); } @@ -214,8 +216,8 @@ public void uploadFileMultipleContentTypes(String contentType, BinaryData file, */ @Metadata(properties = { MetadataProperties.GENERATED }) @ServiceMethod(returns = ReturnType.SINGLE) - public Response downloadFileMultipleContentTypesWithResponse(String accept, - RequestContext requestContext) { + public Response downloadFileMultipleContentTypesWithResponse( + DownloadFileMultipleContentTypesContentType accept, RequestContext requestContext) { return this.instrumentation.instrumentWithResponse("Type.File.Body.downloadFileMultipleContentTypes", requestContext, updatedContext -> this.serviceClient.downloadFileMultipleContentTypesWithResponse(accept, updatedContext)); @@ -232,7 +234,7 @@ public Response downloadFileMultipleContentTypesWithResponse(String */ @Metadata(properties = { MetadataProperties.GENERATED }) @ServiceMethod(returns = ReturnType.SINGLE) - public BinaryData downloadFileMultipleContentTypes(String accept) { + public BinaryData downloadFileMultipleContentTypes(DownloadFileMultipleContentTypesContentType accept) { return downloadFileMultipleContentTypesWithResponse(accept, RequestContext.none()).getValue(); } @@ -276,6 +278,7 @@ public void uploadFileDefaultContentType(String contentType, BinaryData file, lo /** * The downloadFileDefaultContentType operation. * + * @param accept The accept parameter. * @param requestContext The context to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the service returns an error. @@ -284,22 +287,25 @@ public void uploadFileDefaultContentType(String contentType, BinaryData file, lo */ @Metadata(properties = { MetadataProperties.GENERATED }) @ServiceMethod(returns = ReturnType.SINGLE) - public Response downloadFileDefaultContentTypeWithResponse(RequestContext requestContext) { + public Response downloadFileDefaultContentTypeWithResponse(String accept, + RequestContext requestContext) { return this.instrumentation.instrumentWithResponse("Type.File.Body.downloadFileDefaultContentType", requestContext, - updatedContext -> this.serviceClient.downloadFileDefaultContentTypeWithResponse(updatedContext)); + updatedContext -> this.serviceClient.downloadFileDefaultContentTypeWithResponse(accept, updatedContext)); } /** * The downloadFileDefaultContentType operation. * + * @param accept The accept parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ @Metadata(properties = { MetadataProperties.GENERATED }) @ServiceMethod(returns = ReturnType.SINGLE) - public BinaryData downloadFileDefaultContentType() { - return downloadFileDefaultContentTypeWithResponse(RequestContext.none()).getValue(); + public BinaryData downloadFileDefaultContentType(String accept) { + return downloadFileDefaultContentTypeWithResponse(accept, RequestContext.none()).getValue(); } } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/file/implementation/BodiesImpl.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/file/implementation/BodiesImpl.java index 6c3d8873878..cb745d26d04 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/file/implementation/BodiesImpl.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/file/implementation/BodiesImpl.java @@ -16,6 +16,8 @@ import io.clientcore.core.instrumentation.Instrumentation; import io.clientcore.core.models.binarydata.BinaryData; import java.lang.reflect.InvocationTargetException; +import type.file.DownloadFileMultipleContentTypesContentType; +import type.file.UploadFileMultipleContentTypesContentType; /** * An instance of this class provides access to all the operations defined in Bodies. @@ -104,8 +106,9 @@ Response downloadFileSpecificContentType(@HostParam("endpoint") Stri expectedStatusCodes = { 204 }) @UnexpectedResponseExceptionDetail Response uploadFileMultipleContentTypes(@HostParam("endpoint") String endpoint, - @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData file, - @HeaderParam("Content-Length") long contentLength, RequestContext requestContext); + @HeaderParam("Content-Type") UploadFileMultipleContentTypesContentType contentType, + @BodyParam("application/json") BinaryData file, @HeaderParam("Content-Length") long contentLength, + RequestContext requestContext); @HttpRequestInformation( method = HttpMethod.GET, @@ -113,7 +116,7 @@ Response uploadFileMultipleContentTypes(@HostParam("endpoint") String endp expectedStatusCodes = { 200 }) @UnexpectedResponseExceptionDetail Response downloadFileMultipleContentTypes(@HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, RequestContext requestContext); + @HeaderParam("Accept") DownloadFileMultipleContentTypesContentType accept, RequestContext requestContext); @HttpRequestInformation( method = HttpMethod.POST, @@ -136,7 +139,6 @@ Response downloadFileDefaultContentType(@HostParam("endpoint") Strin /** * The uploadFileSpecificContentType operation. * - * @param contentType Body parameter's content type. Known values are image/png. * @param file The file parameter. * @param contentLength The Content-Length header for the request. * @param requestContext The context to configure the HTTP request before HTTP client sends it. @@ -146,10 +148,11 @@ Response downloadFileDefaultContentType(@HostParam("endpoint") Strin * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response uploadFileSpecificContentTypeWithResponse(String contentType, BinaryData file, - long contentLength, RequestContext requestContext) { + public Response uploadFileSpecificContentTypeWithResponse(BinaryData file, long contentLength, + RequestContext requestContext) { return this.instrumentation.instrumentWithResponse("Type.File.Body.uploadFileSpecificContentType", requestContext, updatedContext -> { + final String contentType = "image/png"; return service.uploadFileSpecificContentType(this.client.getEndpoint(), contentType, file, contentLength, updatedContext); }); @@ -226,8 +229,9 @@ public Response downloadFileSpecificContentTypeWithResponse(RequestC * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response uploadFileMultipleContentTypesWithResponse(String contentType, BinaryData file, - long contentLength, RequestContext requestContext) { + public Response uploadFileMultipleContentTypesWithResponse( + UploadFileMultipleContentTypesContentType contentType, BinaryData file, long contentLength, + RequestContext requestContext) { return this.instrumentation.instrumentWithResponse("Type.File.Body.uploadFileMultipleContentTypes", requestContext, updatedContext -> { return service.uploadFileMultipleContentTypes(this.client.getEndpoint(), contentType, file, @@ -246,8 +250,8 @@ public Response uploadFileMultipleContentTypesWithResponse(String contentT * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response downloadFileMultipleContentTypesWithResponse(String accept, - RequestContext requestContext) { + public Response downloadFileMultipleContentTypesWithResponse( + DownloadFileMultipleContentTypesContentType accept, RequestContext requestContext) { return this.instrumentation.instrumentWithResponse("Type.File.Body.downloadFileMultipleContentTypes", requestContext, updatedContext -> { return service.downloadFileMultipleContentTypes(this.client.getEndpoint(), accept, updatedContext); @@ -279,6 +283,7 @@ public Response uploadFileDefaultContentTypeWithResponse(String contentTyp /** * The downloadFileDefaultContentType operation. * + * @param accept The accept parameter. * @param requestContext The context to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the service returns an error. @@ -286,10 +291,10 @@ public Response uploadFileDefaultContentTypeWithResponse(String contentTyp * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response downloadFileDefaultContentTypeWithResponse(RequestContext requestContext) { + public Response downloadFileDefaultContentTypeWithResponse(String accept, + RequestContext requestContext) { return this.instrumentation.instrumentWithResponse("Type.File.Body.downloadFileDefaultContentType", requestContext, updatedContext -> { - final String accept = "*/*"; return service.downloadFileDefaultContentType(this.client.getEndpoint(), accept, updatedContext); }); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/resources/META-INF/type-file_metadata.json b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/resources/META-INF/type-file_metadata.json index 2c00f07c6f1..fae6f73a225 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/resources/META-INF/type-file_metadata.json +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/resources/META-INF/type-file_metadata.json @@ -1 +1 @@ -{"flavor":"generic","apiVersions":{},"crossLanguageDefinitions":{"type.file.FileClient":"Type.File.Body","type.file.FileClientBuilder":"Type.File"},"generatedFiles":["src/main/java/module-info.java","src/main/java/type/file/FileClient.java","src/main/java/type/file/FileClientBuilder.java","src/main/java/type/file/implementation/BodiesImpl.java","src/main/java/type/file/implementation/FileClientImpl.java","src/main/java/type/file/implementation/package-info.java","src/main/java/type/file/package-info.java"]} \ No newline at end of file +{"flavor":"generic","apiVersions":{},"crossLanguageDefinitions":{"type.file.DownloadFileMultipleContentTypesContentType":"Type.File.Body.downloadFileMultipleContentTypes.accept","type.file.FileClient":"Type.File.Body","type.file.FileClientBuilder":"Type.File"},"generatedFiles":["src/main/java/module-info.java","src/main/java/type/file/DownloadFileMultipleContentTypesContentType.java","src/main/java/type/file/FileClient.java","src/main/java/type/file/FileClientBuilder.java","src/main/java/type/file/implementation/BodiesImpl.java","src/main/java/type/file/implementation/FileClientImpl.java","src/main/java/type/file/implementation/package-info.java","src/main/java/type/file/package-info.java"]} \ No newline at end of file diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/HeaderAsyncClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/HeaderAsyncClient.java new file mode 100644 index 00000000000..21b19c60259 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/HeaderAsyncClient.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package client.naming; + +import client.naming.implementation.HeadersImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous NamingClient type. + */ +@ServiceClient(builder = NamingClientBuilder.class, isAsync = true) +public final class HeaderAsyncClient { + @Generated + private final HeadersImpl serviceClient; + + /** + * Initializes an instance of HeaderAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + HeaderAsyncClient(HeadersImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * The request operation. + * + * @param clientName The clientName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> requestWithResponse(String clientName, RequestOptions requestOptions) { + return this.serviceClient.requestWithResponseAsync(clientName, requestOptions); + } + + /** + * The response operation. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> responseWithResponse(RequestOptions requestOptions) { + return this.serviceClient.responseWithResponseAsync(requestOptions); + } + + /** + * The request operation. + * + * @param clientName The clientName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono request(String clientName) { + // Generated convenience method for requestWithResponse + RequestOptions requestOptions = new RequestOptions(); + return requestWithResponse(clientName, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * The response operation. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono response() { + // Generated convenience method for responseWithResponse + RequestOptions requestOptions = new RequestOptions(); + return responseWithResponse(requestOptions).flatMap(FluxUtil::toMono); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/HeaderClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/HeaderClient.java new file mode 100644 index 00000000000..41ac9ed13ce --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/HeaderClient.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package client.naming; + +import client.naming.implementation.HeadersImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; + +/** + * Initializes a new instance of the synchronous NamingClient type. + */ +@ServiceClient(builder = NamingClientBuilder.class) +public final class HeaderClient { + @Generated + private final HeadersImpl serviceClient; + + /** + * Initializes an instance of HeaderClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + HeaderClient(HeadersImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * The request operation. + * + * @param clientName The clientName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response requestWithResponse(String clientName, RequestOptions requestOptions) { + return this.serviceClient.requestWithResponse(clientName, requestOptions); + } + + /** + * The response operation. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response responseWithResponse(RequestOptions requestOptions) { + return this.serviceClient.responseWithResponse(requestOptions); + } + + /** + * The request operation. + * + * @param clientName The clientName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void request(String clientName) { + // Generated convenience method for requestWithResponse + RequestOptions requestOptions = new RequestOptions(); + requestWithResponse(clientName, requestOptions).getValue(); + } + + /** + * The response operation. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void response() { + // Generated convenience method for responseWithResponse + RequestOptions requestOptions = new RequestOptions(); + responseWithResponse(requestOptions).getValue(); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/NamingAsyncClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/NamingAsyncClient.java index 29bdc3d4247..1a9965972a2 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/NamingAsyncClient.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/NamingAsyncClient.java @@ -5,9 +5,6 @@ package client.naming; import client.naming.implementation.NamingClientImpl; -import client.naming.property.models.ClientNameAndJsonEncodedNameModel; -import client.naming.property.models.ClientNameModel; -import client.naming.property.models.LanguageClientNameModel; import com.azure.core.annotation.Generated; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceClient; @@ -18,7 +15,6 @@ import com.azure.core.exception.ResourceNotFoundException; import com.azure.core.http.rest.RequestOptions; import com.azure.core.http.rest.Response; -import com.azure.core.util.BinaryData; import com.azure.core.util.FluxUtil; import reactor.core.publisher.Mono; @@ -73,117 +69,6 @@ public Mono> parameterWithResponse(String clientName, RequestOpti return this.serviceClient.parameterWithResponseAsync(clientName, requestOptions); } - /** - * The client operation. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     defaultName: boolean (Required)
-     * }
-     * }
-     * 
- * - * @param body The body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> clientWithResponse(BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.clientWithResponseAsync(body, requestOptions); - } - - /** - * The language operation. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     defaultName: boolean (Required)
-     * }
-     * }
-     * 
- * - * @param body The body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> languageWithResponse(BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.languageWithResponseAsync(body, requestOptions); - } - - /** - * The compatibleWithEncodedName operation. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     wireName: boolean (Required)
-     * }
-     * }
-     * 
- * - * @param body The body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> compatibleWithEncodedNameWithResponse(BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.compatibleWithEncodedNameWithResponseAsync(body, requestOptions); - } - - /** - * The request operation. - * - * @param clientName The clientName parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> requestWithResponse(String clientName, RequestOptions requestOptions) { - return this.serviceClient.requestWithResponseAsync(clientName, requestOptions); - } - - /** - * The response operation. - * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> responseWithResponse(RequestOptions requestOptions) { - return this.serviceClient.responseWithResponseAsync(requestOptions); - } - /** * The clientName operation. * @@ -221,103 +106,4 @@ public Mono parameter(String clientName) { RequestOptions requestOptions = new RequestOptions(); return parameterWithResponse(clientName, requestOptions).flatMap(FluxUtil::toMono); } - - /** - * The client operation. - * - * @param body The body parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono client(ClientNameModel body) { - // Generated convenience method for clientWithResponse - RequestOptions requestOptions = new RequestOptions(); - return clientWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono); - } - - /** - * The language operation. - * - * @param body The body parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono language(LanguageClientNameModel body) { - // Generated convenience method for languageWithResponse - RequestOptions requestOptions = new RequestOptions(); - return languageWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono); - } - - /** - * The compatibleWithEncodedName operation. - * - * @param body The body parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono compatibleWithEncodedName(ClientNameAndJsonEncodedNameModel body) { - // Generated convenience method for compatibleWithEncodedNameWithResponse - RequestOptions requestOptions = new RequestOptions(); - return compatibleWithEncodedNameWithResponse(BinaryData.fromObject(body), requestOptions) - .flatMap(FluxUtil::toMono); - } - - /** - * The request operation. - * - * @param clientName The clientName parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono request(String clientName) { - // Generated convenience method for requestWithResponse - RequestOptions requestOptions = new RequestOptions(); - return requestWithResponse(clientName, requestOptions).flatMap(FluxUtil::toMono); - } - - /** - * The response operation. - * - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono response() { - // Generated convenience method for responseWithResponse - RequestOptions requestOptions = new RequestOptions(); - return responseWithResponse(requestOptions).flatMap(FluxUtil::toMono); - } } diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/NamingClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/NamingClient.java index cbf0519ab3e..bf91d85c0a1 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/NamingClient.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/NamingClient.java @@ -5,9 +5,6 @@ package client.naming; import client.naming.implementation.NamingClientImpl; -import client.naming.property.models.ClientNameAndJsonEncodedNameModel; -import client.naming.property.models.ClientNameModel; -import client.naming.property.models.LanguageClientNameModel; import com.azure.core.annotation.Generated; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceClient; @@ -18,7 +15,6 @@ import com.azure.core.exception.ResourceNotFoundException; import com.azure.core.http.rest.RequestOptions; import com.azure.core.http.rest.Response; -import com.azure.core.util.BinaryData; /** * Initializes a new instance of the synchronous NamingClient type. @@ -71,117 +67,6 @@ public Response parameterWithResponse(String clientName, RequestOptions re return this.serviceClient.parameterWithResponse(clientName, requestOptions); } - /** - * The client operation. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     defaultName: boolean (Required)
-     * }
-     * }
-     * 
- * - * @param body The body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response clientWithResponse(BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.clientWithResponse(body, requestOptions); - } - - /** - * The language operation. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     defaultName: boolean (Required)
-     * }
-     * }
-     * 
- * - * @param body The body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response languageWithResponse(BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.languageWithResponse(body, requestOptions); - } - - /** - * The compatibleWithEncodedName operation. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     wireName: boolean (Required)
-     * }
-     * }
-     * 
- * - * @param body The body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response compatibleWithEncodedNameWithResponse(BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.compatibleWithEncodedNameWithResponse(body, requestOptions); - } - - /** - * The request operation. - * - * @param clientName The clientName parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response requestWithResponse(String clientName, RequestOptions requestOptions) { - return this.serviceClient.requestWithResponse(clientName, requestOptions); - } - - /** - * The response operation. - * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response responseWithResponse(RequestOptions requestOptions) { - return this.serviceClient.responseWithResponse(requestOptions); - } - /** * The clientName operation. * @@ -217,97 +102,4 @@ public void parameter(String clientName) { RequestOptions requestOptions = new RequestOptions(); parameterWithResponse(clientName, requestOptions).getValue(); } - - /** - * The client operation. - * - * @param body The body parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public void client(ClientNameModel body) { - // Generated convenience method for clientWithResponse - RequestOptions requestOptions = new RequestOptions(); - clientWithResponse(BinaryData.fromObject(body), requestOptions).getValue(); - } - - /** - * The language operation. - * - * @param body The body parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public void language(LanguageClientNameModel body) { - // Generated convenience method for languageWithResponse - RequestOptions requestOptions = new RequestOptions(); - languageWithResponse(BinaryData.fromObject(body), requestOptions).getValue(); - } - - /** - * The compatibleWithEncodedName operation. - * - * @param body The body parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public void compatibleWithEncodedName(ClientNameAndJsonEncodedNameModel body) { - // Generated convenience method for compatibleWithEncodedNameWithResponse - RequestOptions requestOptions = new RequestOptions(); - compatibleWithEncodedNameWithResponse(BinaryData.fromObject(body), requestOptions).getValue(); - } - - /** - * The request operation. - * - * @param clientName The clientName parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public void request(String clientName) { - // Generated convenience method for requestWithResponse - RequestOptions requestOptions = new RequestOptions(); - requestWithResponse(clientName, requestOptions).getValue(); - } - - /** - * The response operation. - * - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public void response() { - // Generated convenience method for responseWithResponse - RequestOptions requestOptions = new RequestOptions(); - responseWithResponse(requestOptions).getValue(); - } } diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/NamingClientBuilder.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/NamingClientBuilder.java index e03f6a58db2..2f2b24a6177 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/NamingClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/NamingClientBuilder.java @@ -43,9 +43,13 @@ @ServiceClientBuilder( serviceClients = { NamingClient.class, + PropertyClient.class, + HeaderClient.class, ModelClient.class, UnionEnumClient.class, NamingAsyncClient.class, + PropertyAsyncClient.class, + HeaderAsyncClient.class, ModelAsyncClient.class, UnionEnumAsyncClient.class }) public final class NamingClientBuilder implements HttpTrait, @@ -280,6 +284,26 @@ public NamingAsyncClient buildAsyncClient() { return new NamingAsyncClient(buildInnerClient()); } + /** + * Builds an instance of PropertyAsyncClient class. + * + * @return an instance of PropertyAsyncClient. + */ + @Generated + public PropertyAsyncClient buildPropertyAsyncClient() { + return new PropertyAsyncClient(buildInnerClient().getProperties()); + } + + /** + * Builds an instance of HeaderAsyncClient class. + * + * @return an instance of HeaderAsyncClient. + */ + @Generated + public HeaderAsyncClient buildHeaderAsyncClient() { + return new HeaderAsyncClient(buildInnerClient().getHeaders()); + } + /** * Builds an instance of ModelAsyncClient class. * @@ -310,6 +334,26 @@ public NamingClient buildClient() { return new NamingClient(buildInnerClient()); } + /** + * Builds an instance of PropertyClient class. + * + * @return an instance of PropertyClient. + */ + @Generated + public PropertyClient buildPropertyClient() { + return new PropertyClient(buildInnerClient().getProperties()); + } + + /** + * Builds an instance of HeaderClient class. + * + * @return an instance of HeaderClient. + */ + @Generated + public HeaderClient buildHeaderClient() { + return new HeaderClient(buildInnerClient().getHeaders()); + } + /** * Builds an instance of ModelClient class. * diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/PropertyAsyncClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/PropertyAsyncClient.java new file mode 100644 index 00000000000..07816f53712 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/PropertyAsyncClient.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package client.naming; + +import client.naming.implementation.PropertiesImpl; +import client.naming.property.models.ClientNameAndJsonEncodedNameModel; +import client.naming.property.models.ClientNameModel; +import client.naming.property.models.LanguageClientNameModel; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous NamingClient type. + */ +@ServiceClient(builder = NamingClientBuilder.class, isAsync = true) +public final class PropertyAsyncClient { + @Generated + private final PropertiesImpl serviceClient; + + /** + * Initializes an instance of PropertyAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + PropertyAsyncClient(PropertiesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * The client operation. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     defaultName: boolean (Required)
+     * }
+     * }
+     * 
+ * + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> clientWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.clientWithResponseAsync(body, requestOptions); + } + + /** + * The language operation. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     defaultName: boolean (Required)
+     * }
+     * }
+     * 
+ * + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> languageWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.languageWithResponseAsync(body, requestOptions); + } + + /** + * The compatibleWithEncodedName operation. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     wireName: boolean (Required)
+     * }
+     * }
+     * 
+ * + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> compatibleWithEncodedNameWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.compatibleWithEncodedNameWithResponseAsync(body, requestOptions); + } + + /** + * The client operation. + * + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono client(ClientNameModel body) { + // Generated convenience method for clientWithResponse + RequestOptions requestOptions = new RequestOptions(); + return clientWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * The language operation. + * + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono language(LanguageClientNameModel body) { + // Generated convenience method for languageWithResponse + RequestOptions requestOptions = new RequestOptions(); + return languageWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * The compatibleWithEncodedName operation. + * + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono compatibleWithEncodedName(ClientNameAndJsonEncodedNameModel body) { + // Generated convenience method for compatibleWithEncodedNameWithResponse + RequestOptions requestOptions = new RequestOptions(); + return compatibleWithEncodedNameWithResponse(BinaryData.fromObject(body), requestOptions) + .flatMap(FluxUtil::toMono); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/PropertyClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/PropertyClient.java new file mode 100644 index 00000000000..bbd4d0fc8d3 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/PropertyClient.java @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package client.naming; + +import client.naming.implementation.PropertiesImpl; +import client.naming.property.models.ClientNameAndJsonEncodedNameModel; +import client.naming.property.models.ClientNameModel; +import client.naming.property.models.LanguageClientNameModel; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous NamingClient type. + */ +@ServiceClient(builder = NamingClientBuilder.class) +public final class PropertyClient { + @Generated + private final PropertiesImpl serviceClient; + + /** + * Initializes an instance of PropertyClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + PropertyClient(PropertiesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * The client operation. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     defaultName: boolean (Required)
+     * }
+     * }
+     * 
+ * + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response clientWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.clientWithResponse(body, requestOptions); + } + + /** + * The language operation. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     defaultName: boolean (Required)
+     * }
+     * }
+     * 
+ * + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response languageWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.languageWithResponse(body, requestOptions); + } + + /** + * The compatibleWithEncodedName operation. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     wireName: boolean (Required)
+     * }
+     * }
+     * 
+ * + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response compatibleWithEncodedNameWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.compatibleWithEncodedNameWithResponse(body, requestOptions); + } + + /** + * The client operation. + * + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void client(ClientNameModel body) { + // Generated convenience method for clientWithResponse + RequestOptions requestOptions = new RequestOptions(); + clientWithResponse(BinaryData.fromObject(body), requestOptions).getValue(); + } + + /** + * The language operation. + * + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void language(LanguageClientNameModel body) { + // Generated convenience method for languageWithResponse + RequestOptions requestOptions = new RequestOptions(); + languageWithResponse(BinaryData.fromObject(body), requestOptions).getValue(); + } + + /** + * The compatibleWithEncodedName operation. + * + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void compatibleWithEncodedName(ClientNameAndJsonEncodedNameModel body) { + // Generated convenience method for compatibleWithEncodedNameWithResponse + RequestOptions requestOptions = new RequestOptions(); + compatibleWithEncodedNameWithResponse(BinaryData.fromObject(body), requestOptions).getValue(); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/implementation/HeadersImpl.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/implementation/HeadersImpl.java new file mode 100644 index 00000000000..a74651005cf --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/implementation/HeadersImpl.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package client.naming.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in Headers. + */ +public final class HeadersImpl { + /** + * The proxy service used to perform REST calls. + */ + private final HeadersService service; + + /** + * The service client containing this operation class. + */ + private final NamingClientImpl client; + + /** + * Initializes an instance of HeadersImpl. + * + * @param client the instance of the service client containing this operation class. + */ + HeadersImpl(NamingClientImpl client) { + this.service = RestProxy.create(HeadersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NamingClientHeaders to be used by the proxy service to perform REST + * calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NamingClientHeaders") + public interface HeadersService { + @Post("/client/naming/header") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> request(@HostParam("endpoint") String endpoint, + @HeaderParam("default-name") String clientName, RequestOptions requestOptions, Context context); + + @Post("/client/naming/header") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response requestSync(@HostParam("endpoint") String endpoint, + @HeaderParam("default-name") String clientName, RequestOptions requestOptions, Context context); + + @Get("/client/naming/header") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> response(@HostParam("endpoint") String endpoint, RequestOptions requestOptions, + Context context); + + @Get("/client/naming/header") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response responseSync(@HostParam("endpoint") String endpoint, RequestOptions requestOptions, + Context context); + } + + /** + * The request operation. + * + * @param clientName The clientName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> requestWithResponseAsync(String clientName, RequestOptions requestOptions) { + return FluxUtil + .withContext(context -> service.request(this.client.getEndpoint(), clientName, requestOptions, context)); + } + + /** + * The request operation. + * + * @param clientName The clientName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response requestWithResponse(String clientName, RequestOptions requestOptions) { + return service.requestSync(this.client.getEndpoint(), clientName, requestOptions, Context.NONE); + } + + /** + * The response operation. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> responseWithResponseAsync(RequestOptions requestOptions) { + return FluxUtil.withContext(context -> service.response(this.client.getEndpoint(), requestOptions, context)); + } + + /** + * The response operation. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response responseWithResponse(RequestOptions requestOptions) { + return service.responseSync(this.client.getEndpoint(), requestOptions, Context.NONE); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/implementation/NamingClientImpl.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/implementation/NamingClientImpl.java index e1555932b3d..1ba9477a595 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/implementation/NamingClientImpl.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/implementation/NamingClientImpl.java @@ -4,10 +4,7 @@ package client.naming.implementation; -import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; import com.azure.core.annotation.Post; @@ -27,7 +24,6 @@ import com.azure.core.http.rest.RequestOptions; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.serializer.JacksonAdapter; @@ -85,6 +81,34 @@ public SerializerAdapter getSerializerAdapter() { return this.serializerAdapter; } + /** + * The PropertiesImpl object to access its operations. + */ + private final PropertiesImpl properties; + + /** + * Gets the PropertiesImpl object to access its operations. + * + * @return the PropertiesImpl object. + */ + public PropertiesImpl getProperties() { + return this.properties; + } + + /** + * The HeadersImpl object to access its operations. + */ + private final HeadersImpl headers; + + /** + * Gets the HeadersImpl object to access its operations. + * + * @return the HeadersImpl object. + */ + public HeadersImpl getHeaders() { + return this.headers; + } + /** * The ModelClientsImpl object to access its operations. */ @@ -144,6 +168,8 @@ public NamingClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerA this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.endpoint = endpoint; + this.properties = new PropertiesImpl(this); + this.headers = new HeadersImpl(this); this.modelClients = new ModelClientsImpl(this); this.unionEnums = new UnionEnumsImpl(this); this.service = RestProxy.create(NamingClientService.class, this.httpPipeline, this.getSerializerAdapter()); @@ -190,102 +216,6 @@ Mono> parameter(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(HttpResponseException.class) Response parameterSync(@HostParam("endpoint") String endpoint, @QueryParam("defaultName") String clientName, RequestOptions requestOptions, Context context); - - @Post("/client/naming/property/client") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> client(@HostParam("endpoint") String endpoint, - @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData body, - RequestOptions requestOptions, Context context); - - @Post("/client/naming/property/client") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Response clientSync(@HostParam("endpoint") String endpoint, - @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData body, - RequestOptions requestOptions, Context context); - - @Post("/client/naming/property/language") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> language(@HostParam("endpoint") String endpoint, - @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData body, - RequestOptions requestOptions, Context context); - - @Post("/client/naming/property/language") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Response languageSync(@HostParam("endpoint") String endpoint, - @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData body, - RequestOptions requestOptions, Context context); - - @Post("/client/naming/property/compatible-with-encoded-name") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> compatibleWithEncodedName(@HostParam("endpoint") String endpoint, - @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData body, - RequestOptions requestOptions, Context context); - - @Post("/client/naming/property/compatible-with-encoded-name") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Response compatibleWithEncodedNameSync(@HostParam("endpoint") String endpoint, - @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData body, - RequestOptions requestOptions, Context context); - - @Post("/client/naming/header") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> request(@HostParam("endpoint") String endpoint, - @HeaderParam("default-name") String clientName, RequestOptions requestOptions, Context context); - - @Post("/client/naming/header") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Response requestSync(@HostParam("endpoint") String endpoint, - @HeaderParam("default-name") String clientName, RequestOptions requestOptions, Context context); - - @Get("/client/naming/header") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> response(@HostParam("endpoint") String endpoint, RequestOptions requestOptions, - Context context); - - @Get("/client/naming/header") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Response responseSync(@HostParam("endpoint") String endpoint, RequestOptions requestOptions, - Context context); } /** @@ -350,228 +280,4 @@ public Mono> parameterWithResponseAsync(String clientName, Reques public Response parameterWithResponse(String clientName, RequestOptions requestOptions) { return service.parameterSync(this.getEndpoint(), clientName, requestOptions, Context.NONE); } - - /** - * The client operation. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     defaultName: boolean (Required)
-     * }
-     * }
-     * 
- * - * @param body The body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> clientWithResponseAsync(BinaryData body, RequestOptions requestOptions) { - final String contentType = "application/json"; - return FluxUtil - .withContext(context -> service.client(this.getEndpoint(), contentType, body, requestOptions, context)); - } - - /** - * The client operation. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     defaultName: boolean (Required)
-     * }
-     * }
-     * 
- * - * @param body The body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response clientWithResponse(BinaryData body, RequestOptions requestOptions) { - final String contentType = "application/json"; - return service.clientSync(this.getEndpoint(), contentType, body, requestOptions, Context.NONE); - } - - /** - * The language operation. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     defaultName: boolean (Required)
-     * }
-     * }
-     * 
- * - * @param body The body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> languageWithResponseAsync(BinaryData body, RequestOptions requestOptions) { - final String contentType = "application/json"; - return FluxUtil - .withContext(context -> service.language(this.getEndpoint(), contentType, body, requestOptions, context)); - } - - /** - * The language operation. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     defaultName: boolean (Required)
-     * }
-     * }
-     * 
- * - * @param body The body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response languageWithResponse(BinaryData body, RequestOptions requestOptions) { - final String contentType = "application/json"; - return service.languageSync(this.getEndpoint(), contentType, body, requestOptions, Context.NONE); - } - - /** - * The compatibleWithEncodedName operation. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     wireName: boolean (Required)
-     * }
-     * }
-     * 
- * - * @param body The body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> compatibleWithEncodedNameWithResponseAsync(BinaryData body, - RequestOptions requestOptions) { - final String contentType = "application/json"; - return FluxUtil.withContext(context -> service.compatibleWithEncodedName(this.getEndpoint(), contentType, body, - requestOptions, context)); - } - - /** - * The compatibleWithEncodedName operation. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     wireName: boolean (Required)
-     * }
-     * }
-     * 
- * - * @param body The body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response compatibleWithEncodedNameWithResponse(BinaryData body, RequestOptions requestOptions) { - final String contentType = "application/json"; - return service.compatibleWithEncodedNameSync(this.getEndpoint(), contentType, body, requestOptions, - Context.NONE); - } - - /** - * The request operation. - * - * @param clientName The clientName parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> requestWithResponseAsync(String clientName, RequestOptions requestOptions) { - return FluxUtil - .withContext(context -> service.request(this.getEndpoint(), clientName, requestOptions, context)); - } - - /** - * The request operation. - * - * @param clientName The clientName parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response requestWithResponse(String clientName, RequestOptions requestOptions) { - return service.requestSync(this.getEndpoint(), clientName, requestOptions, Context.NONE); - } - - /** - * The response operation. - * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> responseWithResponseAsync(RequestOptions requestOptions) { - return FluxUtil.withContext(context -> service.response(this.getEndpoint(), requestOptions, context)); - } - - /** - * The response operation. - * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response responseWithResponse(RequestOptions requestOptions) { - return service.responseSync(this.getEndpoint(), requestOptions, Context.NONE); - } } diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/implementation/PropertiesImpl.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/implementation/PropertiesImpl.java new file mode 100644 index 00000000000..dae6af0ed5a --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/naming/implementation/PropertiesImpl.java @@ -0,0 +1,282 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package client.naming.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in Properties. + */ +public final class PropertiesImpl { + /** + * The proxy service used to perform REST calls. + */ + private final PropertiesService service; + + /** + * The service client containing this operation class. + */ + private final NamingClientImpl client; + + /** + * Initializes an instance of PropertiesImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PropertiesImpl(NamingClientImpl client) { + this.service + = RestProxy.create(PropertiesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NamingClientProperties to be used by the proxy service to perform + * REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NamingClientProperties") + public interface PropertiesService { + @Post("/client/naming/property/client") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> client(@HostParam("endpoint") String endpoint, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData body, + RequestOptions requestOptions, Context context); + + @Post("/client/naming/property/client") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response clientSync(@HostParam("endpoint") String endpoint, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData body, + RequestOptions requestOptions, Context context); + + @Post("/client/naming/property/language") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> language(@HostParam("endpoint") String endpoint, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData body, + RequestOptions requestOptions, Context context); + + @Post("/client/naming/property/language") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response languageSync(@HostParam("endpoint") String endpoint, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData body, + RequestOptions requestOptions, Context context); + + @Post("/client/naming/property/compatible-with-encoded-name") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> compatibleWithEncodedName(@HostParam("endpoint") String endpoint, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData body, + RequestOptions requestOptions, Context context); + + @Post("/client/naming/property/compatible-with-encoded-name") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response compatibleWithEncodedNameSync(@HostParam("endpoint") String endpoint, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData body, + RequestOptions requestOptions, Context context); + } + + /** + * The client operation. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     defaultName: boolean (Required)
+     * }
+     * }
+     * 
+ * + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> clientWithResponseAsync(BinaryData body, RequestOptions requestOptions) { + final String contentType = "application/json"; + return FluxUtil.withContext( + context -> service.client(this.client.getEndpoint(), contentType, body, requestOptions, context)); + } + + /** + * The client operation. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     defaultName: boolean (Required)
+     * }
+     * }
+     * 
+ * + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response clientWithResponse(BinaryData body, RequestOptions requestOptions) { + final String contentType = "application/json"; + return service.clientSync(this.client.getEndpoint(), contentType, body, requestOptions, Context.NONE); + } + + /** + * The language operation. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     defaultName: boolean (Required)
+     * }
+     * }
+     * 
+ * + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> languageWithResponseAsync(BinaryData body, RequestOptions requestOptions) { + final String contentType = "application/json"; + return FluxUtil.withContext( + context -> service.language(this.client.getEndpoint(), contentType, body, requestOptions, context)); + } + + /** + * The language operation. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     defaultName: boolean (Required)
+     * }
+     * }
+     * 
+ * + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response languageWithResponse(BinaryData body, RequestOptions requestOptions) { + final String contentType = "application/json"; + return service.languageSync(this.client.getEndpoint(), contentType, body, requestOptions, Context.NONE); + } + + /** + * The compatibleWithEncodedName operation. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     wireName: boolean (Required)
+     * }
+     * }
+     * 
+ * + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> compatibleWithEncodedNameWithResponseAsync(BinaryData body, + RequestOptions requestOptions) { + final String contentType = "application/json"; + return FluxUtil.withContext(context -> service.compatibleWithEncodedName(this.client.getEndpoint(), contentType, + body, requestOptions, context)); + } + + /** + * The compatibleWithEncodedName operation. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     wireName: boolean (Required)
+     * }
+     * }
+     * 
+ * + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response compatibleWithEncodedNameWithResponse(BinaryData body, RequestOptions requestOptions) { + final String contentType = "application/json"; + return service.compatibleWithEncodedNameSync(this.client.getEndpoint(), contentType, body, requestOptions, + Context.NONE); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/anotherclientoperationgroup/subnamespace/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/anotherclientoperationgroup/subnamespace/package-info.java index 4a649af0460..64f2b7bae5e 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/anotherclientoperationgroup/subnamespace/package-info.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/anotherclientoperationgroup/subnamespace/package-info.java @@ -5,8 +5,7 @@ /** * * Package containing the classes for SecondClient. - * Test that we can use @client and @operationGroup decorators to customize client side code structure, such - * as: + * Test that we can use @client decorators to customize client side code structure, such as: * 1. have everything as default. * 2. to rename client or operation group * 3. one client can have more than one operations groups diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/clientoperationgroup/implementation/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/clientoperationgroup/implementation/package-info.java index a806f1928b8..ef528715ceb 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/clientoperationgroup/implementation/package-info.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/clientoperationgroup/implementation/package-info.java @@ -5,8 +5,7 @@ /** * * Package containing the implementations for Service. - * Test that we can use @client and @operationGroup decorators to customize client side code structure, such - * as: + * Test that we can use @client decorators to customize client side code structure, such as: * 1. have everything as default. * 2. to rename client or operation group * 3. one client can have more than one operations groups diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/clientoperationgroup/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/clientoperationgroup/package-info.java index 2b619ea0cb2..d11613f5a9a 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/clientoperationgroup/package-info.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/clientoperationgroup/package-info.java @@ -5,8 +5,7 @@ /** * * Package containing the classes for Service. - * Test that we can use @client and @operationGroup decorators to customize client side code structure, such - * as: + * Test that we can use @client decorators to customize client side code structure, such as: * 1. have everything as default. * 2. to rename client or operation group * 3. one client can have more than one operations groups diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/multiclient/implementation/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/multiclient/implementation/package-info.java index 4bd35e24192..ab1b67ee1d1 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/multiclient/implementation/package-info.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/multiclient/implementation/package-info.java @@ -5,8 +5,7 @@ /** * * Package containing the implementations for Service. - * Test that we can use @client and @operationGroup decorators to customize client side code structure, such - * as: + * Test that we can use @client decorators to customize client side code structure, such as: * 1. have everything as default. * 2. to rename client or operation group * 3. one client can have more than one operations groups diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/multiclient/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/multiclient/package-info.java index 9e0bc9b2ccd..9671e62f440 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/multiclient/package-info.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/multiclient/package-info.java @@ -5,8 +5,7 @@ /** * * Package containing the classes for Service. - * Test that we can use @client and @operationGroup decorators to customize client side code structure, such - * as: + * Test that we can use @client decorators to customize client side code structure, such as: * 1. have everything as default. * 2. to rename client or operation group * 3. one client can have more than one operations groups diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/renamedoperation/implementation/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/renamedoperation/implementation/package-info.java index ef4c542a7da..36fc52504d9 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/renamedoperation/implementation/package-info.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/renamedoperation/implementation/package-info.java @@ -5,8 +5,7 @@ /** * * Package containing the implementations for Service. - * Test that we can use @client and @operationGroup decorators to customize client side code structure, such - * as: + * Test that we can use @client decorators to customize client side code structure, such as: * 1. have everything as default. * 2. to rename client or operation group * 3. one client can have more than one operations groups diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/renamedoperation/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/renamedoperation/package-info.java index d08052aad20..a16d444ee1b 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/renamedoperation/package-info.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/renamedoperation/package-info.java @@ -5,8 +5,7 @@ /** * * Package containing the classes for Service. - * Test that we can use @client and @operationGroup decorators to customize client side code structure, such - * as: + * Test that we can use @client decorators to customize client side code structure, such as: * 1. have everything as default. * 2. to rename client or operation group * 3. one client can have more than one operations groups diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/service/implementation/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/service/implementation/package-info.java index c7595374ac3..f2a385ef4c4 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/service/implementation/package-info.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/service/implementation/package-info.java @@ -5,8 +5,7 @@ /** * * Package containing the implementations for Service. - * Test that we can use @client and @operationGroup decorators to customize client side code structure, such - * as: + * Test that we can use @client decorators to customize client side code structure, such as: * 1. have everything as default. * 2. to rename client or operation group * 3. one client can have more than one operations groups diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/service/models/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/service/models/package-info.java index 39f210ff84a..38476d596b2 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/service/models/package-info.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/service/models/package-info.java @@ -5,8 +5,7 @@ /** * * Package containing the data models for Service. - * Test that we can use @client and @operationGroup decorators to customize client side code structure, such - * as: + * Test that we can use @client decorators to customize client side code structure, such as: * 1. have everything as default. * 2. to rename client or operation group * 3. one client can have more than one operations groups diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/service/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/service/package-info.java index 8f70f1bf5d8..23c65249310 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/service/package-info.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/service/package-info.java @@ -5,8 +5,7 @@ /** * * Package containing the classes for Service. - * Test that we can use @client and @operationGroup decorators to customize client side code structure, such - * as: + * Test that we can use @client decorators to customize client side code structure, such as: * 1. have everything as default. * 2. to rename client or operation group * 3. one client can have more than one operations groups diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/twooperationgroup/implementation/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/twooperationgroup/implementation/package-info.java index 799b292b9dd..c5e86c1afb1 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/twooperationgroup/implementation/package-info.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/twooperationgroup/implementation/package-info.java @@ -5,8 +5,7 @@ /** * * Package containing the implementations for Service. - * Test that we can use @client and @operationGroup decorators to customize client side code structure, such - * as: + * Test that we can use @client decorators to customize client side code structure, such as: * 1. have everything as default. * 2. to rename client or operation group * 3. one client can have more than one operations groups diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/twooperationgroup/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/twooperationgroup/package-info.java index e3d68ebcf75..f46b9bfe2ee 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/twooperationgroup/package-info.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/client/structure/twooperationgroup/package-info.java @@ -5,8 +5,7 @@ /** * * Package containing the classes for Service. - * Test that we can use @client and @operationGroup decorators to customize client side code structure, such - * as: + * Test that we can use @client decorators to customize client side code structure, such as: * 1. have everything as default. * 2. to rename client or operation group * 3. one client can have more than one operations groups diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/OperationsAsyncClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/OperationsAsyncClient.java new file mode 100644 index 00000000000..20ae75a4582 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/OperationsAsyncClient.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package service.multipleservices.servicea; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; +import service.multipleservices.servicea.implementation.OperationsImpl; + +/** + * Initializes a new instance of the asynchronous ServiceAClient type. + */ +@ServiceClient(builder = ServiceAClientBuilder.class, isAsync = true) +public final class OperationsAsyncClient { + @Generated + private final OperationsImpl serviceClient; + + /** + * Initializes an instance of OperationsAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + OperationsAsyncClient(OperationsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * The opA operation. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> opAWithResponse(RequestOptions requestOptions) { + return this.serviceClient.opAWithResponseAsync(requestOptions); + } + + /** + * The opA operation. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono opA() { + // Generated convenience method for opAWithResponse + RequestOptions requestOptions = new RequestOptions(); + return opAWithResponse(requestOptions).flatMap(FluxUtil::toMono); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/OperationsClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/OperationsClient.java new file mode 100644 index 00000000000..90b75157ad8 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/OperationsClient.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package service.multipleservices.servicea; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import service.multipleservices.servicea.implementation.OperationsImpl; + +/** + * Initializes a new instance of the synchronous ServiceAClient type. + */ +@ServiceClient(builder = ServiceAClientBuilder.class) +public final class OperationsClient { + @Generated + private final OperationsImpl serviceClient; + + /** + * Initializes an instance of OperationsClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + OperationsClient(OperationsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * The opA operation. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response opAWithResponse(RequestOptions requestOptions) { + return this.serviceClient.opAWithResponse(requestOptions); + } + + /** + * The opA operation. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void opA() { + // Generated convenience method for opAWithResponse + RequestOptions requestOptions = new RequestOptions(); + opAWithResponse(requestOptions).getValue(); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/ServiceAClientBuilder.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/ServiceAClientBuilder.java new file mode 100644 index 00000000000..26f80ed5ae0 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/ServiceAClientBuilder.java @@ -0,0 +1,333 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package service.multipleservices.servicea; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import service.multipleservices.servicea.implementation.ServiceAClientImpl; + +/** + * A builder for creating a new instance of the ServiceAClient type. + */ +@ServiceClientBuilder( + serviceClients = { + SubNamespaceClient.class, + OperationsClient.class, + SubNamespaceAsyncClient.class, + OperationsAsyncClient.class }) +public final class ServiceAClientBuilder implements HttpTrait, + ConfigurationTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("service-multipleservices-servicea.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the ServiceAClientBuilder. + */ + @Generated + public ServiceAClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ServiceAClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ServiceAClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ServiceAClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ServiceAClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ServiceAClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ServiceAClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ServiceAClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ServiceAClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Service version + */ + @Generated + private ServiceAServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the ServiceAClientBuilder. + */ + @Generated + public ServiceAClientBuilder serviceVersion(ServiceAServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the ServiceAClientBuilder. + */ + @Generated + public ServiceAClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of ServiceAClientImpl with the provided parameters. + * + * @return an instance of ServiceAClientImpl. + */ + @Generated + private ServiceAClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + String localEndpoint = (endpoint != null) ? endpoint : "http://localhost:3000"; + ServiceAServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : ServiceAServiceVersion.getLatest(); + ServiceAClientImpl client = new ServiceAClientImpl(localPipeline, + JacksonAdapter.createDefaultSerializerAdapter(), localEndpoint, localServiceVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of SubNamespaceAsyncClient class. + * + * @return an instance of SubNamespaceAsyncClient. + */ + @Generated + public SubNamespaceAsyncClient buildSubNamespaceAsyncClient() { + return new SubNamespaceAsyncClient(buildInnerClient().getSubNamespaces()); + } + + /** + * Builds an instance of OperationsAsyncClient class. + * + * @return an instance of OperationsAsyncClient. + */ + @Generated + public OperationsAsyncClient buildOperationsAsyncClient() { + return new OperationsAsyncClient(buildInnerClient().getOperations()); + } + + /** + * Builds an instance of SubNamespaceClient class. + * + * @return an instance of SubNamespaceClient. + */ + @Generated + public SubNamespaceClient buildSubNamespaceClient() { + return new SubNamespaceClient(buildInnerClient().getSubNamespaces()); + } + + /** + * Builds an instance of OperationsClient class. + * + * @return an instance of OperationsClient. + */ + @Generated + public OperationsClient buildOperationsClient() { + return new OperationsClient(buildInnerClient().getOperations()); + } + + private static final ClientLogger LOGGER = new ClientLogger(ServiceAClientBuilder.class); +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/ServiceAServiceVersion.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/ServiceAServiceVersion.java new file mode 100644 index 00000000000..8b3d188e8be --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/ServiceAServiceVersion.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package service.multipleservices.servicea; + +import com.azure.core.util.ServiceVersion; + +/** + * Service version of ServiceAClient. + */ +public enum ServiceAServiceVersion implements ServiceVersion { + /** + * Enum value av1. + */ + VAV1("av1"), + + /** + * Enum value av2. + */ + VAV2("av2"); + + private final String version; + + ServiceAServiceVersion(String version) { + this.version = version; + } + + /** + * {@inheritDoc} + */ + @Override + public String getVersion() { + return this.version; + } + + /** + * Gets the latest service version supported by this client library. + * + * @return The latest {@link ServiceAServiceVersion}. + */ + public static ServiceAServiceVersion getLatest() { + return VAV2; + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/ServiceBServiceVersion.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/ServiceBServiceVersion.java new file mode 100644 index 00000000000..d2f143e3e82 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/ServiceBServiceVersion.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package service.multipleservices.servicea; + +import com.azure.core.util.ServiceVersion; + +/** + * Service version of ServiceBClient. + */ +public enum ServiceBServiceVersion implements ServiceVersion { + /** + * Enum value bv1. + */ + VBV1("bv1"), + + /** + * Enum value bv2. + */ + VBV2("bv2"); + + private final String version; + + ServiceBServiceVersion(String version) { + this.version = version; + } + + /** + * {@inheritDoc} + */ + @Override + public String getVersion() { + return this.version; + } + + /** + * Gets the latest service version supported by this client library. + * + * @return The latest {@link ServiceBServiceVersion}. + */ + public static ServiceBServiceVersion getLatest() { + return VBV2; + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/SubNamespaceAsyncClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/SubNamespaceAsyncClient.java new file mode 100644 index 00000000000..b9a1b6c8e97 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/SubNamespaceAsyncClient.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package service.multipleservices.servicea; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; +import service.multipleservices.servicea.implementation.SubNamespacesImpl; + +/** + * Initializes a new instance of the asynchronous ServiceAClient type. + */ +@ServiceClient(builder = ServiceAClientBuilder.class, isAsync = true) +public final class SubNamespaceAsyncClient { + @Generated + private final SubNamespacesImpl serviceClient; + + /** + * Initializes an instance of SubNamespaceAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + SubNamespaceAsyncClient(SubNamespacesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * The subOpA operation. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> subOpAWithResponse(RequestOptions requestOptions) { + return this.serviceClient.subOpAWithResponseAsync(requestOptions); + } + + /** + * The subOpA operation. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono subOpA() { + // Generated convenience method for subOpAWithResponse + RequestOptions requestOptions = new RequestOptions(); + return subOpAWithResponse(requestOptions).flatMap(FluxUtil::toMono); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/SubNamespaceClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/SubNamespaceClient.java new file mode 100644 index 00000000000..32f7824d7dd --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/SubNamespaceClient.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package service.multipleservices.servicea; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import service.multipleservices.servicea.implementation.SubNamespacesImpl; + +/** + * Initializes a new instance of the synchronous ServiceAClient type. + */ +@ServiceClient(builder = ServiceAClientBuilder.class) +public final class SubNamespaceClient { + @Generated + private final SubNamespacesImpl serviceClient; + + /** + * Initializes an instance of SubNamespaceClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + SubNamespaceClient(SubNamespacesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * The subOpA operation. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response subOpAWithResponse(RequestOptions requestOptions) { + return this.serviceClient.subOpAWithResponse(requestOptions); + } + + /** + * The subOpA operation. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void subOpA() { + // Generated convenience method for subOpAWithResponse + RequestOptions requestOptions = new RequestOptions(); + subOpAWithResponse(requestOptions).getValue(); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/OperationsImpl.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/OperationsImpl.java new file mode 100644 index 00000000000..4175493917a --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/OperationsImpl.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package service.multipleservices.servicea.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; +import service.multipleservices.servicea.ServiceAServiceVersion; + +/** + * An instance of this class provides access to all the operations defined in Operations. + */ +public final class OperationsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final OperationsService service; + + /** + * The service client containing this operation class. + */ + private final ServiceAClientImpl client; + + /** + * Initializes an instance of OperationsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OperationsImpl(ServiceAClientImpl client) { + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public ServiceAServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for ServiceAClientOperations to be used by the proxy service to perform + * REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ServiceAClientOperations") + public interface OperationsService { + @Get("/service/multiple-services/service-a/a-test") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> opA(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + RequestOptions requestOptions, Context context); + + @Get("/service/multiple-services/service-a/a-test") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response opASync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + RequestOptions requestOptions, Context context); + } + + /** + * The opA operation. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> opAWithResponseAsync(RequestOptions requestOptions) { + return FluxUtil.withContext(context -> service.opA(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), requestOptions, context)); + } + + /** + * The opA operation. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response opAWithResponse(RequestOptions requestOptions) { + return service.opASync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), requestOptions, + Context.NONE); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/OperationsOperationsImpl.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/OperationsOperationsImpl.java new file mode 100644 index 00000000000..b5975c84156 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/OperationsOperationsImpl.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package service.multipleservices.servicea.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; +import service.multipleservices.servicea.ServiceBServiceVersion; + +/** + * An instance of this class provides access to all the operations defined in OperationsOperations. + */ +public final class OperationsOperationsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final OperationsService service; + + /** + * The service client containing this operation class. + */ + private final ServiceBClientImpl client; + + /** + * Initializes an instance of OperationsOperationsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OperationsOperationsImpl(ServiceBClientImpl client) { + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public ServiceBServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for ServiceBClientOperationsOperations to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ServiceBClientOperationsOperations") + public interface OperationsService { + @Get("/service/multiple-services/service-b/b-test") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> opB(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + RequestOptions requestOptions, Context context); + + @Get("/service/multiple-services/service-b/b-test") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response opBSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + RequestOptions requestOptions, Context context); + } + + /** + * The opB operation. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> opBWithResponseAsync(RequestOptions requestOptions) { + return FluxUtil.withContext(context -> service.opB(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), requestOptions, context)); + } + + /** + * The opB operation. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response opBWithResponse(RequestOptions requestOptions) { + return service.opBSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), requestOptions, + Context.NONE); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/ServiceAClientImpl.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/ServiceAClientImpl.java new file mode 100644 index 00000000000..ca1061a2bc2 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/ServiceAClientImpl.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package service.multipleservices.servicea.implementation; + +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; +import service.multipleservices.servicea.ServiceAServiceVersion; + +/** + * Initializes a new instance of the ServiceAClient type. + */ +public final class ServiceAClientImpl { + /** + * Service host. + */ + private final String endpoint; + + /** + * Gets Service host. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * Service version. + */ + private final ServiceAServiceVersion serviceVersion; + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public ServiceAServiceVersion getServiceVersion() { + return this.serviceVersion; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The serializer to serialize an object into a string. + */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * The SubNamespacesImpl object to access its operations. + */ + private final SubNamespacesImpl subNamespaces; + + /** + * Gets the SubNamespacesImpl object to access its operations. + * + * @return the SubNamespacesImpl object. + */ + public SubNamespacesImpl getSubNamespaces() { + return this.subNamespaces; + } + + /** + * The OperationsImpl object to access its operations. + */ + private final OperationsImpl operations; + + /** + * Gets the OperationsImpl object to access its operations. + * + * @return the OperationsImpl object. + */ + public OperationsImpl getOperations() { + return this.operations; + } + + /** + * Initializes an instance of ServiceAClient client. + * + * @param endpoint Service host. + * @param serviceVersion Service version. + */ + public ServiceAClientImpl(String endpoint, ServiceAServiceVersion serviceVersion) { + this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), + JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + } + + /** + * Initializes an instance of ServiceAClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param endpoint Service host. + * @param serviceVersion Service version. + */ + public ServiceAClientImpl(HttpPipeline httpPipeline, String endpoint, ServiceAServiceVersion serviceVersion) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + } + + /** + * Initializes an instance of ServiceAClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param endpoint Service host. + * @param serviceVersion Service version. + */ + public ServiceAClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint, + ServiceAServiceVersion serviceVersion) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.endpoint = endpoint; + this.serviceVersion = serviceVersion; + this.subNamespaces = new SubNamespacesImpl(this); + this.operations = new OperationsImpl(this); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/ServiceBClientImpl.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/ServiceBClientImpl.java new file mode 100644 index 00000000000..bd4f16ae090 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/ServiceBClientImpl.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package service.multipleservices.servicea.implementation; + +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; +import service.multipleservices.servicea.ServiceBServiceVersion; + +/** + * Initializes a new instance of the ServiceBClient type. + */ +public final class ServiceBClientImpl { + /** + * Service host. + */ + private final String endpoint; + + /** + * Gets Service host. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * Service version. + */ + private final ServiceBServiceVersion serviceVersion; + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public ServiceBServiceVersion getServiceVersion() { + return this.serviceVersion; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The serializer to serialize an object into a string. + */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * The SubNamespacesOperationsImpl object to access its operations. + */ + private final SubNamespacesOperationsImpl subNamespacesOperations; + + /** + * Gets the SubNamespacesOperationsImpl object to access its operations. + * + * @return the SubNamespacesOperationsImpl object. + */ + public SubNamespacesOperationsImpl getSubNamespacesOperations() { + return this.subNamespacesOperations; + } + + /** + * The OperationsOperationsImpl object to access its operations. + */ + private final OperationsOperationsImpl operationsOperations; + + /** + * Gets the OperationsOperationsImpl object to access its operations. + * + * @return the OperationsOperationsImpl object. + */ + public OperationsOperationsImpl getOperationsOperations() { + return this.operationsOperations; + } + + /** + * Initializes an instance of ServiceBClient client. + * + * @param endpoint Service host. + * @param serviceVersion Service version. + */ + public ServiceBClientImpl(String endpoint, ServiceBServiceVersion serviceVersion) { + this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), + JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + } + + /** + * Initializes an instance of ServiceBClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param endpoint Service host. + * @param serviceVersion Service version. + */ + public ServiceBClientImpl(HttpPipeline httpPipeline, String endpoint, ServiceBServiceVersion serviceVersion) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + } + + /** + * Initializes an instance of ServiceBClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param endpoint Service host. + * @param serviceVersion Service version. + */ + public ServiceBClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint, + ServiceBServiceVersion serviceVersion) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.endpoint = endpoint; + this.serviceVersion = serviceVersion; + this.subNamespacesOperations = new SubNamespacesOperationsImpl(this); + this.operationsOperations = new OperationsOperationsImpl(this); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/SubNamespacesImpl.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/SubNamespacesImpl.java new file mode 100644 index 00000000000..42d73c60417 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/SubNamespacesImpl.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package service.multipleservices.servicea.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; +import service.multipleservices.servicea.ServiceAServiceVersion; + +/** + * An instance of this class provides access to all the operations defined in SubNamespaces. + */ +public final class SubNamespacesImpl { + /** + * The proxy service used to perform REST calls. + */ + private final SubNamespacesService service; + + /** + * The service client containing this operation class. + */ + private final ServiceAClientImpl client; + + /** + * Initializes an instance of SubNamespacesImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SubNamespacesImpl(ServiceAClientImpl client) { + this.service + = RestProxy.create(SubNamespacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public ServiceAServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for ServiceAClientSubNamespaces to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ServiceAClientSubNamespaces") + public interface SubNamespacesService { + @Get("/service/multiple-services/service-a/a-sub-test") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> subOpA(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, RequestOptions requestOptions, Context context); + + @Get("/service/multiple-services/service-a/a-sub-test") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response subOpASync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + RequestOptions requestOptions, Context context); + } + + /** + * The subOpA operation. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> subOpAWithResponseAsync(RequestOptions requestOptions) { + return FluxUtil.withContext(context -> service.subOpA(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), requestOptions, context)); + } + + /** + * The subOpA operation. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response subOpAWithResponse(RequestOptions requestOptions) { + return service.subOpASync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), + requestOptions, Context.NONE); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/SubNamespacesOperationsImpl.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/SubNamespacesOperationsImpl.java new file mode 100644 index 00000000000..f2222dcc636 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/SubNamespacesOperationsImpl.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package service.multipleservices.servicea.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; +import service.multipleservices.servicea.ServiceBServiceVersion; + +/** + * An instance of this class provides access to all the operations defined in SubNamespacesOperations. + */ +public final class SubNamespacesOperationsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final SubNamespacesService service; + + /** + * The service client containing this operation class. + */ + private final ServiceBClientImpl client; + + /** + * Initializes an instance of SubNamespacesOperationsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SubNamespacesOperationsImpl(ServiceBClientImpl client) { + this.service + = RestProxy.create(SubNamespacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public ServiceBServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for ServiceBClientSubNamespacesOperations to be used by the proxy service + * to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ServiceBClientSubNamespacesOperations") + public interface SubNamespacesService { + @Get("/service/multiple-services/service-b/b-sub-test") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> subOpB(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, RequestOptions requestOptions, Context context); + + @Get("/service/multiple-services/service-b/b-sub-test") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response subOpBSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + RequestOptions requestOptions, Context context); + } + + /** + * The subOpB operation. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> subOpBWithResponseAsync(RequestOptions requestOptions) { + return FluxUtil.withContext(context -> service.subOpB(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), requestOptions, context)); + } + + /** + * The subOpB operation. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response subOpBWithResponse(RequestOptions requestOptions) { + return service.subOpBSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), + requestOptions, Context.NONE); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/package-info.java new file mode 100644 index 00000000000..a8d65d2b70a --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/package-info.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +/** + * + * Package containing the implementations for ServiceA. + * First service definition in a multiple-services package with versioning. + * Without explicit `@client`, this should create a separate root client (`ServiceAClient`). + * + */ +package service.multipleservices.servicea.implementation; diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/package-info.java new file mode 100644 index 00000000000..06b59cc674a --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/package-info.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +/** + * + * Package containing the classes for ServiceA. + * First service definition in a multiple-services package with versioning. + * Without explicit `@client`, this should create a separate root client (`ServiceAClient`). + * + */ +package service.multipleservices.servicea; diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/OperationsAsyncClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/OperationsAsyncClient.java new file mode 100644 index 00000000000..929ed406c1b --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/OperationsAsyncClient.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package service.multipleservices.serviceb; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; +import service.multipleservices.servicea.implementation.OperationsOperationsImpl; + +/** + * Initializes a new instance of the asynchronous ServiceBClient type. + */ +@ServiceClient(builder = ServiceBClientBuilder.class, isAsync = true) +public final class OperationsAsyncClient { + @Generated + private final OperationsOperationsImpl serviceClient; + + /** + * Initializes an instance of OperationsAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + OperationsAsyncClient(OperationsOperationsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * The opB operation. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> opBWithResponse(RequestOptions requestOptions) { + return this.serviceClient.opBWithResponseAsync(requestOptions); + } + + /** + * The opB operation. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono opB() { + // Generated convenience method for opBWithResponse + RequestOptions requestOptions = new RequestOptions(); + return opBWithResponse(requestOptions).flatMap(FluxUtil::toMono); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/OperationsClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/OperationsClient.java new file mode 100644 index 00000000000..4f4b27c6e4e --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/OperationsClient.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package service.multipleservices.serviceb; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import service.multipleservices.servicea.implementation.OperationsOperationsImpl; + +/** + * Initializes a new instance of the synchronous ServiceBClient type. + */ +@ServiceClient(builder = ServiceBClientBuilder.class) +public final class OperationsClient { + @Generated + private final OperationsOperationsImpl serviceClient; + + /** + * Initializes an instance of OperationsClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + OperationsClient(OperationsOperationsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * The opB operation. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response opBWithResponse(RequestOptions requestOptions) { + return this.serviceClient.opBWithResponse(requestOptions); + } + + /** + * The opB operation. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void opB() { + // Generated convenience method for opBWithResponse + RequestOptions requestOptions = new RequestOptions(); + opBWithResponse(requestOptions).getValue(); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/ServiceBClientBuilder.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/ServiceBClientBuilder.java new file mode 100644 index 00000000000..72155075228 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/ServiceBClientBuilder.java @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package service.multipleservices.serviceb; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import service.multipleservices.servicea.ServiceBServiceVersion; +import service.multipleservices.servicea.implementation.ServiceBClientImpl; + +/** + * A builder for creating a new instance of the ServiceBClient type. + */ +@ServiceClientBuilder( + serviceClients = { + SubNamespaceClient.class, + OperationsClient.class, + SubNamespaceAsyncClient.class, + OperationsAsyncClient.class }) +public final class ServiceBClientBuilder implements HttpTrait, + ConfigurationTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("service-multipleservices-servicea.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the ServiceBClientBuilder. + */ + @Generated + public ServiceBClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ServiceBClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ServiceBClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ServiceBClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ServiceBClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ServiceBClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ServiceBClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ServiceBClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ServiceBClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Service version + */ + @Generated + private ServiceBServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the ServiceBClientBuilder. + */ + @Generated + public ServiceBClientBuilder serviceVersion(ServiceBServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the ServiceBClientBuilder. + */ + @Generated + public ServiceBClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of ServiceBClientImpl with the provided parameters. + * + * @return an instance of ServiceBClientImpl. + */ + @Generated + private ServiceBClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + String localEndpoint = (endpoint != null) ? endpoint : "http://localhost:3000"; + ServiceBServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : ServiceBServiceVersion.getLatest(); + ServiceBClientImpl client = new ServiceBClientImpl(localPipeline, + JacksonAdapter.createDefaultSerializerAdapter(), localEndpoint, localServiceVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of SubNamespaceAsyncClient class. + * + * @return an instance of SubNamespaceAsyncClient. + */ + @Generated + public SubNamespaceAsyncClient buildSubNamespaceAsyncClient() { + return new SubNamespaceAsyncClient(buildInnerClient().getSubNamespacesOperations()); + } + + /** + * Builds an instance of OperationsAsyncClient class. + * + * @return an instance of OperationsAsyncClient. + */ + @Generated + public OperationsAsyncClient buildOperationsAsyncClient() { + return new OperationsAsyncClient(buildInnerClient().getOperationsOperations()); + } + + /** + * Builds an instance of SubNamespaceClient class. + * + * @return an instance of SubNamespaceClient. + */ + @Generated + public SubNamespaceClient buildSubNamespaceClient() { + return new SubNamespaceClient(buildInnerClient().getSubNamespacesOperations()); + } + + /** + * Builds an instance of OperationsClient class. + * + * @return an instance of OperationsClient. + */ + @Generated + public OperationsClient buildOperationsClient() { + return new OperationsClient(buildInnerClient().getOperationsOperations()); + } + + private static final ClientLogger LOGGER = new ClientLogger(ServiceBClientBuilder.class); +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/SubNamespaceAsyncClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/SubNamespaceAsyncClient.java new file mode 100644 index 00000000000..778ff99be57 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/SubNamespaceAsyncClient.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package service.multipleservices.serviceb; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; +import service.multipleservices.servicea.implementation.SubNamespacesOperationsImpl; + +/** + * Initializes a new instance of the asynchronous ServiceBClient type. + */ +@ServiceClient(builder = ServiceBClientBuilder.class, isAsync = true) +public final class SubNamespaceAsyncClient { + @Generated + private final SubNamespacesOperationsImpl serviceClient; + + /** + * Initializes an instance of SubNamespaceAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + SubNamespaceAsyncClient(SubNamespacesOperationsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * The subOpB operation. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> subOpBWithResponse(RequestOptions requestOptions) { + return this.serviceClient.subOpBWithResponseAsync(requestOptions); + } + + /** + * The subOpB operation. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono subOpB() { + // Generated convenience method for subOpBWithResponse + RequestOptions requestOptions = new RequestOptions(); + return subOpBWithResponse(requestOptions).flatMap(FluxUtil::toMono); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/SubNamespaceClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/SubNamespaceClient.java new file mode 100644 index 00000000000..e9619f15a3a --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/SubNamespaceClient.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package service.multipleservices.serviceb; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import service.multipleservices.servicea.implementation.SubNamespacesOperationsImpl; + +/** + * Initializes a new instance of the synchronous ServiceBClient type. + */ +@ServiceClient(builder = ServiceBClientBuilder.class) +public final class SubNamespaceClient { + @Generated + private final SubNamespacesOperationsImpl serviceClient; + + /** + * Initializes an instance of SubNamespaceClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + SubNamespaceClient(SubNamespacesOperationsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * The subOpB operation. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response subOpBWithResponse(RequestOptions requestOptions) { + return this.serviceClient.subOpBWithResponse(requestOptions); + } + + /** + * The subOpB operation. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void subOpB() { + // Generated convenience method for subOpBWithResponse + RequestOptions requestOptions = new RequestOptions(); + subOpBWithResponse(requestOptions).getValue(); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/package-info.java new file mode 100644 index 00000000000..108534c89ad --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/package-info.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +/** + * + * Package containing the classes for ServiceBClient. + * First service definition in a multiple-services package with versioning. + * Without explicit `@client`, this should create a separate root client (`ServiceAClient`). + * + */ +package service.multipleservices.serviceb; diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/response/ResponseAsyncClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/response/ResponseAsyncClient.java index bb5f84c9ca6..7f4328aa4e7 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/response/ResponseAsyncClient.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/response/ResponseAsyncClient.java @@ -26,6 +26,7 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import tsptest.response.implementation.ResponseClientImpl; +import tsptest.response.models.GetUnionResponseContentType; import tsptest.response.models.OperationDetails1; import tsptest.response.models.OperationDetails2; import tsptest.response.models.Resource; @@ -368,7 +369,7 @@ public Mono> getPlusJsonResponseWithResponse(RequestOptions * } * * - * @param accept The accept parameter. + * @param accept The accept parameter. Allowed values: "application/json", "application/json". * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -806,10 +807,10 @@ public Mono getPlusJsonResponse() { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getUnionResponse(String accept) { + public Mono getUnionResponse(GetUnionResponseContentType accept) { // Generated convenience method for getUnionResponseWithResponse RequestOptions requestOptions = new RequestOptions(); - return getUnionResponseWithResponse(accept, requestOptions).flatMap(FluxUtil::toMono); + return getUnionResponseWithResponse(accept.toString(), requestOptions).flatMap(FluxUtil::toMono); } /** diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/response/ResponseClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/response/ResponseClient.java index d6cfa44063c..3acf0e9a678 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/response/ResponseClient.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/response/ResponseClient.java @@ -20,6 +20,7 @@ import com.azure.core.util.serializer.TypeReference; import java.util.List; import tsptest.response.implementation.ResponseClientImpl; +import tsptest.response.models.GetUnionResponseContentType; import tsptest.response.models.OperationDetails1; import tsptest.response.models.OperationDetails2; import tsptest.response.models.Resource; @@ -362,7 +363,7 @@ public Response getPlusJsonResponseWithResponse(RequestOptions reque * } * * - * @param accept The accept parameter. + * @param accept The accept parameter. Allowed values: "application/json", "application/json". * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -770,10 +771,10 @@ public Resource getPlusJsonResponse() { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public BinaryData getUnionResponse(String accept) { + public BinaryData getUnionResponse(GetUnionResponseContentType accept) { // Generated convenience method for getUnionResponseWithResponse RequestOptions requestOptions = new RequestOptions(); - return getUnionResponseWithResponse(accept, requestOptions).getValue(); + return getUnionResponseWithResponse(accept.toString(), requestOptions).getValue(); } /** diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/response/implementation/ResponseClientImpl.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/response/implementation/ResponseClientImpl.java index 6b93dafe6cf..0cbf712deb2 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/response/implementation/ResponseClientImpl.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/response/implementation/ResponseClientImpl.java @@ -1598,7 +1598,7 @@ public Response getPlusJsonResponseWithResponse(RequestOptions reque * } * * - * @param accept The accept parameter. + * @param accept The accept parameter. Allowed values: "application/json", "application/json". * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1622,7 +1622,7 @@ public Mono> getUnionResponseWithResponseAsync(String accep * } * * - * @param accept The accept parameter. + * @param accept The accept parameter. Allowed values: "application/json", "application/json". * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/response/models/GetUnionResponseContentType.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/response/models/GetUnionResponseContentType.java new file mode 100644 index 00000000000..10072a3d711 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/response/models/GetUnionResponseContentType.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package tsptest.response.models; + +/** + * Defines values for GetUnionResponseContentType. + */ +public enum GetUnionResponseContentType { + /** + * Enum value application/json. + */ + APPLICATION_JSON("application/json"), + + /** + * Enum value application/json. + */ + APPLICATION_JSON_1("application/json"); + + /** + * The actual serialized value for a GetUnionResponseContentType instance. + */ + private final String value; + + GetUnionResponseContentType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a GetUnionResponseContentType instance. + * + * @param value the serialized value to parse. + * @return the parsed GetUnionResponseContentType object, or null if unable to parse. + */ + public static GetUnionResponseContentType fromString(String value) { + if (value == null) { + return null; + } + GetUnionResponseContentType[] items = GetUnionResponseContentType.values(); + for (GetUnionResponseContentType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return this.value; + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/type/file/FileAsyncClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/type/file/FileAsyncClient.java index 4630c036e80..6115e9a2e14 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/type/file/FileAsyncClient.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/type/file/FileAsyncClient.java @@ -18,6 +18,7 @@ import com.azure.core.util.FluxUtil; import reactor.core.publisher.Mono; import type.file.implementation.BodiesImpl; +import type.file.models.DownloadFileMultipleContentTypesContentType; /** * Initializes a new instance of the asynchronous FileClient type. @@ -47,7 +48,6 @@ public final class FileAsyncClient { * } * * - * @param contentType Body parameter's content type. Known values are image/png. * @param file The file parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -58,9 +58,9 @@ public final class FileAsyncClient { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> uploadFileSpecificContentTypeWithResponse(String contentType, BinaryData file, + public Mono> uploadFileSpecificContentTypeWithResponse(BinaryData file, RequestOptions requestOptions) { - return this.serviceClient.uploadFileSpecificContentTypeWithResponseAsync(contentType, file, requestOptions); + return this.serviceClient.uploadFileSpecificContentTypeWithResponseAsync(file, requestOptions); } /** @@ -143,7 +143,8 @@ public Mono> downloadFileSpecificContentTypeWithResponse(Re * } * * - * @param contentType Body parameter's content type. Known values are image/png,image/jpeg. + * @param contentType Body parameter's content type. Known values are image/png,image/jpeg. Allowed values: + * "image/png", "image/jpeg". * @param file The file parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -156,6 +157,8 @@ public Mono> downloadFileSpecificContentTypeWithResponse(Re @ServiceMethod(returns = ReturnType.SINGLE) public Mono> uploadFileMultipleContentTypesWithResponse(String contentType, BinaryData file, RequestOptions requestOptions) { + // Operation 'uploadFileMultipleContentTypes' can be invoked with multiple content-type. It is difficult to form + // a correct method signature for convenience API, and hence the convenience API is not generated. return this.serviceClient.uploadFileMultipleContentTypesWithResponseAsync(contentType, file, requestOptions); } @@ -169,7 +172,7 @@ public Mono> uploadFileMultipleContentTypesWithResponse(String co * } * * - * @param accept The accept parameter. + * @param accept The accept parameter. Allowed values: "image/png", "image/jpeg". * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -220,6 +223,7 @@ public Mono> uploadFileDefaultContentTypeWithResponse(String cont * } * * + * @param accept The accept parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -229,14 +233,14 @@ public Mono> uploadFileDefaultContentTypeWithResponse(String cont */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> downloadFileDefaultContentTypeWithResponse(RequestOptions requestOptions) { - return this.serviceClient.downloadFileDefaultContentTypeWithResponseAsync(requestOptions); + public Mono> downloadFileDefaultContentTypeWithResponse(String accept, + RequestOptions requestOptions) { + return this.serviceClient.downloadFileDefaultContentTypeWithResponseAsync(accept, requestOptions); } /** * The uploadFileSpecificContentType operation. * - * @param contentType Body parameter's content type. Known values are image/png. * @param file The file parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -248,10 +252,10 @@ public Mono> downloadFileDefaultContentTypeWithResponse(Req */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono uploadFileSpecificContentType(String contentType, BinaryData file) { + public Mono uploadFileSpecificContentType(BinaryData file) { // Generated convenience method for uploadFileSpecificContentTypeWithResponse RequestOptions requestOptions = new RequestOptions(); - return uploadFileSpecificContentTypeWithResponse(contentType, file, requestOptions).flatMap(FluxUtil::toMono); + return uploadFileSpecificContentTypeWithResponse(file, requestOptions).flatMap(FluxUtil::toMono); } /** @@ -310,27 +314,6 @@ public Mono downloadFileSpecificContentType() { return downloadFileSpecificContentTypeWithResponse(requestOptions).flatMap(FluxUtil::toMono); } - /** - * The uploadFileMultipleContentTypes operation. - * - * @param contentType Body parameter's content type. Known values are image/png,image/jpeg. - * @param file The file parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono uploadFileMultipleContentTypes(String contentType, BinaryData file) { - // Generated convenience method for uploadFileMultipleContentTypesWithResponse - RequestOptions requestOptions = new RequestOptions(); - return uploadFileMultipleContentTypesWithResponse(contentType, file, requestOptions).flatMap(FluxUtil::toMono); - } - /** * The downloadFileMultipleContentTypes operation. * @@ -345,10 +328,11 @@ public Mono uploadFileMultipleContentTypes(String contentType, BinaryData */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono downloadFileMultipleContentTypes(String accept) { + public Mono downloadFileMultipleContentTypes(DownloadFileMultipleContentTypesContentType accept) { // Generated convenience method for downloadFileMultipleContentTypesWithResponse RequestOptions requestOptions = new RequestOptions(); - return downloadFileMultipleContentTypesWithResponse(accept, requestOptions).flatMap(FluxUtil::toMono); + return downloadFileMultipleContentTypesWithResponse(accept.toString(), requestOptions) + .flatMap(FluxUtil::toMono); } /** @@ -375,6 +359,8 @@ public Mono uploadFileDefaultContentType(String contentType, BinaryData fi /** * The downloadFileDefaultContentType operation. * + * @param accept The accept parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -384,9 +370,9 @@ public Mono uploadFileDefaultContentType(String contentType, BinaryData fi */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono downloadFileDefaultContentType() { + public Mono downloadFileDefaultContentType(String accept) { // Generated convenience method for downloadFileDefaultContentTypeWithResponse RequestOptions requestOptions = new RequestOptions(); - return downloadFileDefaultContentTypeWithResponse(requestOptions).flatMap(FluxUtil::toMono); + return downloadFileDefaultContentTypeWithResponse(accept, requestOptions).flatMap(FluxUtil::toMono); } } diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/type/file/FileClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/type/file/FileClient.java index 05170b2fdb8..6c9b71af7d7 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/type/file/FileClient.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/type/file/FileClient.java @@ -16,6 +16,7 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.BinaryData; import type.file.implementation.BodiesImpl; +import type.file.models.DownloadFileMultipleContentTypesContentType; /** * Initializes a new instance of the synchronous FileClient type. @@ -45,7 +46,6 @@ public final class FileClient { * } * * - * @param contentType Body parameter's content type. Known values are image/png. * @param file The file parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -56,9 +56,8 @@ public final class FileClient { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response uploadFileSpecificContentTypeWithResponse(String contentType, BinaryData file, - RequestOptions requestOptions) { - return this.serviceClient.uploadFileSpecificContentTypeWithResponse(contentType, file, requestOptions); + public Response uploadFileSpecificContentTypeWithResponse(BinaryData file, RequestOptions requestOptions) { + return this.serviceClient.uploadFileSpecificContentTypeWithResponse(file, requestOptions); } /** @@ -141,7 +140,8 @@ public Response downloadFileSpecificContentTypeWithResponse(RequestO * } * * - * @param contentType Body parameter's content type. Known values are image/png,image/jpeg. + * @param contentType Body parameter's content type. Known values are image/png,image/jpeg. Allowed values: + * "image/png", "image/jpeg". * @param file The file parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -154,6 +154,8 @@ public Response downloadFileSpecificContentTypeWithResponse(RequestO @ServiceMethod(returns = ReturnType.SINGLE) public Response uploadFileMultipleContentTypesWithResponse(String contentType, BinaryData file, RequestOptions requestOptions) { + // Operation 'uploadFileMultipleContentTypes' can be invoked with multiple content-type. It is difficult to form + // a correct method signature for convenience API, and hence the convenience API is not generated. return this.serviceClient.uploadFileMultipleContentTypesWithResponse(contentType, file, requestOptions); } @@ -167,7 +169,7 @@ public Response uploadFileMultipleContentTypesWithResponse(String contentT * } * * - * @param accept The accept parameter. + * @param accept The accept parameter. Allowed values: "image/png", "image/jpeg". * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -218,6 +220,7 @@ public Response uploadFileDefaultContentTypeWithResponse(String contentTyp * } * * + * @param accept The accept parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -227,14 +230,14 @@ public Response uploadFileDefaultContentTypeWithResponse(String contentTyp */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response downloadFileDefaultContentTypeWithResponse(RequestOptions requestOptions) { - return this.serviceClient.downloadFileDefaultContentTypeWithResponse(requestOptions); + public Response downloadFileDefaultContentTypeWithResponse(String accept, + RequestOptions requestOptions) { + return this.serviceClient.downloadFileDefaultContentTypeWithResponse(accept, requestOptions); } /** * The uploadFileSpecificContentType operation. * - * @param contentType Body parameter's content type. Known values are image/png. * @param file The file parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -245,10 +248,10 @@ public Response downloadFileDefaultContentTypeWithResponse(RequestOp */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public void uploadFileSpecificContentType(String contentType, BinaryData file) { + public void uploadFileSpecificContentType(BinaryData file) { // Generated convenience method for uploadFileSpecificContentTypeWithResponse RequestOptions requestOptions = new RequestOptions(); - uploadFileSpecificContentTypeWithResponse(contentType, file, requestOptions).getValue(); + uploadFileSpecificContentTypeWithResponse(file, requestOptions).getValue(); } /** @@ -306,26 +309,6 @@ public BinaryData downloadFileSpecificContentType() { return downloadFileSpecificContentTypeWithResponse(requestOptions).getValue(); } - /** - * The uploadFileMultipleContentTypes operation. - * - * @param contentType Body parameter's content type. Known values are image/png,image/jpeg. - * @param file The file parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public void uploadFileMultipleContentTypes(String contentType, BinaryData file) { - // Generated convenience method for uploadFileMultipleContentTypesWithResponse - RequestOptions requestOptions = new RequestOptions(); - uploadFileMultipleContentTypesWithResponse(contentType, file, requestOptions).getValue(); - } - /** * The downloadFileMultipleContentTypes operation. * @@ -340,10 +323,10 @@ public void uploadFileMultipleContentTypes(String contentType, BinaryData file) */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public BinaryData downloadFileMultipleContentTypes(String accept) { + public BinaryData downloadFileMultipleContentTypes(DownloadFileMultipleContentTypesContentType accept) { // Generated convenience method for downloadFileMultipleContentTypesWithResponse RequestOptions requestOptions = new RequestOptions(); - return downloadFileMultipleContentTypesWithResponse(accept, requestOptions).getValue(); + return downloadFileMultipleContentTypesWithResponse(accept.toString(), requestOptions).getValue(); } /** @@ -369,6 +352,8 @@ public void uploadFileDefaultContentType(String contentType, BinaryData file) { /** * The downloadFileDefaultContentType operation. * + * @param accept The accept parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -378,9 +363,9 @@ public void uploadFileDefaultContentType(String contentType, BinaryData file) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public BinaryData downloadFileDefaultContentType() { + public BinaryData downloadFileDefaultContentType(String accept) { // Generated convenience method for downloadFileDefaultContentTypeWithResponse RequestOptions requestOptions = new RequestOptions(); - return downloadFileDefaultContentTypeWithResponse(requestOptions).getValue(); + return downloadFileDefaultContentTypeWithResponse(accept, requestOptions).getValue(); } } diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/type/file/implementation/BodiesImpl.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/type/file/implementation/BodiesImpl.java index 43f5f03c38e..715b03483f0 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/type/file/implementation/BodiesImpl.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/type/file/implementation/BodiesImpl.java @@ -221,7 +221,6 @@ Response downloadFileDefaultContentTypeSync(@HostParam("endpoint") S * } * * - * @param contentType Body parameter's content type. Known values are image/png. * @param file The file parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -231,8 +230,9 @@ Response downloadFileDefaultContentTypeSync(@HostParam("endpoint") S * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> uploadFileSpecificContentTypeWithResponseAsync(String contentType, BinaryData file, + public Mono> uploadFileSpecificContentTypeWithResponseAsync(BinaryData file, RequestOptions requestOptions) { + final String contentType = "image/png"; return FluxUtil.withContext(context -> service.uploadFileSpecificContentType(this.client.getEndpoint(), contentType, file, requestOptions, context)); } @@ -247,7 +247,6 @@ public Mono> uploadFileSpecificContentTypeWithResponseAsync(Strin * } * * - * @param contentType Body parameter's content type. Known values are image/png. * @param file The file parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -257,8 +256,8 @@ public Mono> uploadFileSpecificContentTypeWithResponseAsync(Strin * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response uploadFileSpecificContentTypeWithResponse(String contentType, BinaryData file, - RequestOptions requestOptions) { + public Response uploadFileSpecificContentTypeWithResponse(BinaryData file, RequestOptions requestOptions) { + final String contentType = "image/png"; return service.uploadFileSpecificContentTypeSync(this.client.getEndpoint(), contentType, file, requestOptions, Context.NONE); } @@ -419,7 +418,8 @@ public Response downloadFileSpecificContentTypeWithResponse(RequestO * } * * - * @param contentType Body parameter's content type. Known values are image/png,image/jpeg. + * @param contentType Body parameter's content type. Known values are image/png,image/jpeg. Allowed values: + * "image/png", "image/jpeg". * @param file The file parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -445,7 +445,8 @@ public Mono> uploadFileMultipleContentTypesWithResponseAsync(Stri * } * * - * @param contentType Body parameter's content type. Known values are image/png,image/jpeg. + * @param contentType Body parameter's content type. Known values are image/png,image/jpeg. Allowed values: + * "image/png", "image/jpeg". * @param file The file parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -471,7 +472,7 @@ public Response uploadFileMultipleContentTypesWithResponse(String contentT * } * * - * @param accept The accept parameter. + * @param accept The accept parameter. Allowed values: "image/png", "image/jpeg". * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -496,7 +497,7 @@ public Mono> downloadFileMultipleContentTypesWithResponseAs * } * * - * @param accept The accept parameter. + * @param accept The accept parameter. Allowed values: "image/png", "image/jpeg". * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -573,6 +574,7 @@ public Response uploadFileDefaultContentTypeWithResponse(String contentTyp * } * * + * @param accept The accept parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -581,8 +583,8 @@ public Response uploadFileDefaultContentTypeWithResponse(String contentTyp * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> downloadFileDefaultContentTypeWithResponseAsync(RequestOptions requestOptions) { - final String accept = "*/*"; + public Mono> downloadFileDefaultContentTypeWithResponseAsync(String accept, + RequestOptions requestOptions) { return FluxUtil.withContext(context -> service.downloadFileDefaultContentType(this.client.getEndpoint(), accept, requestOptions, context)); } @@ -597,6 +599,7 @@ public Mono> downloadFileDefaultContentTypeWithResponseAsyn * } * * + * @param accept The accept parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -605,8 +608,8 @@ public Mono> downloadFileDefaultContentTypeWithResponseAsyn * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response downloadFileDefaultContentTypeWithResponse(RequestOptions requestOptions) { - final String accept = "*/*"; + public Response downloadFileDefaultContentTypeWithResponse(String accept, + RequestOptions requestOptions) { return service.downloadFileDefaultContentTypeSync(this.client.getEndpoint(), accept, requestOptions, Context.NONE); } diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/type/file/models/DownloadFileMultipleContentTypesContentType.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/type/file/models/DownloadFileMultipleContentTypesContentType.java new file mode 100644 index 00000000000..809a1d1bd91 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/type/file/models/DownloadFileMultipleContentTypesContentType.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package type.file.models; + +/** + * Defines values for DownloadFileMultipleContentTypesContentType. + */ +public enum DownloadFileMultipleContentTypesContentType { + /** + * Enum value image/png. + */ + IMAGE_PNG("image/png"), + + /** + * Enum value image/jpeg. + */ + IMAGE_JPEG("image/jpeg"); + + /** + * The actual serialized value for a DownloadFileMultipleContentTypesContentType instance. + */ + private final String value; + + DownloadFileMultipleContentTypesContentType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DownloadFileMultipleContentTypesContentType instance. + * + * @param value the serialized value to parse. + * @return the parsed DownloadFileMultipleContentTypesContentType object, or null if unable to parse. + */ + public static DownloadFileMultipleContentTypesContentType fromString(String value) { + if (value == null) { + return null; + } + DownloadFileMultipleContentTypesContentType[] items = DownloadFileMultipleContentTypesContentType.values(); + for (DownloadFileMultipleContentTypesContentType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return this.value; + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/type/file/models/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/type/file/models/package-info.java new file mode 100644 index 00000000000..70898197723 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/type/file/models/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +/** + * + * Package containing the data models for File. + * Test for File type usage in request and response bodies. + * + */ +package type.file.models; diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/client-naming_metadata.json b/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/client-naming_metadata.json index a5f1937acb1..070b1b3c21f 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/client-naming_metadata.json +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/client-naming_metadata.json @@ -1 +1 @@ -{"flavor":"Azure","apiVersions":{},"crossLanguageDefinitions":{"client.naming.ModelAsyncClient":"Client.Naming.Model","client.naming.ModelAsyncClient.client":"Client.Naming.Model.client","client.naming.ModelAsyncClient.clientWithResponse":"Client.Naming.Model.client","client.naming.ModelAsyncClient.language":"Client.Naming.Model.language","client.naming.ModelAsyncClient.languageWithResponse":"Client.Naming.Model.language","client.naming.ModelClient":"Client.Naming.Model","client.naming.ModelClient.client":"Client.Naming.Model.client","client.naming.ModelClient.clientWithResponse":"Client.Naming.Model.client","client.naming.ModelClient.language":"Client.Naming.Model.language","client.naming.ModelClient.languageWithResponse":"Client.Naming.Model.language","client.naming.NamingAsyncClient":"Client.Naming","client.naming.NamingAsyncClient.client":"Client.Naming.Property.client","client.naming.NamingAsyncClient.clientName":"Client.Naming.operation","client.naming.NamingAsyncClient.clientNameWithResponse":"Client.Naming.operation","client.naming.NamingAsyncClient.clientWithResponse":"Client.Naming.Property.client","client.naming.NamingAsyncClient.compatibleWithEncodedName":"Client.Naming.Property.compatibleWithEncodedName","client.naming.NamingAsyncClient.compatibleWithEncodedNameWithResponse":"Client.Naming.Property.compatibleWithEncodedName","client.naming.NamingAsyncClient.language":"Client.Naming.Property.language","client.naming.NamingAsyncClient.languageWithResponse":"Client.Naming.Property.language","client.naming.NamingAsyncClient.parameter":"Client.Naming.parameter","client.naming.NamingAsyncClient.parameterWithResponse":"Client.Naming.parameter","client.naming.NamingAsyncClient.request":"Client.Naming.Header.request","client.naming.NamingAsyncClient.requestWithResponse":"Client.Naming.Header.request","client.naming.NamingAsyncClient.response":"Client.Naming.Header.response","client.naming.NamingAsyncClient.responseWithResponse":"Client.Naming.Header.response","client.naming.NamingClient":"Client.Naming","client.naming.NamingClient.client":"Client.Naming.Property.client","client.naming.NamingClient.clientName":"Client.Naming.operation","client.naming.NamingClient.clientNameWithResponse":"Client.Naming.operation","client.naming.NamingClient.clientWithResponse":"Client.Naming.Property.client","client.naming.NamingClient.compatibleWithEncodedName":"Client.Naming.Property.compatibleWithEncodedName","client.naming.NamingClient.compatibleWithEncodedNameWithResponse":"Client.Naming.Property.compatibleWithEncodedName","client.naming.NamingClient.language":"Client.Naming.Property.language","client.naming.NamingClient.languageWithResponse":"Client.Naming.Property.language","client.naming.NamingClient.parameter":"Client.Naming.parameter","client.naming.NamingClient.parameterWithResponse":"Client.Naming.parameter","client.naming.NamingClient.request":"Client.Naming.Header.request","client.naming.NamingClient.requestWithResponse":"Client.Naming.Header.request","client.naming.NamingClient.response":"Client.Naming.Header.response","client.naming.NamingClient.responseWithResponse":"Client.Naming.Header.response","client.naming.NamingClientBuilder":"Client.Naming","client.naming.UnionEnumAsyncClient":"Client.Naming.UnionEnum","client.naming.UnionEnumAsyncClient.unionEnumMemberName":"Client.Naming.UnionEnum.unionEnumMemberName","client.naming.UnionEnumAsyncClient.unionEnumMemberNameWithResponse":"Client.Naming.UnionEnum.unionEnumMemberName","client.naming.UnionEnumAsyncClient.unionEnumName":"Client.Naming.UnionEnum.unionEnumName","client.naming.UnionEnumAsyncClient.unionEnumNameWithResponse":"Client.Naming.UnionEnum.unionEnumName","client.naming.UnionEnumClient":"Client.Naming.UnionEnum","client.naming.UnionEnumClient.unionEnumMemberName":"Client.Naming.UnionEnum.unionEnumMemberName","client.naming.UnionEnumClient.unionEnumMemberNameWithResponse":"Client.Naming.UnionEnum.unionEnumMemberName","client.naming.UnionEnumClient.unionEnumName":"Client.Naming.UnionEnum.unionEnumName","client.naming.UnionEnumClient.unionEnumNameWithResponse":"Client.Naming.UnionEnum.unionEnumName","client.naming.model.models.ClientModel":"Client.Naming.Model.ModelWithClientClientName","client.naming.model.models.JavaModel":"Client.Naming.Model.ModelWithLanguageClientName","client.naming.property.models.ClientNameAndJsonEncodedNameModel":"Client.Naming.Property.ClientNameAndJsonEncodedNameModel","client.naming.property.models.ClientNameModel":"Client.Naming.Property.ClientNameModel","client.naming.property.models.LanguageClientNameModel":"Client.Naming.Property.LanguageClientNameModel","client.naming.unionenum.models.ClientExtensibleEnum":"Client.Naming.UnionEnum.ServerExtensibleEnum","client.naming.unionenum.models.ExtensibleEnum":"Client.Naming.UnionEnum.ExtensibleEnum"},"generatedFiles":["src/main/java/client/naming/ModelAsyncClient.java","src/main/java/client/naming/ModelClient.java","src/main/java/client/naming/NamingAsyncClient.java","src/main/java/client/naming/NamingClient.java","src/main/java/client/naming/NamingClientBuilder.java","src/main/java/client/naming/UnionEnumAsyncClient.java","src/main/java/client/naming/UnionEnumClient.java","src/main/java/client/naming/implementation/ModelClientsImpl.java","src/main/java/client/naming/implementation/NamingClientImpl.java","src/main/java/client/naming/implementation/UnionEnumsImpl.java","src/main/java/client/naming/implementation/package-info.java","src/main/java/client/naming/model/models/ClientModel.java","src/main/java/client/naming/model/models/JavaModel.java","src/main/java/client/naming/model/models/package-info.java","src/main/java/client/naming/package-info.java","src/main/java/client/naming/property/models/ClientNameAndJsonEncodedNameModel.java","src/main/java/client/naming/property/models/ClientNameModel.java","src/main/java/client/naming/property/models/LanguageClientNameModel.java","src/main/java/client/naming/property/models/package-info.java","src/main/java/client/naming/unionenum/models/ClientExtensibleEnum.java","src/main/java/client/naming/unionenum/models/ExtensibleEnum.java","src/main/java/client/naming/unionenum/models/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"Azure","apiVersions":{},"crossLanguageDefinitions":{"client.naming.HeaderAsyncClient":"Client.Naming.Header","client.naming.HeaderAsyncClient.request":"Client.Naming.Header.request","client.naming.HeaderAsyncClient.requestWithResponse":"Client.Naming.Header.request","client.naming.HeaderAsyncClient.response":"Client.Naming.Header.response","client.naming.HeaderAsyncClient.responseWithResponse":"Client.Naming.Header.response","client.naming.HeaderClient":"Client.Naming.Header","client.naming.HeaderClient.request":"Client.Naming.Header.request","client.naming.HeaderClient.requestWithResponse":"Client.Naming.Header.request","client.naming.HeaderClient.response":"Client.Naming.Header.response","client.naming.HeaderClient.responseWithResponse":"Client.Naming.Header.response","client.naming.ModelAsyncClient":"Client.Naming.Model","client.naming.ModelAsyncClient.client":"Client.Naming.Model.client","client.naming.ModelAsyncClient.clientWithResponse":"Client.Naming.Model.client","client.naming.ModelAsyncClient.language":"Client.Naming.Model.language","client.naming.ModelAsyncClient.languageWithResponse":"Client.Naming.Model.language","client.naming.ModelClient":"Client.Naming.Model","client.naming.ModelClient.client":"Client.Naming.Model.client","client.naming.ModelClient.clientWithResponse":"Client.Naming.Model.client","client.naming.ModelClient.language":"Client.Naming.Model.language","client.naming.ModelClient.languageWithResponse":"Client.Naming.Model.language","client.naming.NamingAsyncClient":"Client.Naming","client.naming.NamingAsyncClient.clientName":"Client.Naming.operation","client.naming.NamingAsyncClient.clientNameWithResponse":"Client.Naming.operation","client.naming.NamingAsyncClient.parameter":"Client.Naming.parameter","client.naming.NamingAsyncClient.parameterWithResponse":"Client.Naming.parameter","client.naming.NamingClient":"Client.Naming","client.naming.NamingClient.clientName":"Client.Naming.operation","client.naming.NamingClient.clientNameWithResponse":"Client.Naming.operation","client.naming.NamingClient.parameter":"Client.Naming.parameter","client.naming.NamingClient.parameterWithResponse":"Client.Naming.parameter","client.naming.NamingClientBuilder":"Client.Naming","client.naming.PropertyAsyncClient":"Client.Naming.Property","client.naming.PropertyAsyncClient.client":"Client.Naming.Property.client","client.naming.PropertyAsyncClient.clientWithResponse":"Client.Naming.Property.client","client.naming.PropertyAsyncClient.compatibleWithEncodedName":"Client.Naming.Property.compatibleWithEncodedName","client.naming.PropertyAsyncClient.compatibleWithEncodedNameWithResponse":"Client.Naming.Property.compatibleWithEncodedName","client.naming.PropertyAsyncClient.language":"Client.Naming.Property.language","client.naming.PropertyAsyncClient.languageWithResponse":"Client.Naming.Property.language","client.naming.PropertyClient":"Client.Naming.Property","client.naming.PropertyClient.client":"Client.Naming.Property.client","client.naming.PropertyClient.clientWithResponse":"Client.Naming.Property.client","client.naming.PropertyClient.compatibleWithEncodedName":"Client.Naming.Property.compatibleWithEncodedName","client.naming.PropertyClient.compatibleWithEncodedNameWithResponse":"Client.Naming.Property.compatibleWithEncodedName","client.naming.PropertyClient.language":"Client.Naming.Property.language","client.naming.PropertyClient.languageWithResponse":"Client.Naming.Property.language","client.naming.UnionEnumAsyncClient":"Client.Naming.UnionEnum","client.naming.UnionEnumAsyncClient.unionEnumMemberName":"Client.Naming.UnionEnum.unionEnumMemberName","client.naming.UnionEnumAsyncClient.unionEnumMemberNameWithResponse":"Client.Naming.UnionEnum.unionEnumMemberName","client.naming.UnionEnumAsyncClient.unionEnumName":"Client.Naming.UnionEnum.unionEnumName","client.naming.UnionEnumAsyncClient.unionEnumNameWithResponse":"Client.Naming.UnionEnum.unionEnumName","client.naming.UnionEnumClient":"Client.Naming.UnionEnum","client.naming.UnionEnumClient.unionEnumMemberName":"Client.Naming.UnionEnum.unionEnumMemberName","client.naming.UnionEnumClient.unionEnumMemberNameWithResponse":"Client.Naming.UnionEnum.unionEnumMemberName","client.naming.UnionEnumClient.unionEnumName":"Client.Naming.UnionEnum.unionEnumName","client.naming.UnionEnumClient.unionEnumNameWithResponse":"Client.Naming.UnionEnum.unionEnumName","client.naming.model.models.ClientModel":"Client.Naming.Model.ModelWithClientClientName","client.naming.model.models.JavaModel":"Client.Naming.Model.ModelWithLanguageClientName","client.naming.property.models.ClientNameAndJsonEncodedNameModel":"Client.Naming.Property.ClientNameAndJsonEncodedNameModel","client.naming.property.models.ClientNameModel":"Client.Naming.Property.ClientNameModel","client.naming.property.models.LanguageClientNameModel":"Client.Naming.Property.LanguageClientNameModel","client.naming.unionenum.models.ClientExtensibleEnum":"Client.Naming.UnionEnum.ServerExtensibleEnum","client.naming.unionenum.models.ExtensibleEnum":"Client.Naming.UnionEnum.ExtensibleEnum"},"generatedFiles":["src/main/java/client/naming/HeaderAsyncClient.java","src/main/java/client/naming/HeaderClient.java","src/main/java/client/naming/ModelAsyncClient.java","src/main/java/client/naming/ModelClient.java","src/main/java/client/naming/NamingAsyncClient.java","src/main/java/client/naming/NamingClient.java","src/main/java/client/naming/NamingClientBuilder.java","src/main/java/client/naming/PropertyAsyncClient.java","src/main/java/client/naming/PropertyClient.java","src/main/java/client/naming/UnionEnumAsyncClient.java","src/main/java/client/naming/UnionEnumClient.java","src/main/java/client/naming/implementation/HeadersImpl.java","src/main/java/client/naming/implementation/ModelClientsImpl.java","src/main/java/client/naming/implementation/NamingClientImpl.java","src/main/java/client/naming/implementation/PropertiesImpl.java","src/main/java/client/naming/implementation/UnionEnumsImpl.java","src/main/java/client/naming/implementation/package-info.java","src/main/java/client/naming/model/models/ClientModel.java","src/main/java/client/naming/model/models/JavaModel.java","src/main/java/client/naming/model/models/package-info.java","src/main/java/client/naming/package-info.java","src/main/java/client/naming/property/models/ClientNameAndJsonEncodedNameModel.java","src/main/java/client/naming/property/models/ClientNameModel.java","src/main/java/client/naming/property/models/LanguageClientNameModel.java","src/main/java/client/naming/property/models/package-info.java","src/main/java/client/naming/unionenum/models/ClientExtensibleEnum.java","src/main/java/client/naming/unionenum/models/ExtensibleEnum.java","src/main/java/client/naming/unionenum/models/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/service-multipleservices-servicea_metadata.json b/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/service-multipleservices-servicea_metadata.json new file mode 100644 index 00000000000..ea6d596f1f4 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/service-multipleservices-servicea_metadata.json @@ -0,0 +1 @@ +{"flavor":"Azure","apiVersions":{"Service.MultipleServices.ServiceA":"av2","Service.MultipleServices.ServiceB":"bv2"},"crossLanguageDefinitions":{"service.multipleservices.servicea.OperationsAsyncClient":"Service.MultipleServices.ServiceA.Operations","service.multipleservices.servicea.OperationsAsyncClient.opA":"Service.MultipleServices.ServiceA.Operations.opA","service.multipleservices.servicea.OperationsAsyncClient.opAWithResponse":"Service.MultipleServices.ServiceA.Operations.opA","service.multipleservices.servicea.OperationsClient":"Service.MultipleServices.ServiceA.Operations","service.multipleservices.servicea.OperationsClient.opA":"Service.MultipleServices.ServiceA.Operations.opA","service.multipleservices.servicea.OperationsClient.opAWithResponse":"Service.MultipleServices.ServiceA.Operations.opA","service.multipleservices.servicea.ServiceAClientBuilder":"Service.MultipleServices.ServiceA","service.multipleservices.servicea.SubNamespaceAsyncClient":"Service.MultipleServices.ServiceA.SubNamespace","service.multipleservices.servicea.SubNamespaceAsyncClient.subOpA":"Service.MultipleServices.ServiceA.SubNamespace.subOpA","service.multipleservices.servicea.SubNamespaceAsyncClient.subOpAWithResponse":"Service.MultipleServices.ServiceA.SubNamespace.subOpA","service.multipleservices.servicea.SubNamespaceClient":"Service.MultipleServices.ServiceA.SubNamespace","service.multipleservices.servicea.SubNamespaceClient.subOpA":"Service.MultipleServices.ServiceA.SubNamespace.subOpA","service.multipleservices.servicea.SubNamespaceClient.subOpAWithResponse":"Service.MultipleServices.ServiceA.SubNamespace.subOpA","service.multipleservices.serviceb.OperationsAsyncClient":"Service.MultipleServices.ServiceB.Operations","service.multipleservices.serviceb.OperationsAsyncClient.opB":"Service.MultipleServices.ServiceB.Operations.opB","service.multipleservices.serviceb.OperationsAsyncClient.opBWithResponse":"Service.MultipleServices.ServiceB.Operations.opB","service.multipleservices.serviceb.OperationsClient":"Service.MultipleServices.ServiceB.Operations","service.multipleservices.serviceb.OperationsClient.opB":"Service.MultipleServices.ServiceB.Operations.opB","service.multipleservices.serviceb.OperationsClient.opBWithResponse":"Service.MultipleServices.ServiceB.Operations.opB","service.multipleservices.serviceb.ServiceBClientBuilder":"Service.MultipleServices.ServiceB","service.multipleservices.serviceb.SubNamespaceAsyncClient":"Service.MultipleServices.ServiceB.SubNamespace","service.multipleservices.serviceb.SubNamespaceAsyncClient.subOpB":"Service.MultipleServices.ServiceB.SubNamespace.subOpB","service.multipleservices.serviceb.SubNamespaceAsyncClient.subOpBWithResponse":"Service.MultipleServices.ServiceB.SubNamespace.subOpB","service.multipleservices.serviceb.SubNamespaceClient":"Service.MultipleServices.ServiceB.SubNamespace","service.multipleservices.serviceb.SubNamespaceClient.subOpB":"Service.MultipleServices.ServiceB.SubNamespace.subOpB","service.multipleservices.serviceb.SubNamespaceClient.subOpBWithResponse":"Service.MultipleServices.ServiceB.SubNamespace.subOpB"},"generatedFiles":["src/main/java/module-info.java","src/main/java/service/multipleservices/servicea/OperationsAsyncClient.java","src/main/java/service/multipleservices/servicea/OperationsClient.java","src/main/java/service/multipleservices/servicea/ServiceAClientBuilder.java","src/main/java/service/multipleservices/servicea/ServiceAServiceVersion.java","src/main/java/service/multipleservices/servicea/ServiceBServiceVersion.java","src/main/java/service/multipleservices/servicea/SubNamespaceAsyncClient.java","src/main/java/service/multipleservices/servicea/SubNamespaceClient.java","src/main/java/service/multipleservices/servicea/implementation/OperationsImpl.java","src/main/java/service/multipleservices/servicea/implementation/OperationsOperationsImpl.java","src/main/java/service/multipleservices/servicea/implementation/ServiceAClientImpl.java","src/main/java/service/multipleservices/servicea/implementation/ServiceBClientImpl.java","src/main/java/service/multipleservices/servicea/implementation/SubNamespacesImpl.java","src/main/java/service/multipleservices/servicea/implementation/SubNamespacesOperationsImpl.java","src/main/java/service/multipleservices/servicea/implementation/package-info.java","src/main/java/service/multipleservices/servicea/package-info.java","src/main/java/service/multipleservices/serviceb/OperationsAsyncClient.java","src/main/java/service/multipleservices/serviceb/OperationsClient.java","src/main/java/service/multipleservices/serviceb/ServiceBClientBuilder.java","src/main/java/service/multipleservices/serviceb/SubNamespaceAsyncClient.java","src/main/java/service/multipleservices/serviceb/SubNamespaceClient.java","src/main/java/service/multipleservices/serviceb/package-info.java"]} \ No newline at end of file diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/tsptest-response_metadata.json b/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/tsptest-response_metadata.json index 7e889e6c4ed..ed9cc4a37e7 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/tsptest-response_metadata.json +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/tsptest-response_metadata.json @@ -1 +1 @@ -{"flavor":"Azure","apiVersions":{"TspTest.Response":"2022-06-01-preview"},"crossLanguageDefinitions":{"tsptest.response.ResponseAsyncClient":"TspTest.Response.ResponseOp","tsptest.response.ResponseAsyncClient.beginLroInvalidPollResponse":"TspTest.Response.ResponseOp.lroInvalidPollResponse","tsptest.response.ResponseAsyncClient.beginLroInvalidPollResponseWithModel":"TspTest.Response.ResponseOp.lroInvalidPollResponse","tsptest.response.ResponseAsyncClient.beginLroInvalidResult":"TspTest.Response.ResponseOp.lroInvalidResult","tsptest.response.ResponseAsyncClient.beginLroInvalidResultWithModel":"TspTest.Response.ResponseOp.lroInvalidResult","tsptest.response.ResponseAsyncClient.createWithHeaders":"TspTest.Response.ResponseOp.createWithHeaders","tsptest.response.ResponseAsyncClient.createWithHeadersWithResponse":"TspTest.Response.ResponseOp.createWithHeaders","tsptest.response.ResponseAsyncClient.deleteWithHeaders":"TspTest.Response.ResponseOp.deleteWithHeaders","tsptest.response.ResponseAsyncClient.deleteWithHeadersWithResponse":"TspTest.Response.ResponseOp.deleteWithHeaders","tsptest.response.ResponseAsyncClient.exists":"TspTest.Response.ResponseOp.exists","tsptest.response.ResponseAsyncClient.existsWithResponse":"TspTest.Response.ResponseOp.exists","tsptest.response.ResponseAsyncClient.getAnotherArray":"TspTest.Response.ResponseOp.getAnotherArray","tsptest.response.ResponseAsyncClient.getAnotherArrayWithResponse":"TspTest.Response.ResponseOp.getAnotherArray","tsptest.response.ResponseAsyncClient.getArray":"TspTest.Response.ResponseOp.getArray","tsptest.response.ResponseAsyncClient.getArrayWithResponse":"TspTest.Response.ResponseOp.getArray","tsptest.response.ResponseAsyncClient.getBinary":"TspTest.Response.ResponseOp.getBinary","tsptest.response.ResponseAsyncClient.getBinaryWithResponse":"TspTest.Response.ResponseOp.getBinary","tsptest.response.ResponseAsyncClient.getJsonUtf8Response":"TspTest.Response.ResponseOp.getJsonUtf8Response","tsptest.response.ResponseAsyncClient.getJsonUtf8ResponseWithResponse":"TspTest.Response.ResponseOp.getJsonUtf8Response","tsptest.response.ResponseAsyncClient.getPlusJsonResponse":"TspTest.Response.ResponseOp.getPlusJsonResponse","tsptest.response.ResponseAsyncClient.getPlusJsonResponseWithResponse":"TspTest.Response.ResponseOp.getPlusJsonResponse","tsptest.response.ResponseAsyncClient.getTextBoolean":"TspTest.Response.ResponseOp.getTextBoolean","tsptest.response.ResponseAsyncClient.getTextBooleanWithResponse":"TspTest.Response.ResponseOp.getTextBoolean","tsptest.response.ResponseAsyncClient.getTextByte":"TspTest.Response.ResponseOp.getTextByte","tsptest.response.ResponseAsyncClient.getTextByteWithResponse":"TspTest.Response.ResponseOp.getTextByte","tsptest.response.ResponseAsyncClient.getTextChar":"TspTest.Response.ResponseOp.getTextChar","tsptest.response.ResponseAsyncClient.getTextCharWithResponse":"TspTest.Response.ResponseOp.getTextChar","tsptest.response.ResponseAsyncClient.getTextFloat32":"TspTest.Response.ResponseOp.getTextFloat32","tsptest.response.ResponseAsyncClient.getTextFloat32WithResponse":"TspTest.Response.ResponseOp.getTextFloat32","tsptest.response.ResponseAsyncClient.getTextFloat64":"TspTest.Response.ResponseOp.getTextFloat64","tsptest.response.ResponseAsyncClient.getTextFloat64WithResponse":"TspTest.Response.ResponseOp.getTextFloat64","tsptest.response.ResponseAsyncClient.getTextInt32":"TspTest.Response.ResponseOp.getTextInt32","tsptest.response.ResponseAsyncClient.getTextInt32WithResponse":"TspTest.Response.ResponseOp.getTextInt32","tsptest.response.ResponseAsyncClient.getTextInt64":"TspTest.Response.ResponseOp.getTextInt64","tsptest.response.ResponseAsyncClient.getTextInt64WithResponse":"TspTest.Response.ResponseOp.getTextInt64","tsptest.response.ResponseAsyncClient.getUnionResponse":"TspTest.Response.ResponseOp.getUnionResponse","tsptest.response.ResponseAsyncClient.getUnionResponseWithResponse":"TspTest.Response.ResponseOp.getUnionResponse","tsptest.response.ResponseAsyncClient.listIntegers":"TspTest.Response.ResponseOp.listIntegers","tsptest.response.ResponseAsyncClient.listStrings":"TspTest.Response.ResponseOp.listStrings","tsptest.response.ResponseClient":"TspTest.Response.ResponseOp","tsptest.response.ResponseClient.beginLroInvalidPollResponse":"TspTest.Response.ResponseOp.lroInvalidPollResponse","tsptest.response.ResponseClient.beginLroInvalidPollResponseWithModel":"TspTest.Response.ResponseOp.lroInvalidPollResponse","tsptest.response.ResponseClient.beginLroInvalidResult":"TspTest.Response.ResponseOp.lroInvalidResult","tsptest.response.ResponseClient.beginLroInvalidResultWithModel":"TspTest.Response.ResponseOp.lroInvalidResult","tsptest.response.ResponseClient.createWithHeaders":"TspTest.Response.ResponseOp.createWithHeaders","tsptest.response.ResponseClient.createWithHeadersWithResponse":"TspTest.Response.ResponseOp.createWithHeaders","tsptest.response.ResponseClient.deleteWithHeaders":"TspTest.Response.ResponseOp.deleteWithHeaders","tsptest.response.ResponseClient.deleteWithHeadersWithResponse":"TspTest.Response.ResponseOp.deleteWithHeaders","tsptest.response.ResponseClient.exists":"TspTest.Response.ResponseOp.exists","tsptest.response.ResponseClient.existsWithResponse":"TspTest.Response.ResponseOp.exists","tsptest.response.ResponseClient.getAnotherArray":"TspTest.Response.ResponseOp.getAnotherArray","tsptest.response.ResponseClient.getAnotherArrayWithResponse":"TspTest.Response.ResponseOp.getAnotherArray","tsptest.response.ResponseClient.getArray":"TspTest.Response.ResponseOp.getArray","tsptest.response.ResponseClient.getArrayWithResponse":"TspTest.Response.ResponseOp.getArray","tsptest.response.ResponseClient.getBinary":"TspTest.Response.ResponseOp.getBinary","tsptest.response.ResponseClient.getBinaryWithResponse":"TspTest.Response.ResponseOp.getBinary","tsptest.response.ResponseClient.getJsonUtf8Response":"TspTest.Response.ResponseOp.getJsonUtf8Response","tsptest.response.ResponseClient.getJsonUtf8ResponseWithResponse":"TspTest.Response.ResponseOp.getJsonUtf8Response","tsptest.response.ResponseClient.getPlusJsonResponse":"TspTest.Response.ResponseOp.getPlusJsonResponse","tsptest.response.ResponseClient.getPlusJsonResponseWithResponse":"TspTest.Response.ResponseOp.getPlusJsonResponse","tsptest.response.ResponseClient.getTextBoolean":"TspTest.Response.ResponseOp.getTextBoolean","tsptest.response.ResponseClient.getTextBooleanWithResponse":"TspTest.Response.ResponseOp.getTextBoolean","tsptest.response.ResponseClient.getTextByte":"TspTest.Response.ResponseOp.getTextByte","tsptest.response.ResponseClient.getTextByteWithResponse":"TspTest.Response.ResponseOp.getTextByte","tsptest.response.ResponseClient.getTextChar":"TspTest.Response.ResponseOp.getTextChar","tsptest.response.ResponseClient.getTextCharWithResponse":"TspTest.Response.ResponseOp.getTextChar","tsptest.response.ResponseClient.getTextFloat32":"TspTest.Response.ResponseOp.getTextFloat32","tsptest.response.ResponseClient.getTextFloat32WithResponse":"TspTest.Response.ResponseOp.getTextFloat32","tsptest.response.ResponseClient.getTextFloat64":"TspTest.Response.ResponseOp.getTextFloat64","tsptest.response.ResponseClient.getTextFloat64WithResponse":"TspTest.Response.ResponseOp.getTextFloat64","tsptest.response.ResponseClient.getTextInt32":"TspTest.Response.ResponseOp.getTextInt32","tsptest.response.ResponseClient.getTextInt32WithResponse":"TspTest.Response.ResponseOp.getTextInt32","tsptest.response.ResponseClient.getTextInt64":"TspTest.Response.ResponseOp.getTextInt64","tsptest.response.ResponseClient.getTextInt64WithResponse":"TspTest.Response.ResponseOp.getTextInt64","tsptest.response.ResponseClient.getUnionResponse":"TspTest.Response.ResponseOp.getUnionResponse","tsptest.response.ResponseClient.getUnionResponseWithResponse":"TspTest.Response.ResponseOp.getUnionResponse","tsptest.response.ResponseClient.listIntegers":"TspTest.Response.ResponseOp.listIntegers","tsptest.response.ResponseClient.listStrings":"TspTest.Response.ResponseOp.listStrings","tsptest.response.ResponseClientBuilder":"TspTest.Response.ResponseOp","tsptest.response.models.OperationDetails1":"TspTest.Response.OperationDetails1","tsptest.response.models.OperationDetails2":"TspTest.Response.OperationDetails2","tsptest.response.models.OperationState":"Azure.Core.Foundations.OperationState","tsptest.response.models.Resource":"TspTest.Response.Resource"},"generatedFiles":["src/main/java/module-info.java","src/main/java/tsptest/response/ResponseAsyncClient.java","src/main/java/tsptest/response/ResponseClient.java","src/main/java/tsptest/response/ResponseClientBuilder.java","src/main/java/tsptest/response/ResponseServiceVersion.java","src/main/java/tsptest/response/implementation/OperationLocationPollingStrategy.java","src/main/java/tsptest/response/implementation/PollingUtils.java","src/main/java/tsptest/response/implementation/ResponseClientImpl.java","src/main/java/tsptest/response/implementation/SyncOperationLocationPollingStrategy.java","src/main/java/tsptest/response/implementation/package-info.java","src/main/java/tsptest/response/models/OperationDetails1.java","src/main/java/tsptest/response/models/OperationDetails2.java","src/main/java/tsptest/response/models/OperationState.java","src/main/java/tsptest/response/models/Resource.java","src/main/java/tsptest/response/models/package-info.java","src/main/java/tsptest/response/package-info.java"]} \ No newline at end of file +{"flavor":"Azure","apiVersions":{"TspTest.Response":"2022-06-01-preview"},"crossLanguageDefinitions":{"tsptest.response.ResponseAsyncClient":"TspTest.Response.ResponseOp","tsptest.response.ResponseAsyncClient.beginLroInvalidPollResponse":"TspTest.Response.ResponseOp.lroInvalidPollResponse","tsptest.response.ResponseAsyncClient.beginLroInvalidPollResponseWithModel":"TspTest.Response.ResponseOp.lroInvalidPollResponse","tsptest.response.ResponseAsyncClient.beginLroInvalidResult":"TspTest.Response.ResponseOp.lroInvalidResult","tsptest.response.ResponseAsyncClient.beginLroInvalidResultWithModel":"TspTest.Response.ResponseOp.lroInvalidResult","tsptest.response.ResponseAsyncClient.createWithHeaders":"TspTest.Response.ResponseOp.createWithHeaders","tsptest.response.ResponseAsyncClient.createWithHeadersWithResponse":"TspTest.Response.ResponseOp.createWithHeaders","tsptest.response.ResponseAsyncClient.deleteWithHeaders":"TspTest.Response.ResponseOp.deleteWithHeaders","tsptest.response.ResponseAsyncClient.deleteWithHeadersWithResponse":"TspTest.Response.ResponseOp.deleteWithHeaders","tsptest.response.ResponseAsyncClient.exists":"TspTest.Response.ResponseOp.exists","tsptest.response.ResponseAsyncClient.existsWithResponse":"TspTest.Response.ResponseOp.exists","tsptest.response.ResponseAsyncClient.getAnotherArray":"TspTest.Response.ResponseOp.getAnotherArray","tsptest.response.ResponseAsyncClient.getAnotherArrayWithResponse":"TspTest.Response.ResponseOp.getAnotherArray","tsptest.response.ResponseAsyncClient.getArray":"TspTest.Response.ResponseOp.getArray","tsptest.response.ResponseAsyncClient.getArrayWithResponse":"TspTest.Response.ResponseOp.getArray","tsptest.response.ResponseAsyncClient.getBinary":"TspTest.Response.ResponseOp.getBinary","tsptest.response.ResponseAsyncClient.getBinaryWithResponse":"TspTest.Response.ResponseOp.getBinary","tsptest.response.ResponseAsyncClient.getJsonUtf8Response":"TspTest.Response.ResponseOp.getJsonUtf8Response","tsptest.response.ResponseAsyncClient.getJsonUtf8ResponseWithResponse":"TspTest.Response.ResponseOp.getJsonUtf8Response","tsptest.response.ResponseAsyncClient.getPlusJsonResponse":"TspTest.Response.ResponseOp.getPlusJsonResponse","tsptest.response.ResponseAsyncClient.getPlusJsonResponseWithResponse":"TspTest.Response.ResponseOp.getPlusJsonResponse","tsptest.response.ResponseAsyncClient.getTextBoolean":"TspTest.Response.ResponseOp.getTextBoolean","tsptest.response.ResponseAsyncClient.getTextBooleanWithResponse":"TspTest.Response.ResponseOp.getTextBoolean","tsptest.response.ResponseAsyncClient.getTextByte":"TspTest.Response.ResponseOp.getTextByte","tsptest.response.ResponseAsyncClient.getTextByteWithResponse":"TspTest.Response.ResponseOp.getTextByte","tsptest.response.ResponseAsyncClient.getTextChar":"TspTest.Response.ResponseOp.getTextChar","tsptest.response.ResponseAsyncClient.getTextCharWithResponse":"TspTest.Response.ResponseOp.getTextChar","tsptest.response.ResponseAsyncClient.getTextFloat32":"TspTest.Response.ResponseOp.getTextFloat32","tsptest.response.ResponseAsyncClient.getTextFloat32WithResponse":"TspTest.Response.ResponseOp.getTextFloat32","tsptest.response.ResponseAsyncClient.getTextFloat64":"TspTest.Response.ResponseOp.getTextFloat64","tsptest.response.ResponseAsyncClient.getTextFloat64WithResponse":"TspTest.Response.ResponseOp.getTextFloat64","tsptest.response.ResponseAsyncClient.getTextInt32":"TspTest.Response.ResponseOp.getTextInt32","tsptest.response.ResponseAsyncClient.getTextInt32WithResponse":"TspTest.Response.ResponseOp.getTextInt32","tsptest.response.ResponseAsyncClient.getTextInt64":"TspTest.Response.ResponseOp.getTextInt64","tsptest.response.ResponseAsyncClient.getTextInt64WithResponse":"TspTest.Response.ResponseOp.getTextInt64","tsptest.response.ResponseAsyncClient.getUnionResponse":"TspTest.Response.ResponseOp.getUnionResponse","tsptest.response.ResponseAsyncClient.getUnionResponseWithResponse":"TspTest.Response.ResponseOp.getUnionResponse","tsptest.response.ResponseAsyncClient.listIntegers":"TspTest.Response.ResponseOp.listIntegers","tsptest.response.ResponseAsyncClient.listStrings":"TspTest.Response.ResponseOp.listStrings","tsptest.response.ResponseClient":"TspTest.Response.ResponseOp","tsptest.response.ResponseClient.beginLroInvalidPollResponse":"TspTest.Response.ResponseOp.lroInvalidPollResponse","tsptest.response.ResponseClient.beginLroInvalidPollResponseWithModel":"TspTest.Response.ResponseOp.lroInvalidPollResponse","tsptest.response.ResponseClient.beginLroInvalidResult":"TspTest.Response.ResponseOp.lroInvalidResult","tsptest.response.ResponseClient.beginLroInvalidResultWithModel":"TspTest.Response.ResponseOp.lroInvalidResult","tsptest.response.ResponseClient.createWithHeaders":"TspTest.Response.ResponseOp.createWithHeaders","tsptest.response.ResponseClient.createWithHeadersWithResponse":"TspTest.Response.ResponseOp.createWithHeaders","tsptest.response.ResponseClient.deleteWithHeaders":"TspTest.Response.ResponseOp.deleteWithHeaders","tsptest.response.ResponseClient.deleteWithHeadersWithResponse":"TspTest.Response.ResponseOp.deleteWithHeaders","tsptest.response.ResponseClient.exists":"TspTest.Response.ResponseOp.exists","tsptest.response.ResponseClient.existsWithResponse":"TspTest.Response.ResponseOp.exists","tsptest.response.ResponseClient.getAnotherArray":"TspTest.Response.ResponseOp.getAnotherArray","tsptest.response.ResponseClient.getAnotherArrayWithResponse":"TspTest.Response.ResponseOp.getAnotherArray","tsptest.response.ResponseClient.getArray":"TspTest.Response.ResponseOp.getArray","tsptest.response.ResponseClient.getArrayWithResponse":"TspTest.Response.ResponseOp.getArray","tsptest.response.ResponseClient.getBinary":"TspTest.Response.ResponseOp.getBinary","tsptest.response.ResponseClient.getBinaryWithResponse":"TspTest.Response.ResponseOp.getBinary","tsptest.response.ResponseClient.getJsonUtf8Response":"TspTest.Response.ResponseOp.getJsonUtf8Response","tsptest.response.ResponseClient.getJsonUtf8ResponseWithResponse":"TspTest.Response.ResponseOp.getJsonUtf8Response","tsptest.response.ResponseClient.getPlusJsonResponse":"TspTest.Response.ResponseOp.getPlusJsonResponse","tsptest.response.ResponseClient.getPlusJsonResponseWithResponse":"TspTest.Response.ResponseOp.getPlusJsonResponse","tsptest.response.ResponseClient.getTextBoolean":"TspTest.Response.ResponseOp.getTextBoolean","tsptest.response.ResponseClient.getTextBooleanWithResponse":"TspTest.Response.ResponseOp.getTextBoolean","tsptest.response.ResponseClient.getTextByte":"TspTest.Response.ResponseOp.getTextByte","tsptest.response.ResponseClient.getTextByteWithResponse":"TspTest.Response.ResponseOp.getTextByte","tsptest.response.ResponseClient.getTextChar":"TspTest.Response.ResponseOp.getTextChar","tsptest.response.ResponseClient.getTextCharWithResponse":"TspTest.Response.ResponseOp.getTextChar","tsptest.response.ResponseClient.getTextFloat32":"TspTest.Response.ResponseOp.getTextFloat32","tsptest.response.ResponseClient.getTextFloat32WithResponse":"TspTest.Response.ResponseOp.getTextFloat32","tsptest.response.ResponseClient.getTextFloat64":"TspTest.Response.ResponseOp.getTextFloat64","tsptest.response.ResponseClient.getTextFloat64WithResponse":"TspTest.Response.ResponseOp.getTextFloat64","tsptest.response.ResponseClient.getTextInt32":"TspTest.Response.ResponseOp.getTextInt32","tsptest.response.ResponseClient.getTextInt32WithResponse":"TspTest.Response.ResponseOp.getTextInt32","tsptest.response.ResponseClient.getTextInt64":"TspTest.Response.ResponseOp.getTextInt64","tsptest.response.ResponseClient.getTextInt64WithResponse":"TspTest.Response.ResponseOp.getTextInt64","tsptest.response.ResponseClient.getUnionResponse":"TspTest.Response.ResponseOp.getUnionResponse","tsptest.response.ResponseClient.getUnionResponseWithResponse":"TspTest.Response.ResponseOp.getUnionResponse","tsptest.response.ResponseClient.listIntegers":"TspTest.Response.ResponseOp.listIntegers","tsptest.response.ResponseClient.listStrings":"TspTest.Response.ResponseOp.listStrings","tsptest.response.ResponseClientBuilder":"TspTest.Response.ResponseOp","tsptest.response.models.GetUnionResponseContentType":"TspTest.Response.ResponseOp.getUnionResponse.accept","tsptest.response.models.OperationDetails1":"TspTest.Response.OperationDetails1","tsptest.response.models.OperationDetails2":"TspTest.Response.OperationDetails2","tsptest.response.models.OperationState":"Azure.Core.Foundations.OperationState","tsptest.response.models.Resource":"TspTest.Response.Resource"},"generatedFiles":["src/main/java/module-info.java","src/main/java/tsptest/response/ResponseAsyncClient.java","src/main/java/tsptest/response/ResponseClient.java","src/main/java/tsptest/response/ResponseClientBuilder.java","src/main/java/tsptest/response/ResponseServiceVersion.java","src/main/java/tsptest/response/implementation/OperationLocationPollingStrategy.java","src/main/java/tsptest/response/implementation/PollingUtils.java","src/main/java/tsptest/response/implementation/ResponseClientImpl.java","src/main/java/tsptest/response/implementation/SyncOperationLocationPollingStrategy.java","src/main/java/tsptest/response/implementation/package-info.java","src/main/java/tsptest/response/models/GetUnionResponseContentType.java","src/main/java/tsptest/response/models/OperationDetails1.java","src/main/java/tsptest/response/models/OperationDetails2.java","src/main/java/tsptest/response/models/OperationState.java","src/main/java/tsptest/response/models/Resource.java","src/main/java/tsptest/response/models/package-info.java","src/main/java/tsptest/response/package-info.java"]} \ No newline at end of file diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/type-file_metadata.json b/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/type-file_metadata.json index 1b2610043a6..c267d01168c 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/type-file_metadata.json +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/type-file_metadata.json @@ -1 +1 @@ -{"flavor":"Azure","apiVersions":{},"crossLanguageDefinitions":{"type.file.FileAsyncClient":"Type.File.Body","type.file.FileAsyncClient.downloadFileDefaultContentType":"Type.File.Body.downloadFileDefaultContentType","type.file.FileAsyncClient.downloadFileDefaultContentTypeWithResponse":"Type.File.Body.downloadFileDefaultContentType","type.file.FileAsyncClient.downloadFileJsonContentType":"Type.File.Body.downloadFileJsonContentType","type.file.FileAsyncClient.downloadFileJsonContentTypeWithResponse":"Type.File.Body.downloadFileJsonContentType","type.file.FileAsyncClient.downloadFileMultipleContentTypes":"Type.File.Body.downloadFileMultipleContentTypes","type.file.FileAsyncClient.downloadFileMultipleContentTypesWithResponse":"Type.File.Body.downloadFileMultipleContentTypes","type.file.FileAsyncClient.downloadFileSpecificContentType":"Type.File.Body.downloadFileSpecificContentType","type.file.FileAsyncClient.downloadFileSpecificContentTypeWithResponse":"Type.File.Body.downloadFileSpecificContentType","type.file.FileAsyncClient.uploadFileDefaultContentType":"Type.File.Body.uploadFileDefaultContentType","type.file.FileAsyncClient.uploadFileDefaultContentTypeWithResponse":"Type.File.Body.uploadFileDefaultContentType","type.file.FileAsyncClient.uploadFileJsonContentType":"Type.File.Body.uploadFileJsonContentType","type.file.FileAsyncClient.uploadFileJsonContentTypeWithResponse":"Type.File.Body.uploadFileJsonContentType","type.file.FileAsyncClient.uploadFileMultipleContentTypes":"Type.File.Body.uploadFileMultipleContentTypes","type.file.FileAsyncClient.uploadFileMultipleContentTypesWithResponse":"Type.File.Body.uploadFileMultipleContentTypes","type.file.FileAsyncClient.uploadFileSpecificContentType":"Type.File.Body.uploadFileSpecificContentType","type.file.FileAsyncClient.uploadFileSpecificContentTypeWithResponse":"Type.File.Body.uploadFileSpecificContentType","type.file.FileClient":"Type.File.Body","type.file.FileClient.downloadFileDefaultContentType":"Type.File.Body.downloadFileDefaultContentType","type.file.FileClient.downloadFileDefaultContentTypeWithResponse":"Type.File.Body.downloadFileDefaultContentType","type.file.FileClient.downloadFileJsonContentType":"Type.File.Body.downloadFileJsonContentType","type.file.FileClient.downloadFileJsonContentTypeWithResponse":"Type.File.Body.downloadFileJsonContentType","type.file.FileClient.downloadFileMultipleContentTypes":"Type.File.Body.downloadFileMultipleContentTypes","type.file.FileClient.downloadFileMultipleContentTypesWithResponse":"Type.File.Body.downloadFileMultipleContentTypes","type.file.FileClient.downloadFileSpecificContentType":"Type.File.Body.downloadFileSpecificContentType","type.file.FileClient.downloadFileSpecificContentTypeWithResponse":"Type.File.Body.downloadFileSpecificContentType","type.file.FileClient.uploadFileDefaultContentType":"Type.File.Body.uploadFileDefaultContentType","type.file.FileClient.uploadFileDefaultContentTypeWithResponse":"Type.File.Body.uploadFileDefaultContentType","type.file.FileClient.uploadFileJsonContentType":"Type.File.Body.uploadFileJsonContentType","type.file.FileClient.uploadFileJsonContentTypeWithResponse":"Type.File.Body.uploadFileJsonContentType","type.file.FileClient.uploadFileMultipleContentTypes":"Type.File.Body.uploadFileMultipleContentTypes","type.file.FileClient.uploadFileMultipleContentTypesWithResponse":"Type.File.Body.uploadFileMultipleContentTypes","type.file.FileClient.uploadFileSpecificContentType":"Type.File.Body.uploadFileSpecificContentType","type.file.FileClient.uploadFileSpecificContentTypeWithResponse":"Type.File.Body.uploadFileSpecificContentType","type.file.FileClientBuilder":"Type.File"},"generatedFiles":["src/main/java/module-info.java","src/main/java/type/file/FileAsyncClient.java","src/main/java/type/file/FileClient.java","src/main/java/type/file/FileClientBuilder.java","src/main/java/type/file/implementation/BodiesImpl.java","src/main/java/type/file/implementation/FileClientImpl.java","src/main/java/type/file/implementation/package-info.java","src/main/java/type/file/package-info.java"]} \ No newline at end of file +{"flavor":"Azure","apiVersions":{},"crossLanguageDefinitions":{"type.file.FileAsyncClient":"Type.File.Body","type.file.FileAsyncClient.downloadFileDefaultContentType":"Type.File.Body.downloadFileDefaultContentType","type.file.FileAsyncClient.downloadFileDefaultContentTypeWithResponse":"Type.File.Body.downloadFileDefaultContentType","type.file.FileAsyncClient.downloadFileJsonContentType":"Type.File.Body.downloadFileJsonContentType","type.file.FileAsyncClient.downloadFileJsonContentTypeWithResponse":"Type.File.Body.downloadFileJsonContentType","type.file.FileAsyncClient.downloadFileMultipleContentTypes":"Type.File.Body.downloadFileMultipleContentTypes","type.file.FileAsyncClient.downloadFileMultipleContentTypesWithResponse":"Type.File.Body.downloadFileMultipleContentTypes","type.file.FileAsyncClient.downloadFileSpecificContentType":"Type.File.Body.downloadFileSpecificContentType","type.file.FileAsyncClient.downloadFileSpecificContentTypeWithResponse":"Type.File.Body.downloadFileSpecificContentType","type.file.FileAsyncClient.uploadFileDefaultContentType":"Type.File.Body.uploadFileDefaultContentType","type.file.FileAsyncClient.uploadFileDefaultContentTypeWithResponse":"Type.File.Body.uploadFileDefaultContentType","type.file.FileAsyncClient.uploadFileJsonContentType":"Type.File.Body.uploadFileJsonContentType","type.file.FileAsyncClient.uploadFileJsonContentTypeWithResponse":"Type.File.Body.uploadFileJsonContentType","type.file.FileAsyncClient.uploadFileSpecificContentType":"Type.File.Body.uploadFileSpecificContentType","type.file.FileAsyncClient.uploadFileSpecificContentTypeWithResponse":"Type.File.Body.uploadFileSpecificContentType","type.file.FileClient":"Type.File.Body","type.file.FileClient.downloadFileDefaultContentType":"Type.File.Body.downloadFileDefaultContentType","type.file.FileClient.downloadFileDefaultContentTypeWithResponse":"Type.File.Body.downloadFileDefaultContentType","type.file.FileClient.downloadFileJsonContentType":"Type.File.Body.downloadFileJsonContentType","type.file.FileClient.downloadFileJsonContentTypeWithResponse":"Type.File.Body.downloadFileJsonContentType","type.file.FileClient.downloadFileMultipleContentTypes":"Type.File.Body.downloadFileMultipleContentTypes","type.file.FileClient.downloadFileMultipleContentTypesWithResponse":"Type.File.Body.downloadFileMultipleContentTypes","type.file.FileClient.downloadFileSpecificContentType":"Type.File.Body.downloadFileSpecificContentType","type.file.FileClient.downloadFileSpecificContentTypeWithResponse":"Type.File.Body.downloadFileSpecificContentType","type.file.FileClient.uploadFileDefaultContentType":"Type.File.Body.uploadFileDefaultContentType","type.file.FileClient.uploadFileDefaultContentTypeWithResponse":"Type.File.Body.uploadFileDefaultContentType","type.file.FileClient.uploadFileJsonContentType":"Type.File.Body.uploadFileJsonContentType","type.file.FileClient.uploadFileJsonContentTypeWithResponse":"Type.File.Body.uploadFileJsonContentType","type.file.FileClient.uploadFileSpecificContentType":"Type.File.Body.uploadFileSpecificContentType","type.file.FileClient.uploadFileSpecificContentTypeWithResponse":"Type.File.Body.uploadFileSpecificContentType","type.file.FileClientBuilder":"Type.File","type.file.models.DownloadFileMultipleContentTypesContentType":"Type.File.Body.downloadFileMultipleContentTypes.accept"},"generatedFiles":["src/main/java/module-info.java","src/main/java/type/file/FileAsyncClient.java","src/main/java/type/file/FileClient.java","src/main/java/type/file/FileClientBuilder.java","src/main/java/type/file/implementation/BodiesImpl.java","src/main/java/type/file/implementation/FileClientImpl.java","src/main/java/type/file/implementation/package-info.java","src/main/java/type/file/models/DownloadFileMultipleContentTypesContentType.java","src/main/java/type/file/models/package-info.java","src/main/java/type/file/package-info.java"]} \ No newline at end of file diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/resources/service-multipleservices-servicea.properties b/packages/http-client-java/generator/http-client-generator-test/src/main/resources/service-multipleservices-servicea.properties new file mode 100644 index 00000000000..ca812989b4f --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/resources/service-multipleservices-servicea.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/test/java/client/naming/generated/NamingClientTestBase.java b/packages/http-client-java/generator/http-client-generator-test/src/test/java/client/naming/generated/NamingClientTestBase.java index 56ab4a928bb..ad09790a3ba 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/test/java/client/naming/generated/NamingClientTestBase.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/test/java/client/naming/generated/NamingClientTestBase.java @@ -8,9 +8,11 @@ // If you wish to modify these files, please copy them out of the 'generated' package, and modify there. // See https://aka.ms/azsdk/dpg/java/tests for guide on adding a test. +import client.naming.HeaderClient; import client.naming.ModelClient; import client.naming.NamingClient; import client.naming.NamingClientBuilder; +import client.naming.PropertyClient; import client.naming.UnionEnumClient; import com.azure.core.http.policy.HttpLogDetailLevel; import com.azure.core.http.policy.HttpLogOptions; @@ -21,6 +23,10 @@ class NamingClientTestBase extends TestProxyTestBase { protected NamingClient namingClient; + protected PropertyClient propertyClient; + + protected HeaderClient headerClient; + protected ModelClient modelClient; protected UnionEnumClient unionEnumClient; @@ -36,6 +42,24 @@ protected void beforeTest() { } namingClient = namingClientbuilder.buildClient(); + NamingClientBuilder propertyClientbuilder = new NamingClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "http://localhost:3000")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.RECORD) { + propertyClientbuilder.addPolicy(interceptorManager.getRecordPolicy()); + } + propertyClient = propertyClientbuilder.buildPropertyClient(); + + NamingClientBuilder headerClientbuilder = new NamingClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "http://localhost:3000")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.RECORD) { + headerClientbuilder.addPolicy(interceptorManager.getRecordPolicy()); + } + headerClient = headerClientbuilder.buildHeaderClient(); + NamingClientBuilder modelClientbuilder = new NamingClientBuilder() .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "http://localhost:3000")) .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) diff --git a/packages/http-client-java/generator/http-client-generator-test/src/test/java/service/multipleservices/servicea/generated/ServiceAClientTestBase.java b/packages/http-client-java/generator/http-client-generator-test/src/test/java/service/multipleservices/servicea/generated/ServiceAClientTestBase.java new file mode 100644 index 00000000000..4730f09ee87 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/test/java/service/multipleservices/servicea/generated/ServiceAClientTestBase.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package service.multipleservices.servicea.generated; + +// The Java test files under 'generated' package are generated for your reference. +// If you wish to modify these files, please copy them out of the 'generated' package, and modify there. +// See https://aka.ms/azsdk/dpg/java/tests for guide on adding a test. + +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.test.TestMode; +import com.azure.core.test.TestProxyTestBase; +import com.azure.core.util.Configuration; +import service.multipleservices.servicea.OperationsClient; +import service.multipleservices.servicea.ServiceAClientBuilder; +import service.multipleservices.servicea.SubNamespaceClient; +import service.multipleservices.serviceb.OperationsClient; +import service.multipleservices.serviceb.ServiceBClientBuilder; +import service.multipleservices.serviceb.SubNamespaceClient; + +class ServiceAClientTestBase extends TestProxyTestBase { + protected SubNamespaceClient subNamespaceClient; + + protected OperationsClient operationsClient; + + protected SubNamespaceClient subNamespaceClient; + + protected OperationsClient operationsClient; + + @Override + protected void beforeTest() { + ServiceAClientBuilder subNamespaceClientbuilder = new ServiceAClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "http://localhost:3000")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.RECORD) { + subNamespaceClientbuilder.addPolicy(interceptorManager.getRecordPolicy()); + } + subNamespaceClient = subNamespaceClientbuilder.buildSubNamespaceClient(); + + ServiceAClientBuilder operationsClientbuilder = new ServiceAClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "http://localhost:3000")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.RECORD) { + operationsClientbuilder.addPolicy(interceptorManager.getRecordPolicy()); + } + operationsClient = operationsClientbuilder.buildOperationsClient(); + + ServiceBClientBuilder subNamespaceClientbuilder = new ServiceBClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "http://localhost:3000")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.RECORD) { + subNamespaceClientbuilder.addPolicy(interceptorManager.getRecordPolicy()); + } + subNamespaceClient = subNamespaceClientbuilder.buildSubNamespaceClient(); + + ServiceBClientBuilder operationsClientbuilder = new ServiceBClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "http://localhost:3000")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.RECORD) { + operationsClientbuilder.addPolicy(interceptorManager.getRecordPolicy()); + } + operationsClient = operationsClientbuilder.buildOperationsClient(); + + } +} From 0e7124da3c590f5f12f415b80b61e0cad9955442 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Apr 2026 01:54:17 +0000 Subject: [PATCH 3/8] chore: add changelog entry for http-client-java dependency update Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/f40aa9b9-39e5-4bb7-bdbd-756b78c3668b Co-authored-by: weidongxu-microsoft <53292327+weidongxu-microsoft@users.noreply.github.com> --- ...ot-update-nodejs-dependencies-again-2026-3-8-1-53-53.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .chronus/changes/copilot-update-nodejs-dependencies-again-2026-3-8-1-53-53.md diff --git a/.chronus/changes/copilot-update-nodejs-dependencies-again-2026-3-8-1-53-53.md b/.chronus/changes/copilot-update-nodejs-dependencies-again-2026-3-8-1-53-53.md new file mode 100644 index 00000000000..776b12f8f03 --- /dev/null +++ b/.chronus/changes/copilot-update-nodejs-dependencies-again-2026-3-8-1-53-53.md @@ -0,0 +1,7 @@ +--- +changeKind: dependencies +packages: + - "@typespec/http-client-java" +--- + +Update Node.js dependencies \ No newline at end of file From ed9febe845696bb0134a9ab6739e1598810b57d4 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Wed, 8 Apr 2026 10:10:02 +0800 Subject: [PATCH 4/8] generateConvenienceApi only apply to AzureV1 --- packages/http-client-java/emitter/src/code-model-builder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/http-client-java/emitter/src/code-model-builder.ts b/packages/http-client-java/emitter/src/code-model-builder.ts index d7fe98b6fc8..041cfadac19 100644 --- a/packages/http-client-java/emitter/src/code-model-builder.ts +++ b/packages/http-client-java/emitter/src/code-model-builder.ts @@ -941,7 +941,7 @@ export class CodeModelBuilder { let generateProtocolApi: boolean = sdkMethod.generateProtocol; let diagnostic = undefined; - if (generateConvenienceApi) { + if (generateConvenienceApi && this.isAzureV1()) { // check if the convenience API need to be disabled for some special cases if (operationIsMultipart(httpOperation)) { // do not generate protocol method for multipart/form-data, as it be very hard for user to prepare the request body as BinaryData From cfc2c0d7e3eeb52c075df024dabccc9616155630 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Wed, 8 Apr 2026 10:18:08 +0800 Subject: [PATCH 5/8] regen --- .../payload/multipart/FormDataClient.java | 18 ------- .../payload/multipart/FormDataFileClient.java | 6 --- .../multipart/FormDataHttpPartsClient.java | 2 - .../FormDataHttpPartsContentTypeClient.java | 6 --- .../FormDataHttpPartsNonStringClient.java | 2 - .../src/main/java/type/file/FileClient.java | 2 - ...adFileMultipleContentTypesContentType.java | 52 +++++++++++++++++++ .../META-INF/type-file_metadata.json | 2 +- 8 files changed, 53 insertions(+), 37 deletions(-) create mode 100644 packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/file/UploadFileMultipleContentTypesContentType.java diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/multipart/FormDataClient.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/multipart/FormDataClient.java index 737dff85a49..adbb54ce0dc 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/multipart/FormDataClient.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/multipart/FormDataClient.java @@ -47,8 +47,6 @@ public final class FormDataClient { @Metadata(properties = { MetadataProperties.GENERATED }) @ServiceMethod(returns = ReturnType.SINGLE) public Response basicWithResponse(MultiPartRequest body, RequestContext requestContext) { - // Operation 'basic' is of content-type 'multipart/form-data'. Protocol API is not usable and hence not - // generated. return this.instrumentation.instrumentWithResponse("Payload.MultiPart.FormData.basic", requestContext, updatedContext -> this.serviceClient.basicWithResponse(body, updatedContext)); } @@ -80,8 +78,6 @@ public void basic(MultiPartRequest body) { @Metadata(properties = { MetadataProperties.GENERATED }) @ServiceMethod(returns = ReturnType.SINGLE) public Response withWireNameWithResponse(MultiPartRequestWithWireName body, RequestContext requestContext) { - // Operation 'withWireName' is of content-type 'multipart/form-data'. Protocol API is not usable and hence not - // generated. return this.instrumentation.instrumentWithResponse("Payload.MultiPart.FormData.withWireName", requestContext, updatedContext -> this.serviceClient.withWireNameWithResponse(body, updatedContext)); } @@ -113,8 +109,6 @@ public void withWireName(MultiPartRequestWithWireName body) { @Metadata(properties = { MetadataProperties.GENERATED }) @ServiceMethod(returns = ReturnType.SINGLE) public Response optionalPartsWithResponse(MultiPartOptionalRequest body, RequestContext requestContext) { - // Operation 'optionalParts' is of content-type 'multipart/form-data'. Protocol API is not usable and hence not - // generated. return this.instrumentation.instrumentWithResponse("Payload.MultiPart.FormData.optionalParts", requestContext, updatedContext -> this.serviceClient.optionalPartsWithResponse(body, updatedContext)); } @@ -146,8 +140,6 @@ public void optionalParts(MultiPartOptionalRequest body) { @Metadata(properties = { MetadataProperties.GENERATED }) @ServiceMethod(returns = ReturnType.SINGLE) public Response fileArrayAndBasicWithResponse(ComplexPartsRequest body, RequestContext requestContext) { - // Operation 'fileArrayAndBasic' is of content-type 'multipart/form-data'. Protocol API is not usable and hence - // not generated. return this.instrumentation.instrumentWithResponse("Payload.MultiPart.FormData.fileArrayAndBasic", requestContext, updatedContext -> this.serviceClient.fileArrayAndBasicWithResponse(body, updatedContext)); } @@ -179,8 +171,6 @@ public void fileArrayAndBasic(ComplexPartsRequest body) { @Metadata(properties = { MetadataProperties.GENERATED }) @ServiceMethod(returns = ReturnType.SINGLE) public Response jsonPartWithResponse(JsonPartRequest body, RequestContext requestContext) { - // Operation 'jsonPart' is of content-type 'multipart/form-data'. Protocol API is not usable and hence not - // generated. return this.instrumentation.instrumentWithResponse("Payload.MultiPart.FormData.jsonPart", requestContext, updatedContext -> this.serviceClient.jsonPartWithResponse(body, updatedContext)); } @@ -212,8 +202,6 @@ public void jsonPart(JsonPartRequest body) { @Metadata(properties = { MetadataProperties.GENERATED }) @ServiceMethod(returns = ReturnType.SINGLE) public Response binaryArrayPartsWithResponse(BinaryArrayPartsRequest body, RequestContext requestContext) { - // Operation 'binaryArrayParts' is of content-type 'multipart/form-data'. Protocol API is not usable and hence - // not generated. return this.instrumentation.instrumentWithResponse("Payload.MultiPart.FormData.binaryArrayParts", requestContext, updatedContext -> this.serviceClient.binaryArrayPartsWithResponse(body, updatedContext)); } @@ -245,8 +233,6 @@ public void binaryArrayParts(BinaryArrayPartsRequest body) { @Metadata(properties = { MetadataProperties.GENERATED }) @ServiceMethod(returns = ReturnType.SINGLE) public Response multiBinaryPartsWithResponse(MultiBinaryPartsRequest body, RequestContext requestContext) { - // Operation 'multiBinaryParts' is of content-type 'multipart/form-data'. Protocol API is not usable and hence - // not generated. return this.instrumentation.instrumentWithResponse("Payload.MultiPart.FormData.multiBinaryParts", requestContext, updatedContext -> this.serviceClient.multiBinaryPartsWithResponse(body, updatedContext)); } @@ -279,8 +265,6 @@ public void multiBinaryParts(MultiBinaryPartsRequest body) { @ServiceMethod(returns = ReturnType.SINGLE) public Response checkFileNameAndContentTypeWithResponse(MultiPartRequest body, RequestContext requestContext) { - // Operation 'checkFileNameAndContentType' is of content-type 'multipart/form-data'. Protocol API is not usable - // and hence not generated. return this.instrumentation.instrumentWithResponse("Payload.MultiPart.FormData.checkFileNameAndContentType", requestContext, updatedContext -> this.serviceClient.checkFileNameAndContentTypeWithResponse(body, updatedContext)); @@ -313,8 +297,6 @@ public void checkFileNameAndContentType(MultiPartRequest body) { @Metadata(properties = { MetadataProperties.GENERATED }) @ServiceMethod(returns = ReturnType.SINGLE) public Response anonymousModelWithResponse(AnonymousModelRequest body, RequestContext requestContext) { - // Operation 'anonymousModel' is of content-type 'multipart/form-data'. Protocol API is not usable and hence not - // generated. return this.instrumentation.instrumentWithResponse("Payload.MultiPart.FormData.anonymousModel", requestContext, updatedContext -> this.serviceClient.anonymousModelWithResponse(body, updatedContext)); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/multipart/FormDataFileClient.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/multipart/FormDataFileClient.java index 6fbf86ae64c..bc7651ad466 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/multipart/FormDataFileClient.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/multipart/FormDataFileClient.java @@ -50,8 +50,6 @@ public final class FormDataFileClient { @ServiceMethod(returns = ReturnType.SINGLE) public Response uploadFileSpecificContentTypeWithResponse(UploadFileSpecificContentTypeRequest body, RequestContext requestContext) { - // Operation 'uploadFileSpecificContentType' is of content-type 'multipart/form-data'. Protocol API is not - // usable and hence not generated. return this.instrumentation.instrumentWithResponse( "Payload.MultiPart.FormData.File.uploadFileSpecificContentType", requestContext, updatedContext -> this.serviceClient.uploadFileSpecificContentTypeWithResponse(body, updatedContext)); @@ -85,8 +83,6 @@ public void uploadFileSpecificContentType(UploadFileSpecificContentTypeRequest b @ServiceMethod(returns = ReturnType.SINGLE) public Response uploadFileRequiredFilenameWithResponse(UploadFileRequiredFilenameRequest body, RequestContext requestContext) { - // Operation 'uploadFileRequiredFilename' is of content-type 'multipart/form-data'. Protocol API is not usable - // and hence not generated. return this.instrumentation.instrumentWithResponse("Payload.MultiPart.FormData.File.uploadFileRequiredFilename", requestContext, updatedContext -> this.serviceClient.uploadFileRequiredFilenameWithResponse(body, updatedContext)); @@ -119,8 +115,6 @@ public void uploadFileRequiredFilename(UploadFileRequiredFilenameRequest body) { @Metadata(properties = { MetadataProperties.GENERATED }) @ServiceMethod(returns = ReturnType.SINGLE) public Response uploadFileArrayWithResponse(UploadFileArrayRequest body, RequestContext requestContext) { - // Operation 'uploadFileArray' is of content-type 'multipart/form-data'. Protocol API is not usable and hence - // not generated. return this.instrumentation.instrumentWithResponse("Payload.MultiPart.FormData.File.uploadFileArray", requestContext, updatedContext -> this.serviceClient.uploadFileArrayWithResponse(body, updatedContext)); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/multipart/FormDataHttpPartsClient.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/multipart/FormDataHttpPartsClient.java index ee0e965ab8f..8644a85f16c 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/multipart/FormDataHttpPartsClient.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/multipart/FormDataHttpPartsClient.java @@ -47,8 +47,6 @@ public final class FormDataHttpPartsClient { @ServiceMethod(returns = ReturnType.SINGLE) public Response jsonArrayAndFileArrayWithResponse(ComplexHttpPartsModelRequest body, RequestContext requestContext) { - // Operation 'jsonArrayAndFileArray' is of content-type 'multipart/form-data'. Protocol API is not usable and - // hence not generated. return this.instrumentation.instrumentWithResponse("Payload.MultiPart.FormData.HttpParts.jsonArrayAndFileArray", requestContext, updatedContext -> this.serviceClient.jsonArrayAndFileArrayWithResponse(body, updatedContext)); diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/multipart/FormDataHttpPartsContentTypeClient.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/multipart/FormDataHttpPartsContentTypeClient.java index d7a42c96f3a..f02258501e6 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/multipart/FormDataHttpPartsContentTypeClient.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/multipart/FormDataHttpPartsContentTypeClient.java @@ -48,8 +48,6 @@ public final class FormDataHttpPartsContentTypeClient { @ServiceMethod(returns = ReturnType.SINGLE) public Response imageJpegContentTypeWithResponse(FileWithHttpPartSpecificContentTypeRequest body, RequestContext requestContext) { - // Operation 'imageJpegContentType' is of content-type 'multipart/form-data'. Protocol API is not usable and - // hence not generated. return this.instrumentation.instrumentWithResponse( "Payload.MultiPart.FormData.HttpParts.ContentType.imageJpegContentType", requestContext, updatedContext -> this.serviceClient.imageJpegContentTypeWithResponse(body, updatedContext)); @@ -83,8 +81,6 @@ public void imageJpegContentType(FileWithHttpPartSpecificContentTypeRequest body @ServiceMethod(returns = ReturnType.SINGLE) public Response requiredContentTypeWithResponse(FileWithHttpPartRequiredContentTypeRequest body, RequestContext requestContext) { - // Operation 'requiredContentType' is of content-type 'multipart/form-data'. Protocol API is not usable and - // hence not generated. return this.instrumentation.instrumentWithResponse( "Payload.MultiPart.FormData.HttpParts.ContentType.requiredContentType", requestContext, updatedContext -> this.serviceClient.requiredContentTypeWithResponse(body, updatedContext)); @@ -118,8 +114,6 @@ public void requiredContentType(FileWithHttpPartRequiredContentTypeRequest body) @ServiceMethod(returns = ReturnType.SINGLE) public Response optionalContentTypeWithResponse(FileWithHttpPartOptionalContentTypeRequest body, RequestContext requestContext) { - // Operation 'optionalContentType' is of content-type 'multipart/form-data'. Protocol API is not usable and - // hence not generated. return this.instrumentation.instrumentWithResponse( "Payload.MultiPart.FormData.HttpParts.ContentType.optionalContentType", requestContext, updatedContext -> this.serviceClient.optionalContentTypeWithResponse(body, updatedContext)); diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/multipart/FormDataHttpPartsNonStringClient.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/multipart/FormDataHttpPartsNonStringClient.java index d0dff51efbb..2e44da87da6 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/multipart/FormDataHttpPartsNonStringClient.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/multipart/FormDataHttpPartsNonStringClient.java @@ -47,8 +47,6 @@ public final class FormDataHttpPartsNonStringClient { @Metadata(properties = { MetadataProperties.GENERATED }) @ServiceMethod(returns = ReturnType.SINGLE) public Response floatMethodWithResponse(FloatRequest body, RequestContext requestContext) { - // Operation 'float' is of content-type 'multipart/form-data'. Protocol API is not usable and hence not - // generated. return this.instrumentation.instrumentWithResponse("Payload.MultiPart.FormData.HttpParts.NonString.float", requestContext, updatedContext -> this.serviceClient.floatMethodWithResponse(body, updatedContext)); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/file/FileClient.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/file/FileClient.java index a87c2f875cb..83ba163eb8a 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/file/FileClient.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/file/FileClient.java @@ -180,8 +180,6 @@ public BinaryData downloadFileSpecificContentType() { public Response uploadFileMultipleContentTypesWithResponse( UploadFileMultipleContentTypesContentType contentType, BinaryData file, long contentLength, RequestContext requestContext) { - // Operation 'uploadFileMultipleContentTypes' can be invoked with multiple content-type. It is difficult to form - // a correct method signature for convenience API, and hence the convenience API is not generated. return this.instrumentation.instrumentWithResponse("Type.File.Body.uploadFileMultipleContentTypes", requestContext, updatedContext -> this.serviceClient.uploadFileMultipleContentTypesWithResponse(contentType, file, contentLength, updatedContext)); diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/file/UploadFileMultipleContentTypesContentType.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/file/UploadFileMultipleContentTypesContentType.java new file mode 100644 index 00000000000..23fda08060e --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/file/UploadFileMultipleContentTypesContentType.java @@ -0,0 +1,52 @@ +package type.file; + +/** + * Defines values for UploadFileMultipleContentTypesContentType. + */ +public enum UploadFileMultipleContentTypesContentType { + /** + * Enum value image/png. + */ + IMAGE_PNG("image/png"), + + /** + * Enum value image/jpeg. + */ + IMAGE_JPEG("image/jpeg"); + + /** + * The actual serialized value for a UploadFileMultipleContentTypesContentType instance. + */ + private final String value; + + UploadFileMultipleContentTypesContentType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a UploadFileMultipleContentTypesContentType instance. + * + * @param value the serialized value to parse. + * @return the parsed UploadFileMultipleContentTypesContentType object, or null if unable to parse. + */ + public static UploadFileMultipleContentTypesContentType fromString(String value) { + if (value == null) { + return null; + } + UploadFileMultipleContentTypesContentType[] items = UploadFileMultipleContentTypesContentType.values(); + for (UploadFileMultipleContentTypesContentType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return this.value; + } +} diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/resources/META-INF/type-file_metadata.json b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/resources/META-INF/type-file_metadata.json index fae6f73a225..4483830b659 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/resources/META-INF/type-file_metadata.json +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/resources/META-INF/type-file_metadata.json @@ -1 +1 @@ -{"flavor":"generic","apiVersions":{},"crossLanguageDefinitions":{"type.file.DownloadFileMultipleContentTypesContentType":"Type.File.Body.downloadFileMultipleContentTypes.accept","type.file.FileClient":"Type.File.Body","type.file.FileClientBuilder":"Type.File"},"generatedFiles":["src/main/java/module-info.java","src/main/java/type/file/DownloadFileMultipleContentTypesContentType.java","src/main/java/type/file/FileClient.java","src/main/java/type/file/FileClientBuilder.java","src/main/java/type/file/implementation/BodiesImpl.java","src/main/java/type/file/implementation/FileClientImpl.java","src/main/java/type/file/implementation/package-info.java","src/main/java/type/file/package-info.java"]} \ No newline at end of file +{"flavor":"generic","apiVersions":{},"crossLanguageDefinitions":{"type.file.DownloadFileMultipleContentTypesContentType":"Type.File.Body.downloadFileMultipleContentTypes.accept","type.file.FileClient":"Type.File.Body","type.file.FileClientBuilder":"Type.File","type.file.UploadFileMultipleContentTypesContentType":"Type.File.Body.uploadFileMultipleContentTypes.contentType"},"generatedFiles":["src/main/java/module-info.java","src/main/java/type/file/DownloadFileMultipleContentTypesContentType.java","src/main/java/type/file/FileClient.java","src/main/java/type/file/FileClientBuilder.java","src/main/java/type/file/UploadFileMultipleContentTypesContentType.java","src/main/java/type/file/implementation/BodiesImpl.java","src/main/java/type/file/implementation/FileClientImpl.java","src/main/java/type/file/implementation/package-info.java","src/main/java/type/file/package-info.java"]} \ No newline at end of file From 4537606af51e92776ad7fe9e5713add58a876506 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Wed, 8 Apr 2026 10:28:45 +0800 Subject: [PATCH 6/8] fix test --- .../src/test/java/type/file/FileTests.java | 10 ++++++---- .../src/test/java/client/naming/NamingTests.java | 14 +++++++++----- .../src/test/java/type/file/FileTests.java | 10 ++++++---- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/test/java/type/file/FileTests.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/test/java/type/file/FileTests.java index 465519a2867..1aa5aa47a8c 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/test/java/type/file/FileTests.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/test/java/type/file/FileTests.java @@ -19,7 +19,7 @@ public class FileTests { @Test public void testUploadFileSpecificContentType() { BinaryData fileData = BinaryData.fromFile(PNG_FILE); - client.uploadFileSpecificContentType("image/png", fileData, fileData.getLength()); + client.uploadFileSpecificContentType(fileData, fileData.getLength()); } @Disabled("possible bug in clientcore") @@ -46,12 +46,14 @@ public void testDownloadFileSpecificContentType() { @Test public void testUploadFileMultipleContentTypes() { BinaryData fileData = BinaryData.fromFile(PNG_FILE); - client.uploadFileMultipleContentTypes("image/png", fileData, fileData.getLength()); + client.uploadFileMultipleContentTypes(UploadFileMultipleContentTypesContentType.IMAGE_PNG, fileData, + fileData.getLength()); } @Test public void testDownloadFileMultipleContentTypes() { - BinaryData response = client.downloadFileMultipleContentTypes("image/png"); + BinaryData response + = client.downloadFileMultipleContentTypes(DownloadFileMultipleContentTypesContentType.IMAGE_PNG); Assertions.assertNotNull(response); } @@ -63,7 +65,7 @@ public void testUploadFileDefaultContentType() { @Test public void testDownloadFileDefaultContentType() { - BinaryData response = client.downloadFileDefaultContentType(); + BinaryData response = client.downloadFileDefaultContentType("image/png"); Assertions.assertNotNull(response); } } diff --git a/packages/http-client-java/generator/http-client-generator-test/src/test/java/client/naming/NamingTests.java b/packages/http-client-java/generator/http-client-generator-test/src/test/java/client/naming/NamingTests.java index 1389491b1a8..30f62398507 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/test/java/client/naming/NamingTests.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/test/java/client/naming/NamingTests.java @@ -16,6 +16,10 @@ public class NamingTests { private final NamingClient client = new NamingClientBuilder().buildClient(); + private final PropertyClient propertyClient = new NamingClientBuilder().buildPropertyClient(); + + private final HeaderClient headerClient = new NamingClientBuilder().buildHeaderClient(); + // client name should be "ClientModel", currently a bug in TCGC private final ModelClient modelClient = new NamingClientBuilder().buildModelClient(); @@ -30,13 +34,13 @@ public void testNaming() { client.parameter("true"); // property - client.client(new ClientNameModel(true)); - client.language(new LanguageClientNameModel(true)); - client.compatibleWithEncodedName(new ClientNameAndJsonEncodedNameModel(true)); + propertyClient.client(new ClientNameModel(true)); + propertyClient.language(new LanguageClientNameModel(true)); + propertyClient.compatibleWithEncodedName(new ClientNameAndJsonEncodedNameModel(true)); // header - client.request("true"); - client.response(); // no class about response header at present + headerClient.request("true"); + headerClient.response(); // no class about response header at present // model modelClient.client(new ClientModel(true)); diff --git a/packages/http-client-java/generator/http-client-generator-test/src/test/java/type/file/FileTests.java b/packages/http-client-java/generator/http-client-generator-test/src/test/java/type/file/FileTests.java index c2559b257c4..8d9349184ba 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/test/java/type/file/FileTests.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/test/java/type/file/FileTests.java @@ -8,6 +8,7 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.utils.FileUtils; +import type.file.models.DownloadFileMultipleContentTypesContentType; public class FileTests { @@ -17,7 +18,7 @@ public class FileTests { @Test public void testUploadFileSpecificContentType() { - client.uploadFileSpecificContentType("image/png", BinaryData.fromFile(PNG_FILE)); + client.uploadFileSpecificContentType(BinaryData.fromFile(PNG_FILE)); } @Test @@ -41,12 +42,13 @@ public void testDownloadFileSpecificContentType() { @Test public void testUploadFileMultipleContentTypes() { - client.uploadFileMultipleContentTypes("image/png", BinaryData.fromFile(PNG_FILE)); + client.uploadFileMultipleContentTypesWithResponse("image/png", BinaryData.fromFile(PNG_FILE), null); } @Test public void testDownloadFileMultipleContentTypes() { - BinaryData response = client.downloadFileMultipleContentTypes("image/png"); + BinaryData response + = client.downloadFileMultipleContentTypes(DownloadFileMultipleContentTypesContentType.IMAGE_PNG); Assertions.assertNotNull(response); } @@ -57,7 +59,7 @@ public void testUploadFileDefaultContentType() { @Test public void testDownloadFileDefaultContentType() { - BinaryData response = client.downloadFileDefaultContentType(); + BinaryData response = client.downloadFileDefaultContentType("image/png"); Assertions.assertNotNull(response); } } From 93a223e07155cf211d7346aeb146283c98d5e071 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Wed, 8 Apr 2026 10:30:39 +0800 Subject: [PATCH 7/8] skip multiple-services for now --- .../generator/http-client-generator-test/Generate.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/http-client-java/generator/http-client-generator-test/Generate.ps1 b/packages/http-client-java/generator/http-client-generator-test/Generate.ps1 index 24c692adc8a..6de39d2e421 100644 --- a/packages/http-client-java/generator/http-client-generator-test/Generate.ps1 +++ b/packages/http-client-java/generator/http-client-generator-test/Generate.ps1 @@ -19,7 +19,7 @@ Write-Host "Parallelization: $Parallelization" $generateScript = { $tspFile = $_ - if ((($tspFile -match "payload[\\/]pageable[\\/]main\.tsp") -and (-not ($tspFile -match "azure[\\/]payload[\\/]pageable[\\/]main\.tsp"))) -or ($tspFile -match "payload[\\/]xml[\\/]main\.tsp")) { + if ((($tspFile -match "payload[\\/]pageable[\\/]main\.tsp") -and (-not ($tspFile -match "azure[\\/]payload[\\/]pageable[\\/]main\.tsp"))) -or ($tspFile -match "payload[\\/]xml[\\/]main\.tsp") -or ($tspFile -match "service[\\/]multiple-services[\\/]main\.tsp")) { Write-Host " SKIPPED $tspFile From 1dd3cbc660002edb426034349c4734b0b3e3fe3d Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Wed, 8 Apr 2026 10:43:52 +0800 Subject: [PATCH 8/8] regen --- .../servicea/OperationsAsyncClient.java | 72 ---- .../servicea/OperationsClient.java | 69 ---- .../servicea/ServiceAClientBuilder.java | 333 ----------------- .../servicea/ServiceAServiceVersion.java | 45 --- .../servicea/ServiceBServiceVersion.java | 45 --- .../servicea/SubNamespaceAsyncClient.java | 72 ---- .../servicea/SubNamespaceClient.java | 69 ---- .../implementation/OperationsImpl.java | 119 ------- .../OperationsOperationsImpl.java | 119 ------- .../implementation/ServiceAClientImpl.java | 142 -------- .../implementation/ServiceBClientImpl.java | 142 -------- .../implementation/SubNamespacesImpl.java | 119 ------- .../SubNamespacesOperationsImpl.java | 119 ------- .../servicea/implementation/package-info.java | 12 - .../servicea/package-info.java | 12 - .../serviceb/OperationsAsyncClient.java | 72 ---- .../serviceb/OperationsClient.java | 69 ---- .../serviceb/ServiceBClientBuilder.java | 334 ------------------ .../serviceb/SubNamespaceAsyncClient.java | 72 ---- .../serviceb/SubNamespaceClient.java | 69 ---- .../serviceb/package-info.java | 12 - ...ce-multipleservices-servicea_metadata.json | 1 - ...rvice-multipleservices-servicea.properties | 2 - .../generated/ServiceAClientTestBase.java | 71 ---- 24 files changed, 2191 deletions(-) delete mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/OperationsAsyncClient.java delete mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/OperationsClient.java delete mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/ServiceAClientBuilder.java delete mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/ServiceAServiceVersion.java delete mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/ServiceBServiceVersion.java delete mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/SubNamespaceAsyncClient.java delete mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/SubNamespaceClient.java delete mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/OperationsImpl.java delete mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/OperationsOperationsImpl.java delete mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/ServiceAClientImpl.java delete mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/ServiceBClientImpl.java delete mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/SubNamespacesImpl.java delete mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/SubNamespacesOperationsImpl.java delete mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/package-info.java delete mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/package-info.java delete mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/OperationsAsyncClient.java delete mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/OperationsClient.java delete mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/ServiceBClientBuilder.java delete mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/SubNamespaceAsyncClient.java delete mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/SubNamespaceClient.java delete mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/package-info.java delete mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/service-multipleservices-servicea_metadata.json delete mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/resources/service-multipleservices-servicea.properties delete mode 100644 packages/http-client-java/generator/http-client-generator-test/src/test/java/service/multipleservices/servicea/generated/ServiceAClientTestBase.java diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/OperationsAsyncClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/OperationsAsyncClient.java deleted file mode 100644 index 20ae75a4582..00000000000 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/OperationsAsyncClient.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package service.multipleservices.servicea; - -import com.azure.core.annotation.Generated; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceClient; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.exception.ClientAuthenticationException; -import com.azure.core.exception.HttpResponseException; -import com.azure.core.exception.ResourceModifiedException; -import com.azure.core.exception.ResourceNotFoundException; -import com.azure.core.http.rest.RequestOptions; -import com.azure.core.http.rest.Response; -import com.azure.core.util.FluxUtil; -import reactor.core.publisher.Mono; -import service.multipleservices.servicea.implementation.OperationsImpl; - -/** - * Initializes a new instance of the asynchronous ServiceAClient type. - */ -@ServiceClient(builder = ServiceAClientBuilder.class, isAsync = true) -public final class OperationsAsyncClient { - @Generated - private final OperationsImpl serviceClient; - - /** - * Initializes an instance of OperationsAsyncClient class. - * - * @param serviceClient the service client implementation. - */ - @Generated - OperationsAsyncClient(OperationsImpl serviceClient) { - this.serviceClient = serviceClient; - } - - /** - * The opA operation. - * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> opAWithResponse(RequestOptions requestOptions) { - return this.serviceClient.opAWithResponseAsync(requestOptions); - } - - /** - * The opA operation. - * - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono opA() { - // Generated convenience method for opAWithResponse - RequestOptions requestOptions = new RequestOptions(); - return opAWithResponse(requestOptions).flatMap(FluxUtil::toMono); - } -} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/OperationsClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/OperationsClient.java deleted file mode 100644 index 90b75157ad8..00000000000 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/OperationsClient.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package service.multipleservices.servicea; - -import com.azure.core.annotation.Generated; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceClient; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.exception.ClientAuthenticationException; -import com.azure.core.exception.HttpResponseException; -import com.azure.core.exception.ResourceModifiedException; -import com.azure.core.exception.ResourceNotFoundException; -import com.azure.core.http.rest.RequestOptions; -import com.azure.core.http.rest.Response; -import service.multipleservices.servicea.implementation.OperationsImpl; - -/** - * Initializes a new instance of the synchronous ServiceAClient type. - */ -@ServiceClient(builder = ServiceAClientBuilder.class) -public final class OperationsClient { - @Generated - private final OperationsImpl serviceClient; - - /** - * Initializes an instance of OperationsClient class. - * - * @param serviceClient the service client implementation. - */ - @Generated - OperationsClient(OperationsImpl serviceClient) { - this.serviceClient = serviceClient; - } - - /** - * The opA operation. - * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response opAWithResponse(RequestOptions requestOptions) { - return this.serviceClient.opAWithResponse(requestOptions); - } - - /** - * The opA operation. - * - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public void opA() { - // Generated convenience method for opAWithResponse - RequestOptions requestOptions = new RequestOptions(); - opAWithResponse(requestOptions).getValue(); - } -} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/ServiceAClientBuilder.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/ServiceAClientBuilder.java deleted file mode 100644 index 26f80ed5ae0..00000000000 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/ServiceAClientBuilder.java +++ /dev/null @@ -1,333 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package service.multipleservices.servicea; - -import com.azure.core.annotation.Generated; -import com.azure.core.annotation.ServiceClientBuilder; -import com.azure.core.client.traits.ConfigurationTrait; -import com.azure.core.client.traits.EndpointTrait; -import com.azure.core.client.traits.HttpTrait; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.HttpPipelinePosition; -import com.azure.core.http.policy.AddDatePolicy; -import com.azure.core.http.policy.AddHeadersFromContextPolicy; -import com.azure.core.http.policy.AddHeadersPolicy; -import com.azure.core.http.policy.HttpLogOptions; -import com.azure.core.http.policy.HttpLoggingPolicy; -import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.core.http.policy.HttpPolicyProviders; -import com.azure.core.http.policy.RequestIdPolicy; -import com.azure.core.http.policy.RetryOptions; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.util.ClientOptions; -import com.azure.core.util.Configuration; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.builder.ClientBuilderUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.serializer.JacksonAdapter; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import service.multipleservices.servicea.implementation.ServiceAClientImpl; - -/** - * A builder for creating a new instance of the ServiceAClient type. - */ -@ServiceClientBuilder( - serviceClients = { - SubNamespaceClient.class, - OperationsClient.class, - SubNamespaceAsyncClient.class, - OperationsAsyncClient.class }) -public final class ServiceAClientBuilder implements HttpTrait, - ConfigurationTrait, EndpointTrait { - @Generated - private static final String SDK_NAME = "name"; - - @Generated - private static final String SDK_VERSION = "version"; - - @Generated - private static final Map PROPERTIES - = CoreUtils.getProperties("service-multipleservices-servicea.properties"); - - @Generated - private final List pipelinePolicies; - - /** - * Create an instance of the ServiceAClientBuilder. - */ - @Generated - public ServiceAClientBuilder() { - this.pipelinePolicies = new ArrayList<>(); - } - - /* - * The HTTP client used to send the request. - */ - @Generated - private HttpClient httpClient; - - /** - * {@inheritDoc}. - */ - @Generated - @Override - public ServiceAClientBuilder httpClient(HttpClient httpClient) { - this.httpClient = httpClient; - return this; - } - - /* - * The HTTP pipeline to send requests through. - */ - @Generated - private HttpPipeline pipeline; - - /** - * {@inheritDoc}. - */ - @Generated - @Override - public ServiceAClientBuilder pipeline(HttpPipeline pipeline) { - if (this.pipeline != null && pipeline == null) { - LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); - } - this.pipeline = pipeline; - return this; - } - - /* - * The logging configuration for HTTP requests and responses. - */ - @Generated - private HttpLogOptions httpLogOptions; - - /** - * {@inheritDoc}. - */ - @Generated - @Override - public ServiceAClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { - this.httpLogOptions = httpLogOptions; - return this; - } - - /* - * The client options such as application ID and custom headers to set on a request. - */ - @Generated - private ClientOptions clientOptions; - - /** - * {@inheritDoc}. - */ - @Generated - @Override - public ServiceAClientBuilder clientOptions(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - return this; - } - - /* - * The retry options to configure retry policy for failed requests. - */ - @Generated - private RetryOptions retryOptions; - - /** - * {@inheritDoc}. - */ - @Generated - @Override - public ServiceAClientBuilder retryOptions(RetryOptions retryOptions) { - this.retryOptions = retryOptions; - return this; - } - - /** - * {@inheritDoc}. - */ - @Generated - @Override - public ServiceAClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { - Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); - pipelinePolicies.add(customPolicy); - return this; - } - - /* - * The configuration store that is used during construction of the service client. - */ - @Generated - private Configuration configuration; - - /** - * {@inheritDoc}. - */ - @Generated - @Override - public ServiceAClientBuilder configuration(Configuration configuration) { - this.configuration = configuration; - return this; - } - - /* - * The service endpoint - */ - @Generated - private String endpoint; - - /** - * {@inheritDoc}. - */ - @Generated - @Override - public ServiceAClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /* - * Service version - */ - @Generated - private ServiceAServiceVersion serviceVersion; - - /** - * Sets Service version. - * - * @param serviceVersion the serviceVersion value. - * @return the ServiceAClientBuilder. - */ - @Generated - public ServiceAClientBuilder serviceVersion(ServiceAServiceVersion serviceVersion) { - this.serviceVersion = serviceVersion; - return this; - } - - /* - * The retry policy that will attempt to retry failed requests, if applicable. - */ - @Generated - private RetryPolicy retryPolicy; - - /** - * Sets The retry policy that will attempt to retry failed requests, if applicable. - * - * @param retryPolicy the retryPolicy value. - * @return the ServiceAClientBuilder. - */ - @Generated - public ServiceAClientBuilder retryPolicy(RetryPolicy retryPolicy) { - this.retryPolicy = retryPolicy; - return this; - } - - /** - * Builds an instance of ServiceAClientImpl with the provided parameters. - * - * @return an instance of ServiceAClientImpl. - */ - @Generated - private ServiceAClientImpl buildInnerClient() { - this.validateClient(); - HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); - String localEndpoint = (endpoint != null) ? endpoint : "http://localhost:3000"; - ServiceAServiceVersion localServiceVersion - = (serviceVersion != null) ? serviceVersion : ServiceAServiceVersion.getLatest(); - ServiceAClientImpl client = new ServiceAClientImpl(localPipeline, - JacksonAdapter.createDefaultSerializerAdapter(), localEndpoint, localServiceVersion); - return client; - } - - @Generated - private void validateClient() { - // This method is invoked from 'buildInnerClient'/'buildClient' method. - // Developer can customize this method, to validate that the necessary conditions are met for the new client. - } - - @Generated - private HttpPipeline createHttpPipeline() { - Configuration buildConfiguration - = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; - HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; - ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; - List policies = new ArrayList<>(); - String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); - String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); - String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); - policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); - policies.add(new RequestIdPolicy()); - policies.add(new AddHeadersFromContextPolicy()); - HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); - if (headers != null) { - policies.add(new AddHeadersPolicy(headers)); - } - this.pipelinePolicies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .forEach(p -> policies.add(p)); - HttpPolicyProviders.addBeforeRetryPolicies(policies); - policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); - policies.add(new AddDatePolicy()); - this.pipelinePolicies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .forEach(p -> policies.add(p)); - HttpPolicyProviders.addAfterRetryPolicies(policies); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); - HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) - .httpClient(httpClient) - .clientOptions(localClientOptions) - .build(); - return httpPipeline; - } - - /** - * Builds an instance of SubNamespaceAsyncClient class. - * - * @return an instance of SubNamespaceAsyncClient. - */ - @Generated - public SubNamespaceAsyncClient buildSubNamespaceAsyncClient() { - return new SubNamespaceAsyncClient(buildInnerClient().getSubNamespaces()); - } - - /** - * Builds an instance of OperationsAsyncClient class. - * - * @return an instance of OperationsAsyncClient. - */ - @Generated - public OperationsAsyncClient buildOperationsAsyncClient() { - return new OperationsAsyncClient(buildInnerClient().getOperations()); - } - - /** - * Builds an instance of SubNamespaceClient class. - * - * @return an instance of SubNamespaceClient. - */ - @Generated - public SubNamespaceClient buildSubNamespaceClient() { - return new SubNamespaceClient(buildInnerClient().getSubNamespaces()); - } - - /** - * Builds an instance of OperationsClient class. - * - * @return an instance of OperationsClient. - */ - @Generated - public OperationsClient buildOperationsClient() { - return new OperationsClient(buildInnerClient().getOperations()); - } - - private static final ClientLogger LOGGER = new ClientLogger(ServiceAClientBuilder.class); -} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/ServiceAServiceVersion.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/ServiceAServiceVersion.java deleted file mode 100644 index 8b3d188e8be..00000000000 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/ServiceAServiceVersion.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package service.multipleservices.servicea; - -import com.azure.core.util.ServiceVersion; - -/** - * Service version of ServiceAClient. - */ -public enum ServiceAServiceVersion implements ServiceVersion { - /** - * Enum value av1. - */ - VAV1("av1"), - - /** - * Enum value av2. - */ - VAV2("av2"); - - private final String version; - - ServiceAServiceVersion(String version) { - this.version = version; - } - - /** - * {@inheritDoc} - */ - @Override - public String getVersion() { - return this.version; - } - - /** - * Gets the latest service version supported by this client library. - * - * @return The latest {@link ServiceAServiceVersion}. - */ - public static ServiceAServiceVersion getLatest() { - return VAV2; - } -} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/ServiceBServiceVersion.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/ServiceBServiceVersion.java deleted file mode 100644 index d2f143e3e82..00000000000 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/ServiceBServiceVersion.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package service.multipleservices.servicea; - -import com.azure.core.util.ServiceVersion; - -/** - * Service version of ServiceBClient. - */ -public enum ServiceBServiceVersion implements ServiceVersion { - /** - * Enum value bv1. - */ - VBV1("bv1"), - - /** - * Enum value bv2. - */ - VBV2("bv2"); - - private final String version; - - ServiceBServiceVersion(String version) { - this.version = version; - } - - /** - * {@inheritDoc} - */ - @Override - public String getVersion() { - return this.version; - } - - /** - * Gets the latest service version supported by this client library. - * - * @return The latest {@link ServiceBServiceVersion}. - */ - public static ServiceBServiceVersion getLatest() { - return VBV2; - } -} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/SubNamespaceAsyncClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/SubNamespaceAsyncClient.java deleted file mode 100644 index b9a1b6c8e97..00000000000 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/SubNamespaceAsyncClient.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package service.multipleservices.servicea; - -import com.azure.core.annotation.Generated; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceClient; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.exception.ClientAuthenticationException; -import com.azure.core.exception.HttpResponseException; -import com.azure.core.exception.ResourceModifiedException; -import com.azure.core.exception.ResourceNotFoundException; -import com.azure.core.http.rest.RequestOptions; -import com.azure.core.http.rest.Response; -import com.azure.core.util.FluxUtil; -import reactor.core.publisher.Mono; -import service.multipleservices.servicea.implementation.SubNamespacesImpl; - -/** - * Initializes a new instance of the asynchronous ServiceAClient type. - */ -@ServiceClient(builder = ServiceAClientBuilder.class, isAsync = true) -public final class SubNamespaceAsyncClient { - @Generated - private final SubNamespacesImpl serviceClient; - - /** - * Initializes an instance of SubNamespaceAsyncClient class. - * - * @param serviceClient the service client implementation. - */ - @Generated - SubNamespaceAsyncClient(SubNamespacesImpl serviceClient) { - this.serviceClient = serviceClient; - } - - /** - * The subOpA operation. - * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> subOpAWithResponse(RequestOptions requestOptions) { - return this.serviceClient.subOpAWithResponseAsync(requestOptions); - } - - /** - * The subOpA operation. - * - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono subOpA() { - // Generated convenience method for subOpAWithResponse - RequestOptions requestOptions = new RequestOptions(); - return subOpAWithResponse(requestOptions).flatMap(FluxUtil::toMono); - } -} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/SubNamespaceClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/SubNamespaceClient.java deleted file mode 100644 index 32f7824d7dd..00000000000 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/SubNamespaceClient.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package service.multipleservices.servicea; - -import com.azure.core.annotation.Generated; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceClient; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.exception.ClientAuthenticationException; -import com.azure.core.exception.HttpResponseException; -import com.azure.core.exception.ResourceModifiedException; -import com.azure.core.exception.ResourceNotFoundException; -import com.azure.core.http.rest.RequestOptions; -import com.azure.core.http.rest.Response; -import service.multipleservices.servicea.implementation.SubNamespacesImpl; - -/** - * Initializes a new instance of the synchronous ServiceAClient type. - */ -@ServiceClient(builder = ServiceAClientBuilder.class) -public final class SubNamespaceClient { - @Generated - private final SubNamespacesImpl serviceClient; - - /** - * Initializes an instance of SubNamespaceClient class. - * - * @param serviceClient the service client implementation. - */ - @Generated - SubNamespaceClient(SubNamespacesImpl serviceClient) { - this.serviceClient = serviceClient; - } - - /** - * The subOpA operation. - * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response subOpAWithResponse(RequestOptions requestOptions) { - return this.serviceClient.subOpAWithResponse(requestOptions); - } - - /** - * The subOpA operation. - * - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public void subOpA() { - // Generated convenience method for subOpAWithResponse - RequestOptions requestOptions = new RequestOptions(); - subOpAWithResponse(requestOptions).getValue(); - } -} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/OperationsImpl.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/OperationsImpl.java deleted file mode 100644 index 4175493917a..00000000000 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/OperationsImpl.java +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package service.multipleservices.servicea.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.exception.ClientAuthenticationException; -import com.azure.core.exception.HttpResponseException; -import com.azure.core.exception.ResourceModifiedException; -import com.azure.core.exception.ResourceNotFoundException; -import com.azure.core.http.rest.RequestOptions; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import reactor.core.publisher.Mono; -import service.multipleservices.servicea.ServiceAServiceVersion; - -/** - * An instance of this class provides access to all the operations defined in Operations. - */ -public final class OperationsImpl { - /** - * The proxy service used to perform REST calls. - */ - private final OperationsService service; - - /** - * The service client containing this operation class. - */ - private final ServiceAClientImpl client; - - /** - * Initializes an instance of OperationsImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsImpl(ServiceAClientImpl client) { - this.service - = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * Gets Service version. - * - * @return the serviceVersion value. - */ - public ServiceAServiceVersion getServiceVersion() { - return client.getServiceVersion(); - } - - /** - * The interface defining all the services for ServiceAClientOperations to be used by the proxy service to perform - * REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "ServiceAClientOperations") - public interface OperationsService { - @Get("/service/multiple-services/service-a/a-test") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> opA(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - RequestOptions requestOptions, Context context); - - @Get("/service/multiple-services/service-a/a-test") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Response opASync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - RequestOptions requestOptions, Context context); - } - - /** - * The opA operation. - * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> opAWithResponseAsync(RequestOptions requestOptions) { - return FluxUtil.withContext(context -> service.opA(this.client.getEndpoint(), - this.client.getServiceVersion().getVersion(), requestOptions, context)); - } - - /** - * The opA operation. - * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response opAWithResponse(RequestOptions requestOptions) { - return service.opASync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), requestOptions, - Context.NONE); - } -} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/OperationsOperationsImpl.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/OperationsOperationsImpl.java deleted file mode 100644 index b5975c84156..00000000000 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/OperationsOperationsImpl.java +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package service.multipleservices.servicea.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.exception.ClientAuthenticationException; -import com.azure.core.exception.HttpResponseException; -import com.azure.core.exception.ResourceModifiedException; -import com.azure.core.exception.ResourceNotFoundException; -import com.azure.core.http.rest.RequestOptions; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import reactor.core.publisher.Mono; -import service.multipleservices.servicea.ServiceBServiceVersion; - -/** - * An instance of this class provides access to all the operations defined in OperationsOperations. - */ -public final class OperationsOperationsImpl { - /** - * The proxy service used to perform REST calls. - */ - private final OperationsService service; - - /** - * The service client containing this operation class. - */ - private final ServiceBClientImpl client; - - /** - * Initializes an instance of OperationsOperationsImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsOperationsImpl(ServiceBClientImpl client) { - this.service - = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * Gets Service version. - * - * @return the serviceVersion value. - */ - public ServiceBServiceVersion getServiceVersion() { - return client.getServiceVersion(); - } - - /** - * The interface defining all the services for ServiceBClientOperationsOperations to be used by the proxy service to - * perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "ServiceBClientOperationsOperations") - public interface OperationsService { - @Get("/service/multiple-services/service-b/b-test") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> opB(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - RequestOptions requestOptions, Context context); - - @Get("/service/multiple-services/service-b/b-test") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Response opBSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - RequestOptions requestOptions, Context context); - } - - /** - * The opB operation. - * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> opBWithResponseAsync(RequestOptions requestOptions) { - return FluxUtil.withContext(context -> service.opB(this.client.getEndpoint(), - this.client.getServiceVersion().getVersion(), requestOptions, context)); - } - - /** - * The opB operation. - * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response opBWithResponse(RequestOptions requestOptions) { - return service.opBSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), requestOptions, - Context.NONE); - } -} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/ServiceAClientImpl.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/ServiceAClientImpl.java deleted file mode 100644 index ca1061a2bc2..00000000000 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/ServiceAClientImpl.java +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package service.multipleservices.servicea.implementation; - -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.util.serializer.JacksonAdapter; -import com.azure.core.util.serializer.SerializerAdapter; -import service.multipleservices.servicea.ServiceAServiceVersion; - -/** - * Initializes a new instance of the ServiceAClient type. - */ -public final class ServiceAClientImpl { - /** - * Service host. - */ - private final String endpoint; - - /** - * Gets Service host. - * - * @return the endpoint value. - */ - public String getEndpoint() { - return this.endpoint; - } - - /** - * Service version. - */ - private final ServiceAServiceVersion serviceVersion; - - /** - * Gets Service version. - * - * @return the serviceVersion value. - */ - public ServiceAServiceVersion getServiceVersion() { - return this.serviceVersion; - } - - /** - * The HTTP pipeline to send requests through. - */ - private final HttpPipeline httpPipeline; - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - public HttpPipeline getHttpPipeline() { - return this.httpPipeline; - } - - /** - * The serializer to serialize an object into a string. - */ - private final SerializerAdapter serializerAdapter; - - /** - * Gets The serializer to serialize an object into a string. - * - * @return the serializerAdapter value. - */ - public SerializerAdapter getSerializerAdapter() { - return this.serializerAdapter; - } - - /** - * The SubNamespacesImpl object to access its operations. - */ - private final SubNamespacesImpl subNamespaces; - - /** - * Gets the SubNamespacesImpl object to access its operations. - * - * @return the SubNamespacesImpl object. - */ - public SubNamespacesImpl getSubNamespaces() { - return this.subNamespaces; - } - - /** - * The OperationsImpl object to access its operations. - */ - private final OperationsImpl operations; - - /** - * Gets the OperationsImpl object to access its operations. - * - * @return the OperationsImpl object. - */ - public OperationsImpl getOperations() { - return this.operations; - } - - /** - * Initializes an instance of ServiceAClient client. - * - * @param endpoint Service host. - * @param serviceVersion Service version. - */ - public ServiceAClientImpl(String endpoint, ServiceAServiceVersion serviceVersion) { - this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), - JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); - } - - /** - * Initializes an instance of ServiceAClient client. - * - * @param httpPipeline The HTTP pipeline to send requests through. - * @param endpoint Service host. - * @param serviceVersion Service version. - */ - public ServiceAClientImpl(HttpPipeline httpPipeline, String endpoint, ServiceAServiceVersion serviceVersion) { - this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); - } - - /** - * Initializes an instance of ServiceAClient client. - * - * @param httpPipeline The HTTP pipeline to send requests through. - * @param serializerAdapter The serializer to serialize an object into a string. - * @param endpoint Service host. - * @param serviceVersion Service version. - */ - public ServiceAClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint, - ServiceAServiceVersion serviceVersion) { - this.httpPipeline = httpPipeline; - this.serializerAdapter = serializerAdapter; - this.endpoint = endpoint; - this.serviceVersion = serviceVersion; - this.subNamespaces = new SubNamespacesImpl(this); - this.operations = new OperationsImpl(this); - } -} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/ServiceBClientImpl.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/ServiceBClientImpl.java deleted file mode 100644 index bd4f16ae090..00000000000 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/ServiceBClientImpl.java +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package service.multipleservices.servicea.implementation; - -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.util.serializer.JacksonAdapter; -import com.azure.core.util.serializer.SerializerAdapter; -import service.multipleservices.servicea.ServiceBServiceVersion; - -/** - * Initializes a new instance of the ServiceBClient type. - */ -public final class ServiceBClientImpl { - /** - * Service host. - */ - private final String endpoint; - - /** - * Gets Service host. - * - * @return the endpoint value. - */ - public String getEndpoint() { - return this.endpoint; - } - - /** - * Service version. - */ - private final ServiceBServiceVersion serviceVersion; - - /** - * Gets Service version. - * - * @return the serviceVersion value. - */ - public ServiceBServiceVersion getServiceVersion() { - return this.serviceVersion; - } - - /** - * The HTTP pipeline to send requests through. - */ - private final HttpPipeline httpPipeline; - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - public HttpPipeline getHttpPipeline() { - return this.httpPipeline; - } - - /** - * The serializer to serialize an object into a string. - */ - private final SerializerAdapter serializerAdapter; - - /** - * Gets The serializer to serialize an object into a string. - * - * @return the serializerAdapter value. - */ - public SerializerAdapter getSerializerAdapter() { - return this.serializerAdapter; - } - - /** - * The SubNamespacesOperationsImpl object to access its operations. - */ - private final SubNamespacesOperationsImpl subNamespacesOperations; - - /** - * Gets the SubNamespacesOperationsImpl object to access its operations. - * - * @return the SubNamespacesOperationsImpl object. - */ - public SubNamespacesOperationsImpl getSubNamespacesOperations() { - return this.subNamespacesOperations; - } - - /** - * The OperationsOperationsImpl object to access its operations. - */ - private final OperationsOperationsImpl operationsOperations; - - /** - * Gets the OperationsOperationsImpl object to access its operations. - * - * @return the OperationsOperationsImpl object. - */ - public OperationsOperationsImpl getOperationsOperations() { - return this.operationsOperations; - } - - /** - * Initializes an instance of ServiceBClient client. - * - * @param endpoint Service host. - * @param serviceVersion Service version. - */ - public ServiceBClientImpl(String endpoint, ServiceBServiceVersion serviceVersion) { - this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), - JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); - } - - /** - * Initializes an instance of ServiceBClient client. - * - * @param httpPipeline The HTTP pipeline to send requests through. - * @param endpoint Service host. - * @param serviceVersion Service version. - */ - public ServiceBClientImpl(HttpPipeline httpPipeline, String endpoint, ServiceBServiceVersion serviceVersion) { - this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); - } - - /** - * Initializes an instance of ServiceBClient client. - * - * @param httpPipeline The HTTP pipeline to send requests through. - * @param serializerAdapter The serializer to serialize an object into a string. - * @param endpoint Service host. - * @param serviceVersion Service version. - */ - public ServiceBClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint, - ServiceBServiceVersion serviceVersion) { - this.httpPipeline = httpPipeline; - this.serializerAdapter = serializerAdapter; - this.endpoint = endpoint; - this.serviceVersion = serviceVersion; - this.subNamespacesOperations = new SubNamespacesOperationsImpl(this); - this.operationsOperations = new OperationsOperationsImpl(this); - } -} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/SubNamespacesImpl.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/SubNamespacesImpl.java deleted file mode 100644 index 42d73c60417..00000000000 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/SubNamespacesImpl.java +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package service.multipleservices.servicea.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.exception.ClientAuthenticationException; -import com.azure.core.exception.HttpResponseException; -import com.azure.core.exception.ResourceModifiedException; -import com.azure.core.exception.ResourceNotFoundException; -import com.azure.core.http.rest.RequestOptions; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import reactor.core.publisher.Mono; -import service.multipleservices.servicea.ServiceAServiceVersion; - -/** - * An instance of this class provides access to all the operations defined in SubNamespaces. - */ -public final class SubNamespacesImpl { - /** - * The proxy service used to perform REST calls. - */ - private final SubNamespacesService service; - - /** - * The service client containing this operation class. - */ - private final ServiceAClientImpl client; - - /** - * Initializes an instance of SubNamespacesImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SubNamespacesImpl(ServiceAClientImpl client) { - this.service - = RestProxy.create(SubNamespacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * Gets Service version. - * - * @return the serviceVersion value. - */ - public ServiceAServiceVersion getServiceVersion() { - return client.getServiceVersion(); - } - - /** - * The interface defining all the services for ServiceAClientSubNamespaces to be used by the proxy service to - * perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "ServiceAClientSubNamespaces") - public interface SubNamespacesService { - @Get("/service/multiple-services/service-a/a-sub-test") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> subOpA(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, RequestOptions requestOptions, Context context); - - @Get("/service/multiple-services/service-a/a-sub-test") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Response subOpASync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - RequestOptions requestOptions, Context context); - } - - /** - * The subOpA operation. - * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> subOpAWithResponseAsync(RequestOptions requestOptions) { - return FluxUtil.withContext(context -> service.subOpA(this.client.getEndpoint(), - this.client.getServiceVersion().getVersion(), requestOptions, context)); - } - - /** - * The subOpA operation. - * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response subOpAWithResponse(RequestOptions requestOptions) { - return service.subOpASync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - requestOptions, Context.NONE); - } -} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/SubNamespacesOperationsImpl.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/SubNamespacesOperationsImpl.java deleted file mode 100644 index f2222dcc636..00000000000 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/SubNamespacesOperationsImpl.java +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package service.multipleservices.servicea.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.exception.ClientAuthenticationException; -import com.azure.core.exception.HttpResponseException; -import com.azure.core.exception.ResourceModifiedException; -import com.azure.core.exception.ResourceNotFoundException; -import com.azure.core.http.rest.RequestOptions; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import reactor.core.publisher.Mono; -import service.multipleservices.servicea.ServiceBServiceVersion; - -/** - * An instance of this class provides access to all the operations defined in SubNamespacesOperations. - */ -public final class SubNamespacesOperationsImpl { - /** - * The proxy service used to perform REST calls. - */ - private final SubNamespacesService service; - - /** - * The service client containing this operation class. - */ - private final ServiceBClientImpl client; - - /** - * Initializes an instance of SubNamespacesOperationsImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SubNamespacesOperationsImpl(ServiceBClientImpl client) { - this.service - = RestProxy.create(SubNamespacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * Gets Service version. - * - * @return the serviceVersion value. - */ - public ServiceBServiceVersion getServiceVersion() { - return client.getServiceVersion(); - } - - /** - * The interface defining all the services for ServiceBClientSubNamespacesOperations to be used by the proxy service - * to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "ServiceBClientSubNamespacesOperations") - public interface SubNamespacesService { - @Get("/service/multiple-services/service-b/b-sub-test") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> subOpB(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, RequestOptions requestOptions, Context context); - - @Get("/service/multiple-services/service-b/b-sub-test") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Response subOpBSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - RequestOptions requestOptions, Context context); - } - - /** - * The subOpB operation. - * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> subOpBWithResponseAsync(RequestOptions requestOptions) { - return FluxUtil.withContext(context -> service.subOpB(this.client.getEndpoint(), - this.client.getServiceVersion().getVersion(), requestOptions, context)); - } - - /** - * The subOpB operation. - * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response subOpBWithResponse(RequestOptions requestOptions) { - return service.subOpBSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - requestOptions, Context.NONE); - } -} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/package-info.java deleted file mode 100644 index a8d65d2b70a..00000000000 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/implementation/package-info.java +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -/** - * - * Package containing the implementations for ServiceA. - * First service definition in a multiple-services package with versioning. - * Without explicit `@client`, this should create a separate root client (`ServiceAClient`). - * - */ -package service.multipleservices.servicea.implementation; diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/package-info.java deleted file mode 100644 index 06b59cc674a..00000000000 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/servicea/package-info.java +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -/** - * - * Package containing the classes for ServiceA. - * First service definition in a multiple-services package with versioning. - * Without explicit `@client`, this should create a separate root client (`ServiceAClient`). - * - */ -package service.multipleservices.servicea; diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/OperationsAsyncClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/OperationsAsyncClient.java deleted file mode 100644 index 929ed406c1b..00000000000 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/OperationsAsyncClient.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package service.multipleservices.serviceb; - -import com.azure.core.annotation.Generated; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceClient; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.exception.ClientAuthenticationException; -import com.azure.core.exception.HttpResponseException; -import com.azure.core.exception.ResourceModifiedException; -import com.azure.core.exception.ResourceNotFoundException; -import com.azure.core.http.rest.RequestOptions; -import com.azure.core.http.rest.Response; -import com.azure.core.util.FluxUtil; -import reactor.core.publisher.Mono; -import service.multipleservices.servicea.implementation.OperationsOperationsImpl; - -/** - * Initializes a new instance of the asynchronous ServiceBClient type. - */ -@ServiceClient(builder = ServiceBClientBuilder.class, isAsync = true) -public final class OperationsAsyncClient { - @Generated - private final OperationsOperationsImpl serviceClient; - - /** - * Initializes an instance of OperationsAsyncClient class. - * - * @param serviceClient the service client implementation. - */ - @Generated - OperationsAsyncClient(OperationsOperationsImpl serviceClient) { - this.serviceClient = serviceClient; - } - - /** - * The opB operation. - * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> opBWithResponse(RequestOptions requestOptions) { - return this.serviceClient.opBWithResponseAsync(requestOptions); - } - - /** - * The opB operation. - * - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono opB() { - // Generated convenience method for opBWithResponse - RequestOptions requestOptions = new RequestOptions(); - return opBWithResponse(requestOptions).flatMap(FluxUtil::toMono); - } -} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/OperationsClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/OperationsClient.java deleted file mode 100644 index 4f4b27c6e4e..00000000000 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/OperationsClient.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package service.multipleservices.serviceb; - -import com.azure.core.annotation.Generated; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceClient; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.exception.ClientAuthenticationException; -import com.azure.core.exception.HttpResponseException; -import com.azure.core.exception.ResourceModifiedException; -import com.azure.core.exception.ResourceNotFoundException; -import com.azure.core.http.rest.RequestOptions; -import com.azure.core.http.rest.Response; -import service.multipleservices.servicea.implementation.OperationsOperationsImpl; - -/** - * Initializes a new instance of the synchronous ServiceBClient type. - */ -@ServiceClient(builder = ServiceBClientBuilder.class) -public final class OperationsClient { - @Generated - private final OperationsOperationsImpl serviceClient; - - /** - * Initializes an instance of OperationsClient class. - * - * @param serviceClient the service client implementation. - */ - @Generated - OperationsClient(OperationsOperationsImpl serviceClient) { - this.serviceClient = serviceClient; - } - - /** - * The opB operation. - * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response opBWithResponse(RequestOptions requestOptions) { - return this.serviceClient.opBWithResponse(requestOptions); - } - - /** - * The opB operation. - * - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public void opB() { - // Generated convenience method for opBWithResponse - RequestOptions requestOptions = new RequestOptions(); - opBWithResponse(requestOptions).getValue(); - } -} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/ServiceBClientBuilder.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/ServiceBClientBuilder.java deleted file mode 100644 index 72155075228..00000000000 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/ServiceBClientBuilder.java +++ /dev/null @@ -1,334 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package service.multipleservices.serviceb; - -import com.azure.core.annotation.Generated; -import com.azure.core.annotation.ServiceClientBuilder; -import com.azure.core.client.traits.ConfigurationTrait; -import com.azure.core.client.traits.EndpointTrait; -import com.azure.core.client.traits.HttpTrait; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.HttpPipelinePosition; -import com.azure.core.http.policy.AddDatePolicy; -import com.azure.core.http.policy.AddHeadersFromContextPolicy; -import com.azure.core.http.policy.AddHeadersPolicy; -import com.azure.core.http.policy.HttpLogOptions; -import com.azure.core.http.policy.HttpLoggingPolicy; -import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.core.http.policy.HttpPolicyProviders; -import com.azure.core.http.policy.RequestIdPolicy; -import com.azure.core.http.policy.RetryOptions; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.util.ClientOptions; -import com.azure.core.util.Configuration; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.builder.ClientBuilderUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.serializer.JacksonAdapter; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import service.multipleservices.servicea.ServiceBServiceVersion; -import service.multipleservices.servicea.implementation.ServiceBClientImpl; - -/** - * A builder for creating a new instance of the ServiceBClient type. - */ -@ServiceClientBuilder( - serviceClients = { - SubNamespaceClient.class, - OperationsClient.class, - SubNamespaceAsyncClient.class, - OperationsAsyncClient.class }) -public final class ServiceBClientBuilder implements HttpTrait, - ConfigurationTrait, EndpointTrait { - @Generated - private static final String SDK_NAME = "name"; - - @Generated - private static final String SDK_VERSION = "version"; - - @Generated - private static final Map PROPERTIES - = CoreUtils.getProperties("service-multipleservices-servicea.properties"); - - @Generated - private final List pipelinePolicies; - - /** - * Create an instance of the ServiceBClientBuilder. - */ - @Generated - public ServiceBClientBuilder() { - this.pipelinePolicies = new ArrayList<>(); - } - - /* - * The HTTP client used to send the request. - */ - @Generated - private HttpClient httpClient; - - /** - * {@inheritDoc}. - */ - @Generated - @Override - public ServiceBClientBuilder httpClient(HttpClient httpClient) { - this.httpClient = httpClient; - return this; - } - - /* - * The HTTP pipeline to send requests through. - */ - @Generated - private HttpPipeline pipeline; - - /** - * {@inheritDoc}. - */ - @Generated - @Override - public ServiceBClientBuilder pipeline(HttpPipeline pipeline) { - if (this.pipeline != null && pipeline == null) { - LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); - } - this.pipeline = pipeline; - return this; - } - - /* - * The logging configuration for HTTP requests and responses. - */ - @Generated - private HttpLogOptions httpLogOptions; - - /** - * {@inheritDoc}. - */ - @Generated - @Override - public ServiceBClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { - this.httpLogOptions = httpLogOptions; - return this; - } - - /* - * The client options such as application ID and custom headers to set on a request. - */ - @Generated - private ClientOptions clientOptions; - - /** - * {@inheritDoc}. - */ - @Generated - @Override - public ServiceBClientBuilder clientOptions(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - return this; - } - - /* - * The retry options to configure retry policy for failed requests. - */ - @Generated - private RetryOptions retryOptions; - - /** - * {@inheritDoc}. - */ - @Generated - @Override - public ServiceBClientBuilder retryOptions(RetryOptions retryOptions) { - this.retryOptions = retryOptions; - return this; - } - - /** - * {@inheritDoc}. - */ - @Generated - @Override - public ServiceBClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { - Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); - pipelinePolicies.add(customPolicy); - return this; - } - - /* - * The configuration store that is used during construction of the service client. - */ - @Generated - private Configuration configuration; - - /** - * {@inheritDoc}. - */ - @Generated - @Override - public ServiceBClientBuilder configuration(Configuration configuration) { - this.configuration = configuration; - return this; - } - - /* - * The service endpoint - */ - @Generated - private String endpoint; - - /** - * {@inheritDoc}. - */ - @Generated - @Override - public ServiceBClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /* - * Service version - */ - @Generated - private ServiceBServiceVersion serviceVersion; - - /** - * Sets Service version. - * - * @param serviceVersion the serviceVersion value. - * @return the ServiceBClientBuilder. - */ - @Generated - public ServiceBClientBuilder serviceVersion(ServiceBServiceVersion serviceVersion) { - this.serviceVersion = serviceVersion; - return this; - } - - /* - * The retry policy that will attempt to retry failed requests, if applicable. - */ - @Generated - private RetryPolicy retryPolicy; - - /** - * Sets The retry policy that will attempt to retry failed requests, if applicable. - * - * @param retryPolicy the retryPolicy value. - * @return the ServiceBClientBuilder. - */ - @Generated - public ServiceBClientBuilder retryPolicy(RetryPolicy retryPolicy) { - this.retryPolicy = retryPolicy; - return this; - } - - /** - * Builds an instance of ServiceBClientImpl with the provided parameters. - * - * @return an instance of ServiceBClientImpl. - */ - @Generated - private ServiceBClientImpl buildInnerClient() { - this.validateClient(); - HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); - String localEndpoint = (endpoint != null) ? endpoint : "http://localhost:3000"; - ServiceBServiceVersion localServiceVersion - = (serviceVersion != null) ? serviceVersion : ServiceBServiceVersion.getLatest(); - ServiceBClientImpl client = new ServiceBClientImpl(localPipeline, - JacksonAdapter.createDefaultSerializerAdapter(), localEndpoint, localServiceVersion); - return client; - } - - @Generated - private void validateClient() { - // This method is invoked from 'buildInnerClient'/'buildClient' method. - // Developer can customize this method, to validate that the necessary conditions are met for the new client. - } - - @Generated - private HttpPipeline createHttpPipeline() { - Configuration buildConfiguration - = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; - HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; - ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; - List policies = new ArrayList<>(); - String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); - String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); - String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); - policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); - policies.add(new RequestIdPolicy()); - policies.add(new AddHeadersFromContextPolicy()); - HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); - if (headers != null) { - policies.add(new AddHeadersPolicy(headers)); - } - this.pipelinePolicies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .forEach(p -> policies.add(p)); - HttpPolicyProviders.addBeforeRetryPolicies(policies); - policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); - policies.add(new AddDatePolicy()); - this.pipelinePolicies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .forEach(p -> policies.add(p)); - HttpPolicyProviders.addAfterRetryPolicies(policies); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); - HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) - .httpClient(httpClient) - .clientOptions(localClientOptions) - .build(); - return httpPipeline; - } - - /** - * Builds an instance of SubNamespaceAsyncClient class. - * - * @return an instance of SubNamespaceAsyncClient. - */ - @Generated - public SubNamespaceAsyncClient buildSubNamespaceAsyncClient() { - return new SubNamespaceAsyncClient(buildInnerClient().getSubNamespacesOperations()); - } - - /** - * Builds an instance of OperationsAsyncClient class. - * - * @return an instance of OperationsAsyncClient. - */ - @Generated - public OperationsAsyncClient buildOperationsAsyncClient() { - return new OperationsAsyncClient(buildInnerClient().getOperationsOperations()); - } - - /** - * Builds an instance of SubNamespaceClient class. - * - * @return an instance of SubNamespaceClient. - */ - @Generated - public SubNamespaceClient buildSubNamespaceClient() { - return new SubNamespaceClient(buildInnerClient().getSubNamespacesOperations()); - } - - /** - * Builds an instance of OperationsClient class. - * - * @return an instance of OperationsClient. - */ - @Generated - public OperationsClient buildOperationsClient() { - return new OperationsClient(buildInnerClient().getOperationsOperations()); - } - - private static final ClientLogger LOGGER = new ClientLogger(ServiceBClientBuilder.class); -} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/SubNamespaceAsyncClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/SubNamespaceAsyncClient.java deleted file mode 100644 index 778ff99be57..00000000000 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/SubNamespaceAsyncClient.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package service.multipleservices.serviceb; - -import com.azure.core.annotation.Generated; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceClient; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.exception.ClientAuthenticationException; -import com.azure.core.exception.HttpResponseException; -import com.azure.core.exception.ResourceModifiedException; -import com.azure.core.exception.ResourceNotFoundException; -import com.azure.core.http.rest.RequestOptions; -import com.azure.core.http.rest.Response; -import com.azure.core.util.FluxUtil; -import reactor.core.publisher.Mono; -import service.multipleservices.servicea.implementation.SubNamespacesOperationsImpl; - -/** - * Initializes a new instance of the asynchronous ServiceBClient type. - */ -@ServiceClient(builder = ServiceBClientBuilder.class, isAsync = true) -public final class SubNamespaceAsyncClient { - @Generated - private final SubNamespacesOperationsImpl serviceClient; - - /** - * Initializes an instance of SubNamespaceAsyncClient class. - * - * @param serviceClient the service client implementation. - */ - @Generated - SubNamespaceAsyncClient(SubNamespacesOperationsImpl serviceClient) { - this.serviceClient = serviceClient; - } - - /** - * The subOpB operation. - * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> subOpBWithResponse(RequestOptions requestOptions) { - return this.serviceClient.subOpBWithResponseAsync(requestOptions); - } - - /** - * The subOpB operation. - * - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono subOpB() { - // Generated convenience method for subOpBWithResponse - RequestOptions requestOptions = new RequestOptions(); - return subOpBWithResponse(requestOptions).flatMap(FluxUtil::toMono); - } -} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/SubNamespaceClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/SubNamespaceClient.java deleted file mode 100644 index e9619f15a3a..00000000000 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/SubNamespaceClient.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package service.multipleservices.serviceb; - -import com.azure.core.annotation.Generated; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceClient; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.exception.ClientAuthenticationException; -import com.azure.core.exception.HttpResponseException; -import com.azure.core.exception.ResourceModifiedException; -import com.azure.core.exception.ResourceNotFoundException; -import com.azure.core.http.rest.RequestOptions; -import com.azure.core.http.rest.Response; -import service.multipleservices.servicea.implementation.SubNamespacesOperationsImpl; - -/** - * Initializes a new instance of the synchronous ServiceBClient type. - */ -@ServiceClient(builder = ServiceBClientBuilder.class) -public final class SubNamespaceClient { - @Generated - private final SubNamespacesOperationsImpl serviceClient; - - /** - * Initializes an instance of SubNamespaceClient class. - * - * @param serviceClient the service client implementation. - */ - @Generated - SubNamespaceClient(SubNamespacesOperationsImpl serviceClient) { - this.serviceClient = serviceClient; - } - - /** - * The subOpB operation. - * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response subOpBWithResponse(RequestOptions requestOptions) { - return this.serviceClient.subOpBWithResponse(requestOptions); - } - - /** - * The subOpB operation. - * - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public void subOpB() { - // Generated convenience method for subOpBWithResponse - RequestOptions requestOptions = new RequestOptions(); - subOpBWithResponse(requestOptions).getValue(); - } -} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/package-info.java deleted file mode 100644 index 108534c89ad..00000000000 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/service/multipleservices/serviceb/package-info.java +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -/** - * - * Package containing the classes for ServiceBClient. - * First service definition in a multiple-services package with versioning. - * Without explicit `@client`, this should create a separate root client (`ServiceAClient`). - * - */ -package service.multipleservices.serviceb; diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/service-multipleservices-servicea_metadata.json b/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/service-multipleservices-servicea_metadata.json deleted file mode 100644 index ea6d596f1f4..00000000000 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/service-multipleservices-servicea_metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"flavor":"Azure","apiVersions":{"Service.MultipleServices.ServiceA":"av2","Service.MultipleServices.ServiceB":"bv2"},"crossLanguageDefinitions":{"service.multipleservices.servicea.OperationsAsyncClient":"Service.MultipleServices.ServiceA.Operations","service.multipleservices.servicea.OperationsAsyncClient.opA":"Service.MultipleServices.ServiceA.Operations.opA","service.multipleservices.servicea.OperationsAsyncClient.opAWithResponse":"Service.MultipleServices.ServiceA.Operations.opA","service.multipleservices.servicea.OperationsClient":"Service.MultipleServices.ServiceA.Operations","service.multipleservices.servicea.OperationsClient.opA":"Service.MultipleServices.ServiceA.Operations.opA","service.multipleservices.servicea.OperationsClient.opAWithResponse":"Service.MultipleServices.ServiceA.Operations.opA","service.multipleservices.servicea.ServiceAClientBuilder":"Service.MultipleServices.ServiceA","service.multipleservices.servicea.SubNamespaceAsyncClient":"Service.MultipleServices.ServiceA.SubNamespace","service.multipleservices.servicea.SubNamespaceAsyncClient.subOpA":"Service.MultipleServices.ServiceA.SubNamespace.subOpA","service.multipleservices.servicea.SubNamespaceAsyncClient.subOpAWithResponse":"Service.MultipleServices.ServiceA.SubNamespace.subOpA","service.multipleservices.servicea.SubNamespaceClient":"Service.MultipleServices.ServiceA.SubNamespace","service.multipleservices.servicea.SubNamespaceClient.subOpA":"Service.MultipleServices.ServiceA.SubNamespace.subOpA","service.multipleservices.servicea.SubNamespaceClient.subOpAWithResponse":"Service.MultipleServices.ServiceA.SubNamespace.subOpA","service.multipleservices.serviceb.OperationsAsyncClient":"Service.MultipleServices.ServiceB.Operations","service.multipleservices.serviceb.OperationsAsyncClient.opB":"Service.MultipleServices.ServiceB.Operations.opB","service.multipleservices.serviceb.OperationsAsyncClient.opBWithResponse":"Service.MultipleServices.ServiceB.Operations.opB","service.multipleservices.serviceb.OperationsClient":"Service.MultipleServices.ServiceB.Operations","service.multipleservices.serviceb.OperationsClient.opB":"Service.MultipleServices.ServiceB.Operations.opB","service.multipleservices.serviceb.OperationsClient.opBWithResponse":"Service.MultipleServices.ServiceB.Operations.opB","service.multipleservices.serviceb.ServiceBClientBuilder":"Service.MultipleServices.ServiceB","service.multipleservices.serviceb.SubNamespaceAsyncClient":"Service.MultipleServices.ServiceB.SubNamespace","service.multipleservices.serviceb.SubNamespaceAsyncClient.subOpB":"Service.MultipleServices.ServiceB.SubNamespace.subOpB","service.multipleservices.serviceb.SubNamespaceAsyncClient.subOpBWithResponse":"Service.MultipleServices.ServiceB.SubNamespace.subOpB","service.multipleservices.serviceb.SubNamespaceClient":"Service.MultipleServices.ServiceB.SubNamespace","service.multipleservices.serviceb.SubNamespaceClient.subOpB":"Service.MultipleServices.ServiceB.SubNamespace.subOpB","service.multipleservices.serviceb.SubNamespaceClient.subOpBWithResponse":"Service.MultipleServices.ServiceB.SubNamespace.subOpB"},"generatedFiles":["src/main/java/module-info.java","src/main/java/service/multipleservices/servicea/OperationsAsyncClient.java","src/main/java/service/multipleservices/servicea/OperationsClient.java","src/main/java/service/multipleservices/servicea/ServiceAClientBuilder.java","src/main/java/service/multipleservices/servicea/ServiceAServiceVersion.java","src/main/java/service/multipleservices/servicea/ServiceBServiceVersion.java","src/main/java/service/multipleservices/servicea/SubNamespaceAsyncClient.java","src/main/java/service/multipleservices/servicea/SubNamespaceClient.java","src/main/java/service/multipleservices/servicea/implementation/OperationsImpl.java","src/main/java/service/multipleservices/servicea/implementation/OperationsOperationsImpl.java","src/main/java/service/multipleservices/servicea/implementation/ServiceAClientImpl.java","src/main/java/service/multipleservices/servicea/implementation/ServiceBClientImpl.java","src/main/java/service/multipleservices/servicea/implementation/SubNamespacesImpl.java","src/main/java/service/multipleservices/servicea/implementation/SubNamespacesOperationsImpl.java","src/main/java/service/multipleservices/servicea/implementation/package-info.java","src/main/java/service/multipleservices/servicea/package-info.java","src/main/java/service/multipleservices/serviceb/OperationsAsyncClient.java","src/main/java/service/multipleservices/serviceb/OperationsClient.java","src/main/java/service/multipleservices/serviceb/ServiceBClientBuilder.java","src/main/java/service/multipleservices/serviceb/SubNamespaceAsyncClient.java","src/main/java/service/multipleservices/serviceb/SubNamespaceClient.java","src/main/java/service/multipleservices/serviceb/package-info.java"]} \ No newline at end of file diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/resources/service-multipleservices-servicea.properties b/packages/http-client-java/generator/http-client-generator-test/src/main/resources/service-multipleservices-servicea.properties deleted file mode 100644 index ca812989b4f..00000000000 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/resources/service-multipleservices-servicea.properties +++ /dev/null @@ -1,2 +0,0 @@ -name=${project.artifactId} -version=${project.version} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/test/java/service/multipleservices/servicea/generated/ServiceAClientTestBase.java b/packages/http-client-java/generator/http-client-generator-test/src/test/java/service/multipleservices/servicea/generated/ServiceAClientTestBase.java deleted file mode 100644 index 4730f09ee87..00000000000 --- a/packages/http-client-java/generator/http-client-generator-test/src/test/java/service/multipleservices/servicea/generated/ServiceAClientTestBase.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package service.multipleservices.servicea.generated; - -// The Java test files under 'generated' package are generated for your reference. -// If you wish to modify these files, please copy them out of the 'generated' package, and modify there. -// See https://aka.ms/azsdk/dpg/java/tests for guide on adding a test. - -import com.azure.core.http.policy.HttpLogDetailLevel; -import com.azure.core.http.policy.HttpLogOptions; -import com.azure.core.test.TestMode; -import com.azure.core.test.TestProxyTestBase; -import com.azure.core.util.Configuration; -import service.multipleservices.servicea.OperationsClient; -import service.multipleservices.servicea.ServiceAClientBuilder; -import service.multipleservices.servicea.SubNamespaceClient; -import service.multipleservices.serviceb.OperationsClient; -import service.multipleservices.serviceb.ServiceBClientBuilder; -import service.multipleservices.serviceb.SubNamespaceClient; - -class ServiceAClientTestBase extends TestProxyTestBase { - protected SubNamespaceClient subNamespaceClient; - - protected OperationsClient operationsClient; - - protected SubNamespaceClient subNamespaceClient; - - protected OperationsClient operationsClient; - - @Override - protected void beforeTest() { - ServiceAClientBuilder subNamespaceClientbuilder = new ServiceAClientBuilder() - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "http://localhost:3000")) - .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) - .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); - if (getTestMode() == TestMode.RECORD) { - subNamespaceClientbuilder.addPolicy(interceptorManager.getRecordPolicy()); - } - subNamespaceClient = subNamespaceClientbuilder.buildSubNamespaceClient(); - - ServiceAClientBuilder operationsClientbuilder = new ServiceAClientBuilder() - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "http://localhost:3000")) - .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) - .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); - if (getTestMode() == TestMode.RECORD) { - operationsClientbuilder.addPolicy(interceptorManager.getRecordPolicy()); - } - operationsClient = operationsClientbuilder.buildOperationsClient(); - - ServiceBClientBuilder subNamespaceClientbuilder = new ServiceBClientBuilder() - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "http://localhost:3000")) - .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) - .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); - if (getTestMode() == TestMode.RECORD) { - subNamespaceClientbuilder.addPolicy(interceptorManager.getRecordPolicy()); - } - subNamespaceClient = subNamespaceClientbuilder.buildSubNamespaceClient(); - - ServiceBClientBuilder operationsClientbuilder = new ServiceBClientBuilder() - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "http://localhost:3000")) - .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) - .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); - if (getTestMode() == TestMode.RECORD) { - operationsClientbuilder.addPolicy(interceptorManager.getRecordPolicy()); - } - operationsClient = operationsClientbuilder.buildOperationsClient(); - - } -}